Sara has asked for the wisdom of the Perl Monks concerning the following question:
LS = /bin/ls MV = /bin/mv TR = /bin/tr AWK = /opt/corp/sir/nbss/tools/utils/gawk NOIMGEN = ../../../nbsstools/noisgen/bin/noimgen NOIPGEN = ../../../nbsstools/noisgen/bin/noipgen OBJDIR = $(NOIVERDIR)/obj compile: setup: @if [ ! -d $(OBJDIR) ]; then mkdir $(OBJDIR); fi genfiles: setup @cd ../src; for PDL in `$(LS) *.pdl | $(TR) '.' ' ' | $(AWK) '{pri +nt $$1}'`; do \ if [ ! -f $${PDL}.cxx -o $${PDL}.pdl -nt $${PDL}.cxx ]; then +\ echo Generating $${PDL}... ; \ $(NOIPGEN) $${PDL}.pdl >> $(OBJDIR)/noipgen.err 2>&1; \ fi \ done @if [ -f $(OBJDIR)/noipgen.err ]; then $(MV) $(OBJDIR)/noipgen.err + $(OBJDIR)/noipgen.debug; fi @cd ../src; for MDL in `$(LS) *.mdl | $(TR) '.' ' ' | $(AWK) '{pri +nt $$1}'`; do \ if [ ! -f $${MDL}.cxx -o $${MDL}.mdl -nt $${MDL}.cxx ]; then +\ echo Generating $${MDL}... ; \ $(NOIMGEN) $${MDL}.mdl >> $(OBJDIR)/noimgen.err 2>&1; \ fi \ done @if [ -f $(OBJDIR)/noimgen.err ]; then $(MV) $(OBJDIR)/noimgen.err + $(OBJDIR)/noimgen.debug; fi clean: @if [ -d $(OBJDIR) ]; then $(RM) $(OBJDIR)/*; fi
edited: Wed Aug 14 19:40:42 2002 by jeffa - title change (was: shell to Perl)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: shell to perl
by derby (Abbot) on Aug 14, 2002 at 15:11 UTC | |
by ichimunki (Priest) on Aug 14, 2002 at 15:56 UTC | |
by merlyn (Sage) on Aug 14, 2002 at 18:04 UTC | |
|