#! /bin/csh -f # $COPYRIGHT$ # # Script for creating a LAM/MPI distribution # # Requires the "sowing" package from ftp://ftp.mcs.anl.gov/ to make # the man pages. # set distdir="$1" set srcdir="`pwd`" set LAM_VERSION="`sh config/get_lam_version $srcdir --full`" set LAM_MAJOR_VERSION="`sh config/get_lam_version $srcdir --major`" set LAM_MINOR_VERSION="`sh config/get_lam_version $srcdir --minor`" set LAM_RELEASE_VERSION="`sh config/get_lam_version $srcdir --release`" set LAM_ALPHA_VERSION="`sh config/get_lam_version $srcdir --alpha`" set LAM_BETA_VERSION="`sh config/get_lam_version $srcdir --beta`" # # Temporary: while 6.3 and 6.4 are different # set WANT_IMPI="" if ("`echo $LAM_VERSION | grep 6.4`" != "") then echo "*** Enabling IMPI in this tarball" set WANT_IMPI="yes" endif if ("$distdir" == "") then echo "Must supply distdir as argv[1] -- aborting" exit 1 endif set start=`date` cat < `pwd`/$dir)..." # (cd $dir; tar cf - -C $p/$dir . | tar xf -) # find $dir -type d -exec chmod 755 {} \; # find $dir -type f -exec chmod 644 {} \; #end # # Ditch any CVS trees that we just copied over # #set romiocvs="`find romio -type d -name CVS`" #rm -rf $romiocvs #set mpi2cppcvs="`find mpi2c++ -type d -name CVS`" #rm -rf $mpi2cppcvs #set lamtestscvs="`find lamtests -type d -name CVS`" #rm -rf $lamtestscvs # # Make clean in romio, mpi2c++, and lamtests # #echo "*** Cleaing the ROMIO directory..." #if (-f romio/Makefile) then # (cd romio; make cleanall) #endif #echo "*** Cleaing the MPI-2 C++ directory..." #if (-f mpi2c++/Makefile) then # (cd mpi2c++; make distclean) #endif #echo "*** Cleaning the lamtests directory..." #if (-f lamtests/Makefile) then # (cd lamtests; make clean) #endif #rm -f romio/.lam_built mpi2c++/.lam_built # # Are we making a 6.3 or 6.4 tarball? # If 6.4, we need to reset the patch file to have the LAM_VERSION be # whatever the LAM_IMPI_VERSION is now. # Must change this in both share/include/patchlevel.h and share/include/mpif.h. # # This needs to be redone for the new top-level VERSION file. #chmod +w $VERSIONFILE #chmod +w $VERSIONFILE2 #if ("$WANT_IMPI" != "") then # echo "*** Changing version to 6.4..." # set edname=/tmp/ed.script.$$ # rm -f $edname # cat > $edname < $edname < /tmp/lam-version.$$ # $#%^#@%@#%@# automake makes hard links to the orignial file, # so don't just mv the results back on top of the original (or # you'll dis the version in the real tree, too). So rm this # file first, and then move the result in. # rm -f $VERSIONFILE # mv /tmp/lam-version.$$ $VERSIONFILE # grep -v LAM_IMPI_ $VERSIONFILE2 > /tmp/lam-version.$$ # rm -f $VERSIONFILE2 # mv /tmp/lam-version.$$ $VERSIONFILE2 #endif # # Remove some kruft that we don't want in the distribution tarball. # Misc, Config, and contrib/autoconf are now outdated, but cvs does # not remove directories # # echo "*** Removing kruft..." rm -f TO-DO rm -f WISHLIST rm -f config/distscript.csh rm -f config/doctext.* rm -f config/lamrpmrc rm -f config/signrpm.sh rm -f config/buildrpm.sh rm -f config/buildrpm.sh rm -f config/lam-generic.spec rm -rf config/CVS #touch romio/lib/foo #rm -rf romio/lib/* romio/.libs #find romio -name \*.lo -exec rm -f {} \; # Romio leaves a dead link lying around; creates an error when we try # to tar everything up #rm -f romio/test/mpiof.h # # Have to remove these, because we want them to be sym links to the # share/mpi and share/mpi/f77 directories (the makefile will recreate # the sym links). automake's make dist automatically copies these # files rather than noticing that they are sym links. # rm -rf share/pmpi/*.c rm -rf share/pmpi/f77/*.c # Because we need lam_config.h installed to $prefix/include, it's # listed in include_HEADERS. However, this makes # share/include/lam_config.h get included in the distribution tarball. # This is no good because on some architectures, a VPATH build will # use this lam_config.h rather than the one that is generated from # configure. So we have to manually remove it from the distribution # tarball. Uck! rm -f share/include/lam_config.h # # Put in those headers # echo "*** Inserting license headers..." set filelist=/tmp/lam-license-filelist.$$ rm -f $filelist cat > $filelist <> $filelist find etc -type f -print >> $filelist find examples -type f -print >> $filelist find lamtests -type f -print >> $filelist find man -type f -print >> $filelist find otb -type f -print >> $filelist find share -type f -print >> $filelist find tools -type f -print >> $filelist chmod +x ./config/insertlic.csh ./config/insertlic.csh $filelist rm -rf $filelist rm -f config/insertlic.* rm -f config/license.hdr # # Put in date/version number in man pages # echo "*** Updating version date/number in man pages" rm -f manfiles find man -type f | grep -v Makefile > manfiles set date="`date '+%B, %Y'`" cp $p/config/doctext.nroff.def . foreach file (`cat manfiles` doctext.nroff.def) sed -e "s/-RELEASEDATE-/$date/g" $file > foo sed -e "s/-RELEASEVERSION-/$ver/g" foo > bar rm -f $file # Needed 'cause automake makes hard links, not copies mv bar $file rm -f foo end rm manfiles # # Make all the man pages -- doctext needs to be in your path # Makes man pages for share/mpi/*.c and romio/mpi-io/*.c # echo "*** Running doctext..." cd share/mpi set doctext_args="-ext 3 -I $p/config/doctext.pubinc -defn ../../doctext.nroff.def -heading LAM/MPI -quotefmt $p/config/doctext.errnotes $p/config/doctext.fortnotes" doctext -mpath ../../man/man3 $doctext_args *.c if ("$status" != "0") then echo "ERROR: Not able to run doctext properly!" echo "Aborting, 'cause you really don't want to make a tarball without man pages..." exit 1 endif cd ../../romio/mpi-io doctext -mpath ../../man/man3 $doctext_args *.c if ("$status" != "0") then echo "ERROR: Not able to run doctext properly!" echo "Aborting, 'cause you really don't want to make a tarball without man pages..." exit 1 endif rm -f ../../doctext.nroff.def # # Now we need to list all these generated man pages in the Makefile.am # and Makefile.in in man/man3. Ick! # echo "*** Frobbing Makefile.am and Makefile.in..." cd ../../man/man3 set files="`ls MPI_*3 MPIO_*3 XMPI_*3`" # This is unfortunately necessary because $files is too long to do a # single sed search/replace. Ugh. echo "*** Adding man files to Makefile.in..." foreach file ($files) set name_prefix="`echo $file | cut -c1-4`" if ("$name_prefix" == "MPI_") then set letter="`echo $file | cut -c5`" set div="`expr $letter \> F`" set line="generated_man_$div" else set line="generated_man_other" endif echo " - $file / $line" foreach fix (Makefile.am Makefile.in) sed -e "s/$line =/$line =$file /" $fix > $fix.new chmod +w $fix mv -f $fix.new $fix chmod -w $fix end end cd ../.. # # Put the release version number in the README, INSTALL, HISTORY, and # RELEASE_NOTES files # echo "*** Updating version number in README, INSTALL, HISTORY, and RELEASE_NOTES..." foreach file (README README-6.4 INSTALL INSTALL-6.4 HISTORY HISTORY-6.4 RELEASE_NOTES RELEASE_NOTES-6.4) echo " - Setting $file" if (-f $file) then sed -e "s/LAMRV/$ver/g" $file > bar mv -f bar $file endif end # # Set social Unix perms # echo "*** Setting social Unix permissions..." chmod +x romio/configure romio/util/tarch \ mpi2c++/configure mpi2c++/config.sub mpi2c++/config.guess \ mpi2c++/install-sh mpi2c++/missing mpi2c++/mkinstalldirs \ config/config.guess config/config.sub \ config/install-sh config/ltconfig config/ltmain.sh \ config/missing config/mkinstalldirs # # Make the lamtests tarball # echo "*** Making lamtests-$ver.tar tarballs..." cp LICENSE lamtests mv lamtests lamtests-$ver tar cvf lamtests-$ver.tar lamtests-$ver cp lamtests-$ver.tar lamtests-temp-$ver.tar gzip lamtests-$ver.tar cp lamtests-temp-$ver.tar lamtests-$ver.tar compress lamtests-$ver.tar mv lamtests-temp-$ver.tar lamtests-$ver.tar bzip2 lamtests-$ver.tar echo "*** Moving lamtests-$ver.tar tarballs..." mv lamtests-$ver.tar.gz lamtests-$ver.tar.Z lamtests-$ver.tar.bz2 $p echo " - lamtests-$ver.tar.Z" echo " - lamtests-$ver.tar.gz" echo " - lamtests-$ver.tar.bz2" rm -rf lamtests-$ver # # Myrinet and VIA are Not Ready for Prime Time # echo "*** Removing Myrinet and VIA RPI code..." rm -rf share/rpi/via/* rm -rf share/rpi/myri/* mkdir -p share/rpi/via chmod 755 share/rpi/via mkdir -p share/rpi/myri chmod 755 share/rpi/myri set f=share/rpi/via/README cat > $f <