diff options
author | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2000-05-16 09:38:18 +0000 |
---|---|---|
committer | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2000-05-16 09:38:18 +0000 |
commit | 2e2af1b40c48d6fe1de0dbb7363cf21e8439ce5a (patch) | |
tree | 4a12f8d3d36b66242a95686308a762ba9a882b4a /lib/make/make.configuration | |
parent | aaa40a4c6e4d5b51eeb08238ee5fc1001a604277 (diff) |
Experimental support for a
<config>-utils
compile option. Thorns can add targets of the form
$(UTIL_DIR)$(DIRSEP)<utility> : deps
commands to build
and then in their make.configuration.defn put
ALL_UTILS += <utility>
then when someone does
gmake <config>-utils
that utility will be built. Or people can do
gmake <config>-utils UTILS="util1 util2 util3"
to get just a subset of utilities.
Currently $(UTIL_DIR) is set to be exe/<config>, and utility building targets
should have somewhere in them
if ! -d $(UTIL_DIR) ; then $(MKDIR) $(MKDIRFLAGS) $(UTIL_DIR) ; fi
to make sure it exists.
Util building should also attempt to be in the appropriate thorn's
build directory
$(BUILD_DIR)$(DIRSEP)<thorn>
so the target commands should probably be of the form
cd $(BUILD_DIR)$(DIRSEP)<thorn> ; make -f <utility-makefile> $@ SRCDIR=<utility src dir> ...
to keep the object files in one place. Or of course they could make a subdir of
the thorn's build directory.
As I said before this is experimental, so some features may change as we experiment with it.
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1669 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/make/make.configuration')
-rw-r--r-- | lib/make/make.configuration | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/make/make.configuration b/lib/make/make.configuration index 8135a0bb..a1e82864 100644 --- a/lib/make/make.configuration +++ b/lib/make/make.configuration @@ -61,6 +61,12 @@ ifneq ($(strip $(THORNS)),) -include $(THORNS:%=$(PACKAGE_DIR)/%/src/make.configuration.defn) endif +ifeq ($(strip $(UTILS)),) +UTILS = $(ALL_UTILS) +endif + +UTIL_DIR=$(EXEDIR)$(DIRSEP)$(CONFIG_NAME) + # Build the executable $(EXEDIR)$(DIRSEP)$(EXE): $(CONFIG)/make.thornlist $(CONFIG)/cctk_version.h $(patsubst %,$(CCTK_LIBDIR)/lib%.a,$(notdir $(THORNS) $(CACTUSLIBS))) @echo $(DIVIDER) @@ -192,3 +198,10 @@ realclean: rm -rf $(TOP)/config-data/make.thornlist rm -rf $(TOP)/lib/* rm -f datestamp.o + +# This target allows thorns to add to $(ALL_UTILS) and then +# have them built by a make utils + +.PHONY: utils + +utils: $(UTILS:%=$(UTIL_DIR)$(DIRSEP)%) |