help-make
[Top][All Lists]
Advanced

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

RE: Must be very simple


From: Paul D. Smith
Subject: RE: Must be very simple
Date: Mon, 20 Mar 2006 12:55:43 -0500

%% "PATTON, BILLY \(SBCSI\)" <address@hidden> writes:

  pb> The wildcard would work but it would have to do something like

  pb> if directory $(TOP_DIR)/SOURCE_TREE exists then
  pb>   -include $(wildcard $(TOP_DIR)/SOURCE_TREE/*/make.include
  pb>   -include $(wildcard $(TOP_DIR)/SOURCE_TREE/*/make.dependencies
  pb>   -include $(wildcard $(TOP_DIR)/SOURCE_TREE/*/*/make.include
  pb>   -include $(wildcard $(TOP_DIR)/SOURCE_TREE/*/*/make.dependencies
  pb>   -include $(wildcard $(TOP_DIR)/SOURCE_TREE/*/*/*/make.include
  pb>   -include $(wildcard $(TOP_DIR)/SOURCE_TREE/*/*/*/make.dependencies
  pb> else
  pb>   -include $(wildcard $(PVCS_DIR)/static_makefiles/*.make.include
  pb> endif

PVCS?  Really?  Ouch.

Why do you have to check if the directory exists?  If it doesn't exist
the wildcard will evaluate to the empty string.

  pb> The ones under the static_makefiles will mostly be exactly the
  pb> same as in the SOURCE_TREE.  But including both will result in K's
  pb> warning about duplicate names.

So, don't include both.  That's what the firstword is for in my example.

Using "*" like this is going to be an issue of course... I don't see how
you're relating a path like this:

    $(TOP_DIR)/SOURCE_TREE/*/make.include

with one like this:

    $(PVCS_DIR)/static_makefiles/*.make.include

...???

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          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]