commit edd06489591e8529a78b769b05296164cc026806
parent f4da712c8575a08f2108475d52274e8e96cf67d3
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Tue, 7 May 2024 15:14:59 +0200
Changing temporary directory names
Directory names can be identical to the target name. This used to cause
problems, particularly when parallelizing the compilation: a
prerequisite could be considered fulfilled when what was actually being
checked was the existence of the temporary directory. From now on, the
temporary directory is no longer the name of the target with a
sub-directory whose name is the built version. It's the name of the
target suffixed with this version.
Diffstat:
5 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/src/clipper2.mk.in b/src/clipper2.mk.in
@@ -18,7 +18,7 @@ CLIPPER2_TAG=@TAG@
CLIPPER2_URL=https://github.com/AngusJohnson/Clipper2
# Helper macros
-CLIPPER2_DIR=clipper2/$(CLIPPER2_TAG)
+CLIPPER2_DIR=clipper2_$(CLIPPER2_TAG)
CLIPPER2_CMAKE_OPTIONS =\
-DCMAKE_BUILD_TYPE=Release\
-DCMAKE_INSTALL_LIBDIR="lib"\
@@ -69,7 +69,7 @@ uninstall_clipper2:
xargs rm -f < "$(CLIPPER2_DIR)/CPP/build/install_manifest.txt"
distclean_clipper2:
- rm -rf clipper2
+ rm -rf "$(CLIPPER2_DIR)"
clean_all: clean_clipper2
distclean_all: distclean_clipper2
diff --git a/src/git.mk.in b/src/git.mk.in
@@ -1,36 +1,36 @@
@NAME@: build_@NAME@ prefix
@prefix=$$(cat .prefix) &&\
- cd -- "@NAME@/@TAG@" &&\
+ cd -- "@NAME@_@TAG@" &&\
$(MAKE) PREFIX="$${prefix}" @OPT@ install
# Delete the dependency file to force their regeneration. This is necessary
# because the .prefix file may have been updated and therefore the dependency
# files may be outdated.
build_@NAME@: @DEP@ fetch_@NAME@ prefix
- @cd -- "@NAME@/@TAG@" &&\
+ @cd -- "@NAME@_@TAG@" &&\
rm -f $$(find src -name "*.d") &&\
$(MAKE) @OPT@
-@NAME@/@TAG@:
+@NAME@_@TAG@:
@git clone @URL@ $@
-fetch_@NAME@: @NAME@/@TAG@
- @cd -- "@NAME@/@TAG@" &&\
+fetch_@NAME@: @NAME@_@TAG@
+ @cd -- "@NAME@_@TAG@" &&\
git fetch origin &&\
git checkout -B star-build &&\
git reset --hard @TAG@
clean_@NAME@:
- @if [ -d @NAME@/@TAG@ ]; then\
- cd -- "@NAME@/@TAG@" && $(MAKE) clean;\
+ @if [ -d @NAME@_@TAG@ ]; then\
+ cd -- "@NAME@_@TAG@" && $(MAKE) clean;\
fi
uninstall_@NAME@: fetch_@NAME@ prefix
@prefix=$$(cat .prefix) &&\
- cd -- "@NAME@/@TAG@" && $(MAKE) PREFIX="$${prefix}" uninstall
+ cd -- "@NAME@_@TAG@" && $(MAKE) PREFIX="$${prefix}" uninstall
distclean_@NAME@:
- rm -rf @NAME@
+ rm -rf @NAME@_@TAG@
clean_all: clean_@NAME@
distclean_all: distclean_@NAME@
diff --git a/src/libcyaml.mk.in b/src/libcyaml.mk.in
@@ -18,7 +18,7 @@ LIBCYAML_TAG=@TAG@
LIBCYAML_URL=https://github.com/tlsa/libcyaml
# Helper macros
-LIBCYAML_DIR=libcyaml/$(LIBCYAML_TAG)
+LIBCYAML_DIR=libcyaml_$(LIBCYAML_TAG)
libcyaml: build_libcyaml
@prefix="$$(cat .prefix)" && \
@@ -45,7 +45,7 @@ uninstall_libcyaml:
rm -f "$${prefix}"/lib/pkgconfig/libcyaml.pc
distclean_libcyaml:
- rm -rf libcyaml
+ rm -rf "$(LIBCYAML_DIR)"
clean_all: clean_libcyaml
distclean_all: distclean_libcyaml
diff --git a/src/noweb.mk.in b/src/noweb.mk.in
@@ -18,7 +18,7 @@ NOWEB_TAG=@TAG@
NOWEB_URL=https://github.com/nrnrnr/noweb
# Helper macros
-NOWEB_DIR=noweb/$(NOWEB_TAG)
+NOWEB_DIR=noweb_$(NOWEB_TAG)
NOWEB_MAKE=$(MAKE)\
BIN="$${prefix}/bin"\
LIB="$${prefix}/lib"\
@@ -59,7 +59,7 @@ uninstall_noweb: fetch_noweb prefix
rm -f "$${prefix}/lib/nwmktemp"
distclean_noweb:
- rm -rf noweb
+ rm -rf "$(NOWEB_DIR)"
clean_all: clean_noweb
distclean_all: distclean_noweb
diff --git a/src/sleef.mk.in b/src/sleef.mk.in
@@ -18,7 +18,7 @@ SLEEF_TAG = @TAG@
SLEEF_URL = https://github.com/shibatch/sleef
# Helper macros
-SLEEF_DIR = sleef/$(SLEEF_TAG)
+SLEEF_DIR = sleef_$(SLEEF_TAG)
SLEEF_CMAKE_OPTIONS =\
-G "Unix Makefiles"\
-DBUILD_TESTS=OFF\
@@ -59,7 +59,7 @@ uninstall_sleef: fetch_sleef prefix
xargs rm -f < "$(SLEEF_DIR)/build/install_manifest.txt"
distclean_sleef:
- rm -rf sleef
+ rm -rf "$(SLEEF_DIR)"
clean_all: clean_sleef
distclean_all: distclean_sleef