aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2009-04-29 15:32:28 +0200
committerChristoph Hellwig <hch@brick.lst.de>2009-04-29 15:32:28 +0200
commit1eb10ccb85261931d5401adbff11acd2dbc5bf63 (patch)
treeca2deb05352d500235c4bd4d50da8e195d680ea8 /Makefile
parentdd72957eac87cd34ff9f867e05e2aac23afed3e9 (diff)
downloadxfsprogs-dev-1eb10ccb85261931d5401adbff11acd2dbc5bf63.tar.gz
keep autoconf-generated files over make distclean
We do want to ship the autoconf-generated files over make distclean and pick them up in Makepkgs so that a user compiling the program doesn't require autoconf. For that split up make distclean from make realclean and exclude the files we want to keep form the former. To make this easier to maintain adher to stricter rules of use for CONFIGURE and LDIRT. CONFIGURE now includes all generated files from autoconf (or for it like our copied install-sh) and gets only removed on make realclean, but added to LSRCFILES so that Makepkgs can pick it up. Everything else than needs to be removed on a realclean gets assigned to LDIRT. Also split up the configure rule into one to generate the configure script and one to run it. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile25
1 files changed, 14 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index c0f4974a70..5c81f66851 100644
--- a/Makefile
+++ b/Makefile
@@ -9,14 +9,14 @@ ifeq ($(HAVE_BUILDDEFS), yes)
include $(TOPDIR)/include/builddefs
endif
-CONFIGURE = aclocal.m4 configure config.guess config.sub \
+CONFIGURE = aclocal.m4 configure config.guess config.sub configure install-sh \
ltmain.sh m4/libtool.m4 m4/ltoptions.m4 m4/ltsugar.m4 \
- m4/ltversion.m4 m4/lt~obsolete.m4 \
- include/builddefs include/platform_defs.h
-LSRCFILES = configure.in Makepkgs install-sh README VERSION $(CONFIGURE)
+ m4/ltversion.m4 m4/lt~obsolete.m4
+LSRCFILES = configure.in Makepkgs README VERSION $(CONFIGURE)
LDIRT = config.log .dep config.status config.cache confdefs.h conftest* \
- Logs/* built .census install.* install-dev.* *.gz
+ Logs/* built .census install.* install-dev.* *.gz autom4te.cache/* \
+ libtool include/builddefs include/platform_defs.h
LIB_SUBDIRS = libxfs libxlog libxcmd libhandle libdisk
TOOL_SUBDIRS = copy db estimate fsck fsr growfs io logprint mkfs quota \
@@ -24,7 +24,7 @@ TOOL_SUBDIRS = copy db estimate fsck fsr growfs io logprint mkfs quota \
SUBDIRS = include $(LIB_SUBDIRS) $(TOOL_SUBDIRS)
-default: configure include/builddefs include/platform_defs.h
+default: include/builddefs include/platform_defs.h
ifeq ($(HAVE_BUILDDEFS), no)
$(MAKE) -C . $@
else
@@ -53,11 +53,13 @@ endif
# versions will copy those files anyway, and don't understand -i.
LIBTOOLIZE_INSTALL = `libtoolize -n -i >/dev/null 2>/dev/null && echo -i`
-configure include/builddefs:
+configure:
libtoolize -c $(LIBTOOLIZE_INSTALL) -f
cp include/install-sh .
aclocal -I m4
autoconf
+
+include/builddefs: configure
./configure \
--prefix=/ \
--exec-prefix=/ \
@@ -96,7 +98,8 @@ install-qa: install $(addsuffix -install-qa,$(SUBDIRS))
%-install-qa:
$(MAKE) -C $* install-qa
-realclean distclean: clean
- rm -f $(LDIRT) $(CONFIGURE)
- rm -f include/builddefs include/config.h install-sh libtool
- rm -rf autom4te.cache Logs
+distclean: clean
+ rm -f $(LDIRT)
+
+realclean: distclean
+ rm -f $(CONFIGURE)