commit a3f3d33f91e4929a22251c981138af110097c565
parent c3fe2b1b71b1a729327a2811f74d06bfcc7d96c3
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Tue, 25 Jul 2023 18:04:34 +0200
Update make install environment variables
Add to the LD_LIBRARY_PATH, PATH, PKG_CONFIG_PATH and TEXINPUTS
variables the installation paths. This allows already installed latex
tools, libraries and styles to be used during the build. Note that the
git projects template has enriched the PKG_CONFIG_PATH variable with the
installation directory. This validation removes this local definition
since it is now performed at the installation target
Diffstat:
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
@@ -21,8 +21,13 @@ include config.mk
MK = $(BUILD).mk
DEP = $(BUILD).d
-install: $(MK) $(DEP)
- @$(MAKE) -f $(DEP) -f $(MK) -f Makefile install_all
+install: $(MK) $(DEP) prefix
+ @prefix=$$(cat .prefix) && \
+ LD_LIBRARY_PATH="$${prefix}/lib:$${LD_LIBRARY_PATH}" \
+ PATH="$${prefix}/bin:$${PATH}" \
+ PKG_CONFIG_PATH="$${prefix}/lib/pkgconfig:$${PKG_CONFIG_PATH}" \
+ TEXINPUTS="$${prefix}/share/tex:$${TEXINPUTS}" \
+ $(MAKE) -f $(DEP) -f $(MK) -f Makefile install_all
clean: $(MK) $(DEP)
@$(MAKE) -f $(DEP) -f $(MK) -f Makefile clean_all
diff --git a/src/git.mk.in b/src/git.mk.in
@@ -7,10 +7,9 @@
# because the .prefix file may have been updated and therefore the dependency
# files may be outdated.
build_@NAME@: @DEP@ fetch_@NAME@ prefix
- @prefix=$$(cat .prefix) &&\
- cd -- "@NAME@/@TAG@" &&\
+ @cd -- "@NAME@/@TAG@" &&\
rm -f $$(find src -name "*.d") &&\
- PKG_CONFIG_PATH="$${prefix}/lib/pkgconfig/" $(MAKE) @OPT@
+ $(MAKE) @OPT@
@NAME@/@TAG@:
@git clone @URL@ $@