From 962c32007bed6025b1f41b1beff74c098979cc1a Mon Sep 17 00:00:00 2001 From: Alfredo Beaumont Date: Tue, 29 Jun 2004 21:51:54 +0000 Subject: [PATCH] Implemented patch #3169 to aid making binary packages --- Makefile.am | 18 ++++++++++++++++++ Makefile.in | 35 ++++++++++++++++++++++++----------- 2 files changed, 42 insertions(+), 11 deletions(-) diff --git a/Makefile.am b/Makefile.am index c605dda4419..a4d4fb35d6b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -15,3 +15,21 @@ uninstall-hook: if test -d $(bindir) ; then echo `rmdir $(bindir)` ; fi if test -d $(datadir) ; then echo `rmdir $(datadir)` ; fi if test -d $(prefix) ; then echo `rmdir $(prefix)` ; fi + +BINARY_STAGING=/tmp/$(PACKAGE)-$(VERSION)-staging +BINARY_DIST=/tmp/$(PACKAGE)-binary-$(VERSION).tar.gz +DATA_DIST=/tmp/$(PACKAGE)-data-$(VERSION).tar.gz + +binary-dist: + @rm -rf $(BINARY_STAGING) $(BINARY_DIST) + @make install-exec DESTDIR=$(BINARY_STAGING) + @cd $(BINARY_STAGING) ; tar cf - * | gzip -c >$(BINARY_DIST) + @rm -rf $(BINARY_STAGING) + @echo "Precompiled binary tarball is in $(BINARY_DIST)" + +data-dist: + @rm -rf $(BINARY_STAGING) $(DATA_DIST) + @make install-data DESTDIR=$(BINARY_STAGING) + @cd $(BINARY_STAGING) ; tar cf - * | gzip -c >$(DATA_DIST) + @rm -rf $(BINARY_STAGING) + @echo "Precompiled data tarball is in $(DATA_DIST)" diff --git a/Makefile.in b/Makefile.in index 251eac762d2..f6ab08732c3 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.8.5 from Makefile.am. +# Makefile.in generated by automake 1.8.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -211,6 +211,9 @@ nobase_dist_pkgdata_DATA = @DATA_FILES@ @FONT_FILES@ @IMAGE_FILES@ \ @MUSIC_FILES@ @SOUND_FILES@ dist_man6_MANS = doc/man/wesnoth.6 doc/man/wesnothd.6 doc/man/wesnoth_editor.6 +BINARY_STAGING = /tmp/$(PACKAGE)-$(VERSION)-staging +BINARY_DIST = /tmp/$(PACKAGE)-binary-$(VERSION).tar.gz +DATA_DIST = /tmp/$(PACKAGE)-data-$(VERSION).tar.gz all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -410,16 +413,14 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + if (etags --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ - empty_fix=.; \ else \ include_option=--include; \ - empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ + test -f $$subdir/TAGS && \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ @@ -429,11 +430,9 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi + test -z "$(ETAGS_ARGS)$$tags$$unique" \ + || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) @@ -542,7 +541,7 @@ distcheck: dist *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(AMTAR) xf - ;;\ *.shar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac @@ -710,6 +709,20 @@ uninstall-hook: if test -d $(bindir) ; then echo `rmdir $(bindir)` ; fi if test -d $(datadir) ; then echo `rmdir $(datadir)` ; fi if test -d $(prefix) ; then echo `rmdir $(prefix)` ; fi + +binary-dist: + @rm -rf $(BINARY_STAGING) $(BINARY_DIST) + @make install-exec DESTDIR=$(BINARY_STAGING) + @cd $(BINARY_STAGING) ; tar cf - * | gzip -c >$(BINARY_DIST) + @rm -rf $(BINARY_STAGING) + @echo "Precompiled binary tarball is in $(BINARY_DIST)" + +data-dist: + @rm -rf $(BINARY_STAGING) $(DATA_DIST) + @make install-data DESTDIR=$(BINARY_STAGING) + @cd $(BINARY_STAGING) ; tar cf - * | gzip -c >$(DATA_DIST) + @rm -rf $(BINARY_STAGING) + @echo "Precompiled data tarball is in $(DATA_DIST)" # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: