Remove distprep
authorPeter Eisentraut <[email protected]>
Mon, 6 Nov 2023 13:51:52 +0000 (14:51 +0100)
committerPeter Eisentraut <[email protected]>
Mon, 6 Nov 2023 14:18:04 +0000 (15:18 +0100)
A PostgreSQL release tarball contains a number of prebuilt files, in
particular files produced by bison, flex, perl, and well as html and
man documentation.  We have done this consistent with established
practice at the time to not require these tools for building from a
tarball.  Some of these tools were hard to get, or get the right
version of, from time to time, and shipping the prebuilt output was a
convenience to users.

Now this has at least two problems:

One, we have to make the build system(s) work in two modes: Building
from a git checkout and building from a tarball.  This is pretty
complicated, but it works so far for autoconf/make.  It does not
currently work for meson; you can currently only build with meson from
a git checkout.  Making meson builds work from a tarball seems very
difficult or impossible.  One particular problem is that since meson
requires a separate build directory, we cannot make the build update
files like gram.h in the source tree.  So if you were to build from a
tarball and update gram.y, you will have a gram.h in the source tree
and one in the build tree, but the way things work is that the
compiler 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 the
origin of software.  We can reasonably track contributions into the
git tree, and users can reasonably track the path from a tarball to
packages and downloads and installs.  But what happens between the git
tree 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 that
adds prebuilt files to the tarball.  The tarball now only contains
what is in the git tree (*).  Getting the additional build
dependencies is no longer a problem nowadays, and the complications to
keep these dual build modes working are significant.  And of course we
want to get the meson build system working universally.

This commit removes the make distprep target altogether.  The make
dist target continues to do its job, it just doesn't call distprep
anymore.

(*) - The tarball also contains the INSTALL file that is built at make
dist time, but not by distprep.  This is unchanged for now.

The make maintainer-clean target, whose job it is to remove the
prebuilt files in addition to what make distclean does, is now just an
alias to make distprep.  (In practice, it is probably obsolete given
that git clean is available.)

The following programs are now hard build requirements in configure
(they were already required by meson.build):

- bison
- flex
- perl

Reviewed-by: Michael Paquier <[email protected]>
Reviewed-by: Andres Freund <[email protected]>
Discussion: https://www.postgresql.org/message-id/flat/e07408d9-e5f2-d9fd-5672-f53354e9305e@eisentraut.org

89 files changed:
GNUmakefile.in
config/perl.m4
config/programs.m4
configure
contrib/cube/Makefile
contrib/fuzzystrmatch/Makefile
contrib/seg/Makefile
doc/Makefile
doc/src/Makefile
doc/src/sgml/Makefile
doc/src/sgml/installation.sgml
doc/src/sgml/sourcerepo.sgml
meson.build
src/Makefile
src/Makefile.global.in
src/backend/Makefile
src/backend/bootstrap/Makefile
src/backend/catalog/Makefile
src/backend/jit/llvm/Makefile
src/backend/nls.mk
src/backend/nodes/Makefile
src/backend/parser/Makefile
src/backend/port/Makefile
src/backend/replication/Makefile
src/backend/replication/libpqwalreceiver/Makefile
src/backend/replication/pgoutput/Makefile
src/backend/snowball/Makefile
src/backend/storage/lmgr/Makefile
src/backend/utils/Makefile
src/backend/utils/activity/Makefile
src/backend/utils/adt/Makefile
src/backend/utils/mb/Makefile
src/backend/utils/mb/Unicode/Makefile
src/backend/utils/mb/conversion_procs/proc.mk
src/backend/utils/misc/Makefile
src/bin/initdb/Makefile
src/bin/pg_amcheck/Makefile
src/bin/pg_archivecleanup/Makefile
src/bin/pg_basebackup/Makefile
src/bin/pg_checksums/Makefile
src/bin/pg_config/Makefile
src/bin/pg_controldata/Makefile
src/bin/pg_ctl/Makefile
src/bin/pg_dump/Makefile
src/bin/pg_resetwal/Makefile
src/bin/pg_rewind/Makefile
src/bin/pg_test_fsync/Makefile
src/bin/pg_test_timing/Makefile
src/bin/pg_upgrade/Makefile
src/bin/pg_verifybackup/Makefile
src/bin/pg_waldump/Makefile
src/bin/pgbench/Makefile
src/bin/psql/Makefile
src/bin/scripts/Makefile
src/common/Makefile
src/common/unicode/Makefile
src/fe_utils/Makefile
src/include/Makefile
src/interfaces/ecpg/Makefile
src/interfaces/ecpg/compatlib/Makefile
src/interfaces/ecpg/ecpglib/Makefile
src/interfaces/ecpg/include/Makefile
src/interfaces/ecpg/pgtypeslib/Makefile
src/interfaces/ecpg/preproc/Makefile
src/interfaces/ecpg/test/Makefile
src/interfaces/libpq/Makefile
src/interfaces/libpq/test/Makefile
src/makefiles/pgxs.mk
src/nls-global.mk
src/pl/plperl/GNUmakefile
src/pl/plpgsql/src/Makefile
src/pl/plpython/Makefile
src/pl/tcl/Makefile
src/port/Makefile
src/test/authentication/Makefile
src/test/examples/Makefile
src/test/icu/Makefile
src/test/isolation/Makefile
src/test/kerberos/Makefile
src/test/ldap/Makefile
src/test/locale/Makefile
src/test/recovery/Makefile
src/test/regress/GNUmakefile
src/test/ssl/Makefile
src/test/ssl/sslfiles.mk
src/test/subscription/Makefile
src/timezone/Makefile
src/tools/ifaddrs/Makefile
src/tools/pg_bsd_indent/Makefile

index 9c18c562330c5beefb239db52359c7fa27012c1b..80db4c73f81b301e5cf3376e27d1b2c3942a46d8 100644 (file)
@@ -41,7 +41,7 @@ install-world-bin-contrib-recurse: install-world-bin-src-recurse
 
 $(call recurse,installdirs uninstall init-po update-po,doc src config)
 
-$(call recurse,distprep coverage,doc src config contrib)
+$(call recurse,coverage,doc src config contrib)
 
 # clean, distclean, etc should apply to contrib too, even though
 # it's not built by default
@@ -53,7 +53,7 @@ clean:
 
 # Important: distclean `src' last, otherwise Makefile.global
 # will be gone too soon.
-distclean maintainer-clean:
+distclean:
        $(MAKE) -C doc $@
        $(MAKE) -C contrib $@
        $(MAKE) -C config $@
@@ -109,7 +109,6 @@ distdir:
              || cp "$(top_srcdir)/$$file" "$(distdir)/$$file"; \
          fi || exit; \
        done
-       $(MAKE) -C $(distdir) distprep
        $(MAKE) -C $(distdir)/doc/src/sgml/ INSTALL
        cp $(distdir)/doc/src/sgml/INSTALL $(distdir)/
        $(MAKE) -C $(distdir) distclean
@@ -122,7 +121,6 @@ distcheck: dist
        install_prefix=`cd $(dummy) && pwd`; \
        cd $(distdir) \
        && ./configure --prefix="$$install_prefix"
-       $(MAKE) -C $(distdir) -q distprep
        $(MAKE) -C $(distdir)
        $(MAKE) -C $(distdir) install
        $(MAKE) -C $(distdir) uninstall
index 8126e79f67dcb27103dd829b64c56e764dd0b20b..1a3bb5564985ddd490098653057fdee785e8a754 100644 (file)
@@ -13,19 +13,14 @@ if test "$PERL"; then
   if echo "$pgac_perl_version" | sed ['s/[.a-z_]/ /g'] | \
     $AWK '{ if ([$]1 == 5 && ([$]2 >= 14)) exit 1; else exit 0;}'
   then
-    AC_MSG_WARN([
+    AC_MSG_ERROR([
 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
 *** Perl version 5.14 or later is required, but this is $pgac_perl_version.])
-    PERL=""
   fi
 fi
 
 if test -z "$PERL"; then
-  AC_MSG_WARN([
-*** Without Perl you will not be able to build PostgreSQL from Git.
-*** You can obtain Perl from any CPAN mirror site.
-*** (If you are using the official distribution of PostgreSQL then you do not
-*** need to worry about this, because the Perl output is pre-generated.)])
+  AC_MSG_ERROR([Perl not found])
 fi
 ])# PGAC_PATH_PERL
 
index 8a118b4e03483539b9ca4c6df49736b4a7f572ff..490ec9fe9f5d8e1a113bab039f86e5161eda7553 100644 (file)
@@ -33,10 +33,9 @@ if test "$BISON"; then
   AC_MSG_NOTICE([using $pgac_bison_version])
   if echo "$pgac_bison_version" | $AWK '{ if ([$]4 < 2.3) exit 0; else exit 1;}'
   then
