summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ffi/Makefile4
-rw-r--r--openpgp-ffi/Makefile4
2 files changed, 4 insertions, 4 deletions
diff --git a/ffi/Makefile b/ffi/Makefile
index dde7af48..f35c2238 100644
--- a/ffi/Makefile
+++ b/ffi/Makefile
@@ -31,10 +31,10 @@ export PREFIX
export DESTDIR
# $(1) = install dir
-# $(2) = whether to set libdir to $(1) (empty string = false)
+# $(2) = whether to set libdir and prefix to $(1) (empty string = false)
sequoia_pc = \
sed -e 's|VERSION|$(VERSION)|g' \
- -e 's|PREFIX|$(shell pwd)|g' \
+ $(if $(2),-e 's|PREFIX|$(shell pwd)|g',-e's|PREFIX|$(PREFIX)|g') \
$(if $(2),-e 's|libdir=.*|libdir=$(1)|g') \
sequoia.pc.in \
>$(1)/sequoia.pc
diff --git a/openpgp-ffi/Makefile b/openpgp-ffi/Makefile
index 8d01c41e..49511468 100644
--- a/openpgp-ffi/Makefile
+++ b/openpgp-ffi/Makefile
@@ -31,10 +31,10 @@ export PREFIX
export DESTDIR
# $(1) = install dir
-# $(2) = whether to set libdir to $(1) (empty string = false)
+# $(2) = whether to set libdir and prefix to $(1) (empty string = false)
sequoia_openpgp_pc = \
sed -e 's|VERSION|$(VERSION)|g' \
- -e 's|PREFIX|$(shell pwd)|g' \
+ $(if $(2),-e 's|PREFIX|$(shell pwd)|g',-e's|PREFIX|$(PREFIX)|g') \
$(if $(2),-e 's|libdir=.*|libdir=$(1)|g') \
sequoia-openpgp.pc.in \
> $(1)/sequoia-openpgp.pc