From 61df2814640f3ab6181a96a8ceec35a87f8e127f Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Thu, 28 Jun 2018 17:36:42 +0300 Subject: Added check of "make install" ability. This closes #136 issue on GitHub. --- auto/make | 13 +++++++++++-- auto/modules/perl | 2 +- auto/modules/php | 2 +- auto/modules/python | 2 +- auto/modules/ruby | 2 +- 5 files changed, 15 insertions(+), 6 deletions(-) (limited to 'auto') diff --git a/auto/make b/auto/make index 392cf059..9af63c97 100644 --- a/auto/make +++ b/auto/make @@ -204,11 +204,20 @@ done cat << END >> $NXT_MAKEFILE -.PHONY: install ${NXT_DAEMON}-install +.PHONY: install ${NXT_DAEMON}-install install-check install: ${NXT_DAEMON}-install -${NXT_DAEMON}-install: $NXT_DAEMON +install-check: + @test -n "\$(DESTDIR)$NXT_PREFIX" \\ + || (echo; \\ + echo "error: to make install you need either"; \\ + echo " to configure --prefix option"; \\ + echo " or to set DESTDIR environment variable."; \\ + echo; \\ + exit 1) + +${NXT_DAEMON}-install: $NXT_DAEMON install-check install -d \$(DESTDIR)$NXT_SBINDIR install -p $NXT_BUILD_DIR/$NXT_DAEMON \$(DESTDIR)$NXT_SBINDIR/ install -d \$(DESTDIR)$NXT_STATE diff --git a/auto/modules/perl b/auto/modules/perl index ecc356c0..22f52136 100644 --- a/auto/modules/perl +++ b/auto/modules/perl @@ -201,7 +201,7 @@ $NXT_BUILD_DIR/${NXT_PERL_MODULE}.unit.so: $nxt_objs install: ${NXT_PERL_MODULE}-install -${NXT_PERL_MODULE}-install: ${NXT_PERL_MODULE} +${NXT_PERL_MODULE}-install: ${NXT_PERL_MODULE} install-check install -d \$(DESTDIR)$NXT_MODULES install -p $NXT_BUILD_DIR/${NXT_PERL_MODULE}.unit.so \\ \$(DESTDIR)$NXT_MODULES/ diff --git a/auto/modules/php b/auto/modules/php index bfb45264..2fee49d3 100644 --- a/auto/modules/php +++ b/auto/modules/php @@ -209,7 +209,7 @@ $NXT_BUILD_DIR/${NXT_PHP_MODULE}.unit.so: $nxt_objs install: ${NXT_PHP_MODULE}-install -${NXT_PHP_MODULE}-install: ${NXT_PHP_MODULE} +${NXT_PHP_MODULE}-install: ${NXT_PHP_MODULE} install-check install -d \$(DESTDIR)$NXT_MODULES install -p $NXT_BUILD_DIR/${NXT_PHP_MODULE}.unit.so \\ \$(DESTDIR)$NXT_MODULES/ diff --git a/auto/modules/python b/auto/modules/python index 57b50f89..f8221915 100644 --- a/auto/modules/python +++ b/auto/modules/python @@ -179,7 +179,7 @@ $NXT_BUILD_DIR/${NXT_PYTHON_MODULE}.unit.so: $nxt_objs install: ${NXT_PYTHON_MODULE}-install -${NXT_PYTHON_MODULE}-install: ${NXT_PYTHON_MODULE} +${NXT_PYTHON_MODULE}-install: ${NXT_PYTHON_MODULE} install-check install -d \$(DESTDIR)$NXT_MODULES install -p $NXT_BUILD_DIR/${NXT_PYTHON_MODULE}.unit.so \\ \$(DESTDIR)$NXT_MODULES/ diff --git a/auto/modules/ruby b/auto/modules/ruby index 99efc449..971d3aeb 100644 --- a/auto/modules/ruby +++ b/auto/modules/ruby @@ -171,7 +171,7 @@ $NXT_BUILD_DIR/${NXT_RUBY_MODULE}.unit.so: $nxt_objs install: ${NXT_RUBY_MODULE}-install -${NXT_RUBY_MODULE}-install: ${NXT_RUBY_MODULE} +${NXT_RUBY_MODULE}-install: ${NXT_RUBY_MODULE} install-check install -d \$(DESTDIR)$NXT_MODULES install -p $NXT_BUILD_DIR/${NXT_RUBY_MODULE}.unit.so \\ \$(DESTDIR)$NXT_MODULES/ -- cgit