From cdd4d1ad5df91ebac5fc117cba57469c83e467a6 Mon Sep 17 00:00:00 2001
From: Boris Kolpackov <boris@codesynthesis.com>
Date: Sat, 9 Feb 2013 14:19:08 +0200
Subject: Make generated files depend on config.h to enforce order

---
 build/bootstrap.make | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/build/bootstrap.make b/build/bootstrap.make
index cabe15c..cef108e 100644
--- a/build/bootstrap.make
+++ b/build/bootstrap.make
@@ -127,15 +127,22 @@ endif
 # To do this we make the object files ($2) depend in order-only on
 # generated files ($3).
 #
+# Also make generated files depend on config.h so that we don't get
+# annoying noise during dependency auto-generation.
+#
 ifeq ($(cxx_id),generic)
 
 define include-dep
-$(if $2,$(eval $2: | $3))
+$(if $2,$(eval $2: | $3)) \
+$(if $(and $3,$(subst $(out_root)/libcommon/common/config.h,,$3)),$(eval \
+$3: $(out_root)/libcommon/common/config.h))
 endef
 
 else
 
 define include-dep
+$(if $(and $3,$(subst $(out_root)/libcommon/common/config.h,,$3)),$(eval \
+$3: $(out_root)/libcommon/common/config.h)) \
 $(call -include,$1)
 endef
 
-- 
cgit v1.1