Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit721856f

Browse files
committed
Remove distprep
A PostgreSQL release tarball contains a number of prebuilt files, inparticular files produced by bison, flex, perl, and well as html andman documentation. We have done this consistent with establishedpractice at the time to not require these tools for building from atarball. Some of these tools were hard to get, or get the rightversion of, from time to time, and shipping the prebuilt output was aconvenience to users.Now this has at least two problems:One, we have to make the build system(s) work in two modes: Buildingfrom a git checkout and building from a tarball. This is prettycomplicated, but it works so far for autoconf/make. It does notcurrently work for meson; you can currently only build with meson froma git checkout. Making meson builds work from a tarball seems verydifficult or impossible. One particular problem is that since mesonrequires a separate build directory, we cannot make the build updatefiles like gram.h in the source tree. So if you were to build from atarball and update gram.y, you will have a gram.h in the source treeand one in the build tree, but the way things work is that thecompiler will always use the one in the source tree. So you cannot,for example, make any gram.y changes when building from a tarball.This seems impossible to fix in a non-horrible way.Second, there is increased interest nowadays in precisely tracking theorigin of software. We can reasonably track contributions into thegit tree, and users can reasonably track the path from a tarball topackages and downloads and installs. But what happens between the gittree and the tarball is obscure and in some cases non-reproducible.The solution for both of these issues is to get rid of the step thatadds prebuilt files to the tarball. The tarball now only containswhat is in the git tree (*). Getting the additional builddependencies is no longer a problem nowadays, and the complications tokeep these dual build modes working are significant. And of course wewant to get the meson build system working universally.This commit removes the make distprep target altogether. The makedist target continues to do its job, it just doesn't call distprepanymore.(*) - The tarball also contains the INSTALL file that is built at makedist time, but not by distprep. This is unchanged for now.The make maintainer-clean target, whose job it is to remove theprebuilt files in addition to what make distclean does, is now just analias to make distprep. (In practice, it is probably obsolete giventhat git clean is available.)The following programs are now hard build requirements in configure(they were already required by meson.build):- bison- flex- perlReviewed-by: Michael Paquier <michael@paquier.xyz>Reviewed-by: Andres Freund <andres@anarazel.de>Discussion:https://www.postgresql.org/message-id/flat/e07408d9-e5f2-d9fd-5672-f53354e9305e@eisentraut.org
1 parentb72de09 commit721856f

File tree

89 files changed

+175
-416
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+175
-416
lines changed

‎GNUmakefile.in

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ install-world-bin-contrib-recurse: install-world-bin-src-recurse
4141

4242
$(call recurse,installdirs uninstall init-po update-po,doc src config)
4343

44-
$(call recurse,distprepcoverage,doc src config contrib)
44+
$(call recurse,coverage,doc src config contrib)
4545

4646
# clean, distclean, etc should apply to contrib too, even though
4747
# it's not built by default
@@ -53,7 +53,7 @@ clean:
5353

5454
# Important: distclean `src' last, otherwise Makefile.global
5555
# will be gone too soon.
56-
distclean maintainer-clean:
56+
distclean:
5757
$(MAKE) -C doc $@
5858
$(MAKE) -C contrib $@
5959
$(MAKE) -C config $@
@@ -109,7 +109,6 @@ distdir:
109109
|| cp "$(top_srcdir)/$$file" "$(distdir)/$$file"; \
110110
fi || exit; \
111111
done
112-
$(MAKE) -C $(distdir) distprep
113112
$(MAKE) -C $(distdir)/doc/src/sgml/ INSTALL
114113
cp $(distdir)/doc/src/sgml/INSTALL $(distdir)/
115114
$(MAKE) -C $(distdir) distclean
@@ -122,7 +121,6 @@ distcheck: dist
122121
install_prefix=`cd $(dummy) && pwd`; \
123122
cd $(distdir) \
124123
&& ./configure --prefix="$$install_prefix"
125-
$(MAKE) -C $(distdir) -q distprep
126124
$(MAKE) -C $(distdir)
127125
$(MAKE) -C $(distdir) install
128126
$(MAKE) -C $(distdir) uninstall

