Commits

Jeff Squyres committed 1caf79e

Remove useless script

Comments (0)

Files changed (1)

ompi/include/strip-bind.pl

-#!/usr/bin/env perl
-#
-# Copyright (c) 2011 Cisco Systems, Inc.  All rights reserved.
-# $COPYRIGHT$
-# 
-# Additional copyrights may follow
-# 
-# $HEADER$
-#
-
-# This file generates the use-mpi-f08 Fortran interfaces if the
-# Fortran wrappers are used.  It strips the BIND(C) information off
-# from the interface declaration so that the compiler won't link to
-# the C implementations in ompi/mpi/fortran/mpif-h/ for compilers that
-# do not support BIND(C) the way that we need it.
-#
-# It creates the file:
-#
-#   ompi/mpi/fortran/use-mpi-f08/interfaces/mpi-f08-interfaces-nobind.h
-
-use strict;
-
-# Find the OMPI topdir.  It is likely the pwd.
-my $topdir;
-if (-r "ompi/include/mpi.h.in") {
-    $topdir = ".";
-} elsif (-r "include/mpi.h.in") {
-    $topdir = "..";
-} elsif (-r "mpi.h.in") {
-    $topdir = "../..";
-} else {
-    print "Please run this script from the Open MPI topdir or topdir/include/mpi\n";
-    print "Aborting.\n";
-    exit(1);
-}
-
-#----------------------------------------------------------------------------
-
-my $filename_in  = "$topdir/ompi/mpi/fortran/use-mpi-f08/interfaces/mpi-f08-interfaces-bind.h";
-my $filename_out = "$topdir/ompi/mpi/fortran/use-mpi-f08/interfaces/mpi-f08-interfaces-nobind.h";
-
-# Read in the input file
-open(FILE_IN,  "$filename_in")  || die "Couldn't open file $filename_in";
-my $input;
-$input .= $_
-    while (<FILE_IN>);
-close(FILE_IN);
-
-# Strip out the BIND(C)'s.  Do NOT strip out the BIND(C)s on the
-# MPI_WTICK and MPI_WTIME functions; these functions have no choice
-# variables and we always want them to have BIND(C).  As such, their
-# BIND(C) clauses are on the same line as the declaration, which means
-# that the regexp below will (intentionally) miss them.
-$input =~ s/ \&\n\s*BIND\(C.*\n/\n/mg;
-
-# Only write the output file a) if doesn't already exist, or b) it
-# exists, but its contents are different than $output.
-
-my $need_write = 0;
-if (! -f $filename_out) {
-    $need_write = 1;
-} else {
-    open(FILE_IN, $filename_out) || die "Couldn't open $filename_out";
-    my $tmp;
-    $tmp .= $_
-        while (<FILE_IN>);
-    close(FILE_IN);
-    if ($input ne $tmp) {
-        $need_write = 1;
-    }
-}
-
-if ($need_write) {
-    open(FILE_OUT, ">$filename_out") || die "Couldn't open $filename_out";
-    print FILE_OUT $input;
-    close(FILE_OUT);
-    print "created $filename_out\n";
-} else {
-    print "$filename_out unchanged; not written\n";
-}
-
-# Done
-exit(0);