summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2009-08-22 17:16:28 +0200
committerPhil Sutter <phil@nwl.cc>2009-08-22 17:18:07 +0200
commitc823698fc91f462eae028ba7e0dfcb9cc0f3e98c (patch)
treeaea136a586cd6878c2e1f191ae79325467bd6f40
parente0e2e2096c10765c6a89b605e996b3af432603fa (diff)
core: wipe cross_*/target/ files when running make clean
-rw-r--r--mk/build.mk15
1 files changed, 15 insertions, 0 deletions
diff --git a/mk/build.mk b/mk/build.mk
index df07fcba8..9f2683642 100644
--- a/mk/build.mk
+++ b/mk/build.mk
@@ -117,9 +117,24 @@ root_clean:
@$(TRACE) root_clean
rm -rf $(TARGET_DIR)
+# Do a per-package clean here, too. This way stale headers and
+# libraries from cross_*/target/ get wiped away, which keeps
+# future package build's configure scripts from returning false
+# dependencies information.
+
clean:
@$(TRACE) clean
$(MAKE) -C $(CONFIG) clean
+ for d in ${STAGING_PARENT_PFX}; do \
+ echo "clean: entering $$d" ; \
+ for f in $$d/pkg/[a-z]*; do \
+ echo "clean: cleaning for $$f" ; \
+ while read file ; do \
+ rm $$d/target/$$file ; \
+ done < $$f ; \
+ rm $$f ; \
+ done \
+ done
rm -rf $(BUILD_DIR) $(BIN_DIR) $(TARGET_DIR) ${TOPDIR}/.cfg
rm -f ${TOPDIR}/package/*/info.mk