1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-11 09:18:07 +03:00

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.
This commit is contained in:
Kay Sievers 2008-12-06 04:03:08 +01:00
parent 626ed3b6c1
commit 5d89ef7bf9
18 changed files with 44 additions and 71 deletions

View 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)"

View File

@ -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

View File

@ -13,6 +13,3 @@ SUBDIRS = \
scsi_id \
usb_id \
volume_id
distclean-local:
rm -f Makefile.in

View File

@ -13,6 +13,3 @@ ata_id_SOURCES = \
dist_man_MANS = \
ata_id.8
distclean-local:
rm -f Makefile.in

View File

@ -17,6 +17,3 @@ cdrom_id_SOURCES = \
dist_man_MANS = \
cdrom_id.8
distclean-local:
rm -f Makefile.in

View 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

View File

@ -17,6 +17,3 @@ edd_id_SOURCES = \
dist_man_MANS = \
edd_id.8
distclean-local:
rm -f Makefile.in

View File

@ -4,6 +4,3 @@ udevhomedir = $(udev_prefix)/lib/udev
dist_udevhome_SCRIPTS = \
firmware.sh
distclean-local:
rm -f Makefile.in

View File

@ -23,6 +23,3 @@ endif
dist_man_MANS = \
create_floppy_devices.8
distclean-local:
rm -f Makefile.in

View File

@ -15,6 +15,3 @@ fstab_import_SOURCES = \
../../udev/lib/libudev-list.c \
../../udev/lib/libudev-util.c
distclean-local:
rm -f Makefile.in

View File

@ -6,7 +6,3 @@ dist_udevhome_SCRIPTS = \
dist_man_MANS = \
path_id.8
distclean-local:
rm -f Makefile.in

View File

@ -13,6 +13,3 @@ dist_udevrules_DATA = \
75-cd-aliases-generator.rules \
75-persistent-net-generator.rules
distclean-local:
rm -f Makefile.in

View File

@ -21,6 +21,3 @@ dist_sysconf_DATA = \
dist_man_MANS = \
scsi_id.8
distclean-local:
rm -f Makefile.in

View 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

View 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)

View File

@ -72,6 +72,3 @@ EXTRA_DIST = \
pkgconfigdir = $(prefix)/$(libdir_name)/pkgconfig
pkgconfig_DATA = libvolume_id.pc
distclean-local:
rm -f Makefile.in

View File

@ -19,7 +19,3 @@ EXTRA_DIST = \
redhat \
suse \
gentoo
distclean-local:
rm -f Makefile.in

View 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)