meson: portname was set too early
authorPeter Eisentraut <peter@eisentraut.org>
Tue, 23 Jan 2024 11:15:21 +0000 (12:15 +0100)
committerPeter Eisentraut <peter@eisentraut.org>
Tue, 23 Jan 2024 11:16:37 +0000 (12:16 +0100)
portname is set to host_system, but host_system might still be changed
later in the file.  As a consequence, platforms where host_system is
changed later wouldn't find some of their platform-specific files
(driven by portname), and the build would fail.  Move the assignment
of portname further down after the last change of host_system (but
before further overriding assignments to portname).

Discussion: https://www.postgresql.org/message-id/flat/CAC7zN94TdsHhY88XkroJzSMx7E%3DBQpV9LKKjNSEnTM04ihoWCA%40mail.gmail.com

meson.build

index 55184db2488452af6a09effba1280b4f4f894ec8..a0c0914b509539b202f228f3c73a3833087776ca 100644 (file)
@@ -159,12 +159,6 @@ cdata.set_quoted('CONFIGURE_ARGS', '')
 # Basic platform specific configuration
 ###############################################################
 
-# meson's system names don't quite map to our "traditional" names. In some
-# places we need the "traditional" name, e.g., for mapping
-# src/include/port/$os.h to src/include/pg_config_os.h. Define portname for
-# that purpose.
-portname = host_system
-
 exesuffix = '' # overridden below where necessary
 dlsuffix = '.so' # overridden below where necessary
 library_path_var = 'LD_LIBRARY_PATH'
@@ -192,6 +186,12 @@ if host_system == 'dragonfly'
   host_system = 'netbsd'
 endif
 
+# meson's system names don't quite map to our "traditional" names. In some
+# places we need the "traditional" name, e.g., for mapping
+# src/include/port/$os.h to src/include/pg_config_os.h. Define portname for
+# that purpose.
+portname = host_system
+
 if host_system == 'aix'
   library_path_var = 'LIBPATH'