postgresql/src/backend/commands
Andres Freund e6927270cd meson: Add initial version of meson based build system
Autoconf is showing its age, fewer and fewer contributors know how to wrangle
it. Recursive make has a lot of hard to resolve dependency issues and slow
incremental rebuilds. Our home-grown MSVC build system is hard to maintain for
developers not using Windows and runs tests serially. While these and other
issues could individually be addressed with incremental improvements, together
they seem best addressed by moving to a more modern build system.

After evaluating different build system choices, we chose to use meson, to a
good degree based on the adoption by other open source projects.

We decided that it's more realistic to commit a relatively early version of
the new build system and mature it in tree.

This commit adds an initial version of a meson based build system. It supports
building postgres on at least AIX, FreeBSD, Linux, macOS, NetBSD, OpenBSD,
Solaris and Windows (however only gcc is supported on aix, solaris). For
Windows/MSVC postgres can now be built with ninja (faster, particularly for
incremental builds) and msbuild (supporting the visual studio GUI, but
building slower).

Several aspects (e.g. Windows rc file generation, PGXS compatibility, LLVM
bitcode generation, documentation adjustments) are done in subsequent commits
requiring further review. Other aspects (e.g. not installing test-only
extensions) are not yet addressed.

When building on Windows with msbuild, builds are slower when using a visual
studio version older than 2019, because those versions do not support
MultiToolTask, required by meson for intra-target parallelism.

The plan is to remove the MSVC specific build system in src/tools/msvc soon
after reaching feature parity. However, we're not planning to remove the
autoconf/make build system in the near future. Likely we're going to keep at
least the parts required for PGXS to keep working around until all supported
versions build with meson.

Some initial help for postgres developers is at
https://wiki.postgresql.org/wiki/Meson

With contributions from Thomas Munro, John Naylor, Stone Tickle and others.

Author: Andres Freund <andres@anarazel.de>
Author: Nazir Bilal Yavuz <byavuz81@gmail.com>
Author: Peter Eisentraut <peter@eisentraut.org>
Reviewed-By: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Discussion: https://postgr.es/m/20211012083721.hvixq4pnh2pixr3j@alap3.anarazel.de
2022-09-21 22:37:17 -07:00
..
Makefile Move parallel vacuum code to vacuumparallel.c. 2021-12-23 11:42:52 +05:30
aggregatecmds.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
alter.c Ensure that pg_auth_members.grantor is always valid. 2022-08-18 13:13:02 -04:00
amcmds.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
analyze.c Invent qsort_interruptible(). 2022-07-12 16:30:36 -04:00
async.c Revert the addition of GetMaxBackends() and related stuff. 2022-04-12 14:45:23 -04:00
cluster.c Split up guc.c for better build speed and ease of maintenance. 2022-09-13 11:11:45 -04:00
collationcmds.c Pre-beta mechanical code beautification. 2022-05-12 15:17:30 -04:00
comment.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
constraint.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
conversioncmds.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
copy.c Reject MERGE in CTEs and COPY 2022-08-12 12:05:50 +02:00
copyfrom.c Further reduce warnings with -Wshadow=compatible-local 2022-08-24 12:27:12 +12:00
copyfromparse.c Fix typo in comment. 2022-08-26 16:55:00 +09:00
copyto.c Pre-beta mechanical code beautification. 2022-05-12 15:17:30 -04:00
createas.c In extensions, don't replace objects not belonging to the extension. 2022-08-08 11:12:31 -04:00
dbcommands.c Improve ICU option handling in CREATE DATABASE 2022-09-21 10:41:36 -04:00
define.c Improve two comments related to a boolean DefElem's value 2022-07-11 11:07:33 +09:00
discard.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
dropcmds.c Use list_copy_head() instead of list_truncate(list_copy(...), ...) 2022-07-13 15:03:47 +12:00
event_trigger.c Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
explain.c Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
extension.c Fix missed corner cases for grantable permissions on GUCs. 2022-07-19 17:21:55 -04:00
foreigncmds.c In extensions, don't replace objects not belonging to the extension. 2022-08-08 11:12:31 -04:00
functioncmds.c More -Wshadow=compatible-local warning fixes 2022-08-26 02:35:40 +12:00
indexcmds.c Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
lockcmds.c Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
matview.c Change internal RelFileNode references to RelFileNumber or RelFileLocator. 2022-07-06 11:39:09 -04:00
meson.build meson: Add initial version of meson based build system 2022-09-21 22:37:17 -07:00
opclasscmds.c Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
operatorcmds.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
policy.c Add construct_array_builtin, deconstruct_array_builtin 2022-07-01 11:23:15 +02:00
portalcmds.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
prepare.c Assorted examples of expanded type-safer palloc/pg_malloc API 2022-09-12 08:45:03 +02:00
proclang.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
publicationcmds.c Avoid using list_length() to test for empty list. 2022-08-17 11:12:35 -04:00
schemacmds.c Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
seclabel.c Allow granting SET and ALTER SYSTEM privileges on GUC parameters. 2022-04-06 13:24:33 -04:00
sequence.c In extensions, don't replace objects not belonging to the extension. 2022-08-08 11:12:31 -04:00
statscmds.c Avoid using list_length() to test for empty list. 2022-08-17 11:12:35 -04:00
subscriptioncmds.c Message wording improvements 2022-09-16 16:39:26 +02:00
tablecmds.c Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
tablespace.c Split up guc.c for better build speed and ease of maintenance. 2022-09-13 11:11:45 -04:00
trigger.c Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
tsearchcmds.c Add Boolean node 2022-01-17 10:38:23 +01:00
typecmds.c Avoid using list_length() to test for empty list. 2022-08-17 11:12:35 -04:00
user.c Allow grant-level control of role inheritance behavior. 2022-08-25 10:06:02 -04:00
vacuum.c Derive freeze cutoff from nextXID, not OldestXmin. 2022-08-31 11:37:35 -07:00
vacuumparallel.c Use logical operator && instead of & in vacuumparallel.c. 2022-08-22 08:53:58 +05:30
variable.c Split up guc.c for better build speed and ease of maintenance. 2022-09-13 11:11:45 -04:00
view.c In extensions, don't replace objects not belonging to the extension. 2022-08-08 11:12:31 -04:00