Re: split func.sgml to separated individual sgml files
Peter Eisentraut <peter@eisentraut.org>
From: Peter Eisentraut <peter@eisentraut.org>
To: Nazir Bilal Yavuz <byavuz81@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andrew Dunstan <andrew@dunslane.net>,
Florents Tselai <florents.tselai@gmail.com>,
Euler Taveira <euler@eulerto.com>, jian he <jian.universality@gmail.com>,
"David G. Johnston" <david.g.johnston@gmail.com>,
Corey Huinker <corey.huinker@gmail.com>,
pgsql-hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-10-03T14:16:42Z
Lists: pgsql-hackers
On 03.10.25 13:48, Nazir Bilal Yavuz wrote: > On Thu, 2 Oct 2025 at 23:16, Tom Lane <tgl@sss.pgh.pa.us> wrote: >> Peter Eisentraut <peter@eisentraut.org> writes: >>> I suspect what you're really after here is the functionality of the >>> check-tabs and check-nbsp targets. So the new Perl script really just >>> has to cover those two and doesn't have to bother with xmllint. And >>> then you just call that script as part of the postgres-full.xml target. >> >> Yeah, that's what I was imagining: replace the xmllint call in >> postgres-full.xml with this new script that will also run the >> tab/nbsp checks. > > Does not this mean we can not run the syntax check by itself in the > make builds? If I understand correctly, we need to create > postgres-full.xml each time we want to run the syntax check, right? If you look at this more closely, creating postgres-full.xml and running the syntax check perform the same operations, except that the latter throws away the output. So it seems redundant to build a whole new code path for this. I think you can make the check target dependent on postgres-full.xml and be done, kind of like this (starting from pre-b2922562726): diff --git a/doc/src/sgml/Makefile b/doc/src/sgml/Makefile index b53b2694a6b..574ae7b3984 100644 --- a/doc/src/sgml/Makefile +++ b/doc/src/sgml/Makefile @@ -69,8 +69,12 @@ ALL_IMAGES := $(wildcard $(srcdir)/images/*.svg) # files into one big file). This helps tools that don't understand # vpath builds (such as dbtoepub). postgres-full.xml: postgres.sgml $(ALL_SGML) + $(MAKE) check-tabs check-nbsp $(XMLLINT) $(XMLINCLUDE) --output $@ --noent --valid $< +# Quick syntax check without style processing +check: postgres-full.xml + ## ## Man pages @@ -195,15 +199,6 @@ MAKEINFO = makeinfo $(MAKEINFO) --enable-encoding --no-split --no-validate $< -o $@ -## -## Check -## - -# Quick syntax check without style processing -check: postgres.sgml $(ALL_SGML) check-tabs check-nbsp - $(XMLLINT) $(XMLINCLUDE) --noout --valid $< - - ## ## Install ##
Commits
-
Revert "Improve docs syntax checking"
- 5b5e8a29c13a 19 (unreleased) landed
-
Improve docs syntax checking
- b29225627262 19 (unreleased) landed
-
Teach doc/src/sgml/Makefile about the new func/*.sgml files.
- 170a8a3f4605 19 (unreleased) cited
-
Split func.sgml into more manageable pieces
- 4e23c9ef65ac 19 (unreleased) landed
-
Doc: add check to detect non-breaking spaces in the docs.
- 5b7da5c261d1 18.0 cited