Re: make ".if exists" problem/question

From: Emanuel Strobl <Emanuel.strobl_at_gmx.net>
Date: Mon, 5 Sep 2005 21:29:46 +0200
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"

Received on Mon Sep 05 2005 - 17:30:03 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:42 UTC