Commit Graph

34 Commits

Author SHA1 Message Date
Peter Eisentraut 721856ff24 Remove distprep
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 <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
2023-11-06 15:18:04 +01:00
Noah Misch 42dbbca58e Add a temp-install prerequisite to src/interfaces/ecpg "checktcp".
The target failed, tested $PATH binaries, or tested a stale temporary
installation.  Commit c66b438db6 missed
this.  Back-patch to v10 (all supported versions).
2022-04-16 17:43:54 -07:00
Peter Eisentraut 39b4a95100 Use https for gnu.org links
Mostly already done, but there were some stragglers.
2020-10-14 08:24:54 +02:00
Peter Eisentraut dbf2ec1a1c Fix parallel make risk with new check temp-install setup
The "check" target no longer needs to depend on "all", because it now
runs "install" directly, which in turn depends on "all".  Doing both
will cause problems with parallel make, because two builds will run next
to each other.

Also remove the redirection of the temp-install output into a log file.
This was appropriate when this was done from within pg_regress, but now
it's just a regular make run, and especially with the above changes this
will now take the place of running the "all" target before the test
suites.

problem report by Jeff Janes, patch in part by Michael Paquier
2015-04-29 20:34:22 -04:00
Bruce Momjian 2fc80e8e83 Rename 'gmake' to 'make' in docs and recommended commands
This simplifies the docs and makes it easier to cut/paste command lines.
2014-02-12 17:29:19 -05:00
Tom Lane 1fc698cf14 Suppress parallel build in interfaces/ecpg/preproc/.
This is to see if it will stop intermittent build failures on buildfarm
member okapi.  We know that gmake 3.82 has some problems with sometimes
not honoring dependencies in parallel builds, and it seems likely that
this is more of the same.  Since the vast bulk of the work in the preproc
directory is associated with creating preproc.c and then preproc.o,
parallelism buys us hardly anything here anyway.

Also, make both this .NOTPARALLEL and the one previously added in
interfaces/ecpg/Makefile be conditional on "ifeq ($(MAKE_VERSION),3.82)".
The known bug in gmake is fixed upstream and should not be present in
3.83 and up, and there's no reason to think it affects older releases.
2012-11-28 22:19:46 -05:00
Tom Lane 843363b8d5 Use .NOTPARALLEL in ecpg/Makefile to avoid a gmake parallelism bug.
Investigation shows that some intermittent build failures in ecpg are the
result of a gmake bug that was reported quite some time ago:
http://savannah.gnu.org/bugs/?30653

Preventing parallel builds of the ecpg subdirectories seems to dodge the
bug.  Per yesterday's pgsql-hackers discussion, there are some other things
in the subdirectory makefiles that seem rather unsafe for parallel builds
too, but there's little point in fixing them as long as we have to work
around a make bug.

Back-patch to 9.1; parallel builds weren't very well supported before
that anyway.
2012-09-09 15:08:32 -04:00
Tom Lane 74812624f2 De-parallelize ecpg build some more.
Make sure ecpg/include/ is rebuilt before the other subdirectories,
so that ecpg_config.h is up to date.  This is not likely to matter
during production builds, only development, so no back-patch.
2011-10-28 15:16:40 -04:00
Peter Eisentraut 4502c8e1c0 Fix parallel make when running make install before make all
In addition to the

all-foo-recurse: all-bar-recurse

dependencies that constraint the order of the rule execution, we need

install-foo-recurse: install-bar-recurse

dependencies in case one runs make install without a make all first,
as some people apparently do.
2011-03-08 23:52:29 +02:00
Peter Eisentraut cfad144f89 Additional fixes for parallel make
Add some additional dependencies to constrain the build order to prevent
parallel make from failing.  In the case of src/Makefile, this is likely to be
too complicated to be worth maintaining, so just add .NOTPARALLEL to get the
old for-loop-like behavior.

More fine-tuning might be necessary for some platforms or configurations.
2010-11-17 08:08:41 +02:00
Peter Eisentraut 19e231bbda Improved parallel make support
Replace for loops in makefiles with proper dependencies.  Parallel
make can now span across directories.  Also, make -k and make -q work
properly.

GNU make 3.80 or newer is now required.
2010-11-12 22:15:16 +02:00
Peter Eisentraut 8c87cc370f Catch all errors in for and while loops in makefiles. Don't ignore any
errors in any commands, including in various clean targets that have so far
been handled inconsistently.  make -i is available to ignore all errors in
a consistent and official way.
2008-03-18 16:24:50 +00:00
Peter Eisentraut 2cc01004c6 Remove remains of old depend target. 2007-01-20 17:16:17 +00:00
Peter Eisentraut 862c3ff04d Only build ecpg test code when the test is to be performed, in line with
other test code.
2007-01-20 15:25:29 +00:00
Michael Meskes 84844bab2c More SoC stuff 2006-08-19 13:42:40 +00:00
Michael Meskes 3ceaa97b3c Regression test updates and fixes 2006-08-04 08:52:18 +00:00
Michael Meskes efc861a842 And finally the Makefiles 2006-08-02 14:19:14 +00:00
Peter Eisentraut 6fabec242d Fix compilation on Cygwin. 2003-05-22 17:20:44 +00:00
Michael Meskes 999f12982e Moved Informix stuff to its own compat library. Interval datetype is now fully functional. 2003-03-30 11:48:19 +00:00
Michael Meskes a4f25b6a9c Started working on a seperate pgtypes library. First test work. PLEASE test compilation on iother systems. 2003-03-16 10:42:54 +00:00
Tom Lane eab6776358 Ensure that ecpg/test is cleaned by higher-level 'make clean'. 2002-01-14 17:49:56 +00:00
Michael Meskes f27da05c00 Undo incorrectly committed Makefile. 2000-11-07 08:52:22 +00:00
Michael Meskes c823b1eedc Added more patches by Cristif Petig. 2000-11-07 08:41:15 +00:00
Peter Eisentraut 424f0edcb8 Fix relative path references so that make knowns which dependencies refer
to one another. Sort out builddir vs srcdir variable namings. Remove some
now obsoleted make variables.
2000-08-31 16:12:35 +00:00
Peter Eisentraut 32163099d7 Add distprep target to take some of the job of the release_prep script.
The latter updated accordingly. Also add `dist' and `distcheck' targets
to play with, but caveat packager.

