commit: 0087143780f4b792c4b2288762984156d8c48c96
parent f94e39cfffc9000ccec602ac83da0326dd8095be
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Sat, 14 Dec 2024 06:18:21 +0100
Makefile,error-standalone.pc.in: support configurable INCDIR
Diffstat:
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
@@ -3,6 +3,7 @@
PREFIX ?= /usr
LIBDIR ?= ${PREFIX}/lib
+INCDIR ?= ${PREFIX}/include
PKG_CONFIG_DIR = ${LIBDIR}/pkgconfig/
@@ -29,10 +30,10 @@ install-static: install liberror.a
cp -p liberror.a ${DESTDIR}${LIBDIR}/
install:
- mkdir -p ${DESTDIR}${PREFIX}/include
- cp error.h ${DESTDIR}${PREFIX}/include/error.h
+ mkdir -p ${DESTDIR}${INCDIR}/
+ cp error.h ${DESTDIR}${INCDIR}/error.h
mkdir -p ${DESTDIR}${PKG_CONFIG_DIR}/
- sed -e 's;@PREFIX@;${PREFIX};' -e 's;@LIBDIR@;${LIBDIR};' error-standalone.pc.in > ${DESTDIR}${PKG_CONFIG_DIR}/error-standalone.pc
+ sed -e 's;@PREFIX@;${PREFIX};' -e 's;@LIBDIR@;${LIBDIR};' -e 's;@INCDIR@;${INCDIR};' error-standalone.pc.in > ${DESTDIR}${PKG_CONFIG_DIR}/error-standalone.pc
clean:
rm -f error.o liberror.so liberror.a
diff --git a/error-standalone.pc.in b/error-standalone.pc.in
@@ -1,7 +1,7 @@
prefix=@PREFIX@
exec_prefix=${prefix}
libdir=@LIBDIR@
-includedir=${prefix}/include
+includedir=@INCDIR@
Name: error-standalone
Description: standalone <error.h> implementation intended for musl