summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2011-07-03 16:40:34 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2011-07-03 16:40:34 -0400
commit8de6e9472ff8bfdcecba8970771e51edb7564c70 (patch)
treea724323a38a13264835376aa2f9b7267f9a6d149
parentca43ce9ebaa0f3af4da206ddc51f8c86de160297 (diff)
Back-patch creation of tar.bz2 tarball during "make dist".
Since commit a4d03bbcdaf7739d7e9073ee76bb186f68ddc163, "make dist" has built both gzip- and bzip2-compressed tarballs. However, this was pretty useless, because our tarball build script didn't know about it and proceeded to overwrite the bz2 file with new data. Back-patch the change to all active branches, so that creation of the tar.bz2 file can be removed from the build script.
-rw-r--r--GNUmakefile.in8
-rw-r--r--src/Makefile.global.in4
2 files changed, 7 insertions, 5 deletions
diff --git a/GNUmakefile.in b/GNUmakefile.in
index 3b67226afc0..a44a80037d5 100644
--- a/GNUmakefile.in
+++ b/GNUmakefile.in
@@ -67,7 +67,7 @@ distdir = postgresql-$(VERSION)
dummy = =install=
garbage = =* "#"* ."#"* *~* *.orig *.rej core postgresql-*
-dist: $(distdir).tar.gz
+dist: $(distdir).tar.gz $(distdir).tar.bz2
ifeq ($(split-dist), yes)
dist: postgresql-base-$(VERSION).tar.gz postgresql-docs-$(VERSION).tar.gz postgresql-opt-$(VERSION).tar.gz postgresql-test-$(VERSION).tar.gz
endif
@@ -77,6 +77,8 @@ dist:
$(distdir).tar: distdir
$(TAR) chf $@ $(distdir)
+.INTERMEDIATE: $(distdir).tar
+
opt_files = \
src/tools src/tutorial \
$(addprefix src/pl/, plperl plpython tcl)
@@ -115,10 +117,10 @@ distdir:
$(MAKE) -C $(distdir) distclean
rm -f $(distdir)/README.git
-distcheck: $(distdir).tar.gz
+distcheck: dist
-rm -rf $(dummy)
mkdir $(dummy)
- $(GZIP) -d -c $< | $(TAR) xf -
+ $(GZIP) -d -c $(distdir).tar.gz | $(TAR) xf -
install_prefix=`cd $(dummy) && pwd`; \
cd $(distdir) \
&& ./configure --prefix="$$install_prefix"
diff --git a/src/Makefile.global.in b/src/Makefile.global.in
index aa41ee9f9b6..5e9f0af2975 100644
--- a/src/Makefile.global.in
+++ b/src/Makefile.global.in
@@ -449,10 +449,10 @@ TAS = @TAS@
# Global targets and rules
%.gz: %
- $(GZIP) -f --best $<
+ $(GZIP) --best -c $< >$@
%.bz2: %
- $(BZIP2) -f $<
+ $(BZIP2) -c $< >$@
ifeq ($(PORTNAME),win32)
# Build rules to add versioninfo resources to win32 binaries