Support relative --with-pmdir by using FindBin

This commit is contained in:
Danielle McLean 2023-10-23 14:38:27 +11:00
parent a6391cd291
commit 47634b9cf1
Signed by: 00dani
GPG key ID: 52C059C3B22A753E

View file

@ -116,11 +116,14 @@ edit = sed -e 's|[@]PERL[@]|$(PERL)|g' \
pmdir_in_INC = \
PERL5LIB= $(PERL) -V | \
awk '/@INC/ {p=1; next} p==1 {print $$1}' | \
grep -q "$(pmdir)"
grep -F -q "$(pmdir)"
calc_use_lib_pmdir = \
pmdir="$(pmdir)"; \
if $(pmdir_in_INC); then \
use_lib_pmdir=""; \
elif [ "$${pmdir\#../}" != "$$pmdir" ]; then \
use_lib_pmdir="use FindBin; use lib \"\$$FindBin::Bin/$$pmdir\";"; \
else \
use_lib_pmdir="use lib \"$(pmdir)\";"; \
fi