#597 closed defect (fixed)
Support "make distclean" target
Reported by: | ssen@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | base | Version: | 1.0 |
Keywords: | Cc: | ||
Port: |
Description
Many open source projects (esp. ones using automake) support "make distclean" to remove not only generated object files, but any other files that were not present in the original distribution. For instance, if I do "make; make clean; cvs -n update base 2>/dev/null | grep ?", I get:
? base/Makefile ? base/Mk/dports.autoconf.mk
There should be a way to delete these files so that a new "make" re-configures. The attached files do this.
topinclude.diff should be applied first. It moves all include statements in Makefiles to after variable declarations but before target declarations. This has the effect of making rules evaluate in post- order. That is, for recursive makes, subdirectories are evaluated before the rules of the current directory
distclean.diff should be applied second. It adds "distclean: clean" where appropriate. For base/ Makefile.in, it deletes itself (really the autoconf-generated Makefile) and Mk/dports.autoconf.mk.
Make clean and other rules continue to work as before.
topinclude.diff