Commit Graph

39 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
Thomas Munro 4c8156d871 Add PGTYPESchar_free() to avoid cross-module problems on Windows.
On Windows, it is sometimes important for corresponding malloc() and
free() calls to be made from the same DLL, since some build options can
result in multiple allocators being active at the same time.  For that
reason we already provided PQfreemem().  This commit adds a similar
function for freeing string results allocated by the pgtypes library.

Author: Takayuki Tsunakawa
Reviewed-by: Kyotaro Horiguchi
Discussion: https://postgr.es/m/0A3221C70F24FB45833433255569204D1F8AD5D6%40G01JPEXMBYT05
2018-06-18 18:33:53 +12:00
Peter Eisentraut 602070f9cc ecpg: Parallel make fix
In some parallel make situations, the install-headers target could be
called before the installation directories are created by installdirs,
causing the installation to fail.  Fix that by making install-headers
depend on installdirs.
2013-03-29 21:39:55 -04:00
Michael Meskes 6d4a351fcb Applied patch by Boszormenyi Zoltan <zb@cybertec.at> to add sqlda support to
ecpg in both native and compatiblity mode.
2010-01-05 16:38:23 +00:00
Peter Eisentraut f1c5247563 Simplify a few makefile rules since install-sh can now install multiple
files in one run.
2009-10-26 21:33:01 +00:00
Peter Eisentraut 9d182ef002 Update of install-sh, mkinstalldirs, and associated configury
Update install-sh to that from Autoconf 2.63, plus our Darwin-specific
changes (which I simplified a bit).  install-sh is now able to install
multiple files in one run, so we could simplify our makefiles sometime.

install-sh also now has a -d option to create directories, so we don't need
mkinstalldirs anymore.

Use AC_PROG_MKDIR_P in configure.in, so we can use mkdir -p when available
instead of install-sh -d.  For consistency with the rest of the world,
the corresponding make variable has been renamed from $(mkinstalldirs) to
$(MKDIR_P).
2009-08-26 22:24:44 +00:00
Peter Eisentraut 9c4b69ed5c Recreate ecpg_config.h with a stamp file created by config.status, same
way pg_config.h is handled.  This avoids reruns of config.status on every
build, if configure has been rerun.
2009-01-22 22:27:13 +00:00
Peter Eisentraut f6f8d61a47 Fix uninstall target. 2008-02-26 13:48:57 +00:00
Tom Lane 314ed5de6d Define the FRONTEND symbol in postgres_fe.h, which allows us to eliminate
duplicative -DFRONTEND flags from many Makefiles.  We still need Makefile
control of the symbol in a few places that compile frontend-or-backend
src/port/ files, but it's a lot cleaner than before.

Hiroshi Saito
2007-09-27 19:53:44 +00:00
Alvaro Herrera cf06c2e5d4 Fix Makefile problem which prevented installation on VPATH builds. 2006-11-29 21:21:03 +00:00
Michael Meskes 09309df9a2 Also install ecpg_config.h 2006-11-28 12:44:06 +00:00
Tom Lane ae28cfe673 Partial fix for ecpg's VPATH problems. It compiles and successfully
builds all the files needed for its regression tests, but the tests
themselves fail because of diffs in the #line directives output by
ecpg itself.  Not sure what to do about that.
2006-08-28 16:13:11 +00:00
Michael Meskes 8d9cf79437 Needed more stuff from c.h. 2006-08-24 10:48:21 +00:00
Michael Meskes 9bade3ff84 Replaced double-quote-fix with a hopefully better version.
Use initializer string length as size for character strings.
Added ecpg_config.h file that is created via configure.
2006-08-23 12:01:53 +00:00
Tom Lane a7143b3088 Fix some makefiles that fail to yield good results from 'make -qp'.
This doesn't really matter for ordinary building of Postgres, but it's
useful for automated checks, such as my just-committed pgcheckdefines.
2006-07-15 03:33:14 +00:00
Peter Eisentraut a29c04a541 Allow installation into directories containing spaces in the name. 2005-12-09 21:19:36 +00:00
Peter Eisentraut ad8c09c29c Move Informix compatibility include files out of the way. compatlib.h
was integrated into ecpg_informix.h, the other ones go into their own
subdirectory that is automatically considered by the embedded preprocessor
when in Informix mode.
2003-12-18 18:55:09 +00:00
Michael Meskes 3b72087bf6 Install dummy sqlda.h file since this is needed for compatibility. 2003-10-20 12:54:29 +00:00
Michael Meskes 1bd5e054ed Hide Informix datatypes. They are not seen by our built process anymore. 2003-10-03 10:07:28 +00:00
Michael Meskes 9aeb1eff24 Just another sync. 2003-06-29 09:25:19 +00:00
Michael Meskes fd3ca524eb Implemented Informix special way to treat NULLs, removed warnings, synced. 2003-06-25 10:44:21 +00:00
Michael Meskes b4117d8b1b Install all header files. 2003-06-12 12:52:24 +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
Michael Meskes 03829995cd Forgot to commit Makefile change. 2003-02-21 15:19:18 +00:00
Peter Eisentraut 335248c9b7 Support for DESTDIR make variable. This is used as in `make install
DESTDIR=/else/where' and prepends the value of DESTDIR to the full
installation paths (e.g., /else/where/usr/local/pgsql/bin). This allows
users to install the package into a location different from the one that
was configured and hard-coded into various scripts, e.g., for creating
binary packages.

DESTDIR is in many cases preferrable over `make install
prefix=/else/where' because