‎config/perl.m4

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,14 @@ if test "$PERL"; then
1313
if echo "$pgac_perl_version" | sed['s/[.a-z_]/ /g'] | \
1414
$AWK '{ if ([$]1 == 5 && ([$]2 >= 14)) exit 1; else exit 0;}'
1515
then
16-
AC_MSG_WARN([
16+
AC_MSG_ERROR([
1717
*** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
1818
*** Perl version 5.14 or later is required, but this is $pgac_perl_version.])
19-
PERL=""
2019
fi
2120
fi
2221
2322
if test -z "$PERL"; then
24-
AC_MSG_WARN([
25-
*** Without Perl you will not be able to build PostgreSQL from Git.
26-
*** You can obtain Perl from any CPAN mirror site.
27-
*** (If you are using the official distribution of PostgreSQL then you do not
28-
*** need to worry about this, because the Perl output is pre-generated.)])
23+
AC_MSG_ERROR([Perl not found])
2924
fi
3025
])# PGAC_PATH_PERL
3126

‎config/programs.m4

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,9 @@ if test "$BISON"; then
3333
AC_MSG_NOTICE([using $pgac_bison_version])
3434
if echo "$pgac_bison_version" | $AWK '{ if ([$]4 < 2.3) exit 0; else exit 1;}'
3535
then
36-
AC_MSG_WARN([
36+
AC_MSG_ERROR([
3737
*** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
3838
*** Bison version 2.3 or later is required, but this is $pgac_bison_version.])
39-
BISON=""
4039
fi
4140
# Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
4241
# of the now preferred %name-prefix "base_yy", but the latter
@@ -49,12 +48,7 @@ if test "$BISON"; then
4948
fi
5049
5150
if test -z "$BISON"; then
52-
AC_MSG_WARN([
53-
*** Without Bison you will not be able to build PostgreSQL from Git nor
54-
*** change any of the parser definition files. You can obtain Bison from
55-
*** a GNU mirror site. (If you are using the official distribution of
56-
*** PostgreSQL then you do not need to worry about this, because the Bison
57-
*** output is pre-generated.)])
51+
AC_MSG_ERROR([bison not found])
5852
fi
5953
dnl We don't needAC_SUBST(BISON) because PGAC_PATH_PROGS did it
6054
AC_SUBST(BISONFLAGS)
@@ -95,7 +89,7 @@ else
9589
pgac_cv_path_flex=$pgac_candidate
9690
break 2
9791
else
98-
AC_MSG_WARN([
92+
AC_MSG_ERROR([
9993
*** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
10094
*** Flex version 2.5.35 or later is required, but this is $pgac_flex_version.])
10195
fi
@@ -109,14 +103,7 @@ fi
109103
])[]dnl AC_CACHE_CHECK
110104
111105
if test x"$pgac_cv_path_flex" = x"no"; then
112-
AC_MSG_WARN([
113-
*** Without Flex you will not be able to build PostgreSQL from Git nor
114-
*** change any of the scanner definition files. You can obtain Flex from
115-
*** a GNU mirror site. (If you are using the official distribution of
116-
*** PostgreSQL then you do not need to worry about this because the Flex
117-
*** output is pre-generated.)])
118-
119-
FLEX=
106+
AC_MSG_ERROR([flex not found])
120107
else
121108
FLEX=$pgac_cv_path_flex
122109
pgac_flex_version=`$FLEX --version 2>/dev/null`

‎configure

Lines changed: 9 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -10162,13 +10162,9 @@ if test "$BISON"; then
1016210162
$as_echo "$as_me: using $pgac_bison_version" >&6;}
1016310163
if echo "$pgac_bison_version" | $AWK '{ if ($4 < 2.3) exit 0; else exit 1;}'
1016410164
then
10165-
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10166-
*** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
10167-
*** Bison version 2.3 or later is required, but this is $pgac_bison_version." >&5
10168-
$as_echo "$as_me: WARNING:
10165+
as_fn_error $? "
1016910166
*** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
10170-
*** Bison version 2.3 or later is required, but this is $pgac_bison_version." >&2;}
10171-
BISON=""
10167+
*** Bison version 2.3 or later is required, but this is $pgac_bison_version." "$LINENO" 5
1017210168
fi
1017310169
# Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
1017410170
# of the now preferred %name-prefix "base_yy", but the latter
@@ -10181,18 +10177,7 @@ $as_echo "$as_me: WARNING:
1018110177
fi
1018210178

1018310179
if test -z "$BISON"; then
10184-
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10185-
*** Without Bison you will not be able to build PostgreSQL from Git nor
10186-
*** change any of the parser definition files. You can obtain Bison from
10187-
*** a GNU mirror site. (If you are using the official distribution of
10188-
*** PostgreSQL then you do not need to worry about this, because the Bison
10189-
*** output is pre-generated.)" >&5
10190-
$as_echo "$as_me: WARNING:
10191-
*** Without Bison you will not be able to build PostgreSQL from Git nor
10192-
*** change any of the parser definition files. You can obtain Bison from
10193-
*** a GNU mirror site. (If you are using the official distribution of
10194-
*** PostgreSQL then you do not need to worry about this, because the Bison
10195-
*** output is pre-generated.)" >&2;}
10180+
as_fn_error $? "bison not found" "$LINENO" 5
1019610181
fi
1019710182

1019810183

@@ -10225,12 +10210,9 @@ else
1022510210
pgac_cv_path_flex=$pgac_candidate
1022610211
break 2
1022710212
else
10228-
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10229-
*** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
10230-
*** Flex version 2.5.35 or later is required, but this is $pgac_flex_version." >&5
10231-
$as_echo "$as_me: WARNING:
10213+
as_fn_error $? "
1023210214
*** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
10233-
*** Flex version 2.5.35 or later is required, but this is $pgac_flex_version.">&2;}
10215+
*** Flex version 2.5.35 or later is required, but this is $pgac_flex_version.""$LINENO" 5
1023410216
fi
1023510217
fi
1023610218
fi
@@ -10244,20 +10226,7 @@ fi
1024410226
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
1024510227
$as_echo "$pgac_cv_path_flex" >&6; }
1024610228
if test x"$pgac_cv_path_flex" = x"no"; then
10247-
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10248-
*** Without Flex you will not be able to build PostgreSQL from Git nor
10249-
*** change any of the scanner definition files. You can obtain Flex from
10250-
*** a GNU mirror site. (If you are using the official distribution of
10251-
*** PostgreSQL then you do not need to worry about this because the Flex
10252-
*** output is pre-generated.)" >&5
10253-
$as_echo "$as_me: WARNING:
10254-
*** Without Flex you will not be able to build PostgreSQL from Git nor
10255-
*** change any of the scanner definition files. You can obtain Flex from
10256-
*** a GNU mirror site. (If you are using the official distribution of
10257-
*** PostgreSQL then you do not need to worry about this because the Flex
10258-
*** output is pre-generated.)" >&2;}
10259-
10260-
FLEX=
10229+
as_fn_error $? "flex not found" "$LINENO" 5
1026110230
else
1026210231
FLEX=$pgac_cv_path_flex
1026310232
pgac_flex_version=`$FLEX --version 2>/dev/null`
@@ -10331,27 +10300,14 @@ $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
1033110300
if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
1033210301
$AWK '{ if ($1 == 5 && ($2 >= 14)) exit 1; else exit 0;}'
1033310302
then
10334-
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10335-
*** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
10336-
*** Perl version 5.14 or later is required, but this is $pgac_perl_version." >&5
10337-
$as_echo "$as_me: WARNING:
10303+
as_fn_error $? "
1033810304
*** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
10339-
*** Perl version 5.14 or later is required, but this is $pgac_perl_version." >&2;}
10340-
PERL=""
10305+
*** Perl version 5.14 or later is required, but this is $pgac_perl_version." "$LINENO" 5
1034110306
fi
1034210307
fi
1034310308

