aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreschnett <eschnett@83718e91-0e4f-0410-abf4-91180603181f>2013-03-26 15:40:12 +0000
committereschnett <eschnett@83718e91-0e4f-0410-abf4-91180603181f>2013-03-26 15:40:12 +0000
commit2f238b38f8f56b5d046a9534d55661972ac4630d (patch)
tree042075759d27e70b2d0a6959e143048b6f6937ce
parent940997fbf78604d45df03f8147734a97de883c9c (diff)
Ensure Formaline perl scripts are available when they are used
Add a new make dependency to ensure that Formaline's perl scripts are available in the scratch directory when they are used. git-svn-id: http://svn.cactuscode.org/arrangements/CactusUtils/Formaline/trunk@231 83718e91-0e4f-0410-abf4-91180603181f
-rw-r--r--src/make.configuration.deps27
1 files changed, 17 insertions, 10 deletions
diff --git a/src/make.configuration.deps b/src/make.configuration.deps
index 1dcdf85..8c4b79c 100644
--- a/src/make.configuration.deps
+++ b/src/make.configuration.deps
@@ -28,6 +28,13 @@ TR_C = $(shell tr -C 'a' 'b' < /dev/null > /dev/null 2> /dev/null && echo 'tr -C
TARBALL_DIR = $(SCRATCH_BUILD)/Formaline
FORMALINE_BIN_DIR = $(SCRATCH_BUILD)/Formaline/bin
+# The Formaline utilities (the perl scripts needed to create tarballs
+# and execute git commands) are installed when Formaline's thorn
+# library is built (see make.code.deps). To ensure that the utilities
+# are available, we thus add a dependency on the thorn library.
+install-Formaline-utils: $(CCTK_LIBDIR)/$(LIBNAME_PREFIX)$(CCTK_LIBNAME_PREFIX)Formaline$(LIBNAME_SUFFIX)
+.PHONY: install-Formaline-utils
+
#CACTUSLIBLINKLINE += $(CCTK_LIBDIR)/$(LIBNAME_PREFIX)$(CCTK_LIBNAME_PREFIX)Formaline-cactus-source$(LIBNAME_SUFFIX)
@@ -46,7 +53,7 @@ $(FRM-LIB): $(FRM-OBJS)
$(RM) $@ 2>/dev/null
xargs -n $(FRM-OBJS-words-max) $(AR) $(ARFLAGS) $@ < $(FRM-LIB).objectlist
$(RM) $(FRM-LIB).objectlist
- if test "x$(USE_RANLIB)" = "xyes" ; then $(RANLIB) $(RANLIBFLAGS) $@ ; fi
+ if test "x$(USE_RANLIB)" = "xyes"; then $(RANLIB) $(RANLIBFLAGS) $@; fi
@echo $(DIVIDER)
.PRECIOUS: $(FRM-LIB)
@@ -69,7 +76,7 @@ $(FRM-LIB): $(FRM-OBJS)
# (generates also $(TOP)/CONFIG-ID)
.PRECIOUS: $(TOP)/BUILD-ID
.PHONY: $(TOP)/BUILD-ID
-$(TOP)/BUILD-ID: $(CCTK_LIBDIR)/$(LIBNAME_PREFIX)$(CCTK_LIBNAME_PREFIX)Formaline$(LIBNAME_SUFFIX)
+$(TOP)/BUILD-ID: $(CCTK_LIBDIR)/$(LIBNAME_PREFIX)$(CCTK_LIBNAME_PREFIX)Formaline$(LIBNAME_SUFFIX) install-Formaline-utils
config=`echo "$(EXE:cactus_%=%)" | $(TR_C) -d '[:alnum:]+-._]'` && \
hostname=`$(FORMALINE_BIN_DIR)/gethostname.pl` && \
user="$$USER" && \
@@ -103,7 +110,7 @@ $(TARBALL_DIR)/build-id.c: $(TOP)/BUILD-ID
$(TARBALL_DIR)/cactus-meta.o: $(TARBALL_DIR)/cactus-meta.c
cd $(TARBALL_DIR) && $(CC) $(CFLAGS) -c -o $@ $^
-$(TARBALL_DIR)/cactus-meta.c: $(TARBALL_DIR)/flesh-Cactus.c $(patsubst %,$(TARBALL_DIR)/thorn-%.c,$(notdir $(THORNS)))
+$(TARBALL_DIR)/cactus-meta.c: $(TARBALL_DIR)/flesh-Cactus.c $(patsubst %,$(TARBALL_DIR)/thorn-%.c,$(notdir $(THORNS))) install-Formaline-utils
$(FORMALINE_BIN_DIR)/makemetablob.pl Cactus $(notdir $(THORNS)) > $@
.PRECIOUS: $(TARBALL_DIR)/cactus-meta.c $(TARBALL_DIR)/cactus-meta.o
@@ -127,7 +134,7 @@ $(TARBALL_DIR)/flesh-Cactus.o: $(TARBALL_DIR)/flesh-Cactus.c
$(CC) $(CFLAGS) -c $(^:%.c=%-????.c) && \
$(CC) $(CFLAGS) -c $^
-$(TARBALL_DIR)/flesh-Cactus.c: $(TARBALL_DIR)/flesh-Cactus.tar.gz $(CCTK_HOME)/arrangements/CactusUtils/Formaline/src/util/VERSION
+$(TARBALL_DIR)/flesh-Cactus.c: $(TARBALL_DIR)/flesh-Cactus.tar.gz $(CCTK_HOME)/arrangements/CactusUtils/Formaline/src/util/VERSION install-Formaline-utils
$(RM) -f $(@:%.c=%-????.c)
$(FORMALINE_BIN_DIR)/makeblob.pl $(@:%.c=%) '' Cactus < $<
@@ -190,7 +197,7 @@ $(TARBALL_DIR)/thorn-%.o: $(TARBALL_DIR)/thorn-%.c
$(CC) $(CFLAGS) -c $(patsubst $(TARBALL_DIR)/%, %, $(^:%.c=%-????.c)) && \
$(CC) $(CFLAGS) -c $(patsubst $(TARBALL_DIR)/%, %, $^)
-$(TARBALL_DIR)/thorn-%.c: $(TARBALL_DIR)/thorn-%.tar.gz $(CCTK_HOME)/arrangements/CactusUtils/Formaline/src/util/VERSION
+$(TARBALL_DIR)/thorn-%.c: $(TARBALL_DIR)/thorn-%.tar.gz $(CCTK_HOME)/arrangements/CactusUtils/Formaline/src/util/VERSION install-Formaline-utils
cd $(TARBALL_DIR) && $(RM) -f $(@:$(TARBALL_DIR)/%.c=%-????.c)
$(FORMALINE_BIN_DIR)/makeblob.pl $(@:%.c=%) $(patsubst %/,%,$(dir $(filter %/$(@:$(TARBALL_DIR)/thorn-%.c=%),$(THORNS)))) $(@:$(TARBALL_DIR)/thorn-%.c=%) < $<
@@ -323,7 +330,7 @@ BUILD-ID-FILE = $(TOP)/BUILD-ID
CONFIG-ID-FILE = $(TOP)/CONFIG-ID
.PHONY: git-push-everything
-git-push-everything: git-commit-everything $(BUILD-ID-FILE)
+git-push-everything: git-commit-everything $(BUILD-ID-FILE) install-Formaline-utils
{ \
'$(GIT-BIN)/git-init-master-repo.pl' '$(GIT)' '$(GIT-MASTER-REPO)' && \
eval "$$('$(GIT-BIN)/git-get-localdir.pl' '$(GIT)')" && \
@@ -335,7 +342,7 @@ git-push-everything: git-commit-everything $(BUILD-ID-FILE)
} || echo "Formaline: WARNING: Error while pushing to master repository"
.PHONY: git-commit-everything
-git-commit-everything: $(GIT-TAG-DIR)/flesh-Cactus.git-tag $(GIT-THORNS:%=$(GIT-TAG-DIR)/thorn-%.git-tag) $(BUILD-ID-FILE) git-rm-unused-thorns
+git-commit-everything: $(GIT-TAG-DIR)/flesh-Cactus.git-tag $(GIT-THORNS:%=$(GIT-TAG-DIR)/thorn-%.git-tag) $(BUILD-ID-FILE) git-rm-unused-thorns install-Formaline-utils
{ \
'$(GIT-BIN)/git-commit-everything.pl' '$(GIT)' '$(GIT-REPO)' '$(GIT-ROOT)' "$$(cat $(BUILD-ID-FILE))" "$$(cat $(CONFIG-ID-FILE))"; \
} || echo "Formaline: WARNING: Error while committing to repository"
@@ -343,13 +350,13 @@ git-commit-everything: $(GIT-TAG-DIR)/flesh-Cactus.git-tag $(GIT-THORNS:%=$(GIT-
# Wait until after thorn Formaline has been built, so that its
# utilities are available
.PHONY: git-rm-unused-thorns
-git-rm-unused-thorns: $(CCTK_LIBDIR)/$(LIBNAME_PREFIX)$(CCTK_LIBNAME_PREFIX)Formaline$(LIBNAME_SUFFIX)
+git-rm-unused-thorns: $(CCTK_LIBDIR)/$(LIBNAME_PREFIX)$(CCTK_LIBNAME_PREFIX)Formaline$(LIBNAME_SUFFIX) install-Formaline-utils
{ \
'$(GIT-BIN)/git-rm-unused-thorns.pl' '$(GIT)' '$(GIT-REPO)' '$(GIT-ROOT)' $(THORNS); \
} || echo "Formaline: WARNING: Error while removing unused thorns"
.PRECIOUS: $(GIT-TAG-DIR)/flesh-Cactus.git-tag
-$(GIT-TAG-DIR)/flesh-Cactus.git-tag: $(TARBALL_DIR)/flesh-Cactus.files
+$(GIT-TAG-DIR)/flesh-Cactus.git-tag: $(TARBALL_DIR)/flesh-Cactus.files install-Formaline-utils
mkdir -p $(GIT-TAG-DIR)
{ \
'$(GIT-BIN)/git-init-repo.pl' '$(GIT)' '$(GIT-REPO)' && \
@@ -360,7 +367,7 @@ $(GIT-TAG-DIR)/flesh-Cactus.git-tag: $(TARBALL_DIR)/flesh-Cactus.files
} || echo "Formaline: WARNING: Error while adding flesh to git repository"
.PRECIOUS: $(GIT-TAG-DIR)/thorn-%.git-tag
-$(GIT-TAG-DIR)/thorn-%.git-tag: $(TARBALL_DIR)/thorn-%.files
+$(GIT-TAG-DIR)/thorn-%.git-tag: $(TARBALL_DIR)/thorn-%.files install-Formaline-utils
mkdir -p $(GIT-TAG-DIR)
{ \
'$(GIT-BIN)/git-init-repo.pl' '$(GIT)' '$(GIT-REPO)' && \