help-gnu-utils
[Top][All Lists]
Advanced

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

Re: target specific inclusion of makefiles


From: Paul D. Smith
Subject: Re: target specific inclusion of makefiles
Date: 22 Aug 2005 08:31:28 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

%% "Jörg" <joergmoellernexpress@hotmail.com> writes:

  j> Currently every module is created as a library and has it's own
  j> makefile. Every module makefile expands the name and path of the
  j> library that it creates to a commonly used macro. The idea is that
  j> just by including the modules makefile the set of needed libraries
  j> is defined.

  j> What I need now is a way to include these module makefiles target
  j> dependent.

What about:

    MODULES = <list of modules>

    ifeq (foo,$(filter foo,$(MODULES)))
      include foo.mk
    endif
    ifeq (bar,$(filter bar,$(MODULES)))
      include bar.mk
    endif

etc.?  If you have a 1-1 relationship between modules and makefile names
you can even just do this:

    MODULES = <list of modules>

    include $(MODULES:%=%.mk)


You'll need to give some real details if you want better answers than
that.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <psmith@gnu.org>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist


reply via email to

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