1034410309
if test -z "$PERL"; then
10345-
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10346-
*** Without Perl you will not be able to build PostgreSQL from Git.
10347-
*** You can obtain Perl from any CPAN mirror site.
10348-
*** (If you are using the official distribution of PostgreSQL then you do not
10349-
*** need to worry about this, because the Perl output is pre-generated.)" >&5
10350-
$as_echo "$as_me: WARNING:
10351-
*** Without Perl you will not be able to build PostgreSQL from Git.
10352-
*** You can obtain Perl from any CPAN mirror site.
10353-
*** (If you are using the official distribution of PostgreSQL then you do not
10354-
*** need to worry about this, because the Perl output is pre-generated.)" >&2;}
10310+
as_fn_error $? "Perl not found" "$LINENO" 5
1035510311
fi
1035610312

1035710313
if test "$with_perl" = yes; then

‎contrib/cube/Makefile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ REGRESS = cube cube_sci
1818

1919
SHLIB_LINK +=$(filter -lm,$(LIBS))
2020

21+
EXTRA_CLEAN = cubeparse.h cubeparse.c cubescan.c
22+
2123
ifdefUSE_PGXS
2224
PG_CONFIG = pg_config
2325
PGXS :=$(shell$(PG_CONFIG) --pgxs)
@@ -37,8 +39,3 @@ cubeparse.c: BISONFLAGS += -d
3739

3840
# Force these dependencies to be known even without dependency info built:
3941
cubeparse.ocubescan.o: cubeparse.h
40-
41-
distprep: cubeparse.c cubescan.c
42-
43-
maintainer-clean:
44-
rm -f cubeparse.h cubeparse.c cubescan.c

