Makefile.in: improve dist target, clean up better

This commit is contained in:
Andreas Gruenbacher 2009-03-20 18:30:57 +01:00
parent 48a9e9afb9
commit 704083c7bd
2 changed files with 26 additions and 16 deletions

View File

@ -1,3 +1,13 @@
2009-03-19 Andreas Gruenbacher <agruen@suse.de>
* Makefile.in (DISTFILES): Add the files from DISTFILES_M4,
DISTFILES_PC, DISTFILES_PC_DJGPP.
(DISTFILES_M4, DISTFILES_PC, DISTFILES_PC_DJGPP): Remove.
(distclean): Also remove config.hin~ and autom4te.cache/.
(maintainer-clean): Also remove aclocal.m4, config.hin, configure.
(dist): Make work for DISTFILES in subdirectories. Normalize and
sort DISTFILES.
2009-03-19 Andreas Gruenbacher <agruen@suse.de>
Imported from Paul Eggert's working directory:

View File

@ -89,11 +89,9 @@ MISC = AUTHORS COPYING ChangeLog INSTALL Makefile.in NEWS README \
aclocal.m4 \
config.hin configure configure.ac \
install-sh mkinstalldirs patch.man stdbool_.h timespec.h
DISTFILES = $(MISC) $(SRCS) $(HDRS)
DISTFILES_M4 = $(ACINCLUDE_INPUTS)
DISTFILES_PC = pc/chdirsaf.c
DISTFILES_PC_DJGPP = pc/djgpp/README pc/djgpp/config.sed \
pc/djgpp/configure.bat pc/djgpp/configure.sed
DISTFILES = $(MISC) $(SRCS) $(HDRS) $(ACINCLUDE_INPUTS) \
pc/chdirsaf.c pc/djgpp/config.sed pc/djgpp/configure.bat \
pc/djgpp/configure.sed pc/djgpp/README
patch_name = `echo patch | sed '$(transform)'`
@ -183,25 +181,27 @@ clean:: mostlyclean
rm -f patch$(EXEEXT)
distclean:: clean
rm -f Makefile config.cache config.log config.status config.h
rm -f Makefile config.cache config.hin~ config.log config.status \
config.h
rm -rf autom4te.cache/
maintainer-clean::
@echo "This command is intended for maintainers to use;"
@echo "rebuilding the deleted files requires special tools."
$(MAKE) distclean
rm -f TAGS
rm -f TAGS aclocal.m4 config.hin configure
PV = $(PACKAGE_NAME)-$(PACKAGE_VERSION)
dist:: $(DISTFILES) $(DISTFILES_M4) $(DISTFILES_PC) $(DISTFILES_PC_DJGPP)
rm -rf $(PV)
mkdir $(PV) $(PV)/m4 $(PV)/pc $(PV)/pc/djgpp
cp -p $(DISTFILES) $(PV)
cp -p $(DISTFILES_M4) $(PV)/m4
cp -p $(DISTFILES_PC) $(PV)/pc
cp -p $(DISTFILES_PC_DJGPP) $(PV)/pc/djgpp
tar -chf - $(PV) | gzip -9 >$(PV).tar.gz
rm -rf $(PV)
dist:: $(DISTFILES)
@echo Creating $(PV).tar.gz
@rm -rf $(PV)
@ln -s . $(PV)
@tar -cf - `printf "%s\n" $(DISTFILES) \
| sed -e 's,^$(srcdir)/,,' \
| LC_ALL=C sort` \
| gzip -9 > $(PV).tar.gz
@rm -rf $(PV)
$(OBJS): config.h
COMMON = common.h $(STDBOOL_H)