Setting makeinfo options
Heime <[email protected]> Tue, 23 Jun 2026 00:52:45 +0000
| Newsgroups | gmane.comp.tex.texinfo.general |
|---|---|
| Message-ID | <rKFpkNe_71BjHqHbbmbt_iyXK0iRK8eiHafSTeP_NQhKqMTmxX-a0QFHP_QxXZVrMQufUwvtSQf-IIicgeWmITsz57uCnWh9tPFivwNixN4=@protonmail.com> |
----------------------------------------------------------------
I have been making a makefile to generate my package documentation,
with ideas from the emacs documentation makefile.
How would one allow users to decide what options to use - for html
for example? Using variable hopc by appending makeinfo options=20
seems difficult, possibly wrong.
.PHONY: all-doc info html pdf dvi ps
--all-doc: info html pdf dvi ps
## [Syntax] targets: prerequisites
info: ${infdir}/antares.info
html: ${hmldir}/antares.html
pdf: ${docdir}/antares.pdf
dvi: ${docdir}/antares.dvi
ps: ${docdir}/antares.ps
hopc :=3D
ifneq ($(strip $(css)),)
=09hopc +=3D --css-include=3D$(css)
endif
ifneq ($(strip $(css-ref)),)
=09hopc +=3D --css-ref=3D$(css-ref)
endif
ifneq ($(strip $(links)),)
=09hopc +=3D --internal-links=3D$(links)
endif
ifneq ($(strip $(split)),)
=09hopc +=3D --split=3D$(split)
endif
ifneq ($(trlfn),)
=09hopc +=3D --transliterate-file-names
endif
ifneq ($(ndf),)
=09hopc +=3D --node-files
endif
.PHONY: trlfn ndf
trlfn:
=09hopc +=3D --transliterate-file-names
ndf:
=09hopc +=3D --node-files
.PHONY: split-chapter split-section split-node
split-chapter:
=09split=3D--split=3Dchapter
split-section:
=09split=3D--split=3Dsection
split-node:
=09split=3D--split=3Dnode
split-chapter split-section split-node: $(hmldir)/antares.html
$(hmldir)/antares.html: $(srcs) | $$(@D)
=09makeinfo $(opts) --html $(hopc) -o $@ $<