HOME = /u/usystem/software/concc

Cruft = -name *,v -o -name '*.[ao]' -o -name a.out -o -name *.ps -o -name core -o -name 'test.*' -o -name '*.old.*' -o -name '.*~' -o -name '*~' -o -name '\#*'

DocCruft = -name '*.aux' -o -name '*.dvi' -o -name '*.ps' -o -name '*.idx' -o -name '*.ilg' -o -name '*.ind' -o -name '*.log' -o -name '*.toc' -o -name '*.blg' -o -name '*.man' -o -name '*.home'

uSystem.tar : Makefile
[
	cd ${HOME}
	tar -chf uSystem.tar `find examples \( -type f -o -type l \) -a \( \( ${Cruft} \) -o -print \)`
	tar -uhf uSystem.tar `find README -name README -print`
	tar -uhf uSystem.tar `find INSTALL -name INSTALL -print`
	tar -uhf uSystem.tar `find RDIST -name RDIST -print`
	tar -uhf uSystem.tar `find CONFIGURE -name CONFIGURE -print`
#	tar -uhf uSystem.tar `find dmake \( -type f -o -type l \) -a \( \( ${Cruft} -o -name dmake \) -o -print \)`
	tar -uhf uSystem.tar `find gnu \( -type f -o -type l \) -a \( \( ${Cruft} -o -name as -o -name ld -o -name cc1 -o -name mcrt0.o \) -o -print \)`
	tar -uhf uSystem.tar `find inc \( -type f -o -type l \) -a \( \( ${Cruft} \) -o -print \)`
	tar -uhf uSystem.tar `find src \( -type f -o -type l \) -a \( \( ${Cruft} \) -o -print \)`
	tar -uhf uSystem.tar `find TeX \( -type f -o -type l \) -a \( \( ${Cruft} \) -o -print \)`
	tar -uhf uSystem.tar `find kernel/doc \( -type f -o -type l \) -a \( \( ${Cruft} -o ${DocCruft} \) -o -print \)`
	tar -uhf uSystem.tar `find kernel/work \( -type f -o -type l \) -a \( \( ${Cruft} -o -name uMachine.\[ih\] -o -name uCalibrate.r \) -o -print \)`
	tar -uhf uSystem.tar `find monitor/doc \( -type f -o -type l \) -a \( \( ${Cruft} -o ${DocCruft} \) -o -print \)`
	tar -uhf uSystem.tar `find monitor/work \( -type f -o -type l \) -a \( \( ${Cruft} -o -name y.tab.c -o -name cpp -o -name mon-cpp \) -o -print \)`
	tar -uhf uSystem.tar `find library/doc \( -type f -o -type l \) -a \( \( ${Cruft} -o ${DocCruft} -o -name \*SGI\*.\* \) -o -print \)`
	tar -uhf uSystem.tar `find library/work \( -type f -o -type l \) -a \( \( ${Cruft} -o ${DocCruft} -o -name \*SGI\*.\* \) -o -print \)`
	pwd
	mv uSystem.tar ${HOME}/dist/
]

uSystem.tar.Z : uSystem.tar
[
	compress uSystem.tar
]

# Execute the following command to move the tar file
# to the public ftp location.

# cp uSystem.tar.Z /nfs/watmsg/u/ftp/pub/uSystem/uSystem.tar.Z

# Execute the following commands to recreate the uSystem.

# zcat uSystem.tar.Z | tar -xf -
