[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
debugging eval,call,foreach....
From: |
mcmahill |
Subject: |
debugging eval,call,foreach.... |
Date: |
Tue, 15 Oct 2002 21:28:47 -0400 (EDT) |
>
> This release contains several bug fixes plus some powerful new features,
> including an $(eval ...) function, "order-only" prerequisites,
> compatibility with the odd SysV make $$@ syntax, a new command-line
> option -B or --always-make, ability to create recursive functions for
> use with $(call ...), new variables MAKEFILE_LIST and .VARIABLES, and
> more.
>
$(eval ...) and $(call ...) seem very powerful, but somewhat difficult to
really debug. Is there a way I can tell make to process my makefile
expanding the $(eval ...) and $(call ...) and print out the result of this
first pass expansion?
For example, the manual has this example:
PROGRAMS= client server
define PROGRAM_template
$(1): $$($(1)_OBJ) $$($(1)_LIBS:%=-l%)
ALL_OBJS += $$($(1)_OBJS)
endef
$(foreach prog,$(PROGRAMS),$(eval $(call PROGRAM_template,$(prog))))
it would be nice have a way to produce:
client: $(client_OBJS)
ALL_OBJS+=$(client_OBJS)
server: $(server_OBJS)
ALL_OBJS+=$(server_OBJS)
to help verify that all the quoting/escaping in PROGRAM_template and the
$( ...) stuff is right.
oh, also the manual should have "OBJS" not "OBJ" in the PROGRAM_template
definition.
-Dan
- GNU make 3.80 is now available, psmith, 2002/10/04
- debugging eval,call,foreach....,
mcmahill <=
- Re: debugging eval,call,foreach...., Paul D. Smith, 2002/10/15
- Re: debugging eval,call,foreach...., Russell, 2002/10/16
- Re: debugging eval,call,foreach...., Toomas Rosin, 2002/10/21