diff options
author | Max Romanov <max.romanov@nginx.com> | 2017-08-31 11:42:13 -0700 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2017-08-31 11:42:13 -0700 |
commit | ac7218e335f0393330cf3d1c791ccdfa5a04c423 (patch) | |
tree | 1e864fe75f90fbb2a3d5796deabfe056f6e0537d /auto/make | |
parent | 6eb4a41364bedc461a58ebe486067ae3abc9aaa1 (diff) | |
download | unit-ac7218e335f0393330cf3d1c791ccdfa5a04c423.tar.gz unit-ac7218e335f0393330cf3d1c791ccdfa5a04c423.tar.bz2 |
Introducing install & uninstall Makefile targets.
Diffstat (limited to 'auto/make')
-rw-r--r-- | auto/make | 34 |
1 files changed, 29 insertions, 5 deletions
@@ -20,10 +20,10 @@ NXT_EXEC_LINK = $NXT_EXEC_LINK $NXT_LD_OPT NXT_SHARED_LOCAL_LINK = $NXT_SHARED_LOCAL_LINK $NXT_LD_OPT NXT_MODULE_LINK = $NXT_MODULE_LINK $NXT_LD_OPT -.PHONY: $NXT_BIN -$NXT_BIN: $NXT_BUILD_DIR/$NXT_BIN +.PHONY: $NXT_DAEMON +$NXT_DAEMON: $NXT_BUILD_DIR/$NXT_DAEMON -all: $NXT_BIN +all: $NXT_DAEMON END @@ -184,9 +184,9 @@ $echo >> $NXT_MAKEFILE cat << END >> $NXT_MAKEFILE -$NXT_BUILD_DIR/$NXT_BIN: $NXT_BUILD_DIR/$NXT_LIB_STATIC \\ +$NXT_BUILD_DIR/$NXT_DAEMON: $NXT_BUILD_DIR/$NXT_LIB_STATIC \\ \$(NXT_OBJS) - \$(NXT_EXEC_LINK) -o $NXT_BUILD_DIR/$NXT_BIN \$(CFLAGS) \\ + \$(NXT_EXEC_LINK) -o $NXT_BUILD_DIR/$NXT_DAEMON \$(CFLAGS) \\ \$(NXT_OBJS) $NXT_BUILD_DIR/$NXT_LIB_STATIC \\ $NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS @@ -210,6 +210,30 @@ END done +# install + +cat << END >> $NXT_MAKEFILE + +.PHONY: install ${NXT_DAEMON}-install + +install: ${NXT_DAEMON}-install + +${NXT_DAEMON}-install: $NXT_DAEMON + install -d \$(DESTDIR)$NXT_SBINDIR + install -p $NXT_BUILD_DIR/$NXT_DAEMON \$(DESTDIR)$NXT_SBINDIR/ + + +.PHONY: uninstall ${NXT_DAEMON}-uninstall + +uninstall: ${NXT_DAEMON}-uninstall + +${NXT_DAEMON}-uninstall: + rm -f \$(DESTDIR)$NXT_SBINDIR/$NXT_DAEMON + @rmdir -p \$(DESTDIR)$NXT_SBINDIR 2>/dev/null || true + +END + + # Makefile. # *.dSYM is MacOSX Clang debug information. |