[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[fedora-virt] [PATCH] build: don't tell "make clean" to remove my '~' backup files



Hi Rich,

automake's policy on what to remove via "make clean" is reasonable:
if running build rules creates it, then "make clean" can and should remove it.
However, even if build rules happen
to create backup files, please remove only the specific ones
they can create, not all of the ones in a directory.  Just in case
someone relies on those and expect them to hang around...

>From 1e8be391ac17b4ddcf9671e8413d2660844e6993 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering redhat com>
Date: Thu, 30 Apr 2009 15:47:52 +0200
Subject: [PATCH] build: don't tell "make clean" to remove my '~' backup files

* Makefile.am (CLEANFILES): Don't remove '~' backup files.
* daemon/Makefile.am: Ditto.
* examples/Makefile.am: Ditto.
* fish/Makefile.am: Ditto.
* images/Makefile.am: Ditto.
* inspector/Makefile.am: Ditto.
* java/Makefile.am: Ditto.
* ocaml/Makefile.am: Ditto.
* ocaml/examples/Makefile.am: Ditto.
* perl/Makefile.am: Ditto.
* python/Makefile.am: Ditto.
* ruby/Makefile.am: Ditto.
* src/Makefile.am: Ditto.
---
 Makefile.am                |    2 +-
 daemon/Makefile.am         |    2 --
 examples/Makefile.am       |    2 +-
 fish/Makefile.am           |    2 --
 images/Makefile.am         |    2 --
 inspector/Makefile.am      |    4 +---
 java/Makefile.am           |    2 +-
 ocaml/Makefile.am          |    4 ++--
 ocaml/examples/Makefile.am |    2 +-
 perl/Makefile.am           |    2 --
 python/Makefile.am         |    4 +---
 ruby/Makefile.am           |    2 +-
 src/Makefile.am            |    2 --
 13 files changed, 9 insertions(+), 23 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 47ef6d0..f2f26e7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -201,7 +201,7 @@ test-boot-realistic: emptydisk

 # Make clean.

-CLEANFILES = $(fs_DATA) emptydisk pod2htm?.tmp *~ html/*~ recipes/*~
+CLEANFILES = $(fs_DATA) emptydisk pod2htm?.tmp

 clean-local:
 	rm -rf initramfs
diff --git a/daemon/Makefile.am b/daemon/Makefile.am
index 1d3f752..bf53c56 100644
--- a/daemon/Makefile.am
+++ b/daemon/Makefile.am
@@ -44,5 +44,3 @@ guestfsd_SOURCES = \
 	../src/guestfs_protocol.c

 guestfsd_CFLAGS = -Wall
-
-CLEANFILES = *~
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 31707b8..13302d9 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -10,4 +10,4 @@ to_xml_SOURCES = to-xml.c
 to_xml_CFLAGS = -I$(top_builddir)/src -Wall
 to_xml_LDADD = $(top_builddir)/src/libguestfs.la

-CLEANFILES = *~ $(noinst_PROGRAMS)
+CLEANFILES = $(noinst_PROGRAMS)
diff --git a/fish/Makefile.am b/fish/Makefile.am
index 4164103..016e9b3 100644
--- a/fish/Makefile.am
+++ b/fish/Makefile.am
@@ -28,5 +28,3 @@ guestfish_CFLAGS = \
 	-I$(top_builddir)/src -Wall \
 	-DGUESTFS_DEFAULT_PATH='"$(libdir)/guestfs"'
 guestfish_LDADD = $(top_builddir)/src/libguestfs.la $(LIBREADLINE)
-
-CLEANFILES = *~
diff --git a/images/Makefile.am b/images/Makefile.am
index d5272e9..6811107 100644
--- a/images/Makefile.am
+++ b/images/Makefile.am
@@ -19,5 +19,3 @@ EXTRA_DIST	= \
 	helloworld.tar \
 	helloworld.tar.gz \
 	mbr-ext2-empty.img.gz
-
-CLEANFILES = *~
diff --git a/inspector/Makefile.am b/inspector/Makefile.am
index 394489b..b43870d 100644
--- a/inspector/Makefile.am
+++ b/inspector/Makefile.am
@@ -19,8 +19,6 @@ EXTRA_DIST = \
 	run-inspector-locally \
 	virt-inspector.pl

-CLEANFILES = *~
-
 if HAVE_INSPECTOR

 man_MANS = virt-inspector.1
@@ -46,4 +44,4 @@ install-data-hook:
 	mkdir -p $(DESTDIR)$(bindir)
 	install -m 0755 virt-inspector.pl $(DESTDIR)$(bindir)/virt-inspector

-endif
\ No newline at end of file
+endif
diff --git a/java/Makefile.am b/java/Makefile.am
index ea4de6a..d1c0da4 100644
--- a/java/Makefile.am
+++ b/java/Makefile.am
@@ -37,7 +37,7 @@ EXTRA_DIST = \
 	$(java_tests) \
 	run-java-test

-CLEANFILES = *~ doc-stamp
+CLEANFILES = doc-stamp

 if HAVE_JAVA

diff --git a/ocaml/Makefile.am b/ocaml/Makefile.am
index 6eebc94..079ce74 100644
--- a/ocaml/Makefile.am
+++ b/ocaml/Makefile.am
@@ -23,8 +23,8 @@ EXTRA_DIST = \

 SUBDIRS = examples

-CLEANFILES = *~ *.cmi *.cmo *.cmx *.cma *.cmxa *.o *.a *.so
-CLEANFILES += t/*~ t/*.cmi t/*.cmo t/*.cmx t/*.o t/*.a t/*.so
+CLEANFILES = *.cmi *.cmo *.cmx *.cma *.cmxa *.o *.a *.so
+CLEANFILES += t/*.cmi t/*.cmo t/*.cmx t/*.o t/*.a t/*.so

 if HAVE_OCAML

diff --git a/ocaml/examples/Makefile.am b/ocaml/examples/Makefile.am
index 48191e7..abe6cdf 100644
--- a/ocaml/examples/Makefile.am
+++ b/ocaml/examples/Makefile.am
@@ -5,6 +5,6 @@ if HAVE_OCAML
 lvs:	lvs.ml
 	$(OCAMLFIND) ocamlopt -I .. mlguestfs.cmxa $< -o $@

-CLEANFILES = *.cmi *.cmo *.cmx *.o *~ lvs
+CLEANFILES = *.cmi *.cmo *.cmx *.o lvs

 endif
\ No newline at end of file
diff --git a/perl/Makefile.am b/perl/Makefile.am
index 7ff52d9..52a6a09 100644
--- a/perl/Makefile.am
+++ b/perl/Makefile.am
@@ -26,8 +26,6 @@ EXTRA_DIST = \
 	t/*.t \
 	typemap

-CLEANFILES = *~ examples/*~ t/*~
-
 if HAVE_PERL

 # Interfacing automake and ExtUtils::MakeMaker known to be
diff --git a/python/Makefile.am b/python/Makefile.am
index 86ece8d..bab869e 100644
--- a/python/Makefile.am
+++ b/python/Makefile.am
@@ -20,8 +20,6 @@ EXTRA_DIST = \
 	guestfs-py.c \
 	t/*.py

-CLEANFILES = *~ t/*~
-
 if HAVE_PYTHON

 pythondir = $(PYTHON_SITE_PACKAGES)
@@ -40,4 +38,4 @@ TESTS_ENVIRONMENT = \
 	$(PYTHON)
 TESTS = t/005-import.py t/010-launch.py t/050-lvcreate.py

-endif
\ No newline at end of file
+endif
diff --git a/ruby/Makefile.am b/ruby/Makefile.am
index 2b4b201..9ee0ae5 100644
--- a/ruby/Makefile.am
+++ b/ruby/Makefile.am
@@ -23,7 +23,7 @@ EXTRA_DIST = \
 	run-ruby-tests \
 	tests/tc_*.rb

-CLEANFILES = *~ \
+CLEANFILES = \
 	lib/*~ \
 	tests/*~ \
 	ext/guestfs/*~ \
diff --git a/src/Makefile.am b/src/Makefile.am
index 9868b42..1874899 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -47,5 +47,3 @@ guestfs_protocol.h: guestfs_protocol.x
 	$(RPCGEN) -h -o $ -t $<
 	mv $ -t $@
 endif
-
-CLEANFILES = *~
--
1.6.3.rc3.212.g8c698


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]