diff --git a/.github/workflows/draft.yml b/.github/workflows/draft.yml index bd6904b..03880b2 100644 --- a/.github/workflows/draft.yml +++ b/.github/workflows/draft.yml @@ -34,7 +34,8 @@ jobs: popd - name: Build (PDF) - run: b2 --debug-configuration -d+2 doc-stage=draft,final + run: | + b2 --debug-configuration -d+2 doc-stage=draft,final - name: Upload uses: actions/upload-artifact@main diff --git a/build.jam b/build.jam index 086b444..61940c3 100644 --- a/build.jam +++ b/build.jam @@ -1,8 +1,9 @@ import toolset ; import feature ; -feature.feature doc-stage : draft final : propagated symmetric implicit ; +feature.feature doc-stage : draft final : propagated symmetric ; feature.feature verbose : off on : propagated incidental ; +feature.feature license : off on : propagated symmetric ; project /ecosystem : build-dir .build/b2 @@ -12,21 +13,45 @@ local tex-src = [ glob src/eco_*.tex src/in_*.tex src/*.ist ] ; local latexmkrc = [ glob src/*latexmkrc* ] ; local _ = " " ; +rule latex-defs ( properties * ) +{ + local pretex ; + if final in $(properties) + { + pretex += "\\\\def\\\\isofinal{yes}" ; + } + if on in $(properties) + { + pretex += "\\\\def\\\\license{yes}" ; + } + return "-usepretex=\"$(pretex:J= )\"" ; +} + make ecosystem.pdf : src/ecosystem.tex : @latexmk : $(tex-src) on:-verbose on:-diagnostics -r$(_)"$(latexmkrc[1])" - "final:-usepretex=\"\\\\def\\\\isofinal{yes}\"" + @latex-defs + doc-stage + license ; explicit ecosystem.pdf ; +rule install-name ( properties * ) +{ + local name = ecosystem-is ; + if draft in $(properties) { name += draft ; } + if final in $(properties) { name += final ; } + if on in $(properties) { name += ccby4 ; } + return $(name:J=-).pdf ; +} + install ecosystem-is : ecosystem.pdf : . - draft:ecosystem-is-draft.pdf - final:ecosystem-is-final.pdf + @install-name ; # Generic latexmk action. diff --git a/src/eco_cover_reg.tex b/src/eco_cover_reg.tex index 2cbc6b7..b382ce4 100644 --- a/src/eco_cover_reg.tex +++ b/src/eco_cover_reg.tex @@ -73,8 +73,10 @@ % \copyright\ ISO/IEC \relyear\\ +\ifdefined\license Except where otherwise noted, content is licensed under a Creative Commons Attribution 4.0 International license (CC BY 4.0).\\ +\fi \begin{indented} \microtypesetup{activate=false}% diff --git a/src/ecosystem.tex b/src/ecosystem.tex index 292d931..930709d 100644 --- a/src/ecosystem.tex +++ b/src/ecosystem.tex @@ -99,7 +99,9 @@ %%-------------------------------------------------- %% chapters +\ifdefined\license \input{eco_license} +\fi \input{eco_scope} \input{eco_refs} \input{eco_conformance} diff --git a/src/in_config.tex b/src/in_config.tex index 3f87c1a..4ae7d74 100644 --- a/src/in_config.tex +++ b/src/in_config.tex @@ -17,7 +17,11 @@ \newcommand{\doctitlefr}{Norme pour L'écosystème \Cpp{}} %% Common bits +\ifdefined\license \newcommand{\isocopyright}{\copyright\ ISO/IEC \relyear\ --- CC BY 4.0} +\else +\newcommand{\isocopyright}{\copyright\ ISO/IEC \relyear\ --- All rights reserved} +\fi %% States \newcommand{\isodoctype}{Draft International Standard}