> One simple thing is to create a sentinel variable specifying whether the
> targets have been defined.
> 
> So, in User.mk you'd do something like:
> 
>         FOO = foo
>         BAR = bar
>            ... other variables ...
>         
>         ifndef TARGETS_DEFINED
>         TARGETS_DEFINED = 1
>         
>         foo:
>               build a foo
>            ... other targets ...
>         endif
> 
> Now the first time you included it TARGETS_DEFINED would not be defined,
> so you'd get the targets.  After that TARGETS_DEFINED would be defined
> and you wouldn't define them twice.

That was the workaround I used to use; but it somewhat uglifies the user
interface :-(, as the ifndef needs to be located in the User.mk. Anyhow,
thanks for the confirmation that I'm out of luck w.r.t. this and a variable
containing the list targets.
_______________________________________________
Help-make mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-make

Reply via email to