Re: split func.sgml to separated individual sgml files - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: split func.sgml to separated individual sgml files
Date
Msg-id 32637c74-2219-42ff-b121-312ab91fd596@eisentraut.org
Whole thread Raw
In response to Re: split func.sgml to separated individual sgml files  (Nazir Bilal Yavuz <byavuz81@gmail.com>)
Responses Re: split func.sgml to separated individual sgml files
List 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
  ##




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Fixing a few minor misusages of bms_union()
Next
From: Tom Lane
Date:
Subject: Re: split func.sgml to separated individual sgml files