diff options
author | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2001-05-09 21:06:20 +0000 |
---|---|---|
committer | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2001-05-09 21:06:20 +0000 |
commit | 6039777605881b19b6bb3821a8e97d370336ed67 (patch) | |
tree | e0d3490c83615f55599daa5128393f2fc2847403 /lib/make/make.thornlib | |
parent | aae8e43a8b249fc9ec8a51ec93af8e8ea6c7350a (diff) |
Changed so that make.subdir is used for building all user-supplied files.
Optimised a bit so libs and executable are only rebuilt if a source file/header
has really changed.
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2158 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/make/make.thornlib')
-rw-r--r-- | lib/make/make.thornlib | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/lib/make/make.thornlib b/lib/make/make.thornlib index 5f5c9d26..843a7e5d 100644 --- a/lib/make/make.thornlib +++ b/lib/make/make.thornlib @@ -39,8 +39,10 @@ include $(SRCDIR)/make.code.defn CCTK_SRCS += $(SRCS) # Protect the value of SRCS and SUBDIRS of this directory -LOCAL_SRCS := $(SRCS) -LOCAL_SUBDIRS := $(SUBDIRS) +#LOCAL_SRCS := $(SRCS) +LOCAL_SUBDIRS := . $(SUBDIRS) + +SRCS = # Include all the make.code.defn files for the subdirectories # These have to be wrapped to allow us to concatanate all the @@ -59,9 +61,9 @@ SUBDIRS = $(LOCAL_SUBDIRS) OBJS = $(SRCS:%=%.o) # Turn local source file names into object file names -LOCAL_OBJS = $(LOCAL_SRCS:%=%.o) +#LOCAL_OBJS = $(LOCAL_SRCS:%=%.o) -$(NAME): $(addsuffix .check, $(SUBDIRS)) $(LOCAL_OBJS) $(SRCDIR)/make.code.defn $(foreach DIR,$(SUBDIRS), $(SRCDIR)/$(DIR)/make.code.defn) +$(NAME): $(addsuffix /make.checked, $(SUBDIRS)) $(LOCAL_OBJS) $(foreach DIR,. $(SUBDIRS), $(SRCDIR)/$(DIR)/make.code.defn) @echo $(DIVIDER) if [ -r $(NAME) ] ; then echo Updating $(NAME) ; else echo Creating $(NAME) ; fi if [ -r $@ ] ; then rm $@ ; fi @@ -79,11 +81,11 @@ include $(CONFIG)/make.config.rules # Extra stuff for allowing make to recurse into directories # This one makes the object files in the subdirectory -.PHONY: $(addsuffix .check, $(SUBDIRS)) +.PHONY: FORCE -$(addsuffix .check, $(SUBDIRS)) : - if [ ! -d $(basename $@) ] ; then $(MKDIR) $(MKDIRFLAGS) $(basename $@) ; fi - cd $(basename $@) ; $(MAKE) TOP=$(TOP) CONFIG=$(CONFIG) SRCDIR=$(SRCDIR)/$(basename $@) THORN=$(THORN) -f $(MAKE_DIR)/make.subdir +$(addsuffix /make.checked, $(SUBDIRS)) : FORCE + if [ ! -d $(dir $@) ] ; then $(MKDIR) $(MKDIRFLAGS) $(dir $@) ; fi + cd $(dir $@) ; $(MAKE) TOP=$(TOP) CONFIG=$(CONFIG) SRCDIR=$(subst /./,,$(SRCDIR)/$(dir $@)) THORN=$(THORN) -f $(MAKE_DIR)/make.subdir # This one puts a file containing identity info into the build subdirectory $(addsuffix /make.identity, $(SUBDIRS)): |