Hi,
I have a question regarding target-specific variables. From
browsing the source, the feature that I want is probably not available,
but I was wondering if it might be added.
I'm working on a build-environment where we want to have our
own header files included rather than the system includes. However,
the number of places where our header files can be found is large,
and makes for a rather messy command line. You can hide this information
using gcc's C_INCLUDE_PATH. However, I would like the ability to have a
debug mode where the -I directives are made part of CPPFLAGS instead.
Here is essentially what I am looking for:
ifndef SHOW_INCLUDES
add_include_paths = C_INCLUDE_PATH += :$(subst $(space),:,$(1))
else
add_include_paths = CPPFLAGS += $(addprefix -I,$(1))
endif
%.c: $(call add_include_paths,../includes)
Unfortunately, the code in read_makefile() requires
that target-specific variable assignments be visible before
any expansion of the dependency list is done. Is the above
something that could fit into make's parsing philosophy?
Thanks,
Chris Jaeger
MTS, Ensim Corporation