From 111a25879b2e25bbdeb986fbba6d754a79428ceb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Mon, 29 Jan 2018 11:18:52 +0200 Subject: [PATCH 1/2] use apxs to query apache install paths MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Elan Ruusamäe --- src/Makefile | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/src/Makefile b/src/Makefile index 09b4871..0df88fb 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,15 +1,12 @@ builddir=. -ifneq (,$(wildcard /usr/share/apache2/build/special.mk)) - top_srcdir=/usr/share/apache2 - top_builddir=/usr/share/apache2 - include /usr/share/apache2/build/special.mk -endif -ifneq (,$(wildcard /usr/lib64/httpd/build/special.mk)) - top_srcdir=/etc/httpd - top_builddir=/usr/lib64/httpd - include /usr/lib64/httpd/build/special.mk -endif +# the used tools +APXS=apxs +APACHECTL=apachectl + +top_builddir=$(shell $(APXS) -q exp_libexecdir) +include $(top_builddir)/build/special.mk + ifneq (,$(wildcard /etc/debian_version)) DISTRIBUTION := $(shell lsb_release -i | cut -f2) ifeq ($(DISTRIBUTION),Debian) @@ -17,10 +14,6 @@ ifneq (,$(wildcard /etc/debian_version)) endif endif -# the used tools -APXS=apxs -APACHECTL=apachectl - # additional defines, includes and libraries LIBS=-ljson-c -lz From 2ec43a617dac4e832b434abaf61ea6e800c15c56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Mon, 29 Jan 2018 11:24:06 +0200 Subject: [PATCH 2/2] assign top_srcdir for make install MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Elan Ruusamäe --- src/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Makefile b/src/Makefile index 0df88fb..63e130b 100644 --- a/src/Makefile +++ b/src/Makefile @@ -5,6 +5,7 @@ APXS=apxs APACHECTL=apachectl top_builddir=$(shell $(APXS) -q exp_libexecdir) +top_srcdir=$(top_builddir) include $(top_builddir)/build/special.mk ifneq (,$(wildcard /etc/debian_version))