commit 35c9bb771aa83a06bca62d0720f9526b15003a67
parent 59bb2d66691fe32722c8d06b8861e8e55ab7a4c3
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Mon, 13 Nov 2023 09:12:11 +0100
Always regenerate the makefile to be executed
Until the previous commit, its generation was controlled by a
hard-to-define list of prerequisites (commit 59bb2d6). After that, users
had to manually clean up the compile makefile when they assumed it
needed updating. This was a source of errors and always sucked.
In fact, makefile generation is actually fast and we can regenerate it
from scratch each time we invoke make. This completely eliminates the
need to define automatically or manually when it should be updated.
Diffstat:
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/Makefile b/Makefile
@@ -20,7 +20,7 @@ include config.mk
MK = $(BUILD).mk
-install: $(MK) prefix
+install: makefile prefix
@prefix=$$(cat .prefix) && \
LD_LIBRARY_PATH="$${prefix}/lib:$${LD_LIBRARY_PATH}" \
PATH="$${prefix}/bin:$${PATH}" \
@@ -28,21 +28,21 @@ install: $(MK) prefix
TEXINPUTS="$${prefix}/share/tex:$${TEXINPUTS}" \
$(MAKE) -f $(MK) -f Makefile install_all
-clean: $(MK)
+clean: makefile
@$(MAKE) -f $(MK) -f Makefile clean_all
rm -rf .prefix $(MK)
-distclean: $(MK)
+distclean: makefile
@$(MAKE) -f $(MK) -f Makefile distclean_all
rm -rf .prefix src/*.sh.mk
-uninstall: $(MK)
+uninstall: makefile
@$(MAKE) -f $(MK) -f Makefile uninstall_all
# Generate the Makefile of the build
-$(MK): $(BUILD) src/build.sh config.mk
- @echo "Setup $@"
- @PATH="src:$${PATH}" USE_SIMD=$(USE_SIMD) $(SHELL) $(BUILD) > $@
+makefile:
+ @echo "Setup $(MK)"
+ @PATH="src:$${PATH}" USE_SIMD=$(USE_SIMD) $(SHELL) $(BUILD) > $(MK)
prefix:
@# store in .prefix the absolute prefix path