;doc: use more obscure m4 flags to avoid clashes (#806)

This commit is contained in:
Simon Michael 2021-06-17 08:28:19 -10:00
parent 5725fb8ab7
commit e7f4619735
2 changed files with 9 additions and 9 deletions

View File

@ -418,7 +418,7 @@ main = do
need $ [src, commonm4, commandsm4, packagemanversionm4, packagemandatem4, tmpl] ++ subfiles
when (dir=="hledger") $ need commandmds
cmd Shell
m4 "-DMAN -I" dir commonm4 commandsm4 packagemanversionm4 packagemandatem4 src "|"
m4 "-DMANFORMAT -I" dir commonm4 commandsm4 packagemanversionm4 packagemandatem4 src "|"
pandoc fromsrcmd "-s" "--template" tmpl
("-V footer='"++pkg++"-"++pkgversion++"'")
"--lua-filter tools/pandoc-drop-html-blocks.lua"
@ -455,7 +455,7 @@ main = do
need $ [src, commonm4, commandsm4, packagemanversionm4, packagemandatem4] ++ subfiles
when (dir=="hledger") $ need commandmds
cmd Shell
m4 "-DINFO -I" dir commonm4 commandsm4 packagemanversionm4 packagemandatem4 src "|"
m4 "-DINFOFORMAT -I" dir commonm4 commandsm4 packagemanversionm4 packagemandatem4 src "|"
-- sed "-e 's/^#(#+)/\\1/'" "|"
pandoc fromsrcmd
"--lua-filter tools/pandoc-drop-html-blocks.lua"
@ -507,7 +507,7 @@ main = do
,""
]
cmd Shell
m4 "-DWEB -I" dir commonm4 commandsm4 packageversionm4 packagemandatem4 src "|"
m4 "-DWEBFORMAT -I" dir commonm4 commandsm4 packageversionm4 packagemandatem4 src "|"
pandoc fromsrcmd towebmd
"--lua-filter tools/pandoc-demote-headers.lua"
">>" out

View File

@ -15,12 +15,12 @@ m4_define({{_author_}}, {{}})m4_dnl
m4_dnl
m4_dnl Macros for conditionally including or excluding content based on the format
m4_dnl (man, web or info).
m4_define({{_man_}}, m4_ifdef({{MAN}},{{$1}}) )m4_dnl
m4_define({{_notman_}}, m4_ifdef({{MAN}},,{{$1}}) )m4_dnl
m4_define({{_web_}}, m4_ifdef({{WEB}},{{$1}}) )m4_dnl
m4_define({{_notweb_}}, m4_ifdef({{WEB}},,{{$1}}) )m4_dnl
m4_define({{_info_}}, m4_ifdef({{INFO}},{{$1}}) )m4_dnl
m4_define({{_notinfo_}}, m4_ifdef({{INFO}},,{{$1}}) )m4_dnl
m4_define({{_man_}}, m4_ifdef({{MANFORMAT}},{{$1}}) )m4_dnl
m4_define({{_notman_}}, m4_ifdef({{MANFORMAT}},,{{$1}}) )m4_dnl
m4_define({{_web_}}, m4_ifdef({{WEBFORMAT}},{{$1}}) )m4_dnl
m4_define({{_notweb_}}, m4_ifdef({{WEBFORMAT}},,{{$1}}) )m4_dnl
m4_define({{_info_}}, m4_ifdef({{INFOFORMAT}},{{$1}}) )m4_dnl
m4_define({{_notinfo_}}, m4_ifdef({{INFOFORMAT}},,{{$1}}) )m4_dnl
m4_dnl
m4_dnl Two side-by-side columns.
m4_define({{_col2_}},