63d21e7742dc1f41587536cb63881fae07a768ff markd Wed May 14 09:32:32 2025 -0700 use pattern rules for running pandoc diff --git docs/makefile docs/makefile index 9a44302a2ae..50f4d09e76d 100644 --- docs/makefile +++ docs/makefile @@ -1,30 +1,26 @@ kentSrc = .. include ../src/inc/common.mk -GIT = git -GITUP = ${GIT} pull - user: ${MAKE} doInstall destDir=${DOCUMENTROOT}-${USER} alpha: ${MAKE} doInstall destDir=${DOCUMENTROOT} beta: ${MAKE} doInstall destDir=${DOCUMENTROOT}-beta -doInstall: - mkdir -p ${destDir}/docs/ - pandoc --ascii -f markdown-smart -t html5 -o ${destDir}/docs/index.html index.md --template staticPage.html -t staticPage.lua --lua-filter GBpandocHTMLrules.lua - pandoc --ascii -f markdown-smart -t html5 -o ${destDir}/docs/gb101.html gb101.md --template staticPage.html -t staticPage.lua --lua-filter GBpandocHTMLrules.lua - pandoc --ascii -f markdown-smart -t html5 -o ${destDir}/docs/page_template.html page_template.md --template staticPage.html -t staticPage.lua --lua-filter GBpandocHTMLrules.lua - pandoc --ascii -f markdown-smart -t html5 -o ${destDir}/docs/gatewayTutorial.html gatewayTutorial.md --template staticPage.html -t staticPage.lua --lua-filter GBpandocHTMLrules.lua - chmod a+x ${destDir}/docs/index.html - chmod a+x ${destDir}/docs/gb101.html - chmod a+x ${destDir}/docs/page_template.html - chmod a+x ${destDir}/docs/gatewayTutorial.html +DOCS = index gb101 gatewayTutorial page_template + + +doInstall: ${DOCS:%=%_install} + +%_install: + ${MKDIR} ${destDir}/docs/ + pandoc --ascii -f markdown-smart -t html5 -o ${destDir}/docs/$*.html $*.md --template staticPage.html -t staticPage.lua --lua-filter GBpandocHTMLrules.lua + chmod a+x ${destDir}/docs/$*.html testPandoc: @printf "Test the following path and commands look ok\n" @printf "pandoc path: %s\n" "`which pandoc`" @printf "pandoc --ascii -f markdown-smart -t html5 index.md --template staticPage.html -t staticPage.lua\n" "${DOCUMENTROOT}/"