The clean target

Stepan Kasal kasal at ucw.cz
Wed Mar 14 03:42:44 PDT 2007


Hello,
  I noticed that the MAINTAINERCLEAN variable contains Makefile.in,
at least in some subdirectories.  (One of the side-effects of the
gtk-doc patch, if I have not missed something.)

I do not think this is right, the `maintainer-clean' target should
leave the tree in a state when ./configure is possible.

If there is a need for a target which would undo the work of
./autogen.sh, then it would have to be something like

mrproper: maintainer-clean
	cd $(srcdir) && rm -rf autom4te.cache && \
	  rm -f configure aclocal.m4 config.guess config.sub && \
	  find -name Makefile.in |xargs rm -f

(Just a first approximation.)

Would the patch attached below be acceptable?

Stepan Kasal
-------------- next part --------------
2007-03-14  Stepan Kasal  <kasal at ucw.cz>

	* Makefile.am, doc/api/Makefile.am, doc/api/libhal-storage/Makefile.am,
	doc/api/libhal/Makefile.am (MAINTAINERCLEAN, clean-local): Do not clean
	Makefile.in, nor *~.

diff --git a/Makefile.am b/Makefile.am
index 4af0d42..4559d25 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -36,6 +36,3 @@ DISTCLEANFILES = hal.pc hal-storage.pc intltool-extract intltool-merge intltool-
 DISTCHECK_CONFIGURE_FLAGS = --disable-policy-kit
 
 EXTRA_DIST = HACKING hal.pc.in hal-storage.pc.in hal.conf.in intltool-extract.in intltool-merge.in intltool-update.in mkinstalldirs ChangeLog
-
-clean-local :
-	rm -f *~
diff --git a/doc/Makefile.am b/doc/Makefile.am
index a72f0ba..4527433 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -2,10 +2,3 @@
 EXTRA_DIST = TODO
 
 SUBDIRS = api spec conf
-
-MAINTAINERCLEANFILES =		\
-	*~			\
-	Makefile.in
-
-clean-local:
-	rm -f *~
diff --git a/doc/api/Makefile.am b/doc/api/Makefile.am
index 9f79d66..4531cfa 100644
--- a/doc/api/Makefile.am
+++ b/doc/api/Makefile.am
@@ -1,8 +1,3 @@
 ## Process this file with automake to create Makefile.in.
 
 SUBDIRS = libhal libhal-storage
-
-MAINTAINERCLEANFILES =		\
-	*~			\
-	Makefile.in		\
-	$(NULL)
diff --git a/doc/api/libhal-storage/Makefile.am b/doc/api/libhal-storage/Makefile.am
index 167c72e..151056d 100644
--- a/doc/api/libhal-storage/Makefile.am
+++ b/doc/api/libhal-storage/Makefile.am
@@ -55,8 +55,6 @@ HTML_IMAGES = \
 FIXXREF_OPTIONS=
 
 MAINTAINERCLEANFILES =		\
-	*~			\
-	Makefile.in		\
 	libhal-storage.types	\
 	libhal-storage-*.txt	\
 	$(NULL)
diff --git a/doc/api/libhal/Makefile.am b/doc/api/libhal/Makefile.am
index cde6c94..7768c54 100644
--- a/doc/api/libhal/Makefile.am
+++ b/doc/api/libhal/Makefile.am
@@ -55,8 +55,6 @@ HTML_IMAGES =
 FIXXREF_OPTIONS=
 
 MAINTAINERCLEANFILES =		\
-	*~			\
-	Makefile.in		\
 	libhal.types	\
 	libhal-*.txt	\
 	$(NULL)


More information about the hal mailing list