diff options
author | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1999-01-18 11:27:22 +0000 |
---|---|---|
committer | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1999-01-18 11:27:22 +0000 |
commit | 8f0dc32c828efa676b9d0fd15179df4ec0dada9a (patch) | |
tree | 80fe28acb7287871b831ca10f76801ff6eb426ed | |
parent | 49dd8431ebb496bd0e709be24073f725e52687e2 (diff) |
Now checks for the presence of a Makefile in a thorn's src directory
and uses that in preference to the default one.
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@63 17b73243-c579-4c4c-a9d2-2d5706c11dac
-rw-r--r-- | lib/make/make.configuration | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/make/make.configuration b/lib/make/make.configuration index 3586ab48..42b2db80 100644 --- a/lib/make/make.configuration +++ b/lib/make/make.configuration @@ -41,13 +41,19 @@ $(EXE): $(CONFIG)/make.thornlist $(patsubst %,$(CCTK_LIBDIR)/lib%.a,$(notdir $(T # Libraries go into the appropriate library directory # Each thorn's object files go into $(BUILD_DIR)/<thorn> # This makes sure the appropriate build directories exist +# Also checks for the existance of Makefile in the thorn's +# src directory, and calls that rather than the default makefile +# used for making thorn libraries. $(CCTK_LIBDIR)/lib%.a: update echo $(DIVIDER) echo Checking status of $(notdir $@) if [ ! -d $(BUILD_DIR) ]; then $(MKDIR) $(BUILD_DIR) ; fi if [ ! -d $(@:$(CCTK_LIBDIR)/lib%.a=$(BUILD_DIR)/%) ]; then $(MKDIR) $(@:$(CCTK_LIBDIR)/lib%.a=$(BUILD_DIR)/%) ; fi cd $(@:$(CCTK_LIBDIR)/lib%.a=$(BUILD_DIR)/%); \ - $(MAKE) TOP=$(TOP) SRCDIR=$(@:$(CCTK_LIBDIR)/lib%.a=$(TOOLKIT_DIR)/$(filter %$(@:$(CCTK_LIBDIR)/lib%.a=%),$(THORNS))/src) CONFIG=$(CONFIG) NAME=$@ -f $(MAKE_DIR)/make.thornlib + if [ -e $(@:$(CCTK_LIBDIR)/lib%.a=$(TOOLKIT_DIR)/$(filter %$(@:$(CCTK_LIBDIR)/lib%.a=%),$(THORNS))/src)/Makefile ] ; \ + then $(MAKE) TOP=$(TOP) SRCDIR=$(@:$(CCTK_LIBDIR)/lib%.a=$(TOOLKIT_DIR)/$(filter %$(@:$(CCTK_LIBDIR)/lib%.a=%),$(THORNS))/src) CONFIG=$(CONFIG) NAME=$@ -f $(@:$(CCTK_LIBDIR)/lib%.a=$(TOOLKIT_DIR)/$(filter %$(@:$(CCTK_LIBDIR)/lib%.a=%),$(THORNS))/src)/Makefile ; \ + else $(MAKE) TOP=$(TOP) SRCDIR=$(@:$(CCTK_LIBDIR)/lib%.a=$(TOOLKIT_DIR)/$(filter %$(@:$(CCTK_LIBDIR)/lib%.a=%),$(THORNS))/src) CONFIG=$(CONFIG) NAME=$@ -f $(MAKE_DIR)/make.thornlib ; \ + fi echo $(DIVIDER) |