Re: make .if exists problem/question

2005-09-05 Thread Harti Brandt
On Thu, 25 Aug 2005, Emanuel Strobl wrote: ESAm Donnerstag, 25. August 2005 20:10 CEST schrieb David Kirchner: ES On 8/25/05, Emanuel Strobl [EMAIL PROTECTED] wrote: ES Dear make gurus (bsd make, not gmake), ES ES it seems that make checks .if directives only at statrup. How can I ES trigger

Re: make .if exists problem/question

2005-09-05 Thread Emanuel Strobl
Am Montag, 5. September 2005 18:03 CEST schrieb Harti Brandt: On Thu, 25 Aug 2005, Emanuel Strobl wrote: [...] You should think of .if and .for as preprocessor directives. They are processed when make reads the makefile and builds the dependency graph. If you need something more dynamic you

make .if exists problem/question

2005-08-25 Thread Emanuel Strobl
Dear make gurus (bsd make, not gmake), it seems that make checks .if directives only at statrup. How can I trigger a reread? I have the problem that in one target I create a filetree, another target checks if it exists, if not it creates itself again. Now it works perfectly when I call the two

Re: make .if exists problem/question

2005-08-25 Thread Emanuel Strobl
Am Donnerstag, 25. August 2005 20:10 CEST schrieb David Kirchner: On 8/25/05, Emanuel Strobl [EMAIL PROTECTED] wrote: Dear make gurus (bsd make, not gmake), it seems that make checks .if directives only at statrup. How can I trigger a reread? I have the problem that in one target I

Re: make .if exists problem/question

2005-08-25 Thread Giorgos Keramidas
On 2005-08-25 20:36, Emanuel Strobl [EMAIL PROTECTED] wrote: Am Donnerstag, 25. August 2005 20:10 CEST schrieb David Kirchner: This Makefile shows the problem: all: .if ! exists(./foobar) @echo foobar does not exist .endif touch foobar .if ! exists(./foobar)

Re: make .if exists problem/question

2005-08-25 Thread M. Warner Losh
Yes. The thing to keep in mind is that much of the .if stuff is done at parsing or rule construction time. So if you change something (creating a file, say), then that condition won't be re-evaluated. For the specific example given, one could replace much of the goo with: target: foobar