On Thursday, June 11th, 2026 at 4:29 AM, Heime <[email protected]> wrote:
> On Thursday, June 11th, 2026 at 2:47 AM > , Dmitry Goncharov <[email protected]> wrote: > > > On Wed, Jun 10, 2026 at 10:11 AM Heime <[email protected]> wrote: > > > > > Are there some makefile examples I can study that allow > > > for various compiling options > > > to be used? > > > > i like the make manual. > > > > regards, Dmitry > > Which parts should I look at? I could use GNU Make variables to configure Makeinfo HTML options I am making a makefile to produce my package documentation with makeinfo. For html output, there are various makeinfo options. Options for HTML: --css-include=FILE include FILE in HTML <style> output; read stdin if FILE is - --css-ref=URL generate CSS reference to URL --internal-links=FILE produce list of internal links in FILE --split=SPLIT split at SPLIT, where SPLIT may be `chapter', `section' or `node' --transliterate-file-names use file names in ASCII transliteration --node-files produce redirection files for nodes and anchors; default is set only if split. The standard way to pass options is with variables. But an html option can be included or not, and multiple options can be used. How can I use make variables to handle the html options from users of the makefile? srcs = ${srcdir}/antares.texi .PHONY: all-doc info html all-doc: info html ## [Syntax] targets: prerequisites info: ${infdir}/antares.info html: ${hmldir}/antares.html .SECONDEXPANSION: opts = --force --enable-encoding -I ${srcdir} $(infdir)/antares.info: $(srcs) | $$(@D) makeinfo $(opts) -o $@ $< $(hmldir)/antares.html: $(srcs) | $$(@D) makeinfo $(opts) --html -o $@ $< Would I make a different variable for each html option?
