In Makefile.in, have ncat_build depend on nbase_build and nsock_build to

avoid a race condition. "make all" would make nsock and ncat, and ncat
would in turn make nsock. If the timing was right, the two simultaneous
builds would trample each other.

It may seem inefficient to have all these recursive makes calling down
the dependency tree all the time, but GNU Make at least remembers which
targets were already completed so for example only one descent into
nbase_build will be done per "make all".
This commit is contained in:
david 2009-01-23 23:05:37 +00:00
parent 98f31853e6
commit 6f5c4b5070
2 changed files with 4 additions and 4 deletions

View file

@ -786,9 +786,9 @@ o Fix a bug in the NSE http library which would cause some scripts to
Files\Nmap\nselib/http.lua:77: attempt to call field 'parse' (a nil
value) [Jah]
o Fixed a Makefile problem (race condition) which could lead to build
failures when launching make in parallel mode (e.g. -j4). [Michal
Januszewski]
o Fixed a couple of Makefile problems (race condition) which could
lead to build failures when launching make in parallel mode (e.g.
-j4). [Michal Januszewski, Chris Clements]
o Added new addrow() function to NSE tab library. It allows
developers to add a whole row at once rather than doing a separate

View file

@ -112,7 +112,7 @@ nsock_build: $(NSOCKDIR)/src/Makefile nbase_build
@echo Compiling libnsock;
cd $(NSOCKDIR)/src && $(MAKE)
ncat_build: $(NCATDIR)/Makefile
ncat_build: $(NCATDIR)/Makefile nbase_build nsock_build
cd $(NCATDIR) && $(MAKE)
lua_build: $(LIBLUADIR)/Makefile