Flexible html documentation targets

Heime <[email protected]> Sat, 02 May 2026 17:56:23 +0000
Newsgroups gmane.comp.gnu.make.general
Message-ID <SGt9S9_0Jwjd7z_rXO3iQwUNtgdgJznzVip_WXNUaYF1LaBH-nO1spIPeClIQoXaQdr7f9eVj6qTSw0wJ6EvfkdhXKmesX4ML--YgZSM5fg=@protonmail.com>

I am using makeinfo tho generate the html documentation of a program.

For HTML, makeinfo includes this option

--split=3DSPLIT
     split at SPLIT, where SPLIT may be `chapter', `section' or `node'.

I want to include the split option to my makefile.

What I plan to do is define three different simple targets.  Such=20
as: html, html-split-chapter, html-split-section, html-split-node.=20

Basically I have to figure out the things that the user might need=20
to produce, and create a target for each one of them.=20

Without requiring "additional parameters" to get the job done.

Currently I have the following target, but it is not very
user friendly.  $(hmldir) is the directory they want to=20
store the out-of-tree html output

opts =3D --force --enable-encoding -I ${srcdir}

$(hmldir)/antares.html: $(srcs) | $$(@D)
=09makeinfo $(opts) --html-o $@ $<

"make help" is also a very nice feature, in case they forget.=20
If users type "make" with no parameters, I give them the "help",=20
and mention "make help" in the text.  Easy to use, and friendly.