[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Automatic prerequisite generation
From: |
Heiko Gerdau |
Subject: |
RE: Automatic prerequisite generation |
Date: |
Mon, 27 Jan 2003 16:08:13 +0100 |
> -----Original Message-----
> From: Paul D. Smith [mailto:address@hidden On
> Behalf Of Paul D. Smith
> Sent: Sunday, January 26, 2003 6:50 PM
> To: Heiko Gerdau
> Cc: address@hidden
> Subject: RE: Automatic prerequisite generation
>
>
> %% "Heiko Gerdau" <address@hidden> writes:
>
> hg> Here is one, maybe someone can help. The following Makefile does
> hg> not work in a windows shell. Make trys to interpret the for loop
> hg> and fails. But I think make should just pass anything
> is does not
> hg> know to the shell. Is it a bug or do I miss something?
>
> hg> cleanall:
> hg> @for %d in (dir1 dir2) do $(MAKE) -k -r clean
> srcdir="%d"
>
> I don't know what the problem is, but make is _NOT_ trying to
> interpret
> the for loop.
>
> You will have to provide an error message or something before we can
> help further.
Thanks for your answer. Motivated by your hint I played around with the
for loop again and yes, you are right, its not the for loop on which
make fails, it's the substitution of the parameter %d. While playing
around I figured out that the following works:
@for %%d in (dir1 dir2) do $(MAKE) -k -r clean srcdir="%%d"
But this double (%%) is designed only for batch-files. The above command
does not work when typed in directly in a command shell. Is there a
particular reason why make uses the batchfile mode of shell commands?
Greetings
Heiko
Re: Automatic prerequisite generation, Michael Mounteney, 2003/01/26
Apologies for repeat post [was:Re: Automatic prerequisite generation], Mike Capp, 2003/01/29