Skip to content

Commit 81ddc46

Browse files
committed
coupla minor fixes in the `make dist' support code
1 parent a67343d commit 81ddc46

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

GNUmakefile.in

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#
22
# PostgreSQL top level makefile
33
#
4-
# $Header: /cvsroot/pgsql/GNUmakefile.in,v 1.9 2000/07/19 16:29:41 petere Exp $
4+
# $Header: /cvsroot/pgsql/GNUmakefile.in,v 1.10 2000/08/20 15:55:15 petere Exp $
55
#
66

77
subdir =
@@ -59,6 +59,8 @@ distdir := postgresql-$(VERSION)
5959
dummy := =install=
6060
garbage := =* "#"* ."#"* *~* *.orig *.rej core postgresql-*
6161

62+
GZIP := gzip
63+
BZIP2 := bzip2
6264

6365
dist: $(distdir).tar.gz
6466
ifeq ($(split-dist), yes)
@@ -84,27 +86,29 @@ $(distdir).test.tar: distdir
8486
$(TAR) cf $@ $(distdir)/src/test
8587

8688
%.gz: %
87-
gzip -f --best $<
88-
@text="$@ is ready for distribution." ; \
89-
frame=`echo "$$text" | sed -e 's/./=/g'` ; \
90-
echo "$$frame" ; echo "$$text" ; echo "$$frame"
89+
$(GZIP) -f --best $<
9190

92-
distdir: distprep
93-
-rm -rf $(distdir)* $(install)
91+
%.bz2: %
92+
$(BZIP2) -f $<
93+
94+
distdir:
95+
-rm -rf $(distdir)* $(dummy)
9496
for x in `cd $(top_srcdir) && find . -name CVS -prune -o -print`; do \
95-
file=`expr $$x : '\./\(.*\)'`; \
97+
file=`expr X$$x : 'X\./\(.*\)'`; \
9698
if test -d "$(top_srcdir)/$$file" ; then \
9799
mkdir "$(distdir)/$$file" && chmod 777 "$(distdir)/$$file"; \
98100
else \
99-
ln "$(top_srcdir)/$$file" "$(distdir)/$$file"; \
101+
ln "$(top_srcdir)/$$file" "$(distdir)/$$file" >/dev/null 2>&1 \
102+
|| cp "$(top_srcdir)/$$file" "$(distdir)/$$file"; \
100103
fi || exit; \
101104
done
105+
$(MAKE) -C $(distdir) distprep
102106
$(MAKE) -C $(distdir) distclean
103107

104-
distcheck: dist
108+
distcheck: $(distdir).tar.gz
105109
-rm -rf $(dummy)
106110
mkdir $(dummy)
107-
gunzip -c $(distdir).tar.gz | $(TAR) xf -
111+
gzip -d -c $< | $(TAR) xf -
108112
install_prefix=`cd $(dummy) && pwd`; \
109113
cd $(distdir) \
110114
&& ./configure --prefix="$$install_prefix"

0 commit comments

Comments
 (0)