Correctly calculate dependencies
authorAlan T. DeKok <aland@freeradius.org>
Wed, 25 Jan 2012 10:52:23 +0000 (11:52 +0100)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 25 Jan 2012 10:52:23 +0000 (11:52 +0100)
FIRST filter absolute path -> ${top_srcdir}
THEN  filter absolute path -> ${BUILDDIR}
THEN delete all other absolute paths.
     They're not part of our build!

scripts/boiler.mk

index 6888f86..e6100a9 100644 (file)
@@ -80,21 +80,23 @@ define FILTER_DEPENDS
        @mkdir -p $$(dir $${BUILD_DIR}/make/src/$$*)
        @mkdir -p $$(dir $${BUILD_DIR}/objs/$$*)
        @sed  -e 's/#.*//' \
+         -e 's,^$${top_srcdir},$$$${top_srcdir},' \
+         -e 's, $${top_srcdir}, $$$${top_srcdir},' \
+         -e 's,^$${BUILD_DIR},$$$${BUILD_DIR},' \
+         -e 's, $${BUILD_DIR}/make/include/[^ :]*,,' \
+         -e 's, $${BUILD_DIR}, $$$${BUILD_DIR},' \
          -e 's, /[^: ]*,,g' \
          -e 's,^ *[^:]* *: *$$$$,,' \
          -e '/: </ d' \
          -e 's/\.o: /.$$$${OBJ_EXT}: /' \
          -e '/^ *\\$$$$/ d' \
-         -e 's,^$${BUILD_DIR},$$$${BUILD_DIR},' \
-         -e 's, $${BUILD_DIR}/make/include/[^ :]*,,' \
-         -e 's, $${BUILD_DIR}, $$$${BUILD_DIR},' \
          < $${BUILD_DIR}/objs/$$*.d | sed -e '$$$$!N; /^\(.*\)\n\1$$$$/!P; D' \
          >  $${BUILD_DIR}/make/src/$$*.mk
        @sed -e 's/#.*//' \
+         -e 's, $${BUILD_DIR}/make/include/[^ :]*,,' \
          -e 's, /[^: ]*,,g' \
          -e 's,^ *[^:]* *: *$$$$,,' \
          -e '/: </ d' \
-         -e 's, $${BUILD_DIR}/make/include/[^ :]*,,' \
          -e 's/^[^:]*: *//' \
          -e 's/ *\\$$$$//' \
          -e 's/$$$$/ :/' \