]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix parallel make problems.
authorDavid M. Lee <dlee@digium.com>
Mon, 1 Apr 2013 13:28:02 +0000 (13:28 +0000)
committerDavid M. Lee <dlee@digium.com>
Mon, 1 Apr 2013 13:28:02 +0000 (13:28 +0000)
Occasionally, make -j would fail due to missing includes, or other
unusual errors.

This was due to the 'cleantest' target, which was designed to force a
make clean when some change in the code would cause the typical
depedency checking to fail. Several targets in the main Makefile did
not depend upon cleantest, hence would run in parallel to it. By
adding the dependency, make -j runs happily now.

Review: https://reviewboard.asterisk.org/r/2418/
........

Merged revisions 384410 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@384411 65c4cc65-6c06-0410-ace0-fbb531ad65f3

Makefile

index adbd65f5ff22c1c2d29c6cf92efe074c55aeaa85..0017ed34552f7d3043c1c2d58387812de1d19aec 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -386,22 +386,22 @@ $(MOD_SUBDIRS): makeopts
 $(OTHER_SUBDIRS): makeopts
        +@_ASTCFLAGS="$(OTHER_SUBDIR_CFLAGS) $(_ASTCFLAGS)" ASTCFLAGS="$(ASTCFLAGS)" _ASTLDFLAGS="$(_ASTLDFLAGS)" ASTLDFLAGS="$(ASTLDFLAGS)" $(SUBMAKE) --no-builtin-rules -C $@ SUBDIR=$@ all
 
-defaults.h: makeopts build_tools/make_defaults_h
+defaults.h: makeopts cleantest build_tools/make_defaults_h
        @build_tools/make_defaults_h > $@.tmp
        @cmp -s $@.tmp $@ || mv $@.tmp $@
        @rm -f $@.tmp
 
-main/version.c: FORCE
+main/version.c: FORCE cleantest
        @build_tools/make_version_c > $@.tmp
        @cmp -s $@.tmp $@ || mv $@.tmp $@
        @rm -f $@.tmp
 
-include/asterisk/buildopts.h: menuselect.makeopts
+include/asterisk/buildopts.h: menuselect.makeopts cleantest
        @build_tools/make_buildopts_h > $@.tmp
        @cmp -s $@.tmp $@ || mv $@.tmp $@
        @rm -f $@.tmp
 
-include/asterisk/build.h:
+include/asterisk/build.h: cleantest
        @build_tools/make_build_h > $@.tmp
        @cmp -s $@.tmp $@ || mv $@.tmp $@
        @rm -f $@.tmp
@@ -458,7 +458,7 @@ datafiles: _all doc/core-en_US.xml
        done
        $(MAKE) -C sounds install
 
-doc/core-en_US.xml: makeopts $(foreach dir,$(MOD_SUBDIRS),$(shell $(GREP) -l "language=\"en_US\"" $(dir)/*.c $(dir)/*.cc 2>/dev/null))
+doc/core-en_US.xml: makeopts cleantest $(foreach dir,$(MOD_SUBDIRS),$(shell $(GREP) -l "language=\"en_US\"" $(dir)/*.c $(dir)/*.cc 2>/dev/null))
        @printf "Building Documentation For: "
        @echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > $@
        @echo "<!DOCTYPE docs SYSTEM \"appdocsxml.dtd\">" >> $@
@@ -472,7 +472,7 @@ doc/core-en_US.xml: makeopts $(foreach dir,$(MOD_SUBDIRS),$(shell $(GREP) -l "la
        @echo
        @echo "</docs>" >> $@
 
-doc/full-en_US.xml: makeopts $(foreach dir,$(MOD_SUBDIRS),$(shell $(GREP) -l "language=\"en_US\"" $(dir)/*.c $(dir)/*.cc 2>/dev/null))
+doc/full-en_US.xml: makeopts cleantest $(foreach dir,$(MOD_SUBDIRS),$(shell $(GREP) -l "language=\"en_US\"" $(dir)/*.c $(dir)/*.cc 2>/dev/null))
 ifeq ($(PYTHON),:)
        @echo "--------------------------------------------------------------------------"
        @echo "---        Please install python to build full documentation           ---"