]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fixed spurious rebuilds of func_version.
authorDavid M. Lee <dlee@digium.com>
Tue, 2 Apr 2013 17:33:53 +0000 (17:33 +0000)
committerDavid M. Lee <dlee@digium.com>
Tue, 2 Apr 2013 17:33:53 +0000 (17:33 +0000)
func_version.so was being rebuilt every time, because build.h was
changing every build, because of the cleantest dependency that was
added in r384410 to fix parallel make bugs.

Now build.h will only be created if it does not exist, which was the
original behavior of the Makefile.

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

Makefile

index d0b24347c58977a08dba38b6391584be35d64328..69b811acaf3c9cca9a14cbefc4fdc8f141c03599 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -370,10 +370,11 @@ include/asterisk/buildopts.h: menuselect.makeopts cleantest
        @cmp -s $@.tmp $@ || mv $@.tmp $@
        @rm -f $@.tmp
 
+# build.h must depend on cleantest, or parallel make may wipe it out after it's
+# been created. But since build.h contains a timestamp, the cmp trick used above
+# won't work. Just testing for existence is good enough.
 include/asterisk/build.h: cleantest
-       @build_tools/make_build_h > $@.tmp
-       @cmp -s $@.tmp $@ || mv $@.tmp $@
-       @rm -f $@.tmp
+       @test -f $@ || build_tools/make_build_h > $@
 
 $(SUBDIRS_CLEAN):
        +@$(SUBMAKE) -C $(@:-clean=) clean