]> err.no Git - systemd/commitdiff
make: do not delete autotools generated file with distclean
authorKay Sievers <kay.sievers@vrfy.org>
Sat, 6 Dec 2008 03:03:08 +0000 (04:03 +0100)
committerKay Sievers <kay.sievers@vrfy.org>
Sat, 6 Dec 2008 03:03:08 +0000 (04:03 +0100)
                                        [...] running the command
`make maintainer-clean' should not delete `configure' even if
`configure' can be remade using a rule in the Makefile.  More
generally, `make maintainer-clean' should not delete anything that
needs to exist in order to run `configure' and then begin to build
the program.  This is the only exception; `maintainer-clean' should
delete everything else that can be rebuilt.

18 files changed:
Makefile.am
autogen.sh
extras/Makefile.am
extras/ata_id/Makefile.am
extras/cdrom_id/Makefile.am
extras/collect/Makefile.am
extras/edd_id/Makefile.am
extras/firmware/Makefile.am
extras/floppy/Makefile.am
extras/fstab_import/Makefile.am
extras/path_id/Makefile.am
extras/rule_generator/Makefile.am
extras/scsi_id/Makefile.am
extras/usb_id/Makefile.am
extras/volume_id/Makefile.am
extras/volume_id/lib/Makefile.am
rules/Makefile.am
udev/Makefile.am

index 1d87bfd1a89a9447c1491f1cd9cd170ad7954df4..55df27e2c738800ea5ec27a12d779ca202679801 100644 (file)
@@ -14,15 +14,16 @@ EXTRA_DIST = \
        docs \
        autogen.sh
 
-PREVIOUS_VERSION = `expr $(VERSION) - 1`
+CLEANFILES = \
+       udev-$(VERSION).tar.gz udev-$(VERSION).tar.bz2
+
+clean-local:
+       rm -rf udev-test-install
 
 distclean-local:
-       rm -f *~
        rm -rf autom4te.cache
-       rm -f depcomp aclocal.m4 config.h.in configure install-sh
-       rm -f Makefile.in missing config.guess config.sub ltmain.sh
-       rm -rf udev-test-install
-       rm -f udev-$(VERSION).tar.gz udev-$(VERSION).tar.bz2
+
+PREVIOUS_VERSION = `expr $(VERSION) - 1`
 
 changelog:
        @ head -1 ChangeLog | grep -q "to v$(PREVIOUS_VERSION)"
index ef3f579cbd3a200f3c86dedd19b5c2edeea6b284..926ca7ec9294eee4ca9fa4fdb9e2c7f406ab58f8 100755 (executable)
@@ -47,18 +47,34 @@ CFLAGS="-g -Wall \
 -Wpointer-arith -Wsign-compare -Wchar-subscripts \
 -Wstrict-prototypes -Wshadow"
 
-if test -z "$1" -o "$1" = "install"; then
-       args="--prefix=/usr --exec-prefix= --sysconfdir=/etc --with-selinux"
-       args="$args --with-libdir-name=lib/$(gcc -print-multi-os-directory)"
-       CFLAGS="$CFLAGS -O2"
-elif test "$1" = "devel" ; then
-       args="--prefix=/usr --exec-prefix= --sysconfdir=/etc --with-selinux --enable-debug"
-       args="$args --with-libdir-name=lib/$(gcc -print-multi-os-directory)"
-       CFLAGS="$CFLAGS -O0"
-else
-       args=$@
-fi
-echo "   configure:  $args"
-echo
-export CFLAGS
-./configure $args
+args="--prefix=/usr --exec-prefix= --sysconfdir=/etc --with-selinux"
+libdir=$(basename $(cd /lib/$(gcc -print-multi-os-directory); pwd))
+
+case "$1" in
+       *install|"")
+               args="$args --with-libdir-name=$libdir"
+               export CFLAGS="$CFLAGS -O2"
+               echo "   configure:  $args"
+               echo
+               ./configure $args
+               ;;
+       *devel)
+               args="$args --enable-debug --with-libdir-name=$libdir"
+               export CFLAGS="$CFLAGS -O0"
+               echo "   configure:  $args"
+               echo
+               ./configure $args
+               ;;
+       *clean)
+               ./configure
+               make maintainer-clean
+               find . -name Makefile.in | xargs -r rm
+               rm -f depcomp aclocal.m4 config.h.in configure install-sh
+               rm -f missing config.guess config.sub ltmain.sh
+               exit 0
+               ;;
+       *)
+               echo "Usage: $0 [--install|--devel|--clean]"
+               exit 1
+               ;;
+esac
index 30e6e95d8951f648c1ff05718c660ca53c587b09..fc46668fdcd32aaf0a6c4bbe9a156b67cdaa44b3 100644 (file)
@@ -13,6 +13,3 @@ SUBDIRS = \
        scsi_id \
        usb_id \
        volume_id
-
-distclean-local:
-       rm -f Makefile.in
index 47ab0d6631459ddc3d060eebf3db5f71888a703c..d31fd2c93c06a3c1acb277e43740edc0d97b98bf 100644 (file)
@@ -13,6 +13,3 @@ ata_id_SOURCES = \
 
 dist_man_MANS = \
        ata_id.8
-
-distclean-local:
-       rm -f Makefile.in
index bb97d96dc042b364367cdbdbe720e78f6c08640d..51b6a20ee238bc14e54b761f94ab4b009dd8b7de 100644 (file)
@@ -17,6 +17,3 @@ cdrom_id_SOURCES = \
 
 dist_man_MANS = \
        cdrom_id.8
