diff options
Diffstat (limited to 'mk')
-rw-r--r-- | mk/build.mk | 15 |
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 |