Updated backend/bootstrap and backend/parser makefile to make them
marginally builddir aware and fix the usual set of things.

Add rule to automatically remake config.h dependent on config.h.in and
config.status. (Adopted from Autoconf manual and about every other
package.) On a good day we should now have a complete and accurate set
of dependencies throughout everything.
2000-07-19 16:30:27 +00:00
Peter Eisentraut 44f64dd3ea Makefile cleanup for interface tree. Now essentially with all the
standard targets and behaviour. Replaced Makefile.in's with
Makefile's and declared the respective variables in Makefile.global.

maintainer-clean target now available at top level, although it does
not work in the backend tree yet.

Cleanup pass over Makefile.shlib, renamed some targets and variables.
The shared library symlink tests are now done by make, not the shell.

ecpg: Remove one warning in sloppy flex output.

PL/Perl and Perl interface: the MakeMaker documentation is confusing,
the realclean target *does* "delete derived files", but it also
uninstalls them. Don't use that.

The submake targets in the various bin directories that update libpq
should `make all', not `make libpq.a'. That is a) unportable, and
b) doesn't build the shared library.
2000-06-28 18:30:16 +00:00
Bruce Momjian 1e801a8f16 Hi,
Attached you'll find a (big) patch that fixes make dep and make
depend in all Makefiles where I found it to be appropriate.

It also removes the dependency in Makefile.global for NAMEDATALEN
and OIDNAMELEN by making backend/catalog/genbki.sh and bin/initdb/initdb.sh
a little smarter.

This no longer requires initdb.sh that is turned into initdb with
a sed script when installing Postgres, hence initdb.sh should be
renamed to initdb (after the patch has been applied :-) )

This patch is against the 6.3 sources, as it took a while to
complete.

Please review and apply,

Cheers,

Jeroen van Vianen
1998-04-06 00:32:26 +00:00
Marc G. Fournier 80e12829cf + Sat Feb 21 19:10:55 CET 1998
+
+       - use char[] as string not as array of bytes that is integers
+
+ Sun Feb 22 16:37:36 CET 1998
+
+       - use long for all size variables
+       - added execute immediate statement
+
+ Sun Feb 22 20:41:32 CET 1998
+
+       - use varcharsize = 1 for all simple types, 0 means pointer, > 1
+         means array if type is char resp. unsigned char
+
+ Thu Feb 24 12:26:12 CET 1998
+
+       - allow 'go to' in whenever statement as well as 'goto'
+       - new argument 'stop' for whenever statement

From: Michael Meskes <meskes@topsystem.de>
1998-02-24 15:52:13 +00:00
Marc G. Fournier 7b30490bc9 First step done,
below  is  the patch to have views to override the permission
    checks for the accessed tables. Now we can do the following:

    CREATE VIEW db_user AS SELECT
         usename,
         usesysid,
         usecreatedb,
         usetrace,
         usecatupd,
         '**********'::text as passwd,
         valuntil
        FROM pg_user;

    REVOKE ALL ON pg_user FROM public;
    REVOKE ALL ON db_user FROM public;
    GRANT SELECT ON db_user TO public;
1998-02-21 06:32:15 +00:00
Thomas G. Lockhart 1aa93cbfa6 Remove inclusion of the doc make. Looks like all of the man pages are
in the usual man page source directory anyway. Source tree now builds.
1998-02-18 07:16:58 +00:00
Marc G. Fournier 7783c2b9ff Remove configure code from ecpg, as well as remove the 'for' loop from the
Makefile, as it isn't appropriate for GNUmake
1998-02-12 02:14:59 +00:00
Marc G. Fournier 72aa1dabb9 From: Michael Meskes <meskes@topsystem.de>
Cleanups for ecpg, as well as a missing patch so that its configured in
1998-02-11 15:18:05 +00:00
Marc G. Fournier a8313f9671 Updated ECPG From: Michael Meskes <meskes@topsystem.de> 1998-02-10 16:37:01 +00:00
Marc G. Fournier 82034103ed From: Michael Meskes <meskes@topsystem.de>
Well this is not really a patch. But I mananged to get Linus' old Postgres95
precompiler to compile and work with PostgreSQL. The next step would be to
collect bug/missing feature reports and to put it into the distribution so
that it is made with the standard make procedure.

Warning! So far it is not tested much and it does not install correctly. But
I was able to create a small binary with it.
1998-02-05 15:46:43 +00:00