Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oVnAm-0005fy-5C for pgsql-hackers@arkaria.postgresql.org; Wed, 07 Sep 2022 05:00:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oVnAl-00038E-0t for pgsql-hackers@arkaria.postgresql.org; Wed, 07 Sep 2022 05:00:23 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oVnAk-000385-NL for pgsql-hackers@lists.postgresql.org; Wed, 07 Sep 2022 05:00:22 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oVnAi-0004nW-Nt for pgsql-hackers@postgresql.org; Wed, 07 Sep 2022 05:00:22 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 94AED5C0160; Wed, 7 Sep 2022 01:00:19 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Wed, 07 Sep 2022 01:00:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1662526819; x= 1662613219; bh=0cXATmABVgIH28hRIPneKovKBk8v0+SU65dKyRQCsdg=; b=p Ux33owtXz8syrXhwjPm2NX2MqFhu+/Iam8Ts+eXgzFhQvfvxy+uM7pfb9sURmYaT 12oYEyO7pfx/LAwXUJfxVwOBev1JGo/vDlDQBsYYjxhsjY3KkTnCvD4Q7qS7aUON +Xo49dLe7T10PGWZ76MJacAUtHntD71/sP5MHYfBEws+Tp1gApqbhf2Sq8nK7DW6 R+6yXpyiFL6XkICzD1VHK94ANFiAV8aZ0dNclfitAYHIFobAb7ReUAhzL6s+hoTX 0UBnmloTWvH3hh/rsSn5ys2SV3NLsdlWuhlwvB/fUhoCNj3V1CxCr6V9ntcwn4bu 6wtY48yl7nN9nA6xOHmuw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdelledgledtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpefrvght vghrucfgihhsvghnthhrrghuthcuoehpvghtvghrrdgvihhsvghnthhrrghuthesvghnth gvrhhprhhishgvuggsrdgtohhmqeenucggtffrrghtthgvrhhnpeegfeejuefhuefgteei lefgkefghfffteegkeevvdfgtdejvddvteeitdfgtdetveenucffohhmrghinheprhgtrd hinhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehp vghtvghrrdgvihhsvghnthhrrghuthesvghnthgvrhhprhhishgvuggsrdgtohhm X-ME-Proxy: Feedback-ID: i131946ab:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 7 Sep 2022 01:00:18 -0400 (EDT) Message-ID: Date: Wed, 7 Sep 2022 07:00:17 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Subject: Re: [RFC] building postgres with meson - v12 Content-Language: en-US To: Andres Freund Cc: pgsql-hackers@postgresql.org, samay sharma , Nazir Bilal Yavuz References: <20211012083721.hvixq4pnh2pixr3j@alap3.anarazel.de> <20220827180447.zbmfk6sp2af4ntio@awork3.anarazel.de> <2180a97c-c026-1b6c-cec8-d6e499f97017@enterprisedb.com> <20220831181154.ebqkjahjzs5bttfa@awork3.anarazel.de> From: Peter Eisentraut In-Reply-To: <20220831181154.ebqkjahjzs5bttfa@awork3.anarazel.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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 diff --git a/src/makefiles/Makefile.win32 b/src/makefiles/Makefile.win32 index 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.