summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2008-12-06 04:03:08 +0100
committerKay Sievers <kay.sievers@vrfy.org>2008-12-06 04:03:08 +0100
commit5d89ef7bf94d8a708a1159be22eb1cf458a1d101 (patch)
treeba18b54b2d0aeb4ed5e31013e89a603b7e7398a1
parent626ed3b6c119090dab7bd7491c423ef8ef93c94b (diff)
make: do not delete autotools generated file with distclean
[...] 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.
-rw-r--r--Makefile.am13
-rwxr-xr-xautogen.sh46
-rw-r--r--extras/Makefile.am3
-rw-r--r--extras/ata_id/Makefile.am3
-rw-r--r--extras/cdrom_id/Makefile.am3
-rw-r--r--extras/collect/Makefile.am4
-rw-r--r--extras/edd_id/Makefile.am3
-rw-r--r--extras/firmware/Makefile.am3
-rw-r--r--extras/floppy/Makefile.am3
-rw-r--r--extras/fstab_import/Makefile.am3
-rw-r--r--extras/path_id/Makefile.am4
-rw-r--r--extras/rule_generator/Makefile.am3
-rw-r--r--extras/scsi_id/Makefile.am3
-rw-r--r--extras/usb_id/Makefile.am3
-rw-r--r--extras/volume_id/Makefile.am5
-rw-r--r--extras/volume_id/lib/Makefile.am3
-rw-r--r--rules/Makefile.am4
-rw-r--r--udev/Makefile.am6
18 files changed, 44 insertions, 71 deletions
diff --git a/Makefile.am b/Makefile.am
index 1d87bfd1a8..55df27e2c7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -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)"
diff --git a/autogen.sh b/autogen.sh
index ef3f579cbd..926ca7ec92 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -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
diff --git a/extras/Makefile.am b/extras/Makefile.am
index 30e6e95d89..fc46668fdc 100644
--- a/extras/Makefile.am
+++ b/extras/Makefile.am
@@ -13,6 +13,3 @@ SUBDIRS = \
scsi_id \
usb_id \
volume_id
-
-distclean-local:
- rm -f Makefile.in
diff --git a/extras/ata_id/Makefile.am b/extras/ata_id/Makefile.am
index 47ab0d6631..d31fd2c93c 100644
--- a/extras/ata_id/Makefile.am
+++ b/extras/ata_id/Makefile.am
@@ -13,6 +13,3 @@ ata_id_SOURCES = \
dist_man_MANS = \
ata_id.8
-
-distclean-local:
- rm -f Makefile.in
diff --git a/extras/cdrom_id/Makefile.am b/extras/cdrom_id/Makefile.am
index bb97d96dc0..51b6a20ee2 100644
--- a/extras/cdrom_id/Makefile.am
+++ b/extras/cdrom_id/Makefile.am
@@ -17,6 +17,3 @@ cdrom_id_SOURCES = \
dist_man_MANS = \
cdrom_id.8
-
-distclean-local:
- rm -f Makefile.in
diff --git a/extras/collect/Makefile.am b/extras/collect/Makefile.am
index 895f1b7f0b..d9792b89eb 100644
--- a/extras/collect/Makefile.am
+++ b/extras/collect/Makefile.am
@@ -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
-
diff --git a/extras/edd_id/Makefile.am b/extras/edd_id/Makefile.am
index 28ff8aa46e..9bfe43231f 100644
--- a/extras/edd_id/Makefile.am
+++ b/extras/edd_id/Makefile.am
@@ -17,6 +17,3 @@ edd_id_SOURCES = \
dist_man_MANS = \
edd_id.8
-
-distclean-local:
- rm -f Makefile.in
diff --git a/extras/firmware/Makefile.am b/extras/firmware/Makefile.am
index 78b28f61f0..4d1b19523e 100644
--- a/extras/firmware/Makefile.am
+++ b/extras/firmware/Makefile.am
@@ -4,6 +4,3 @@ udevhomedir = $(udev_prefix)/lib/udev
dist_udevhome_SCRIPTS = \
firmware.sh
-distclean-local:
- rm -f Makefile.in
-
diff --git a/extras/floppy/Makefile.am b/extras/floppy/Makefile.am
index 8dadefa08d..8cb9cbd47d 100644
--- a/extras/floppy/Makefile.am
+++ b/extras/floppy/Makefile.am
@@ -23,6 +23,3 @@ endif
dist_man_MANS = \
create_floppy_devices.8
-
-distclean-local:
- rm -f Makefile.in
diff --git a/extras/fstab_import/Makefile.am b/extras/fstab_import/Makefile.am
index d16c681ad1..c63dc7cf17 100644
--- a/extras/fstab_import/Makefile.am
+++ b/extras/fstab_import/Makefile.am
@@ -15,6 +15,3 @@ fstab_import_SOURCES = \
../../udev/lib/libudev-list.c \
../../udev/lib/libudev-util.c
-distclean-local:
- rm -f Makefile.in
-
diff --git a/extras/path_id/Makefile.am b/extras/path_id/Makefile.am
index b85b7473bb..f489290399 100644
--- a/extras/path_id/Makefile.am
+++ b/extras/path_id/Makefile.am
@@ -6,7 +6,3 @@ dist_udevhome_SCRIPTS = \
dist_man_MANS = \
path_id.8
-
-distclean-local:
- rm -f Makefile.in
-
diff --git a/extras/rule_generator/Makefile.am b/extras/rule_generator/Makefile.am
index 898191281d..e8a8f17ee0 100644
--- a/extras/rule_generator/Makefile.am
+++ b/extras/rule_generator/Makefile.am
@@ -13,6 +13,3 @@ dist_udevrules_DATA = \
75-cd-aliases-generator.rules \
75-persistent-net-generator.rules
-distclean-local:
- rm -f Makefile.in
-
diff --git a/extras/scsi_id/Makefile.am b/extras/scsi_id/Makefile.am
index 08da1c9de5..29d5fe7344 100644
--- a/extras/scsi_id/Makefile.am
+++ b/extras/scsi_id/Makefile.am
@@ -21,6 +21,3 @@ dist_sysconf_DATA = \
dist_man_MANS = \
scsi_id.8
-distclean-local:
- rm -f Makefile.in
-
diff --git a/extras/usb_id/Makefile.am b/extras/usb_id/Makefile.am
index c54d83e088..dfb52f17e2 100644
--- a/extras/usb_id/Makefile.am
+++ b/extras/usb_id/Makefile.am
@@ -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
diff --git a/extras/volume_id/Makefile.am b/extras/volume_id/Makefile.am
index c58f1a8782..4a8ba94654 100644
--- a/extras/volume_id/Makefile.am
+++ b/extras/volume_id/Makefile.am
@@ -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)
diff --git a/extras/volume_id/lib/Makefile.am b/extras/volume_id/lib/Makefile.am
index 678e44ec1c..d5fd6560f1 100644
--- a/extras/volume_id/lib/Makefile.am
+++ b/extras/volume_id/lib/Makefile.am
@@ -72,6 +72,3 @@ EXTRA_DIST = \
pkgconfigdir = $(prefix)/$(libdir_name)/pkgconfig
pkgconfig_DATA = libvolume_id.pc
-
-distclean-local:
- rm -f Makefile.in
diff --git a/rules/Makefile.am b/rules/Makefile.am
index d6cefe3cc3..7f3cd5982d 100644
--- a/rules/Makefile.am
+++ b/rules/Makefile.am
@@ -19,7 +19,3 @@ EXTRA_DIST = \
redhat \
suse \
gentoo
-
-
-distclean-local:
- rm -f Makefile.in
diff --git a/udev/Makefile.am b/udev/Makefile.am
index c374942c6e..2d185f477d 100644
--- a/udev/Makefile.am
+++ b/udev/Makefile.am
@@ -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)