From 52a03ee66a6e78c57e3f4d703cc8c40f3c4c1789 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Fri, 7 Sep 2018 13:50:47 +0200 Subject: [PATCH] buildsys: add build PVE folder to LD_LIBRARY_PATH and PERLLIB 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 Signed-off-by: Thomas Lamprecht --- 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.39.2