From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@postgresql.org, samay sharma <smilingsamay@gmail.com>
Cc: Nazir Bilal Yavuz <byavuz81@gmail.com>
Subject: Re: [RFC] building postgres with meson - v12
Date: Wed, 7 Sep 2022 07:00:17 +0200
Message-ID: <c29713a5-c141-2c52-3d06-c3fc9ae8ad57@enterprisedb.com> (raw)
In-Reply-To: <20220831181154.ebqkjahjzs5bttfa@awork3.anarazel.de>
References: <20211012083721.hvixq4pnh2pixr3j@alap3.anarazel.de>
<20220827180447.zbmfk6sp2af4ntio@awork3.anarazel.de>
<2180a97c-c026-1b6c-cec8-d6e499f97017@enterprisedb.com>
<20220831181154.ebqkjahjzs5bttfa@awork3.anarazel.de>
On 31.08.22 20:11, Andres Freund wrote:
>> src/port/win32ver.rc.in: This is redundant with src/port/win32ver.rc.
>> (Note that the latter is also used as an input file for text
>> substitution. So having another file named *.in next to it would be
>> super confusing.)
> Yea, this stuff isn't great. I think the better solution, both for meson and
> for configure, would be to move to do all the substitution to the C
> preprocessor.
Yeah, I think if we can get rid of the evil date-based versioning, then
this could be done like
inline patch 1: src/makefiles/Makefile.win32 (+2/-11 lines) download inline-1.patchdiff --git a/src/makefiles/Makefile.win32 b/src/makefiles/Makefile.win32index 17d6819644..609156382f 100644--- a/src/makefiles/Makefile.win32+++ b/src/makefiles/Makefile.win32@@ -65,21 +65,12 @@ endif
# win32ver.rc or furnish a rule for generating one. Set $(PGFILEDESC) to
# signal win32ver.rc availability to the dll build rule below.
ifndef PGXS
-win32ver.rc: $(top_srcdir)/src/port/win32ver.rc- sed -e 's;FILEDESC;$(PGFILEDESC);' \- -e 's;VFT_APP;$(PGFTYPE);' \- -e 's;_ICO_;$(PGICOSTR);' \- -e 's;\(VERSION.*\),0 *$$;\1,'`date '+%y%j' | sed 's/^0*//'`';' \- -e '/_INTERNAL_NAME_/$(if $(shlib),s;_INTERNAL_NAME_;"$(basename $(shlib))";,d)' \- -e '/_ORIGINAL_NAME_/$(if $(shlib),s;_ORIGINAL_NAME_;"$(shlib)";,d)' \- $< >$@-
# Depend on Makefile.global to force rebuild on re-run of configure.
win32ver.rc: $(top_builddir)/src/Makefile.global
endif
-win32ver.o: win32ver.rc- $(WINDRES) -i $< -o $@ --include-dir=$(top_builddir)/src/include --include-dir=$(srcdir)+win32ver.o: $(top_srcdir)/src/port/win32ver.rc+ $(WINDRES) -i $< -o $@ --include-dir=$(top_builddir)/src/include --include-dir=$(srcdir) -D FILEDESC=$(PGFILEDESC) -D VFT_APP=$(PGFTYPE) -D_ICO_=$(PGICOSTR) -D_INTERNAL_NAME_=$(if $(shlib),s;_INTERNAL_NAME_;"$(basename $(shlib))";,d) -D_ORIGINAL_NAME_=$(if $(shlib),s;_ORIGINAL_NAME_;"$(shlib)";,d)Probably needs some careful checking of the quoting. But that should be
the right thing in principle.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: peter.eisentraut@enterprisedb.com, andres@anarazel.de, smilingsamay@gmail.com, byavuz81@gmail.com
Subject: Re: [RFC] building postgres with meson - v12
In-Reply-To: <c29713a5-c141-2c52-3d06-c3fc9ae8ad57@enterprisedb.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox