]> git.kaiwu.me - njs.git/commitdiff
Now a make command does not fail for obscure reason at
authorIgor Sysoev <igor@sysoev.ru>
Fri, 22 Jul 2016 11:15:54 +0000 (14:15 +0300)
committerIgor Sysoev <igor@sysoev.ru>
Fri, 22 Jul 2016 11:15:54 +0000 (14:15 +0300)
the very start or after "make clean" command but it offers
to run the ./configure command instead.  This change is
not compatible with BSD PMake which does not support both
"-include" and "sinclude" directives but only ".sinclude"
directive so GNU Make should be used.

Makefile
nxt/auto/configure

index 74b6b78a4c07fe4219f156d3db51b25cb10d5ec9..469d330bb9b8d05f86daf2ab2dd316042f488fe6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -3,10 +3,16 @@ NJS_VER =     20150922
 
 NXT_LIB =      nxt
 
-include $(NXT_LIB)/Makefile.conf
+-include       $(NXT_LIB)/Makefile.conf
 
 NXT_BUILDDIR = build
 
+unconfigured:
+       @echo
+       @echo " Please run ./configure before make"
+       @echo
+
+main:  $(NXT_BUILDDIR)/libnjs.a
 
 $(NXT_BUILDDIR)/libnjs.a: \
        $(NXT_BUILDDIR)/njscript.o \
@@ -81,7 +87,7 @@ test: \
 
 clean:
        rm -rf $(NXT_BUILDDIR)
-       rm $(NXT_LIB)/Makefile.conf $(NXT_LIB)/nxt_auto_config.h
+       rm -f $(NXT_LIB)/Makefile.conf $(NXT_LIB)/nxt_auto_config.h
 
 tarball:
        make clean
index a4b828dd575dc391b4982f856d3df14bc11e4818..b734c336e28a3b483a963549b4bf196070b36083 100755 (executable)
@@ -55,3 +55,10 @@ END
 . ${NXT_AUTO}memalign
 . ${NXT_AUTO}getrandom
 . ${NXT_AUTO}pcre
+
+
+cat << END >> $NXT_MAKEFILE_CONF
+
+target:                main
+
+END