[Linux-ha-dev] [PATCH] [BUILD] don't remove tarbals in clean target

Simon Horman horms at verge.net.au
Tue Jul 31 03:17:46 MDT 2007


- Remove libtld.tar in maintainerclean, not clean

  libtld.tar is created by ./bootstrap. It is not crated
  by regular builds. And if it is deleted then it has
  to be recrated, either by hand, or by invoking ./bootstrap
  directly or indirectly.

  libtld.tar is a required target of make dist, but make has
  now way of craeating it.

  And it is delted by any type of clean, including make clean.

  So in a nutshell, the following fails.

  # tar -zxf heartbeat-2.1.1.tar.gz
  # cd heartbeat-2.1.1/
  # ./ConfigureMe configure
  # make clean
  # make dist
  ...
  make: *** No rule to make target `libltdl.tar', needed by `distdir'.  Stop

  It seems to me that an easy way to get around this is
  to only remove libltdl.tar when doing an operation which
  would require ./bootstrap to be re-run. And I believe
  that means, make maintainerclean

- Remove $(PACKAGE)-*.tar.gz in distclean, not clean

  It seems much more sensible to me to remove (potentially) stale
  distribution tar balls in make distclean rather than the regular clean,
  as you may actually want them left lying around while doing
  regular build/clean cycles.

Signed-off-by: Simon Horman <horms at verge.net.au>

Index: heartbeat/Makefile.am
===================================================================
--- heartbeat.orig/Makefile.am	2007-07-28 13:14:42.000000000 +0900
+++ heartbeat/Makefile.am	2007-07-28 13:15:04.000000000 +0900
@@ -118,8 +118,11 @@ if MGMT_BUILD
 	rm -f $(DESTDIR)@bindir@/hb_gui && ln -s $(SHAREDIR)/heartbeat-gui/haclient.py $(DESTDIR)@bindir@/hb_gui 
 endif
 
-distclean-local:
-	rm -f autoconf automake autoheader
+dist-clean-local:
+	rm -f autoconf automake autoheader $(PACKAGE)-*.tar.gz
+
+maintainer-clean-local:
+	rm -f libltdl.tar
 
 # "pkg" format for Solaris etc.
 pkg:
@@ -129,11 +132,6 @@ pkg:
 portfile:	dist
 		( cd port && $(MAKE) PWD=`pwd` portfile)
 
-clean-generic: am_config_clean
-
-am_config_clean:
-		rm -fr $(PACKAGE)-*.tar.gz libltdl.tar
-
 drpm:		dist
 		$(RPM) --nodeps $(RPMFLAGS) $(TARFILE) </dev/null;
 handy: drpm handy-copy


More information about the Linux-HA-Dev mailing list