corrected version of 'compile' script
Posted in 1995
In case anyone liked the idea of my revised (multi-name) 'compile' script but can't get it to work: I found a couple of $1 that did not get changed to $f in the posted version. Here is a corrected version that is working for me: ----- Begin compile script ----- !/bin/csh -f echo '' foreach f ( $* ) # Remove pre-existing object file. rm -f ../object/$f.o # Start cross-ref file. echo '' >$f.x echo module $f : >>$f.x echo '' >>$f.x # Tell user compile is starting. echo \\#c4gl $f.4gl #c4gl $f.4gl >& temp.x c4gl $f.4gl >& temp.x # Alert user of errors. egrep -e '[^_]error|warning' temp.x # Finish making cross-ref file. egrep -v -e '_main|warning|Undefined' temp.x | sort >>$f.x # Kill temp files. rm -f temp.x rm -f $f.c $f.ec a.out # Move files to appropriate related directories. mv $f.x ../xref/$f.x mv $f.o ../object/$f.o # Tell user compile is done; ls $f.err file, if any. echo \\#ls $f\\* ls -l $f* echo '' end ----- End compile script ----- +---------------------------+-----------------------------------------------+ | R. Alan Popiel | Internet: alan@den.mmc.com | | Martin Marietta, SLS | Voice: 303-977-9998 | | P.O. Box 179, M/S 3810 | Standard disclaimers apply. Cutesy ones, too. | | Denver, CO 80201-0179 USA | Your mileage may vary. Void where prohibited. | +---------------------------+-----------------------------------------------+