build: don't tell "make clean" to remove my '~' backup files
authorJim Meyering <jim@meyering.net>
Thu, 30 Apr 2009 13:55:58 +0000 (15:55 +0200)
committerRichard Jones <rjones@redhat.com>
Thu, 30 Apr 2009 15:13:06 +0000 (16:13 +0100)
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.

13 files changed:
Makefile.am
daemon/Makefile.am
examples/Makefile.am
fish/Makefile.am
images/Makefile.am
inspector/Makefile.am
java/Makefile.am
ocaml/Makefile.am
ocaml/examples/Makefile.am
perl/Makefile.am
python/Makefile.am
ruby/Makefile.am
src/Makefile.am

index 47ef6d0..f2f26e7 100644 (file)
@@ -201,7 +201,7 @@ test-boot-realistic: emptydisk
 
 # Make clean.
 
 
 # Make clean.
 
-CLEANFILES = $(fs_DATA) emptydisk pod2htm?.tmp *~ html/*~ recipes/*~
+CLEANFILES = $(fs_DATA) emptydisk pod2htm?.tmp
 
 clean-local:
        rm -rf initramfs
 
 clean-local:
        rm -rf initramfs
index 1d3f752..bf53c56 100644 (file)
@@ -44,5 +44,3 @@ guestfsd_SOURCES = \
        ../src/guestfs_protocol.c
 
 guestfsd_CFLAGS = -Wall
        ../src/guestfs_protocol.c
 
 guestfsd_CFLAGS = -Wall
-
-CLEANFILES = *~
index 31707b8..13302d9 100644 (file)
@@ -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
 
 to_xml_CFLAGS = -I$(top_builddir)/src -Wall
 to_xml_LDADD = $(top_builddir)/src/libguestfs.la
 
-CLEANFILES = *~ $(noinst_PROGRAMS)
+CLEANFILES = $(noinst_PROGRAMS)
index 4164103..016e9b3 100644 (file)
@@ -28,5 +28,3 @@ guestfish_CFLAGS = \
        -I$(top_builddir)/src -Wall \
        -DGUESTFS_DEFAULT_PATH='"$(libdir)/guestfs"'
 guestfish_LDADD = $(top_builddir)/src/libguestfs.la $(LIBREADLINE)
        -I$(top_builddir)/src -Wall \
        -DGUESTFS_DEFAULT_PATH='"$(libdir)/guestfs"'
 guestfish_LDADD = $(top_builddir)/src/libguestfs.la $(LIBREADLINE)
-
-CLEANFILES = *~
index d5272e9..6811107 100644 (file)
@@ -19,5 +19,3 @@ EXTRA_DIST    = \
        helloworld.tar \
        helloworld.tar.gz \
        mbr-ext2-empty.img.gz
        helloworld.tar \
        helloworld.tar.gz \
        mbr-ext2-empty.img.gz
-
-CLEANFILES = *~
index 394489b..b43870d 100644 (file)
@@ -19,8 +19,6 @@ EXTRA_DIST = \
        run-inspector-locally \
        virt-inspector.pl
 
        run-inspector-locally \
        virt-inspector.pl
 
-CLEANFILES = *~
-
 if HAVE_INSPECTOR
 
 man_MANS = virt-inspector.1
 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
 
        mkdir -p $(DESTDIR)$(bindir)
        install -m 0755 virt-inspector.pl $(DESTDIR)$(bindir)/virt-inspector
 
-endif
\ No newline at end of file
+endif
index ea4de6a..d1c0da4 100644 (file)
@@ -37,7 +37,7 @@ EXTRA_DIST = \
        $(java_tests) \
        run-java-test
 
        $(java_tests) \
        run-java-test
 
-CLEANFILES = *~ doc-stamp
+CLEANFILES = doc-stamp
 
 if HAVE_JAVA
 
 
 if HAVE_JAVA
 
index 6eebc94..079ce74 100644 (file)
@@ -23,8 +23,8 @@ EXTRA_DIST = \
 
 SUBDIRS = examples
 
 
 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
 
 
 if HAVE_OCAML
 
index 48191e7..abe6cdf 100644 (file)
@@ -5,6 +5,6 @@ if HAVE_OCAML
 lvs:   lvs.ml
        $(OCAMLFIND) ocamlopt -I .. mlguestfs.cmxa $< -o $@
 
 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
 
 endif
\ No newline at end of file
index 7ff52d9..52a6a09 100644 (file)
@@ -26,8 +26,6 @@ EXTRA_DIST = \
        t/*.t \
        typemap
 
        t/*.t \
        typemap
 
-CLEANFILES = *~ examples/*~ t/*~
-
 if HAVE_PERL
 
 # Interfacing automake and ExtUtils::MakeMaker known to be
 if HAVE_PERL
 
 # Interfacing automake and ExtUtils::MakeMaker known to be
index 86ece8d..bab869e 100644 (file)
@@ -20,8 +20,6 @@ EXTRA_DIST = \
        guestfs-py.c \
        t/*.py
 
        guestfs-py.c \
        t/*.py
 
-CLEANFILES = *~ t/*~
-
 if HAVE_PYTHON
 
 pythondir = $(PYTHON_SITE_PACKAGES)
 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
 
        $(PYTHON)
 TESTS = t/005-import.py t/010-launch.py t/050-lvcreate.py
 
-endif
\ No newline at end of file
+endif
index 2b4b201..9ee0ae5 100644 (file)
@@ -23,7 +23,7 @@ EXTRA_DIST = \
        run-ruby-tests \
        tests/tc_*.rb
 
        run-ruby-tests \
        tests/tc_*.rb
 
-CLEANFILES = *~ \
+CLEANFILES = \
        lib/*~ \
        tests/*~ \
        ext/guestfs/*~ \
        lib/*~ \
        tests/*~ \
        ext/guestfs/*~ \
index 9868b42..1874899 100644 (file)
@@ -47,5 +47,3 @@ guestfs_protocol.h: guestfs_protocol.x
        $(RPCGEN) -h -o $@-t $<
        mv $@-t $@
 endif
        $(RPCGEN) -h -o $@-t $<
        mv $@-t $@
 endif
-
-CLEANFILES = *~