diff options
author | Igor Sysoev <igor@sysoev.ru> | 2018-06-28 17:36:42 +0300 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2018-06-28 17:36:42 +0300 |
commit | 61df2814640f3ab6181a96a8ceec35a87f8e127f (patch) | |
tree | ca38ddb909e8b839ceadc467edfcc25a2840891f /auto/make | |
parent | 42e1d8e3b2705b60e3aee900579d569e9fa44300 (diff) | |
download | unit-61df2814640f3ab6181a96a8ceec35a87f8e127f.tar.gz unit-61df2814640f3ab6181a96a8ceec35a87f8e127f.tar.bz2 |
Added check of "make install" ability.
This closes #136 issue on GitHub.
Diffstat (limited to 'auto/make')
-rw-r--r-- | auto/make | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -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 |