-    AC_MSG_WARN([
+    AC_MSG_ERROR([
 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
 *** Bison version 2.3 or later is required, but this is $pgac_bison_version.])
-    BISON=""
   fi
   # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
   # of the now preferred %name-prefix "base_yy", but the latter
@@ -49,12 +48,7 @@ if test "$BISON"; then
 fi
 
 if test -z "$BISON"; then
-  AC_MSG_WARN([
-*** Without Bison you will not be able to build PostgreSQL from Git nor
-*** change any of the parser definition files.  You can obtain Bison from
-*** a GNU mirror site.  (If you are using the official distribution of
-*** PostgreSQL then you do not need to worry about this, because the Bison
-*** output is pre-generated.)])
+  AC_MSG_ERROR([bison not found])
 fi
 dnl We don't need AC_SUBST(BISON) because PGAC_PATH_PROGS did it
 AC_SUBST(BISONFLAGS)
@@ -95,7 +89,7 @@ else
             pgac_cv_path_flex=$pgac_candidate
             break 2
           else
-            AC_MSG_WARN([
+            AC_MSG_ERROR([
 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
 *** Flex version 2.5.35 or later is required, but this is $pgac_flex_version.])
           fi
@@ -109,14 +103,7 @@ fi
 ])[]dnl AC_CACHE_CHECK
 
 if test x"$pgac_cv_path_flex" = x"no"; then
-  AC_MSG_WARN([
-*** Without Flex you will not be able to build PostgreSQL from Git nor
-*** change any of the scanner definition files.  You can obtain Flex from
-*** a GNU mirror site.  (If you are using the official distribution of
-*** PostgreSQL then you do not need to worry about this because the Flex
-*** output is pre-generated.)])
-
-  FLEX=
+  AC_MSG_ERROR([flex not found])
 else
   FLEX=$pgac_cv_path_flex
   pgac_flex_version=`$FLEX --version 2>/dev/null`
index cfd968235f7737367c9d1daef0ac017abd8c3ba0..c064115038387ce02e293c06dea42e5a7fe59083 100755 (executable)
--- a/configure
+++ b/configure
@@ -10162,13 +10162,9 @@ if test "$BISON"; then
 $as_echo "$as_me: using $pgac_bison_version" >&6;}
   if echo "$pgac_bison_version" | $AWK '{ if ($4 < 2.3) exit 0; else exit 1;}'
   then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
-*** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
-*** Bison version 2.3 or later is required, but this is $pgac_bison_version." >&5
-$as_echo "$as_me: WARNING:
+    as_fn_error $? "
 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
-*** Bison version 2.3 or later is required, but this is $pgac_bison_version." >&2;}
-    BISON=""
+*** Bison version 2.3 or later is required, but this is $pgac_bison_version." "$LINENO" 5
   fi
   # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
   # of the now preferred %name-prefix "base_yy", but the latter
@@ -10181,18 +10177,7 @@ $as_echo "$as_me: WARNING:
 fi
 
 if test -z "$BISON"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
-*** Without Bison you will not be able to build PostgreSQL from Git nor
-*** change any of the parser definition files.  You can obtain Bison from
-*** a GNU mirror site.  (If you are using the official distribution of
-*** PostgreSQL then you do not need to worry about this, because the Bison
-*** output is pre-generated.)" >&5
-$as_echo "$as_me: WARNING:
-*** Without Bison you will not be able to build PostgreSQL from Git nor
-*** change any of the parser definition files.  You can obtain Bison from
-*** a GNU mirror site.  (If you are using the official distribution of
-*** PostgreSQL then you do not need to worry about this, because the Bison
-*** output is pre-generated.)" >&2;}
+  as_fn_error $? "bison not found" "$LINENO" 5
 fi
 
 
@@ -10225,12 +10210,9 @@ else
             pgac_cv_path_flex=$pgac_candidate
             break 2
           else
-            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
-*** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
-*** Flex version 2.5.35 or later is required, but this is $pgac_flex_version." >&5
-$as_echo "$as_me: WARNING:
+            as_fn_error $? "
 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
-*** Flex version 2.5.35 or later is required, but this is $pgac_flex_version." >&2;}
+*** Flex version 2.5.35 or later is required, but this is $pgac_flex_version." "$LINENO" 5
           fi
         fi
       fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
 $as_echo "$pgac_cv_path_flex" >&6; }
 if test x"$pgac_cv_path_flex" = x"no"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
-*** Without Flex you will not be able to build PostgreSQL from Git nor
-*** change any of the scanner definition files.  You can obtain Flex from
-*** a GNU mirror site.  (If you are using the official distribution of
-*** PostgreSQL then you do not need to worry about this because the Flex
-*** output is pre-generated.)" >&5
-$as_echo "$as_me: WARNING:
-*** Without Flex you will not be able to build PostgreSQL from Git nor
-*** change any of the scanner definition files.  You can obtain Flex from
-*** a GNU mirror site.  (If you are using the official distribution of
-*** PostgreSQL then you do not need to worry about this because the Flex
-*** output is pre-generated.)" >&2;}
-
-  FLEX=
+  as_fn_error $? "flex not found" "$LINENO" 5
 else
   FLEX=$pgac_cv_path_flex
   pgac_flex_version=`$FLEX --version 2>/dev/null`
@@ -10331,27 +10300,14 @@ $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
   if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
     $AWK '{ if ($1 == 5 && ($2 >= 14)) exit 1; else exit 0;}'
   then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
-*** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
-*** Perl version 5.14 or later is required, but this is $pgac_perl_version." >&5
-$as_echo "$as_me: WARNING:
+    as_fn_error $? "
 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
-*** Perl version 5.14 or later is required, but this is $pgac_perl_version." >&2;}
-    PERL=""
+*** Perl version 5.14 or later is required, but this is $pgac_perl_version." "$LINENO" 5
   fi
 fi
 
 if test -z "$PERL"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
-*** Without Perl you will not be able to build PostgreSQL from Git.
-*** You can obtain Perl from any CPAN mirror site.
-*** (If you are using the official distribution of PostgreSQL then you do not
-*** need to worry about this, because the Perl output is pre-generated.)" >&5
-$as_echo "$as_me: WARNING:
-*** Without Perl you will not be able to build PostgreSQL from Git.
-*** You can obtain Perl from any CPAN mirror site.
-*** (If you are using the official distribution of PostgreSQL then you do not
-*** need to worry about this, because the Perl output is pre-generated.)" >&2;}
+  as_fn_error $? "Perl not found" "$LINENO" 5
 fi
 
 if test "$with_perl" = yes; then
index 4fd19aac359faf72458f4da89139fd157a5937c2..dfb0d806e4b97d870a93bf3bf024e819beb83220 100644 (file)
@@ -18,6 +18,8 @@ REGRESS = cube cube_sci
 
 SHLIB_LINK += $(filter -lm, $(LIBS))
 
+EXTRA_CLEAN = cubeparse.h cubeparse.c cubescan.c
+
 ifdef USE_PGXS
 PG_CONFIG = pg_config
 PGXS := $(shell $(PG_CONFIG) --pgxs)
@@ -37,8 +39,3 @@ cubeparse.c: BISONFLAGS += -d
 
 # Force these dependencies to be known even without dependency info built:
 cubeparse.o cubescan.o: cubeparse.h
-
-distprep: cubeparse.c cubescan.c
-
-maintainer-clean:
-       rm -f cubeparse.h cubeparse.c cubescan.c
index e68bc0e33fd6cb7e717ddee80e6a57746f4d2a0b..04c83a34a7b61a2f07822d35464f07ebea48fc24 100644 (file)
@@ -15,6 +15,8 @@ PGFILEDESC = "fuzzystrmatch - similarities and distance between strings"
 
 REGRESS = fuzzystrmatch fuzzystrmatch_utf8
 
+EXTRA_CLEAN = daitch_mokotoff.h
+
 ifdef USE_PGXS
 PG_CONFIG = pg_config
 PGXS := $(shell $(PG_CONFIG) --pgxs)
@@ -31,10 +33,3 @@ daitch_mokotoff.o: daitch_mokotoff.h
 
 daitch_mokotoff.h: daitch_mokotoff_header.pl
        $(PERL) $< $@
-
-# daitch_mokotoff.h is included in tarballs, so it has to be made by
-# "distprep" and not cleaned except by "maintainer-clean".
-distprep: daitch_mokotoff.h
-
-maintainer-clean:
-       rm -f daitch_mokotoff.h
index a1e49bf051e3d6128d8ec1cedc04e86d8236289c..132ec8dbfeaab88f4b63aba0cd5b9b09c2c37b16 100644 (file)
@@ -16,7 +16,7 @@ HEADERS = segdata.h
 
 REGRESS = security seg
 
-EXTRA_CLEAN = y.tab.c y.tab.h
+EXTRA_CLEAN = segparse.h segparse.c segscan.c
 
 ifdef USE_PGXS
 PG_CONFIG = pg_config
@@ -38,8 +38,3 @@ segparse.c: BISONFLAGS += -d
 
 # Force these dependencies to be known even without dependency info built:
 segparse.o segscan.o: segparse.h
-
-distprep: segparse.c segscan.c
-
-maintainer-clean:
-       rm -f segparse.h segparse.c segscan.c
index aee3cc09654d792944c8ecffc308e626ce88e886..24370fc903024798fe33962b334ff7fb31669f16 100644 (file)
@@ -12,5 +12,5 @@ subdir = doc
 top_builddir = ..
 include $(top_builddir)/src/Makefile.global
 
-all distprep html man install installdirs uninstall clean distclean maintainer-clean:
+all html man install installdirs uninstall clean distclean:
        $(MAKE) -C src $@
index 30d883815aa47cf28c0f8b11d3eea64120a1ffb7..2ed02084ff57dc2559b84f9397aa5279506f3c60 100644 (file)
@@ -4,5 +4,5 @@ subdir = doc/src
 top_builddir = ../..
 include $(top_builddir)/src/Makefile.global
 
-all distprep html man install installdirs uninstall clean distclean maintainer-clean:
+all html man install installdirs uninstall clean distclean:
        $(MAKE) -C sgml $@
index 1e55e531dbfd9a4b64c654ce5f9c45da1f547b3d..49d35dd0d6ece55624d4b27390f759acaf3665ea 100644 (file)
@@ -7,8 +7,7 @@
 #----------------------------------------------------------------------------
 
 # This makefile is for building and installing the documentation.
-# When a release tarball is created, the documentation files are
-# prepared using the distprep target.  In Git-based trees these files
+# In Git-based trees these files
 # don't exist, unless explicitly built, so we skip the installation in
 # that case.
 
@@ -28,8 +27,6 @@ include $(top_builddir)/src/Makefile.global
 
 all: html man
 
-distprep: html distprep-man
-
 
 ifndef DBTOEPUB
 DBTOEPUB = $(missing) dbtoepub
@@ -77,7 +74,7 @@ postgres-full.xml: postgres.sgml $(ALLSGML)
 ## Man pages
 ##
 
-man distprep-man: man-stamp
+man: man-stamp
 
 man-stamp: stylesheet-man.xsl postgres-full.xml
        $(XSLTPROC) $(XMLINCLUDE) $(XSLTPROCFLAGS) $(XSLTPROC_MAN_FLAGS) $^
@@ -89,10 +86,9 @@ man-stamp: stylesheet-man.xsl postgres-full.xml
 ##
 
 # Technically, this should depend on Makefile.global, but then