‎contrib/fuzzystrmatch/Makefile

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ PGFILEDESC = "fuzzystrmatch - similarities and distance between strings"
1515

1616
REGRESS = fuzzystrmatch fuzzystrmatch_utf8
1717

18+
EXTRA_CLEAN = daitch_mokotoff.h
19+
1820
ifdefUSE_PGXS
1921
PG_CONFIG = pg_config
2022
PGXS :=$(shell$(PG_CONFIG) --pgxs)
@@ -31,10 +33,3 @@ daitch_mokotoff.o: daitch_mokotoff.h
3133

3234
daitch_mokotoff.h: daitch_mokotoff_header.pl
3335
$(PERL)$<$@
34-
35-
# daitch_mokotoff.h is included in tarballs, so it has to be made by
36-
# "distprep" and not cleaned except by "maintainer-clean".
37-
distprep: daitch_mokotoff.h
38-
39-
maintainer-clean:
40-
rm -f daitch_mokotoff.h

‎contrib/seg/Makefile

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ HEADERS = segdata.h
1616

1717
REGRESS = security seg
1818

19-
EXTRA_CLEAN =y.tab.cy.tab.h
19+
EXTRA_CLEAN =segparse.h segparse.csegscan.c
2020

2121
ifdefUSE_PGXS
2222
PG_CONFIG = pg_config
@@ -38,8 +38,3 @@ segparse.c: BISONFLAGS += -d
3838

3939
# Force these dependencies to be known even without dependency info built:
4040
segparse.osegscan.o: segparse.h
41-
42-
distprep: segparse.c segscan.c
43-
44-
maintainer-clean:
45-
rm -f segparse.h segparse.c segscan.c

‎doc/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ subdir = doc
1212
top_builddir = ..
1313
include$(top_builddir)/src/Makefile.global
1414

15-
alldistprephtmlmaninstallinstalldirsuninstallcleandistcleanmaintainer-clean:
15+
allhtmlmaninstallinstalldirsuninstallcleandistclean:
1616
$(MAKE) -C src$@

‎doc/src/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ subdir = doc/src
44
top_builddir = ../..
55
include$(top_builddir)/src/Makefile.global
66

7-
alldistprephtmlmaninstallinstalldirsuninstallcleandistcleanmaintainer-clean:
7+
allhtmlmaninstallinstalldirsuninstallcleandistclean:
88
$(MAKE) -C sgml$@

‎doc/src/sgml/Makefile

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
#----------------------------------------------------------------------------
88

99
# This makefile is for building and installing the documentation.
10-
# When a release tarball is created, the documentation files are
11-
# prepared using the distprep target. In Git-based trees these files
10+
# In Git-based trees these files
1211
# don't exist, unless explicitly built, so we skip the installation in
1312
# that case.
1413

@@ -28,8 +27,6 @@ include $(top_builddir)/src/Makefile.global
2827

2928
all: html man
3029

31-
distprep: html distprep-man
32-
3330

3431
ifndefDBTOEPUB
3532
DBTOEPUB =$(missing) dbtoepub
@@ -77,7 +74,7 @@ postgres-full.xml: postgres.sgml $(ALLSGML)
7774
## Man pages
7875
##
7976

80-
mandistprep-man: man-stamp
77+
man: man-stamp
8178

8279
man-stamp: stylesheet-man.xsl postgres-full.xml
8380
$(XSLTPROC)$(XMLINCLUDE)$(XSLTPROCFLAGS)$(XSLTPROC_MAN_FLAGS)$^
@@ -89,10 +86,9 @@ man-stamp: stylesheet-man.xsl postgres-full.xml
8986
##
9087

9188
# Technically, this should depend on Makefile.global, but then
92-
# version.sgml would need to be rebuilt after every configure run,
93-
# even in distribution tarballs. So this is cheating a bit, but it
94-
# will achieve the goal of updating the version number when it
95-
# changes.
89+
# version.sgml would need to be rebuilt after every configure run. So
90+
# this is cheating a bit, but it will achieve the goal of updating the
91+
# version number when it changes.
9692
version.sgml:$(top_srcdir)/configure
9793
{ \
9894
echo"<!ENTITY version\"$(VERSION)\">";\
@@ -305,8 +301,6 @@ clean:
305301
rm -f *.texixml *.texi *.info db2texi.refs
306302

307303
distclean: clean
308-
309-
maintainer-clean: distclean
310304
# HTML
311305
rm -fr html/ html-stamp
312306
# man

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp