[pve-devel] [PATCH cluster 4/4] buildsys: add build PVE folder to LD_LIBRARY_PATH and PERLLIB

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Sep 7 13:50:47 CEST 2018


ensures that the PVE modules and libraries currently build get used,
not the installed ones.

Besides correctness from a Packaging POV this also makes bootstrapping
easier.

Reported-by: Rhonda D'Vine <rhonda at proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
 data/Makefile     | 3 +++
 data/PVE/Makefile | 5 ++---
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/data/Makefile b/data/Makefile
index ebd35c5..5592a5e 100644
--- a/data/Makefile
+++ b/data/Makefile
@@ -1,5 +1,8 @@
 SUBDIRS := PVE src test
 
+export LD_LIBRARY_PATH+=$(CURDIR)/PVE
+export PERLLIB+=$(CURDIR)/PVE
+
 all:
 	for i in $(SUBDIRS); do $(MAKE) -C $$i $@; done
 
diff --git a/data/PVE/Makefile b/data/PVE/Makefile
index f4042dd..81da87b 100644
--- a/data/PVE/Makefile
+++ b/data/PVE/Makefile
@@ -24,14 +24,14 @@ install: pvecm ${SOURCES} IPCC.so pvecm.1 pvecm.bash-completion datacenter.cfg.5
 	for d in ${SUBDIRS}; do $(MAKE) -C $$d install; done
 
 %.bash-completion:
-	LD_LIBRARY_PATH=. perl -I.. -T -e "use PVE::CLI::$*; PVE::CLI::$*->generate_bash_completions();" >$@.tmp
+	perl -I.. -T -e "use PVE::CLI::$*; PVE::CLI::$*->generate_bash_completions();" >$@.tmp
 	mv $@.tmp $@
 
 Cluster/IPCConst.pm:
 	$(MAKE) -C Cluster IPCConst.pm
 
 check: IPCC.so Cluster/IPCConst.pm
-	LD_LIBRARY_PATH=. perl -I.. -T -e "use PVE::CLI::pvecm; PVE::CLI::pvecm->verify_api();"
+	perl -I.. -T -e "use PVE::CLI::pvecm; PVE::CLI::pvecm->verify_api();"
 
 CC=gcc
 CFLAGS += -fPIC -Wl,-z,relro -Wall -Werror -Wno-strict-aliasing -g -O2 -shared
@@ -48,7 +48,6 @@ IPCC.c: IPCC.xs ppport.h
 IPCC.so: IPCC.o
 	$(CC) ${CFLAGS} ${LDFLAGS} -shared -o $@ $<
 
-export PERLLIB=..
 export NOVIEW=1
 -include /usr/share/pve-doc-generator/pve-doc-generator.mk
 
-- 
2.18.0




More information about the pve-devel mailing list