From b53e52602aeaf3aedd94d79f16a69ec58c72c66e Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Sat, 3 Apr 2010 01:14:52 +0000 Subject: [PATCH] make maintainer-clean and make distclean fixes git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11966 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- CCache/Makefile.in | 5 ++--- Makefile.in | 38 ++++++++++++++++++-------------------- 2 files changed, 20 insertions(+), 23 deletions(-) diff --git a/CCache/Makefile.in b/CCache/Makefile.in index fdb316f1f..b96d42a60 100644 --- a/CCache/Makefile.in +++ b/CCache/Makefile.in @@ -52,9 +52,6 @@ uninstall: $(PACKAGE_NAME)$(EXEEXT) $(PACKAGE_NAME).1 clean: /bin/rm -f $(OBJS) *~ $(PACKAGE_NAME)$(EXEEXT) -maintainer-clean: - rm -f $(PACKAGE_NAME).1 web/ccache-man.html - check : test test: test.sh @@ -67,6 +64,8 @@ distclean: clean maintainer-clean: distclean /bin/rm -f configure config.h.in + /bin/rm -f $(PACKAGE_NAME).1 web/ccache-man.html + # FIXME: To fix this, test.sh needs to be able to take ccache from the # installed prefix, not from the source dir. diff --git a/Makefile.in b/Makefile.in index 1401ea9fc..7b74870b6 100644 --- a/Makefile.in +++ b/Makefile.in @@ -302,9 +302,6 @@ clean-source: @cd $(SOURCE) && $(MAKE) -s clean @rm -f $(TARGET) -clean-libfiles: - @rm -f $(srcdir)/Lib/swigwarn.swg - clean-examples: @$(MAKE) -k -s check-examples ACTION=clean @@ -320,27 +317,15 @@ clean-%-test-suite: clean-ccache: test -z "$(ENABLE_CCACHE)" || (cd $(CCACHE) && $(MAKE) -s clean) -clean-docs: clean-docs-main clean-docs-ccache - -clean-docs-main: - @echo cleaning Docs - @test -d $(DOCS) || exit 0; cd $(DOCS) && $(MAKE) clean - -clean-docs-ccache: - @# Use distclean-docs-ccache, else a user requires the yodl tools to generate the docs after a clean - -maintainer-clean: clean-libfiles - @cd $(SOURCE) && $(MAKE) maintainer-clean - ##################################################################### -# DISTCLEAN +# DISTCLEAN - clean what configure built ##################################################################### DISTCLEAN-DEAD = config.status config.log config.cache swig.spec Makefile mkmf.log libtool preinst-swig Lib/ocaml/swigp4.ml -distclean: clean-docs distclean-objects distclean-test-suite distclean-examples distclean-dead distclean-ccache +distclean-helper: distclean-test-suite distclean-examples distclean-dead distclean-ccache -distclean-objects: distclean-source +distclean: distclean-source distclean-helper distclean-source: @echo distcleaning Source @@ -365,8 +350,21 @@ distclean-docs-ccache: distclean-dead: rm -f $(DISTCLEAN-DEAD) -distclean-: - rm -f Lib/ocaml/swigp4.ml +##################################################################### +# MAINTAINER CLEAN - clean what the maintainer builds and ships in +# the distributed tarball - should not delete anything needed to run +# ./configure && make +##################################################################### + +maintainer-clean: + @echo maintainer-cleaning source + @cd $(SOURCE) && $(MAKE) -k -s maintainer-clean + @echo maintainer-cleaning docs + @cd $(DOCS) && $(MAKE) -k -s maintainer-clean + @echo maintainer-cleaning Lib files + @rm -f $(srcdir)/Lib/swigwarn.swg + @echo distcleaning + @$(MAKE) -k -s distclean-helper ##################################################################### # Update the Lib/swigwarn.swg file