At 05:51 PM 6/23/2003 -0400, you wrote:
Right.  But why do you use define or call here?  Simpler to just use a
straight assignment:

_MAKE = $(MAKE)


I was just cutting and pasting from my real world use where I need the define: $(XMAKE) is essentially equivalent to $(MAKE) below.

#Makefile

define XM_reqs
$(XMAKE) -x -p $(1) 2>/dev/null|sed -n -e 's%^$(patsubst .,\.,$(1)): \(.*\)%\1%p' -e '\%^$(patsubst .,\.,$(1)):.*%q'
endef


# Use Make -p option to print the internal database
# we only print the first occurence of 'target:', avoiding the rule itself
# % doesn't match '/' in target names so we need two rules for each XM.% rule

# echo the prerequisites of target /%
XM.reqs./%: FORCE
        @$(call XM_reqs,/$*)
# this is used for PHONY targets
XM.reqs.%: FORCE
        @$(call XM_reqs,$*)

- Greg Keraunen
http://www.xmake.org



_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make

Reply via email to