help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: variable modifier within a for loop - How?


From: Shawn Honess
Subject: Re: variable modifier within a for loop - How?
Date: Fri, 28 Jan 2005 09:53:25 -0800

At 09:26 PM 1/27/2005, Paul D. Smith wrote:
You can't use make functions to operate on shell variables, of course!

Thanks mate!  I knew that, but after fighting with it for so long, I'd
gotten myself confused.

You have to use shell operations with shell variables; try something
like this:

     SRC = ./one/foo.c ./two/bar.c
     target:
        for file in $(SRC) ; do \
          $(HACK) < $$file > ./log/`basename $$file`.log; \
        done

Excellent!  That's what I'm doing now.

I had tried this, but lost the semicolon just before the "done"
and in my confusion didn't figure it out.  Only when you told me
how, you got me to look at it again.  Thank you very much!

Thanks!
Cheers!

--
address@hidden     address@hidden
858.523.3529: SNPS office     858.651.7564: QCOM office: BB.102I
<http://www.synopsys.com/va>  <http://solvnet.synopsys.com>
<address@hidden>   <address@hidden>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]