On Wed, 2008-10-29 at 11:26 -0400, Michael Ploujnikov wrote:
> define rule-generator
> $(1):
> @echo "$(1) generating $(2)" && \
>
> $(call $(3)) && \
>
> $(call $(4))
> endef
>
> $(eval $(call
> rule-generator,my-rule1,package-name,default-start-fun,default-end-fun))
You really don't want to use ifdef for this. Ifdef is a preprocessor
statement and it can't be used inside of backslash-extended lines like
this. It gets appended to the previous line and bad things happen.
Why don't you just use $(if ..)... or actually even $(or ...) would be
more efficient (one less variable expansion)? Something like:
define rule-generator
$(1):
@echo "$(1) generating $(2)" && \
$(call $(or $(3),$(default-start-fun))) && \
$(call $(or $(4),$(default-end-fun)))
endef
(totally untested).
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make