-
-distclean-local:
-       rm -f Makefile.in
index 895f1b7f0b150aa63ba43f6dbde54cd292b81f4c..d9792b89ebf726c3bc73035213cc189871903868 100644 (file)
@@ -10,7 +10,3 @@ collect_SOURCES = \
        ../../udev/lib/libudev.c \
        ../../udev/lib/libudev-util.c \
        ../../udev/lib/libudev-list.c
-
-distclean-local:
-       rm -f Makefile.in
-
index 28ff8aa46ebbcf8c609dcb20d6cab553baf0a3b7..9bfe43231f926d36d5265388c8924cec3c5ef498 100644 (file)
@@ -17,6 +17,3 @@ edd_id_SOURCES = \
 
 dist_man_MANS = \
        edd_id.8
-
-distclean-local:
-       rm -f Makefile.in
index 78b28f61f09bafa247337e265e639c08e3428683..4d1b19523e4857a044188aefddcdf9475b620250 100644 (file)
@@ -4,6 +4,3 @@ udevhomedir = $(udev_prefix)/lib/udev
 dist_udevhome_SCRIPTS = \
        firmware.sh
 
-distclean-local:
-       rm -f Makefile.in
-
index 8dadefa08d4b61b60740975936dcc2afb85a0622..8cb9cbd47d75f29209d6203f3fe8e22a2bd9d9b0 100644 (file)
@@ -23,6 +23,3 @@ endif
 
 dist_man_MANS = \
        create_floppy_devices.8
-
-distclean-local:
-       rm -f Makefile.in
index d16c681ad1235de8be291ba2e5d4e1eff7c3cecf..c63dc7cf178c8c557c96769869ffac5a22bd559c 100644 (file)
@@ -15,6 +15,3 @@ fstab_import_SOURCES = \
        ../../udev/lib/libudev-list.c \
        ../../udev/lib/libudev-util.c
 
-distclean-local:
-       rm -f Makefile.in
-
index b85b7473bbdaa1efefc55c533fb9cf68d8820c99..f4892903999194ef0d9aa5d09aab66c275cabb05 100644 (file)
@@ -6,7 +6,3 @@ dist_udevhome_SCRIPTS = \
 
 dist_man_MANS = \
        path_id.8
-
-distclean-local:
-       rm -f Makefile.in
-
index 898191281d242509a9be0bae072b60b5e5a5ca09..e8a8f17ee04eb9109233034c3e540197e17a52a1 100644 (file)
@@ -13,6 +13,3 @@ dist_udevrules_DATA = \
        75-cd-aliases-generator.rules \
        75-persistent-net-generator.rules
 
-distclean-local:
-       rm -f Makefile.in
-
index 08da1c9de55a8347b483bda4b87cff3965c6807a..29d5fe7344174e62e2ca5d72e39c989f42f810f3 100644 (file)
@@ -21,6 +21,3 @@ dist_sysconf_DATA = \
 dist_man_MANS = \
        scsi_id.8
 
-distclean-local:
-       rm -f Makefile.in
-
index c54d83e0881731ca937ed97c7be022afd650dd53..dfb52f17e2f5320c6bca3f414bd2bffc18b11f69 100644 (file)
@@ -12,6 +12,3 @@ usb_id_SOURCES = \
        ../../udev/lib/libudev-util.c \
        ../../udev/lib/libudev-device.c \
        ../../udev/lib/libudev-enumerate.c
-
-distclean-local:
-       rm -f Makefile.in
index c58f1a8782ab395798b3e6041b2507feec783a04..4a8ba9465492f933b57b8e8ea73e0d2810f6c866 100644 (file)
@@ -26,7 +26,6 @@ EXTRA_DIST = \
 %.7 %.8 : %.xml
        $(XSLTPROC) -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
 
-distclean-local:
-       rm -f Makefile.in
-       rm -f $(dist_man_MANS)
+MAINTAINERCLEANFILES= \
+       $(dist_man_MANS)
 
index 678e44ec1cad4032347bfa4fd7ff36c6f9d76925..d5fd6560f1a0247bf9d8e478b37237c6c0a38d63 100644 (file)
@@ -72,6 +72,3 @@ EXTRA_DIST = \
 
 pkgconfigdir = $(prefix)/$(libdir_name)/pkgconfig
 pkgconfig_DATA = libvolume_id.pc
-
-distclean-local:
-       rm -f Makefile.in
index d6cefe3cc313b6115b79e1e3009a261fccf236d7..7f3cd5982d3cb6198e9060d4243313da7b02adca 100644 (file)
@@ -19,7 +19,3 @@ EXTRA_DIST = \
        redhat \
        suse \
        gentoo
-
-
-distclean-local:
-       rm -f Makefile.in
index c374942c6e0ba7963a113d537be09aade6157000..2d185f477d1eb6b26ccf938a21bb4e63eb82a599 100644 (file)
@@ -81,6 +81,8 @@ EXTRA_DIST = \
 %.7 %.8 : %.xml
        $(XSLTPROC) -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
 
-distclean-local:
+MAINTAINERCLEANFILES = \
+       $(dist_man_MANS)
+
+git-clean:
        rm -f Makefile.in
-       rm -f $(dist_man_MANS)