a) `prefix' affects the path that is hard-coded into the files, which can
lead to a `make install prefix=xxx' (as done by the regression test
driver) corrupting the files in the source tree with wrong paths.

b) it doesn't work at all if a directory was overridden to not depend on
`prefix', e.g., --sysconfdir=/etc.

(Updating the regression test driver to use DESTDIR is a separate
undertaking.)

See also autoconf@gnu.org, From: Akim Demaille <akim@epita.fr>, Date: 08
Sep 2000 12:48:59 +0200, Message-ID:
<mv4em2vb1lw.fsf@nostromo.lrde.epita.fr>, Subject: Re: HTML format
documentation.
2000-09-17 13:02:52 +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 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
Michael Meskes 35ba9de276 *** empty log message *** 2000-02-16 16:18:29 +00:00
Marc G. Fournier 840306af04 ecpg.patch (wrong makefile expansion in some cases)
the ecpg Makefiles use a variable DESTDIR which is never defined
        except by debian/rules makefile, in which case the ecpg makefiles
        expand wrong pathnames. If we want to support a DESTDIR root it
        must be done consistently in all the makefiles, not just in ecpg.

From: Massimo Dal Zotto <dz@cs.unitn.it>
1999-06-05 04:13:21 +00:00
Marc G. Fournier 6bccf64d7b From: Michael Meskes <meskes@topsystem.de>
Tue Apr 28 14:48:41 CEST 1998

      - Put operator "->" back into parser. Note that :foo->bar means the
        C term, but :foo ->bar means the operator "->".

Tue Apr 28 15:49:07 CEST 1998

      - Added exec sql disconnect command.
      - Allow varchar in C to be written in uppercase too.
      - Added whenever option "do break;"

Wed Apr 29 09:17:53 CEST 1998

      - Corrected parsing of C comments.
      - Also allow C++ style comments.
      - Make sure not found is only checked after commands that could
          return it.
      - Added error codes, see ecpgerror.h for details.
      - Added "exec sql <TransactionStmt> release" as disconnect statement
        for compatibility issues.

Thu Apr 30 10:42:10 CEST 1998

      - Added a -t option to disable automatic transaction start.
      - Added sqlerrd[] to sqlca struct.
      - Give back number of tuples affect in sqlca.sqlerrd[2].

Thu Apr 30 13:36:02 CEST 1998

      - Make the return code different in case of different errors.

Wed May  6 11:42:48 CEST 1998

      - Free memory if possible
      - Some bugfixes for bugs I found while changing the memory
          allocation code
      - Now able to fill complete array with one call (see test1.pgc for
          an example)
      - Set version to 2.3.0
      - Set library version to 2.1
1998-05-06 13:03:47 +00:00
Marc G. Fournier 64e35e1468 Upgrade ECPG to 2.0
Michael Meskes <meskes@topsystem.de>
1998-04-21 13:23:24 +00:00
Bruce Momjian 471dbbc223 DESTDIR removed, again. 1998-04-06 16:53:15 +00:00
Bruce Momjian 5523beb949 Re-introduce $DISTDIR. 1998-04-06 01:16:55 +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
Bruce Momjian 2dfee93457 Remove DISTDIR. 1998-04-05 22:02:56 +00:00
Marc G. Fournier 0daa8c3745 A few misc fixes brought up by Andrew 1998-02-23 15:44:25 +00:00
Bruce Momjian df67b83a7a Password fix. Now people have to do the REVOKE themselves. 1998-02-19 17:20:01 +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 38201e21d0 Erk, the whole directory structure changed on us here... 1998-02-10 16:44:17 +00:00