#!/bin/csh

# ZZMAKE -- Used to build these distribution files (NOT FOR DISTRIBUTION).
# The system should be configured generic before making any of these.
# The system should be linked -T to reduce the size of the symbol tables.
#
# To execute:	zzmake >& spool &
# Then:		prepdir ??.*.Z in this directory.

setenv iraf /iraf/iraf.export/iraf/
source $iraf/unix/hlib/irafuser.csh
echo iraf=$iraf hlib=$hlib

(cd $iraf; mkpkg generic; cd $iraf/noao; mkpkg generic)
(cd $hlib; mv extern.pkg extern.pkg.NOAO; mv extern.pkg.DEF extern.pkg)
rm -f $iraf/bin.*/S6.e.[123]
rm -f $iraf/local/.rhosts $iraf/local/.irafhosts

# The extern.pkg file needs to be replaced before making the following.
(cd $iraf; tar -cf - .) |\
    compress > as.sos4.gen.Z
(cd $iraf; tar -cf - HS.SOS4.GEN dev local unix) |\
    compress > hs.sos4.gen.Z

# Make sure any old shared image files are deleted before making these.
(cd $iraf/bin.sparc; tar -cf - .) |\
    compress > ib.sos4.spc.Z
(cd $iraf/noao/bin.sparc; tar -cf - .) |\
    compress > nb.sos4.spc.Z
#(cd $iraf/bin.f68881; tar -cf - .) |\
#    compress > ib.sos4.f68.Z
#(cd $iraf/noao/bin.f68881; tar -cf - .) |\
#    compress > nb.sos4.f68.Z
#(cd $iraf/bin.ffpa; tar -cf - .) |\
#    compress > ib.sos4.fpa.Z
#(cd $iraf/noao/bin.ffpa; tar -cf - .) |\
#    compress > nb.sos4.fpa.Z

(cd $hlib; mv extern.pkg extern.pkg.DEF; mv extern.pkg.NOAO extern.pkg)
