hello guys , can you give me a hint to r-write this shell script to perl , I am having hard time only on the for loop part :
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)


In reply to Convert makefile to Perl by Sara

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.