-# version.sgml would need to be rebuilt after every configure run,
-# even in distribution tarballs.  So this is cheating a bit, but it
-# will achieve the goal of updating the version number when it
-# changes.
+# version.sgml would need to be rebuilt after every configure run.  So
+# this is cheating a bit, but it will achieve the goal of updating the
+# version number when it changes.
 version.sgml: $(top_srcdir)/configure
        { \
          echo "<!ENTITY version \"$(VERSION)\">"; \
@@ -305,8 +301,6 @@ clean:
        rm -f *.texixml *.texi *.info db2texi.refs
 
 distclean: clean
-
-maintainer-clean: distclean
 # HTML
        rm -fr html/ html-stamp
 # man
index 9b25e9fdb1b0bf9453faa4347aeea4b26435693a..a3dc6eb855ff49eb7cd8992b8b9a280bf235f2d4 100644 (file)
@@ -72,8 +72,7 @@ documentation.  See standalone-profile.xsl for details.
 
       Alternatively, <productname>PostgreSQL</productname> can be built using
       <ulink url="https://mesonbuild.com/">Meson</ulink>.  This is currently
-      experimental and only works when building from a Git checkout (not from
-      a distribution tarball).  If you choose to use
+      experimental.  If you choose to use
       <application>Meson</application>, then you don't need
       <acronym>GNU</acronym> <application>make</application>, but the other
       requirements below still apply.
@@ -102,6 +101,41 @@ documentation.  See standalone-profile.xsl for details.
      </para>
     </listitem>
 
+    <listitem>
+     <para>
+      <indexterm>
+       <primary>flex</primary>
+      </indexterm>
+      <indexterm>
+       <primary>lex</primary>
+      </indexterm>
+      <indexterm>
+       <primary>bison</primary>
+      </indexterm>
+      <indexterm>
+       <primary>yacc</primary>
+      </indexterm>
+
+      <application>Flex</application> 2.5.35 or later and
+      <application>Bison</application> 2.3 or later are required.  Other
+      <application>lex</application> and <application>yacc</application>
+      programs cannot be used.
+     </para>
+    </listitem>
+
+    <listitem>
+     <para>
+      <indexterm>
+       <primary>perl</primary>
+      </indexterm>
+
+      <application>Perl</application> 5.14 or later is needed during the build
+      process and to run some test suites.  (This requirement is separate from
+      the requirements for building <application>PL/Perl</application>; see
+      below.)
+     </para>
+    </listitem>
+
     <listitem>
      <para>
       <indexterm>
@@ -315,51 +349,6 @@ documentation.  See standalone-profile.xsl for details.
    </itemizedlist>
   </para>
 
-  <para>
-   If you are building from a <productname>Git</productname> tree instead of
-   using a released source package, or if you want to do server development,
-   you also need the following packages:
-
-   <itemizedlist>
-    <listitem>
-     <para>
-      <indexterm>
-       <primary>flex</primary>
-      </indexterm>
-      <indexterm>
-       <primary>lex</primary>
-      </indexterm>
-      <indexterm>
-       <primary>bison</primary>
-      </indexterm>
-      <indexterm>
-       <primary>yacc</primary>
-      </indexterm>
-
-      <application>Flex</application> and <application>Bison</application>
-      are needed to build from a Git checkout, or if you changed the actual
-      scanner and parser definition files. If you need them, be sure
-      to get <application>Flex</application> 2.5.35 or later and
-      <application>Bison</application> 2.3 or later. Other <application>lex</application>
-      and <application>yacc</application> programs cannot be used.
-     </para>
-    </listitem>
-    <listitem>
-     <para>
-      <indexterm>
-       <primary>perl</primary>
-      </indexterm>
-
-      <application>Perl</application> 5.14 or later is needed to build from a Git checkout,
-      or if you changed the input files for any of the build steps that
-      use Perl scripts.  If building on Windows you will need
-      <application>Perl</application> in any case.  <application>Perl</application> is
-      also required to run some test suites.
-     </para>
-    </listitem>
-   </itemizedlist>
-  </para>
-
   <para>
    If you need to get a <acronym>GNU</acronym> package, you can find
    it at your local <acronym>GNU</acronym> mirror site (see <ulink
index 07b003a7941ca76627a46fec7ce64e06c6562a10..6c13c5a30cde6432a6d546402a6bd40a58dbd4ad 100644 (file)
   has some discussion on working with Git.
  </para>
 
-  <para>
-   Note that building <productname>PostgreSQL</productname> from the source
-   repository requires reasonably up-to-date versions of <application>bison</application>,
-   <application>flex</application>, and <application>Perl</application>.
-   These tools are not needed to build from a distribution tarball, because
-   the files generated with these tools are included in the tarball.
-   Other tool requirements
-   are the same as shown in <xref linkend="install-requirements"/>.
-  </para>
-
  <sect1 id="git">
   <title>Getting the Source via <productname>Git</productname></title>
 
index 2d516c8f372a7d9550ba8dd2bfd15581fff647ac..88a9d9051fe391c05a18a28cb6e48d4ea883524c 100644 (file)
@@ -72,7 +72,7 @@ configure. Alternatively use a separate check out for meson based builds.
 @0@
 ****'''
 if fs.exists(meson.current_source_dir() / 'src' / 'include' / 'pg_config.h')
-  errmsg_cleanup = 'To clean up, run make maintainer-clean in the source tree.'
+  errmsg_cleanup = 'To clean up, run make distclean in the source tree.'
   error(errmsg_nonclean_base.format(errmsg_cleanup))
 endif
 
index 94649c36c7a46db1a4920c9b73704aa108960e91..2f31a2f20a71379e575404d675db0f637562145d 100644 (file)
@@ -59,16 +59,13 @@ uninstall: uninstall-local
 uninstall-local:
        rm -f $(addprefix '$(DESTDIR)$(pgxsdir)/$(subdir)'/, Makefile.global Makefile.port Makefile.shlib nls-global.mk)
 
-distprep:
-       $(MAKE) -C test/isolation $@
-
 clean:
        $(MAKE) -C test $@
        $(MAKE) -C tutorial NO_PGXS=1 $@
        $(MAKE) -C test/isolation $@
        $(MAKE) -C tools/pg_bsd_indent $@
 
-distclean maintainer-clean:
+distclean:
        $(MAKE) -C test $@
        $(MAKE) -C tutorial NO_PGXS=1 $@
        $(MAKE) -C test/isolation $@
index 7b66590801e07fb96625ab925579f011366e5543..b3ca6392a6b476bb6d37ed3b782ff8300d534f45 100644 (file)
 #
 # Meta configuration
 
-standard_targets = all install installdirs uninstall distprep clean distclean maintainer-clean coverage check checkprep installcheck init-po update-po
+standard_targets = all install installdirs uninstall clean distclean coverage check checkprep installcheck init-po update-po
 # these targets should recurse even into subdirectories not being built:
-standard_always_targets = distprep clean distclean maintainer-clean
+standard_always_targets = clean distclean
 
-.PHONY: $(standard_targets) install-strip html man installcheck-parallel update-unicode
+.PHONY: $(standard_targets) maintainer-clean install-strip html man installcheck-parallel update-unicode
 
 # make `all' the default target
 all:
@@ -35,6 +35,8 @@ all:
 # Never delete any intermediate files automatically.
 .SECONDARY:
 
+maintainer-clean: distclean
+
 # PostgreSQL version number
 VERSION = @PACKAGE_VERSION@
 MAJORVERSION = @PG_MAJORVERSION@
@@ -319,12 +321,8 @@ X = @EXEEXT@
 
 # Perl
 
-ifneq (@PERL@,)
-    # quoted to protect pathname with spaces
-    PERL               = '@PERL@'
-else
-    PERL               = $(missing) perl
-endif
+# quoted to protect pathname with spaces
+PERL           = '@PERL@'
 perl_archlibexp                = @perl_archlibexp@
 perl_privlibexp                = @perl_privlibexp@
 perl_includespec       = @perl_includespec@
@@ -777,21 +775,13 @@ TAS         = @TAS@
 # Global targets and rules
 
 %.c: %.l
-ifdef FLEX
        $(FLEX) $(if $(FLEX_NO_BACKUP),-b) $(FLEXFLAGS) -o'$@' $<
        @$(if $(FLEX_NO_BACKUP),if [ `wc -l <lex.backup` -eq 1 ]; then rm lex.backup; else echo "Scanner requires backup; see lex.backup." 1>&2; exit 1; fi)
        $(if $(FLEX_FIX_WARNING),$(PERL) $(top_srcdir)/src/tools/fix-old-flex-code.pl '$@')
-else
-       @$(missing) flex $< '$@'
-endif
 
 %.c: %.y
        $(if $(BISON_CHECK_CMD),$(BISON_CHECK_CMD))
-ifdef BISON
        $(BISON) $(BISONFLAGS) -o $@ $<
-else
-       @$(missing) bison $< $@
-endif
 
 %.i: %.c
        $(CPP) $(CPPFLAGS) -o $@ $<
@@ -919,7 +909,7 @@ recurse = $(foreach target,$(if $1,$1,$(standard_targets)),$(foreach subdir,$(if
 # If a makefile's list of SUBDIRS varies depending on configuration, then
 # any subdirectories excluded from SUBDIRS should instead be added to
 # ALWAYS_SUBDIRS, and then it must call recurse_always as well as recurse.
-# This ensures that distprep, distclean, etc will apply to all subdirectories.
+# This ensures that distclean, etc will apply to all subdirectories.
 # In the normal case all arguments will be defaulted.
 # $1: targets to make recursive (defaults to standard_always_targets)
 # $2: list of subdirs (defaults to ALWAYS_SUBDIRS variable)
@@ -974,7 +964,7 @@ include $(Po_files)
 endif
 
 # hook for clean-up
-clean distclean maintainer-clean: clean-deps
+clean distclean: clean-deps
 
 .PHONY: clean-deps
 clean-deps:
@@ -1058,7 +1048,7 @@ lcov_test.info: $(all_gcda_files)
 
 
 # hook for clean-up
-clean distclean maintainer-clean: clean-coverage
+clean distclean: clean-coverage
 
 .PHONY: clean-coverage
 clean-coverage:
index 3e275ac7599db5de16f3e183f95246465808cd6d..0a475f01a4a41d985bc7816afbae8fa8e69b0dd9 100644 (file)
@@ -138,42 +138,33 @@ utils/activity/wait_event_types.h: utils/activity/generate-wait_event_types.pl u
 
 # run this unconditionally to avoid needing to know its dependencies here:
 submake-catalog-headers:
-       $(MAKE) -C catalog distprep generated-header-symlinks
+       $(MAKE) -C catalog generated-header-symlinks
 
 # run this unconditionally to avoid needing to know its dependencies here:
 submake-nodes-headers:
-       $(MAKE) -C nodes distprep generated-header-symlinks
+       $(MAKE) -C nodes generated-header-symlinks
 
 # run this unconditionally to avoid needing to know its dependencies here:
 submake-utils-headers:
-       $(MAKE) -C utils distprep generated-header-symlinks
+       $(MAKE) -C utils generated-header-symlinks
 
 .PHONY: submake-catalog-headers submake-nodes-headers submake-utils-headers
 
 # Make symlinks for these headers in the include directory. That way
 # we can cut down on the -I options. Also, a symlink is automatically
 # up to date when we update the base file.
-#
-# The point of the prereqdir incantation in some of the rules below is to
-# force the symlink to use an absolute path rather than a relative path.
-# For headers which are generated by make distprep, the actual header within
-# src/backend will be in the source tree, while the symlink in src/include
-# will be in the build tree, so a simple ../.. reference won't work.
-# For headers generated during regular builds, we prefer a relative symlink.
 
 .PHONY: generated-headers
 
-generated-headers: $(top_builddir)/src/include/storage/lwlocknames.h $(top_builddir)/src/include/utils/wait_event_types.h submake-catalog-headers submake-nodes-headers submake-utils-headers
+generated-headers: $(top_builddir)/src/include/storage/lwlocknames.h $(top_builddir)/src/include/utils/wait_event_types.h submake-catalog-headers submake-nodes-headers submake-utils-headers parser/gram.h
 
 $(top_builddir)/src/include/storage/lwlocknames.h: storage/lmgr/lwlocknames.h
-       prereqdir=`cd '$(dir $<)' >/dev/null && pwd` && \
-         cd '$(dir $@)' && rm -f $(notdir $@) && \
-         $(LN_S) "$$prereqdir/$(notdir $<)" .
+       rm -f '$@'
+       $(LN_S) ../../backend/$< '$@'
 
 $(top_builddir)/src/include/utils/wait_event_types.h: utils/activity/wait_event_types.h
-       prereqdir=`cd '$(dir $<)' >/dev/null && pwd` && \
-         cd '$(dir $@)' && rm -f $(notdir $@) && \
-         $(LN_S) "$$prereqdir/$(notdir $<)" .
+       rm -f '$@'
+       $(LN_S) ../../backend/$< '$@'
 
 utils/probes.o: utils/probes.d $(SUBDIROBJS)
        $(DTRACE) $(DTRACEFLAGS) -C -G -s $(call expand_subsys,$^) -o $@
@@ -181,16 +172,12 @@ utils/probes.o: utils/probes.d $(SUBDIROBJS)
 
 ##########################################################################
 
-# Be sure that these files get removed by the maintainer-clean target
-distprep:
+# This target is only needed by nls.mk.
+.PHONY: generated-parser-sources
+generated-parser-sources:
        $(MAKE) -C parser       gram.c gram.h scan.c
        $(MAKE) -C bootstrap    bootparse.c bootparse.h bootscanner.c
-       $(MAKE) -C catalog      distprep
-       $(MAKE) -C nodes        distprep
        $(MAKE) -C replication  repl_gram.c repl_gram.h repl_scanner.c syncrep_gram.c syncrep_gram.h syncrep_scanner.c
-       $(MAKE) -C storage/lmgr lwlocknames.h lwlocknames.c
-       $(MAKE) -C utils        distprep
-       $(MAKE) -C utils/activity       wait_event_types.h pgstat_wait_event.c
        $(MAKE) -C utils/adt    jsonpath_gram.c jsonpath_gram.h jsonpath_scan.c
        $(MAKE) -C utils/misc   guc-file.c
 
@@ -290,34 +277,9 @@ ifeq ($(PORTNAME), win32)
 endif
 
 distclean: clean
+# generated by configure
        rm -f port/tas.s port/pg_sema.c port/pg_shmem.c
 
-maintainer-clean: distclean
-       $(MAKE) -C catalog $@
-       $(MAKE) -C nodes $@
-       $(MAKE) -C utils $@
-       rm -f bootstrap/bootparse.c \
-             bootstrap/bootparse.h \
-             bootstrap/bootscanner.c \
-             parser/gram.c \
-             parser/gram.h \
-             parser/scan.c \
-             replication/repl_gram.c \
-             replication/repl_gram.h \
-             replication/repl_scanner.c \
-             replication/syncrep_gram.c \
-             replication/syncrep_gram.h \
-             replication/syncrep_scanner.c \
-             storage/lmgr/lwlocknames.c \
-             storage/lmgr/lwlocknames.h \
-             utils/activity/pgstat_wait_event.c \
-             utils/activity/wait_event_funcs_data.c \
-             utils/activity/wait_event_types.h \
-             utils/adt/jsonpath_gram.c \
-             utils/adt/jsonpath_gram.h \
-             utils/adt/jsonpath_scan.c \
-             utils/misc/guc-file.c
-
 
 ##########################################################################
 #
index 606c8021e766b8e361e1894b827a38a0a18818a1..509b51e6483111e9d829c32dd9990b686db597de 100644 (file)
@@ -28,5 +28,7 @@ bootparse.c: BISONFLAGS += -d
 # Force these dependencies to be known even without dependency info built:
 bootparse.o bootscanner.o: bootparse.h
 
-# bootparse.c and bootscanner.c are in the distribution tarball, so
-# they are not cleaned here.
+clean:
+       rm -f bootparse.c \
+             bootparse.h \
+             bootscanner.c
index 3e9994793d60ad1bd17814ab5c7ed65be6192d12..ec7b6f53624f2410b0f786664fe9593db2583e5f 100644 (file)
@@ -152,9 +152,7 @@ POSTGRES_BKI_DATA = $(addprefix $(top_srcdir)/src/include/catalog/,\
        pg_type.dat \
        )
 
-all: distprep generated-header-symlinks
-
-distprep: bki-stamp
+all: generated-header-symlinks
 
 .PHONY: generated-header-symlinks
 
@@ -173,14 +171,12 @@ bki-stamp: genbki.pl Catalog.pm $(POSTGRES_BKI_SRCS) $(POSTGRES_BKI_DATA) $(top_
                --set-version=$(MAJORVERSION) $(POSTGRES_BKI_SRCS)
        touch $@
 
-# The generated headers must all be symlinked into builddir/src/include/,
-# using absolute links for the reasons explained in src/backend/Makefile.
+# The generated headers must all be symlinked into src/include/.
 # We use header-stamp to record that we've done this because the symlinks
 # themselves may appear older than bki-stamp.
 $(top_builddir)/src/include/catalog/header-stamp: bki-stamp
-       prereqdir=`cd '$(dir $<)' >/dev/null && pwd` && \
        cd '$(dir $@)' && for file in $(GENERATED_HEADERS); do \
-         rm -f $$file && $(LN_S) "$$prereqdir/$$file" . ; \
+         rm -f $$file && $(LN_S) "../../../$(subdir)/$$file" . ; \
        done
        touch $@
 
@@ -201,9 +197,5 @@ installdirs:
 uninstall-data:
        rm -f $(addprefix '$(DESTDIR)$(datadir)'/, postgres.bki system_constraints.sql system_functions.sql system_views.sql information_schema.sql sql_features.txt)
 
-# postgres.bki, system_constraints.sql, and the generated headers are
-# in the distribution tarball, so they are not cleaned here.
 clean:
-
-maintainer-clean: clean
        rm -f bki-stamp postgres.bki system_constraints.sql $(GENERATED_HEADERS)
index 2da122a391e587f62eb5d7c48b23b1da2b957fff..0036c4f55209c6e16735f337b1e3bd112046e2de 100644 (file)
@@ -71,6 +71,6 @@ uninstall-types:
 
 include $(top_srcdir)/src/Makefile.shlib
 
-clean distclean maintainer-clean: clean-lib
+clean distclean: clean-lib
        rm -f $(OBJS)
        rm -f llvmjit_types.bc
index 8263527c8514de21394e38a699d9c8899b8ca591..dfb053c2a79f31dc26428faf9a531e9ba6613987 100644 (file)
@@ -22,7 +22,7 @@ GETTEXT_FLAGS    = $(BACKEND_COMMON_GETTEXT_FLAGS) \
     report_invalid_record:2:c-format \
     ereport_startup_progress:1:c-format
 
-gettext-files: distprep
+gettext-files: generated-parser-sources generated-headers
        find $(srcdir) $(srcdir)/../common $(srcdir)/../port -name '*.c' -print | LC_ALL=C sort >$@
 
 my-clean:
index 0a95e683d0f9608658e17da63905f37e0689881a..ebbe9052cb76693caf915bb059a3595d08484667 100644 (file)
@@ -65,9 +65,7 @@ node_headers = \
 
 # see also catalog/Makefile for an explanation of these make rules
 
-all: distprep generated-header-symlinks
-
-distprep: node-support-stamp
+all: generated-header-symlinks
 
 .PHONY: generated-header-symlinks
 
@@ -81,14 +79,12 @@ node-support-stamp: gen_node_support.pl $(addprefix $(top_srcdir)/src/include/,$
        $(PERL) $^
        touch $@
 
-# These generated headers must be symlinked into builddir/src/include/,
-# using absolute links for the reasons explained in src/backend/Makefile.
+# These generated headers must be symlinked into src/include/.
 # We use header-stamp to record that we've done this because the symlinks
 # themselves may appear older than node-support-stamp.
 $(top_builddir)/src/include/nodes/header-stamp: node-support-stamp
-       prereqdir=`cd '$(dir $<)' >/dev/null && pwd` && \
        cd '$(dir $@)' && for file in nodetags.h; do \
-         rm -f $$file && $(LN_S) "$$prereqdir/$$file" . ; \
+         rm -f $$file && $(LN_S) "../../../$(subdir)/$$file" . ; \
        done
        touch $@
 
@@ -98,5 +94,5 @@ outfuncs.o: outfuncs.c outfuncs.funcs.c outfuncs.switch.c | node-support-stamp
 queryjumblefuncs.o: queryjumblefuncs.c queryjumblefuncs.funcs.c queryjumblefuncs.switch.c | node-support-stamp
 readfuncs.o:  readfuncs.c readfuncs.funcs.c readfuncs.switch.c | node-support-stamp
 
-maintainer-clean: clean
+clean:
        rm -f node-support-stamp $(addsuffix funcs.funcs.c,copy equal out queryjumble read) $(addsuffix funcs.switch.c,copy equal out queryjumble read) nodetags.h
index 9f1c4022bbe00176d747150d6f7840ac91b1afc6..401c16686c65dc4d78e48dc39e0e777779ef4ffb 100644 (file)
@@ -64,8 +64,8 @@ scan.c: FLEX_FIX_WARNING=yes
 # Force these dependencies to be known even without dependency info built:
 gram.o scan.o parser.o: gram.h
 
-
-# gram.c, gram.h, and scan.c are in the distribution tarball, so they
-# are not cleaned here.
-clean distclean maintainer-clean:
+clean:
+       rm -f gram.c \
+             gram.h \
+             scan.c
        rm -f lex.backup
index 2d00b4f05a7fd994a8b337163ff519c5ed7046a3..47338d99229576bf5cd12ec615ca59470d845120 100644 (file)
@@ -43,6 +43,6 @@ else
        $(CC) $(CFLAGS) -c $<
 endif
 
-distclean clean:
+clean:
        rm -f tas_cpp.s
        $(MAKE) -C win32 clean
index 23f29ba5457547bd553919312cfbcb1ebbda7774..7f867ee91dda82da090a50e6b0a760f5a6362cab 100644 (file)
@@ -48,6 +48,10 @@ syncrep_gram.c: BISONFLAGS += -d
 # Force these dependencies to be known even without dependency info built:
 syncrep_gram.o syncrep_scanner.o: syncrep_gram.h
 
-# repl_gram.c, repl_scanner.c, syncrep_gram.c and syncrep_scanner.c
-# are in the distribution tarball, so they are not cleaned here.
-# (Our parent Makefile takes care of them during maintainer-clean.)
+clean:
+       rm -f repl_gram.c \
+             repl_gram.h \
+             repl_scanner.c \
+             syncrep_gram.c \
+             syncrep_gram.h \
+             syncrep_scanner.c
index f26daa135f3dbef959fd4f908533df2df1b3d5bd..e882907350713c6c93aeb381842f9343dbeef94d 100644 (file)
@@ -33,5 +33,5 @@ installdirs: installdirs-lib
 
 uninstall: uninstall-lib
 
-clean distclean maintainer-clean: clean-lib
+clean distclean: clean-lib
        rm -f $(OBJS)
index 3b41fbcfac244f5e9e85a5bd2edfb9602f994e3c..d89d317fe7a271475598caa797abb1040fb1e646 100644 (file)
@@ -28,5 +28,5 @@ installdirs: installdirs-lib
 
 uninstall: uninstall-lib
 
-clean distclean maintainer-clean: clean-lib
+clean distclean: clean-lib
        rm -f $(OBJS)
index 4bebfa02506934adbe0b8aa0b1c4fbbdb90aaf62..efc4300eb976dec30313bfdffabbcbf1a2746783 100644 (file)
@@ -104,8 +104,6 @@ include $(top_srcdir)/src/Makefile.shlib
 $(SQLSCRIPT): snowball_create.pl snowball_func.sql.in snowball.sql.in
        $(PERL) $< --input ${srcdir} --outdir .
 
-distprep: $(SQLSCRIPT)
-
 install: all installdirs install-lib install-script
        $(INSTALL_DATA) $(addprefix $(srcdir)/stopwords/,$(stop_files)) '$(DESTDIR)$(datadir)/$(DICTDIR)'
 
@@ -122,6 +120,4 @@ uninstall: uninstall-lib
 
 clean distclean: clean-lib
        rm -f $(OBJS)
-
-maintainer-clean: distclean
        rm -f $(SQLSCRIPT)
index b25b7ee421d34ee496da541e5429b01c82fb96c8..c48ba943c4c9cf52ebff27aff60f743a62e1a53b 100644 (file)
@@ -45,8 +45,6 @@ lwlocknames.h: $(top_srcdir)/src/backend/storage/lmgr/lwlocknames.txt generate-l
 check: s_lock_test
        ./s_lock_test
 
-clean distclean:
+clean:
        rm -f s_lock_test
-
-maintainer-clean: clean
        rm -f lwlocknames.h lwlocknames.c
index deb901609f65adfc2d39aaa1bba406a5225d5177..e184e3dfdf1777522cefa64af44733b9c8116c58 100644 (file)
@@ -34,13 +34,14 @@ catalogdir  = $(top_srcdir)/src/backend/catalog
 
 include $(top_srcdir)/src/backend/common.mk
 
-all: distprep probes.h generated-header-symlinks
+all: probes.h generated-header-symlinks
 
-distprep: fmgr-stamp errcodes.h
+.PHONY: generated-header-symlinks submake-adt-headers
 
-.PHONY: generated-header-symlinks
+generated-header-symlinks: $(top_builddir)/src/include/utils/header-stamp submake-adt-headers
 
-generated-header-symlinks: $(top_builddir)/src/include/utils/header-stamp $(top_builddir)/src/include/utils/probes.h
+submake-adt-headers:
+       $(MAKE) -C adt jsonpath_gram.h
 
 $(SUBDIRS:%=%-recursive): fmgr-stamp errcodes.h
 
@@ -66,22 +67,15 @@ probes.h: Gen_dummy_probes.sed probes.d
        sed -f $^ >$@
 endif
 
-# These generated headers must be symlinked into builddir/src/include/,
-# using absolute links for the reasons explained in src/backend/Makefile.
+# These generated headers must be symlinked into src/include/.
 # We use header-stamp to record that we've done this because the symlinks
 # themselves may appear older than fmgr-stamp.
-$(top_builddir)/src/include/utils/header-stamp: fmgr-stamp errcodes.h
-       prereqdir=`cd '$(dir $<)' >/dev/null && pwd` && \
-       cd '$(dir $@)' && for file in fmgroids.h fmgrprotos.h errcodes.h; do \
-         rm -f $$file && $(LN_S) "$$prereqdir/$$file" . ; \
+$(top_builddir)/src/include/utils/header-stamp: fmgr-stamp errcodes.h probes.h
+       cd '$(dir $@)' && for file in fmgroids.h fmgrprotos.h errcodes.h probes.h; do \
+         rm -f $$file && $(LN_S) "../../../$(subdir)/$$file" . ; \
        done
        touch $@
 
-# probes.h is handled differently because it's not in the distribution tarball.
-$(top_builddir)/src/include/utils/probes.h: probes.h
-       cd '$(dir $@)' && rm -f $(notdir $@) && \
-           $(LN_S) "../../../$(subdir)/probes.h" .
-
 # Recipe for rebuilding the Perl version of Gen_dummy_probes
 # Nothing depends on it, so it will never be called unless explicitly requested
 # The last two lines of the recipe format the script according to  our
@@ -104,10 +98,6 @@ installdirs:
 uninstall-data:
        rm -f $(addprefix '$(DESTDIR)$(datadir)'/, errcodes.txt)
 
-# fmgroids.h, fmgrprotos.h, fmgrtab.c, fmgr-stamp, and errcodes.h are in the
-# distribution tarball, so they are not cleaned here.
 clean:
        rm -f probes.h probes.h.tmp
-
-maintainer-clean: clean
        rm -f fmgroids.h fmgrprotos.h fmgrtab.c fmgr-stamp errcodes.h
index f57cf3958c11bc63ea40c30c065550b2e748bdb7..a4397ef907fea52bcf00a6989ebaad4606d5c8ed 100644 (file)
@@ -47,5 +47,5 @@ pgstat_wait_event.c: wait_event_types.h
 wait_event_types.h: $(top_srcdir)/src/backend/utils/activity/wait_event_names.txt generate-wait_event_types.pl
        $(PERL) $(srcdir)/generate-wait_event_types.pl --code $<
 
-maintainer-clean: clean
+clean:
        rm -f wait_event_types.h pgstat_wait_event.c wait_event_funcs_data.c
index 0de0bbb1b8ac7ccb60ea1ab39dbadf7004ea7586..199eae525d1ed57e08f685dd1d076785d6891361 100644 (file)
@@ -132,10 +132,9 @@ jsonpath_scan.c: FLEX_NO_BACKUP=yes
 # Force these dependencies to be known even without dependency info built:
 jsonpath_gram.o jsonpath_scan.o: jsonpath_gram.h
 
-# jsonpath_gram.c and jsonpath_scan.c are in the distribution tarball,
-# so they are not cleaned here.
-clean distclean maintainer-clean:
+clean:
        rm -f lex.backup
+       rm -f jsonpath_gram.c jsonpath_gram.h jsonpath_scan.c
 
 like.o: like.c like_match.c
 
index b19a125fa2f32d9124a58bf7ae5b9857d34a8430..bbde71b5aaa80cfb4d344c19dd44c444ca6403a4 100644 (file)
@@ -21,5 +21,5 @@ OBJS = \
 
 include $(top_srcdir)/src/backend/common.mk
 
-clean distclean maintainer-clean:
+clean distclean:
        $(MAKE) -C conversion_procs $@
index ea930a7b95a22abfb3642714496fcbf3888cdd61..c540f34649dfffcda76f14a8aff736779716bd95 100644 (file)
@@ -66,8 +66,6 @@ all: $(MAPS)
 
 distclean: clean
        rm -f $(TEXTS)
-
-maintainer-clean: distclean
        rm -f $(MAPS)
 
 
index e0a3b74b25efa0e7c748cb7109f6145197138838..2eeae2824098789bece1062bab7bdbe07b0d8c97 100644 (file)
@@ -13,5 +13,5 @@ installdirs: installdirs-lib
 
 uninstall: uninstall-lib
 
-clean distclean maintainer-clean: clean-lib
+clean distclean: clean-lib
        rm -f $(OBJS)
index 29100329300324277cfecaff1b861c9c9169c111..c2971c76782c4597ba860bd723191fa5688cda88 100644 (file)
@@ -40,6 +40,5 @@ endif
 
 include $(top_srcdir)/src/backend/common.mk
 
-# Note: guc-file.c is not deleted by 'make clean',
-# since we want to ship it in distribution tarballs.
 clean:
+       rm -f guc-file.c
index e80e57e4579ca1d9857f3374030e4e16fddffcf9..4a00aa66b61f9353a7e244f0c6c6ce71068f5d59 100644 (file)
@@ -54,7 +54,7 @@ installdirs:
 uninstall:
        rm -f '$(DESTDIR)$(bindir)/initdb$(X)'
 
-clean distclean maintainer-clean:
+clean distclean:
        rm -f initdb$(X) $(OBJS) localtime.c
        rm -rf tmp_check
 
index 947f2267ed153a50f5168eff21c7a36c124a37f2..528c588e35fef61179b51ba1fb9eded12bf6be6f 100644 (file)
@@ -40,7 +40,7 @@ installdirs:
 uninstall:
        rm -f '$(DESTDIR)$(bindir)/pg_amcheck$(X)'
 
-clean distclean maintainer-clean:
+clean distclean:
        rm -f pg_amcheck$(X) $(OBJS)
        rm -rf tmp_check
 
index 49935d6dce3b70582f2f6db133f4afabaded95b8..93fd703f22591e2c901b2e036625a114fb846660 100644 (file)
@@ -25,7 +25,7 @@ installdirs:
 uninstall:
        rm -f '$(DESTDIR)$(bindir)/pg_archivecleanup$(X)'
 
-clean distclean maintainer-clean:
+clean distclean:
        rm -f pg_archivecleanup$(X) $(OBJS)
        rm -rf tmp_check
 
index 893a75c942d7e2a928090e63ff6714bfb2c1ea8a..74dc1ddd6da05bf7b310395934ef2897dce4f8b6 100644 (file)
@@ -71,7 +71,7 @@ uninstall:
        rm -f '$(DESTDIR)$(bindir)/pg_receivewal$(X)'
        rm -f '$(DESTDIR)$(bindir)/pg_recvlogical$(X)'
 
-clean distclean maintainer-clean:
+clean distclean:
        rm -f pg_basebackup$(X) pg_receivewal$(X) pg_recvlogical$(X) \
                $(BBOBJS) pg_receivewal.o pg_recvlogical.o \
                $(OBJS)
index 4911f6bee2cb25be91201aba256623a8017a1fb7..ac736b2260ef8bf1fb91b21fcfad091feaec4ade 100644 (file)
@@ -36,7 +36,7 @@ installdirs:
 uninstall:
        rm -f '$(DESTDIR)$(bindir)/pg_checksums$(X)'
 
-clean distclean maintainer-clean:
+clean distclean:
        rm -f pg_checksums$(X) $(OBJS)
        rm -rf tmp_check
 
index 1a405f9c977e5c3fbad9995b0eeb4043e9752e23..cb13aceafaecf27cdd4e7cf1286628b397f31cd7 100644 (file)
@@ -33,7 +33,7 @@ installdirs:
 uninstall:
        rm -f '$(DESTDIR)$(bindir)/pg_config$(X)'
 
-clean distclean maintainer-clean:
+clean distclean:
        rm -f pg_config$(X) $(OBJS)
        rm -rf tmp_check
 
index aa5bd5822263e3ec92d11b5834f61ebe3054ef55..00ee1e25b3d9dfcacbd688b9ed018efefb49f782 100644 (file)
@@ -33,7 +33,7 @@ installdirs:
 uninstall:
        rm -f '$(DESTDIR)$(bindir)/pg_controldata$(X)'
 
-clean distclean maintainer-clean:
+clean distclean:
        rm -f pg_controldata$(X) $(OBJS)
        rm -rf tmp_check
 
index 4b6d47a8f88d6791b85b53c48a16573584d0ffdd..4d29ca72c16cff38a536c0a4e85ae516bc31bdcc 100644 (file)
@@ -42,7 +42,7 @@ installdirs:
 uninstall:
        rm -f '$(DESTDIR)$(bindir)/pg_ctl$(X)'
 
-clean distclean maintainer-clean:
+clean distclean:
        rm -f pg_ctl$(X) $(OBJS)
        rm -rf tmp_check
 
index 24de7593a6ab63e9f756b897da82a8a4a888d085..604cddb9972ca8c61c0a33df57fafb17affc0117 100644 (file)
@@ -69,6 +69,6 @@ installcheck:
 uninstall:
        rm -f $(addprefix '$(DESTDIR)$(bindir)'/, pg_dump$(X) pg_restore$(X) pg_dumpall$(X))
 
-clean distclean maintainer-clean:
+clean distclean:
        rm -f pg_dump$(X) pg_restore$(X) pg_dumpall$(X) $(OBJS) pg_dump.o common.o pg_dump_sort.o pg_restore.o pg_dumpall.o
        rm -rf tmp_check
index 5c86435e22bc2d411776cdd3472903dbadca3614..a93e6611af8224dc2f431f2ab833820742667ba5 100644 (file)
@@ -35,7 +35,7 @@ installdirs:
 uninstall:
        rm -f '$(DESTDIR)$(bindir)/pg_resetwal$(X)'
 
-clean distclean maintainer-clean:
+clean distclean:
        rm -f pg_resetwal$(X) $(OBJS)
        rm -rf tmp_check
 
index bed05f1609c5e40423fe869296011e07f4718e1d..8df1da80cb73dba0287d93091e6a9091d48e2e52 100644 (file)
@@ -49,7 +49,7 @@ installdirs:
 uninstall:
        rm -f '$(DESTDIR)$(bindir)/pg_rewind$(X)'
 
-clean distclean maintainer-clean:
+clean distclean:
        rm -f pg_rewind$(X) $(OBJS) xlogreader.c
        rm -rf tmp_check
 
index 631d0f38a8e09b01e1f9117bf42ee1d272100ee0..4c5e518125033ab7c02d4050f9a168d72f717161 100644 (file)
@@ -31,6 +31,6 @@ installcheck:
 uninstall:
        rm -f '$(DESTDIR)$(bindir)/pg_test_fsync$(X)'
 
-clean distclean maintainer-clean:
+clean distclean:
        rm -f pg_test_fsync$(X) $(OBJS)
        rm -rf tmp_check
index 84d84c38aa86da27db97c7d9b7bb659faf2613f7..7f677edadb30f55ec10e5c9c1ae4b8b9651e888b 100644 (file)
@@ -31,6 +31,6 @@ installcheck:
 uninstall:
        rm -f '$(DESTDIR)$(bindir)/pg_test_timing$(X)'
 
-clean distclean maintainer-clean:
+clean distclean:
        rm -f pg_test_timing$(X) $(OBJS)
        rm -rf tmp_check
index 05e929965445a2ffb8009333d971d517bf49fe56..bde91e2beb82c94cb16f1c0f211f21c37e03c430 100644 (file)
@@ -49,7 +49,7 @@ installdirs:
 uninstall:
        rm -f '$(DESTDIR)$(bindir)/pg_upgrade$(X)'
 
-clean distclean maintainer-clean:
+clean distclean:
        rm -f pg_upgrade$(X) $(OBJS)
        rm -rf delete_old_cluster.sh log/ tmp_check/ \
               reindex_hash.sql
index 596df15118b618308227a306e9ef1d21abf45d73..c96323faa9c45c84d47b504e7d8e3aa6279ac43c 100644 (file)
@@ -38,7 +38,7 @@ installdirs:
 uninstall:
        rm -f '$(DESTDIR)$(bindir)/pg_verifybackup$(X)'
 
-clean distclean maintainer-clean:
+clean distclean:
        rm -f pg_verifybackup$(X) $(OBJS)
        rm -rf tmp_check
 
index 0ecf582039dd21a1764d3bf68cc88a7ddd094b7c..4c1ee649501f44201ba99ef6520b41eda4cbc162 100644 (file)
@@ -45,7 +45,7 @@ installdirs:
 uninstall:
        rm -f '$(DESTDIR)$(bindir)/pg_waldump$(X)'
 
-clean distclean maintainer-clean:
+clean distclean:
        rm -f pg_waldump$(X) $(OBJS) $(RMGRDESCSOURCES) xlogreader.c xlogstats.c
        rm -rf tmp_check
 
index 68b6eb0376e8d140cb6bc686ceef8c6a4c255143..987bf64df9de001850909a5de3eff4be97c75315 100644 (file)
@@ -38,8 +38,6 @@ exprparse.c: BISONFLAGS += -d
 # Force these dependencies to be known even without dependency info built:
 exprparse.o exprscan.o: exprparse.h
 
-distprep: exprparse.c exprscan.c
-
 install: all installdirs
        $(INSTALL_PROGRAM) pgbench$(X) '$(DESTDIR)$(bindir)/pgbench$(X)'
 
@@ -52,8 +50,6 @@ uninstall:
 clean distclean:
        rm -f pgbench$(X) $(OBJS)
        rm -rf tmp_check
-
-maintainer-clean: distclean
        rm -f exprparse.h exprparse.c exprscan.c
 
 check:
index 1f2bf0c6b0043f7bfd1d778801fa598c86c76fd4..8ad7c654460140210f47f36ca04e2c687f5dd163 100644 (file)
@@ -62,8 +62,6 @@ psqlscanslash.c: FLEXFLAGS = -Cfe -p -p
 psqlscanslash.c: FLEX_NO_BACKUP=yes
 psqlscanslash.c: FLEX_FIX_WARNING=yes
 
-distprep: sql_help.h sql_help.c psqlscanslash.c
-
 install: all installdirs
        $(INSTALL_PROGRAM) psql$(X) '$(DESTDIR)$(bindir)/psql$(X)'
        $(INSTALL_DATA) $(srcdir)/psqlrc.sample '$(DESTDIR)$(datadir)/psqlrc.sample'
@@ -77,10 +75,6 @@ uninstall:
 clean distclean:
        rm -f psql$(X) $(OBJS) lex.backup
        rm -rf tmp_check
-
-# files removed here are supposed to be in the distribution tarball,
-# so do not clean them in the clean/distclean rules
-maintainer-clean: distclean
        rm -f sql_help.h sql_help.c psqlscanslash.c
 
 check:
index a7a9d0fea549b6c2b8def5300d59acdd6096de4a..20db40b1038c6ee34629c7144088d84caa582fb3 100644 (file)
@@ -48,7 +48,7 @@ installdirs:
 uninstall:
        rm -f $(addprefix '$(DESTDIR)$(bindir)'/, $(addsuffix $(X), $(PROGRAMS)))
 
-clean distclean maintainer-clean:
+clean distclean:
        rm -f $(addsuffix $(X), $(PROGRAMS)) $(addsuffix .o, $(PROGRAMS))
        rm -f common.o $(WIN32RES)
        rm -rf tmp_check
index 8de31d47633a45d2347d57efde7dbb75fd1fbd25..ce4535d7feccd91b241d4453cc0c6c0fc1aba0fb 100644 (file)
@@ -123,8 +123,6 @@ GEN_KEYWORDLIST_DEPS = $(TOOLSDIR)/gen_keywordlist.pl $(TOOLSDIR)/PerfectHash.pm
 
 all: libpgcommon.a libpgcommon_shlib.a libpgcommon_srv.a
 
-distprep: kwlist_d.h
-
 # libpgcommon is needed by some contrib
 install: all installdirs
        $(INSTALL_STLIB) libpgcommon.a '$(DESTDIR)$(libdir)/libpgcommon.a'
@@ -197,10 +195,7 @@ RYU_OBJS = $(RYU_FILES) $(RYU_FILES:%.o=%_shlib.o) $(RYU_FILES:%.o=%_srv.o)
 
 $(RYU_OBJS): CFLAGS += $(PERMIT_DECLARATION_AFTER_STATEMENT)
 
-# kwlist_d.h is in the distribution tarball, so it is not cleaned here.
 clean distclean:
        rm -f libpgcommon.a libpgcommon_shlib.a libpgcommon_srv.a
        rm -f $(OBJS_FRONTEND) $(OBJS_SHLIB) $(OBJS_SRV)
-
-maintainer-clean: distclean
        rm -f kwlist_d.h
index 27a7d5a807e85f7b188d9bb4ca0a42b174be649e..30cd75cc6a795fcd32574cc92e07bcf3ad443727 100644 (file)
@@ -83,5 +83,3 @@ clean:
 
 distclean: clean
        rm -f UnicodeData.txt EastAsianWidth.txt CompositionExclusions.txt NormalizationTest.txt norm_test_table.h unicode_norm_table.h
-
-maintainer-clean: distclean
index 456d6dd3904e100a8fd4ef27c894f4075c6b8761..8accd5906d65ba743f7c667306ff298fabdc90e4 100644 (file)
@@ -48,8 +48,6 @@ psqlscan.c: FLEXFLAGS = -Cfe -p -p
 psqlscan.c: FLEX_NO_BACKUP=yes
 psqlscan.c: FLEX_FIX_WARNING=yes
 
-distprep: psqlscan.c
-
 # libpgfeutils could be useful to contrib, so install it
 install: all installdirs
        $(INSTALL_STLIB) libpgfeutils.a '$(DESTDIR)$(libdir)/libpgfeutils.a'
@@ -62,8 +60,4 @@ uninstall:
 
 clean distclean:
        rm -f libpgfeutils.a $(OBJS) lex.backup
-
-# psqlscan.c is supposed to be in the distribution tarball,
-# so do not clean it in the clean/distclean rules
-maintainer-clean: distclean
        rm -f psqlscan.c
index a7ca27780313b8694841774cc46a2c6ca5a50590..11dd6f0d7720079a9f71f905687bdd40f61684a4 100644 (file)
@@ -78,5 +78,5 @@ clean:
        rm -f catalog/pg_*_d.h catalog/header-stamp
        rm -f nodes/nodetags.h nodes/header-stamp
 
-distclean maintainer-clean: clean
+distclean: clean
        rm -f pg_config.h pg_config_ext.h pg_config_os.h stamp-h stamp-ext-h
index e4bbf7b8a865b351cffafa320eb9474f8c9b14bf..3002bc3c1bb66d67b835ca625eae800c23e3279a 100644 (file)
@@ -23,7 +23,7 @@ install-pgtypeslib-recurse install-ecpglib-recurse install-compatlib-recurse ins
 install-compatlib-recurse: install-ecpglib-recurse
 install-ecpglib-recurse: install-pgtypeslib-recurse
 
-clean distclean maintainer-clean:
+clean distclean:
        $(MAKE) -C test clean
 
 checktcp: | temp-install
index b9483fba08a1fcf1d23b1465dd519348f61b366a..695fd1a080affd095dcb63173979f3a69cf99eec 100644 (file)
@@ -55,5 +55,3 @@ uninstall: uninstall-lib
 
 clean distclean: clean-lib
        rm -f $(OBJS)
-
-maintainer-clean: distclean
index 652e0234050abff246ecad74091b50c808e4b5a2..103cce393ae6fbcbbbf7231a6d128b189172fad9 100644 (file)
@@ -66,5 +66,3 @@ uninstall: uninstall-lib
 
 clean distclean: clean-lib
        rm -f $(OBJS)
-
-maintainer-clean: distclean
index 9c68bf3c4770c1bd7d8ef15cb4a88ad832afa62d..3476409cefb971b92d6f44c758cc06c4c03cc20a 100644 (file)
@@ -31,5 +31,5 @@ uninstall:
        rm -f $(addprefix '$(DESTDIR)$(informix_esql_dir)'/, $(informix_headers))
        rm -f '$(DESTDIR)$(includedir)'/$(notdir $(ecpg_config_h))
 
-distclean maintainer-clean:
+distclean:
        rm -f ecpg_config.h stamp-h
index b0e154eb15f2a37598dbd25353ad1279acdb9d16..e56700a12e0da9d040ea6c615fa56b1c99844132 100644 (file)
@@ -50,5 +50,3 @@ uninstall: uninstall-lib
 
 clean distclean: clean-lib
        rm -f $(OBJS)
-
-maintainer-clean: distclean
index 77ae9ab722e846003ab8388db8fc3efa4c827c3b..afd46cd17cf551444ebacb3b956fa26b4ea5ee40 100644 (file)
@@ -81,8 +81,6 @@ ecpg_keywords.o: ecpg_kwlist_d.h
 c_keywords.o: c_kwlist_d.h
 keywords.o: $(top_srcdir)/src/include/parser/kwlist.h
 
-distprep: preproc.y preproc.c preproc.h pgc.c c_kwlist_d.h ecpg_kwlist_d.h
-
 install: all installdirs
        $(INSTALL_PROGRAM) ecpg$(X) '$(DESTDIR)$(bindir)'
 
@@ -92,11 +90,7 @@ installdirs:
 uninstall:
        rm -f '$(DESTDIR)$(bindir)/ecpg$(X)'
 
-# preproc.y, preproc.c, preproc.h, pgc.c, c_kwlist_d.h, and ecpg_kwlist_d.h
-# are in the distribution tarball, so they are not cleaned here.
 clean distclean:
        rm -f *.o ecpg$(X)
        rm -f typename.c
-
-maintainer-clean: distclean
        rm -f preproc.y preproc.c preproc.h pgc.c c_kwlist_d.h ecpg_kwlist_d.h
index ba6ca837b35ac57e1802689b73a334bea27c6c66..be2418ba2642c3a8548512d0d3d8f83a0a00a292 100644 (file)
@@ -21,7 +21,7 @@ else
 abs_builddir := $(shell sh -c "pwd -W")
 endif
 
-all install installdirs uninstall distprep:
+all install installdirs uninstall:
        $(MAKE) -C connect $@
        $(MAKE) -C sql $@
        $(MAKE) -C pgtypeslib $@
@@ -30,7 +30,7 @@ all install installdirs uninstall distprep:
        $(MAKE) -C compat_oracle $@
        $(MAKE) -C thread $@
 
-clean distclean maintainer-clean:
+clean distclean:
        $(MAKE) -C connect $@
        $(MAKE) -C sql $@
        $(MAKE) -C pgtypeslib $@
index 46653682b037530779d8bb7ff9e0d78786dcf68d..d0a66cfaa0d393a97d652eb0969b5fc76d173e1b 100644 (file)
@@ -165,6 +165,3 @@ clean distclean: clean-lib
        rm -f $(OBJS) pthread.h libpq-refs-stamp
 # Might be left over from a Win32 client-only build
        rm -f pg_config_paths.h
-
-maintainer-clean: distclean
-       $(MAKE) -C test $@
index 75ac08f943d9a4a13289b739307fd971f010eb5e..4e17ec15141e6a373ffab1308a7ff424fe704d44 100644 (file)
@@ -20,5 +20,5 @@ all: $(PROGS)
 
 $(PROGS): $(WIN32RES)
 
-clean distclean maintainer-clean:
+clean distclean:
        rm -f $(PROGS) *.o
index 7ba8d5bc9806ca33e04879103f6cf64a1260bb11..0de3737e789b4b2ed30a24b80e4429c410895d33 100644 (file)
@@ -391,7 +391,7 @@ ifdef MODULE_big
 clean: clean-lib
 endif
 
-distclean maintainer-clean: clean
+distclean: clean
 
 
 ifdef REGRESS
index f21bd5ed55519abf67400cf7913c31c7797fa712..dfff472cb3f480e796a52a03a5e8d68fb6822c5a 100644 (file)
@@ -171,7 +171,7 @@ all: all-po
 install: install-po
 installdirs: installdirs-po
 uninstall: uninstall-po
-clean distclean maintainer-clean: clean-po
+clean distclean: clean-po
 
 .PHONY: all-po install-po installdirs-po uninstall-po clean-po \
         init-po update-po
index 51f8890d15d982811dafd12f099cc88658632b76..975f540b3e0fd061718c67aa718a97511956a111 100644 (file)
@@ -127,7 +127,7 @@ installcheck: submake
 submake:
        $(MAKE) -C $(top_builddir)/src/test/regress pg_regress$(X)
 
-clean distclean maintainer-clean: clean-lib
+clean distclean: clean-lib
        rm -f SPI.c Util.c $(OBJS) perlchunks.h plperl_opmask.h
        rm -rf $(pg_regress_clean_files)
 ifeq ($(PORTNAME), win32)
index f7eb42d54fc51fdd94b59c2342fd647719e0ee47..dfb815212fbfbd23e50e72e1d1f535a6c8e59485 100644 (file)
@@ -104,14 +104,7 @@ submake:
        $(MAKE) -C $(top_builddir)/src/test/regress pg_regress$(X)
 
 
-distprep: pl_gram.h pl_gram.c plerrcodes.h pl_reserved_kwlist_d.h pl_unreserved_kwlist_d.h
-
-# pl_gram.c, pl_gram.h, plerrcodes.h, pl_reserved_kwlist_d.h, and
-# pl_unreserved_kwlist_d.h are in the distribution tarball, so they
-# are not cleaned here.
 clean distclean: clean-lib
        rm -f $(OBJS)
        rm -rf $(pg_regress_clean_files)
-
-maintainer-clean: distclean
        rm -f pl_gram.c pl_gram.h plerrcodes.h pl_reserved_kwlist_d.h pl_unreserved_kwlist_d.h
index 6b1865c2402ca19ac3eb5f325dd4dabd9567122c..ef0a5905aed9ff270b492e288b6a9af5cd0870ae 100644 (file)
@@ -142,6 +142,7 @@ clean distclean: clean-lib
 ifeq ($(PORTNAME), win32)
        rm -f python${pytverstr}.def
 endif
+       rm -f spiexceptions.h
 
 
 # Force this dependency to be known even without dependency info built:
@@ -149,8 +150,3 @@ plpy_plpymodule.o: spiexceptions.h
 
 spiexceptions.h: $(top_srcdir)/src/backend/utils/errcodes.txt generate-spiexceptions.pl
        $(PERL) $(srcdir)/generate-spiexceptions.pl $< > $@
-
-distprep: spiexceptions.h
-
-maintainer-clean: distclean
-       rm -f spiexceptions.h
index 314f9b2eec90433738b3e8938c569e6ad581e0b5..ea52a2efc229d784059fbd83d7ec03bd5c81401d 100644 (file)
@@ -63,8 +63,6 @@ pltcl.o: pltclerrcodes.h
 pltclerrcodes.h: $(top_srcdir)/src/backend/utils/errcodes.txt generate-pltclerrcodes.pl
        $(PERL) $(srcdir)/generate-pltclerrcodes.pl $< > $@
 
-distprep: pltclerrcodes.h
-
 install: all install-lib install-data
 
 installdirs: installdirs-lib
@@ -91,13 +89,10 @@ installcheck: submake
 submake:
        $(MAKE) -C $(top_builddir)/src/test/regress pg_regress$(X)
 
-# pltclerrcodes.h is in the distribution tarball, so don't clean it here.
 clean distclean: clean-lib
        rm -f $(OBJS)
        rm -rf $(pg_regress_clean_files)
 ifeq ($(PORTNAME), win32)
        rm -f $(tclwithver).def
 endif
-
-maintainer-clean: distclean
        rm -f pltclerrcodes.h
index f205c2c9c50ed4109b91640bb24f0343286d7b66..4320dee0d1687c5711a982b05205fb4808aed52f 100644 (file)
@@ -154,6 +154,6 @@ pg_config_paths.h: $(top_builddir)/src/Makefile.global
        echo "#define HTMLDIR \"$(htmldir)\"" >>$@
        echo "#define MANDIR \"$(mandir)\"" >>$@
 
-clean distclean maintainer-clean:
+clean distclean:
        rm -f libpgport.a libpgport_shlib.a libpgport_srv.a
        rm -f $(OBJS) $(OBJS_SHLIB) $(OBJS_SRV) pg_config_paths.h
index 46fa72052d908f680d3e7eddf9b98b976b0ac2c8..a48ce39aaf93473d71e8ae0b73f1fcca55e117ce 100644 (file)
@@ -19,5 +19,5 @@ check:
 installcheck:
        $(prove_installcheck)
 
-clean distclean maintainer-clean:
+clean distclean:
        rm -rf tmp_check
index a67f456904834238ae0f4b1b7689d6fbee560832..e72d058e0c4b886be46eb3eeca35250ba818344b 100644 (file)
@@ -18,5 +18,5 @@ PROGS = testlibpq testlibpq2 testlibpq3 testlibpq4 testlo testlo64
 
 all: $(PROGS)
 
-clean distclean maintainer-clean:
+clean distclean:
        rm -f $(PROGS) *.o
index 033b0d03ccb5114caa72156eccf87b2b4ca7f432..c4fc8cdb8c1535932dadb8cda59459a73bdd9532 100644 (file)
@@ -21,5 +21,5 @@ check:
 installcheck:
        $(prove_installcheck)
 
-clean distclean maintainer-clean:
+clean distclean:
        rm -rf tmp_check
index e99602ae526a2eab5378820dfbf4a748fa413c07..ade2256ed3aa73146c9dda66187efd9aa9de0e3f 100644 (file)
@@ -43,8 +43,6 @@ pg_isolation_regress$(X): isolation_main.o pg_regress.o $(WIN32RES)
 isolationtester$(X): $(OBJS) | submake-libpq submake-libpgport
        $(CC) $(CFLAGS) $^ $(libpq_pgport) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@
 
-distprep: specparse.c specscanner.c
-
 # See notes in src/backend/parser/Makefile about the following two rules
 specparse.h: specparse.c
        touch $@
@@ -54,14 +52,10 @@ specparse.c: BISONFLAGS += -d
 # Force these dependencies to be known even without dependency info built:
 specparse.o specscanner.o: specparse.h
 
-# specparse.c and specscanner.c are in the distribution tarball,
-# so do not clean them here
 clean distclean:
        rm -f isolationtester$(X) pg_isolation_regress$(X) $(OBJS) isolation_main.o
        rm -f pg_regress.o
        rm -rf $(pg_regress_clean_files)
-
-maintainer-clean: distclean
        rm -f specparse.h specparse.c specscanner.c
 
 installcheck: all
index f460d2c0e70b34e09b0c2810904045aaaf5566a1..44da65611e18c94c0ec73731a5c6f934af5ec35e 100644 (file)
@@ -24,5 +24,5 @@ check:
 installcheck:
        $(prove_installcheck)
 
-clean distclean maintainer-clean:
+clean distclean:
        rm -rf tmp_check
index 73bc878ea8ef1509f6189da0d55c9b0eb700a840..d4305ed5eb201328b0b569e5b245341e875e59a9 100644 (file)
@@ -21,5 +21,5 @@ check:
 installcheck:
        $(prove_installcheck)
 
-clean distclean maintainer-clean:
+clean distclean:
        rm -rf tmp_check
index 7ba096b542710aaea454c85f5216f97c0296c158..a40c67af07f7e1e2d6529f0e88dcd866480006b0 100644 (file)
@@ -10,7 +10,7 @@ DIRS = de_DE.ISO8859-1 gr_GR.ISO8859-7 koi8-r koi8-to-win1251
 
 all: $(PROGS)
 
-clean distclean maintainer-clean:
+clean distclean:
        rm -f $(PROGS) *.o
        rm -rf tmp_check
        for d in $(DIRS); do \
index c60314d195573b94936b8025a687bb8c3ced448d..49f1d1c118eb056493afa27bad8d9d2ac14a725d 100644 (file)
@@ -25,5 +25,5 @@ check:
 installcheck:
        $(prove_installcheck)
 
-clean distclean maintainer-clean:
+clean distclean:
        rm -rf tmp_check
index bbab45f9b87158c38c4e04c4cf3c95e1c6063340..520fa9d205666980ceef44e2d4797f72d4e82873 100644 (file)
@@ -146,7 +146,7 @@ bigcheck: all | temp-install
 ## Clean up
 ##
 
-clean distclean maintainer-clean: clean-lib
+clean distclean: clean-lib
 # things built by `all' target
        rm -f $(OBJS) refint$(DLSUFFIX) autoinc$(DLSUFFIX)
        rm -f pg_regress_main.o pg_regress.o pg_regress$(X)
index af1e06e9490882b204edcbe132d9a669fdaa70d1..2d7c69068f42493907c97e95d49c06af23a1288c 100644 (file)
@@ -23,7 +23,7 @@ export OPENSSL with_ssl
 sslfiles sslfiles-clean:
        $(MAKE) -f $(srcdir)/sslfiles.mk $@
 
-clean distclean maintainer-clean:
+clean distclean:
        rm -rf tmp_check
        $(MAKE) -f $(srcdir)/sslfiles.mk $@
 
index 569f1731cd1550b696c893faa43d2ac987647b98..89ba2d193b57cbb1b2318a18e6e456d206a2fad8 100644 (file)
@@ -269,6 +269,6 @@ sslfiles-clean:
 # clean targets will be run during a "standard" recursive clean run from the
 # main build tree. The sslfiles-clean target must be run explicitly from this
 # directory.
-.PHONY: clean distclean maintainer-clean
-clean distclean maintainer-clean:
+.PHONY: clean distclean
+clean distclean:
        rm -rf ssl/*.old ssl/new_certs_dir ssl/client*_tmp.key
index 99d1fe012d8e193ffcdbca2da0f539d0d8f15d46..36475ffabc8aa672463289e49bc18b524e59f639 100644 (file)
@@ -23,5 +23,5 @@ check:
 installcheck:
        $(prove_installcheck)
 
-clean distclean maintainer-clean:
+clean distclean:
        rm -rf tmp_check
index fbbaae4cc57cb40716c696b713c856f7e88ae1df..c85e831247a5a8cf7035efa2ce6b73264b2ba8d7 100644 (file)
@@ -75,5 +75,5 @@ ifeq (,$(with_system_tzdata))
 endif
        $(MAKE) -C tznames $@
 
-clean distclean maintainer-clean:
+clean distclean:
        rm -f zic$(X) $(ZICOBJS) abbrevs.txt
index e74d7547698a15819a66b95de9db4cc4f7ff2e80..ef5e8f0e0eae3ae1f2af327bd25b979c43805f15 100644 (file)
@@ -24,5 +24,5 @@ all: test_ifaddrs
 test_ifaddrs: test_ifaddrs.o $(libpq_backend_dir)/ifaddr.o
        $(CC) $(CFLAGS) test_ifaddrs.o $(libpq_backend_dir)/ifaddr.o $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
 
-clean distclean maintainer-clean:
+clean distclean:
        rm -f test_ifaddrs$(X) $(OBJS)
index d176ceb326e5248462a067b822d0c2b8b85947ff..ce5d815f07a66b47ff52ad0c77d28c0d231801e2 100644 (file)
@@ -39,7 +39,7 @@ installdirs:
 uninstall:
        rm -f '$(DESTDIR)$(bindir)/pg_bsd_indent$(X)'
 
-clean distclean maintainer-clean:
+clean distclean:
        rm -f pg_bsd_indent$(X) $(OBJS)
        rm -rf log/ tmp_check/