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 1oVpLr-0005gL-Ny for pgsql-hackers@arkaria.postgresql.org; Wed, 07 Sep 2022 07:19:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oVpLq-0004ii-K9 for pgsql-hackers@arkaria.postgresql.org; Wed, 07 Sep 2022 07:19:58 +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 1oVpLq-0004iT-A3 for pgsql-hackers@lists.postgresql.org; Wed, 07 Sep 2022 07:19:58 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oVpLm-000613-Rt for pgsql-hackers@postgresql.org; Wed, 07 Sep 2022 07:19:57 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 21CE95C013B; Wed, 7 Sep 2022 03:19:53 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Wed, 07 Sep 2022 03:19:53 -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=1662535193; x= 1662621593; bh=G86LH0KGsHxUQ50U8VP+uBD3eVzMNqsMQZJISlAAASg=; b=O uwmaBJdyipqAKYS5StLsVblf0pcW6ERp2mN7bTppApPqiboprMu6ELwd6VNVqRIU nv/fgGfXOagc128fGeJ469mkJQJBi3KfWGb36UKf+TrreTSv/N6S2KPvkMKUUX2F yeMENeWoidtlHuEEtoksYdeJxSgChaXQkRtv4XCRQkOdCbTyo8asNf3W6Xu6GnRD 0TMHP7gkPxyE/6EM+mGh8jIrNsVIFPOrZThr5gsYkOgRmN9KAh48z1N6ATHqyl8c WKkpVT9I4/hYT8Hud3Ms1ur1A9gVC7hnb1v2l+ZMEzjGVOnUnTEfQr+uJvG2SJMh v6UXrqE1p4aE79qle6Wng== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdelledguddulecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomheprfgv thgvrhcugfhishgvnhhtrhgruhhtuceophgvthgvrhdrvghishgvnhhtrhgruhhtsegvnh htvghrphhrihhsvggusgdrtghomheqnecuggftrfgrthhtvghrnhepheelffeggedujeet iefhleetuddvieffhfffvdejvdffgeejkeduleduheduieefnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepphgvthgvrhdrvghishgvnhhtrhgr uhhtsegvnhhtvghrphhrihhsvggusgdrtghomh X-ME-Proxy: Feedback-ID: i131946ab:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 7 Sep 2022 03:19:52 -0400 (EDT) Message-ID: Date: Wed, 7 Sep 2022 09:19:51 +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: >> doc/src/sgml/resolv.xsl: I don't understand what this is doing. Maybe >> at least add a comment in the file. > It's only used for building epubs. Perhaps I should extract that into a > separate patch as well? The relevant section is: > >> # >> # epub >> # >> >> # This was previously implemented using dbtoepub - but that doesn't seem to >> # support running in build != source directory (i.e. VPATH builds already >> # weren't supported). >> if pandoc.found() and xsltproc.found() >> # XXX: Wasn't able to make pandoc successfully resolve entities >> # XXX: Perhaps we should just make all targets use this, to avoid repeatedly >> # building whole thing? It's comparatively fast though. >> postgres_full_xml = custom_target('postgres-full.xml', >> input: ['resolv.xsl', 'postgres.sgml'], >> output: ['postgres-full.xml'], >> depends: doc_generated + [postgres_sgml_valid], >> command: [xsltproc, '--path', '@OUTDIR@/', xsltproc_flags, >> '-o', '@OUTPUT@', '@INPUT@'], >> build_by_default: false, >> ) > A noted, I couldn't make pandoc resolve our entities, so I used resolv.xsl > them, before calling pandoc. > > I'll rename it to resolve-entities.xsl and add a comment. We can have xmllint do this. The following gets the epub build working with vpath: diff --git a/doc/src/sgml/Makefile b/doc/src/sgml/Makefile index 4ae7ca2be7..33b72d03db 100644 --- a/doc/src/sgml/Makefile +++ b/doc/src/sgml/Makefile @@ -184,8 +184,12 @@ XSLTPROC_FO_FLAGS += --stringparam img.src.path '$(srcdir)/' epub: postgres.epub postgres.epub: postgres.sgml $(ALLSGML) $(ALL_IMAGES) - $(XMLLINT) --noout --valid $< - $(DBTOEPUB) -o $@ $< + $(XMLLINT) $(XMLINCLUDE) --output tmp.sgml --noent --valid $< +ifeq ($(vpath_build),yes) + $(MKDIR_P) images + cp $(ALL_IMAGES) images/ +endif + $(DBTOEPUB) -o $@ tmp.sgml This could also be combined with the idea of the postgres.sgml.valid thing you have in the meson patch set. I'll finish this up and produce a proper patch.