help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Conditionally run "-include" in a rule?


From: Matt England
Subject: Re: Conditionally run "-include" in a rule?
Date: Sat, 11 Mar 2006 14:11:58 -0600

At 3/11/2006 11:13 AM, Paul D. Smith wrote:
I don't think there's an answer to your original question, but you can
_certainly_ make your tests cleaner than this:

[...]
NINCLUDE_TARGETS := clean distclean cleanall cleanandfiles cleantmpdfiles \
                    cleanendtgts printvar printvar2 cleanpkg

ifneq (,$(filter $(NINCLUDE_TARGETS),$(MAKECMDGOALS)))
  -include $(ALL_DFILES)
endif

Yes, very good point, thanks. (And also thanks to Dave Hylands for making the same suggestion in a private email.) I'll be changing my core Makefile appropriately.

-Matt




reply via email to

[Prev in Thread] Current Thread [Next in Thread]