make ".if exists" problem/question

Emanuel Strobl Emanuel.strobl at gmx.net
Mon Sep 5 12:30:03 PDT 2005


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 must use either a shell line:
>
> foo:
> 	if [ -f baz ] ; then ...
>
> or go with sub-makes.
>
> Generally you don't want to use .if to check for a file that your
> makefile creates. In this case you just should use make itself. Given
> that the tree you need to have is named 'tree' do something like:
>
> installcfworld: tree
> 	...
>
> installcfconfig: tree
> 	...
>
> tree:
> 	mkdir tree
> 	...

Thanks, I understood it, and the project grew fine. Will be available this 
week :)

-Harry

>
> harti
> _______________________________________________
> freebsd-current at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to
> "freebsd-current-unsubscribe at freebsd.org"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20050905/06b76403/attachment.bin


More information about the freebsd-questions mailing list