@@ -88,12 +88,16 @@ doc-clean:
8888 html/doc \
8989 man
9090
91+ # # build-time tools for the documentation
92+ build-doc-tools := node_modules/.bin/marked \
93+ node_modules/.bin/marked-man
94+
9195# use `npm install marked-man` for this to work.
92- man/man1/npm-README.1 : README.md scripts/doc-build.sh package.json
96+ man/man1/npm-README.1 : README.md scripts/doc-build.sh package.json $( build-doc-tools )
9397 @[ -d man/man1 ] || mkdir -p man/man1
9498 scripts/doc-build.sh $< $@
9599
96- man/man1/% .1 : doc/cli/% .md scripts/doc-build.sh package.json
100+ man/man1/% .1 : doc/cli/% .md scripts/doc-build.sh package.json $( build-doc-tools )
97101 @[ -d man/man1 ] || mkdir -p man/man1
98102 scripts/doc-build.sh $< $@
99103
@@ -106,26 +110,26 @@ man/man5/npm-json.5: man/man5/package.json.5
106110man/man5/npm-global.5 : man/man5/npm-folders.5
107111 cp $< $@
108112
109- man/man5/% .5 : doc/files/% .md scripts/doc-build.sh package.json
113+ man/man5/% .5 : doc/files/% .md scripts/doc-build.sh package.json $( build-doc-tools )
110114 @[ -d man/man5 ] || mkdir -p man/man5
111115 scripts/doc-build.sh $< $@
112116
113- doc/misc/npm-index.md : scripts/index-build.js package.json
117+ doc/misc/npm-index.md : scripts/index-build.js package.json $( build-doc-tools )
114118 node scripts/index-build.js > $@
115119
116- html/doc/index.html : doc/misc/npm-index.md $(html_docdeps )
120+ html/doc/index.html : doc/misc/npm-index.md $(html_docdeps ) $( build-doc-tools )
117121 @[ -d html/doc ] || mkdir -p html/doc
118122 scripts/doc-build.sh $< $@
119123
120- man/man7/% .7 : doc/misc/% .md scripts/doc-build.sh package.json
124+ man/man7/% .7 : doc/misc/% .md scripts/doc-build.sh package.json $( build-doc-tools )
121125 @[ -d man/man7 ] || mkdir -p man/man7
122126 scripts/doc-build.sh $< $@
123127
124- html/doc/README.html : README.md $(html_docdeps )
128+ html/doc/README.html : README.md $(html_docdeps ) $( build-doc-tools )
125129 @[ -d html/doc ] || mkdir -p html/doc
126130 scripts/doc-build.sh $< $@
127131
128- html/doc/cli/% .html : doc/cli/% .md $(html_docdeps )
132+ html/doc/cli/% .html : doc/cli/% .md $(html_docdeps ) $( build-doc-tools )
129133 @[ -d html/doc/cli ] || mkdir -p html/doc/cli
130134 scripts/doc-build.sh $< $@
131135
@@ -135,11 +139,11 @@ html/doc/files/npm-json.html: html/doc/files/package.json.html
135139html/doc/files/npm-global.html : html/doc/files/npm-folders.html
136140 cp $< $@
137141
138- html/doc/files/% .html : doc/files/% .md $(html_docdeps )
142+ html/doc/files/% .html : doc/files/% .md $(html_docdeps ) $( build-doc-tools )
139143 @[ -d html/doc/files ] || mkdir -p html/doc/files
140144 scripts/doc-build.sh $< $@
141145
142- html/doc/misc/% .html : doc/misc/% .md $(html_docdeps )
146+ html/doc/misc/% .html : doc/misc/% .md $(html_docdeps ) $( build-doc-tools )
143147 @[ -d html/doc/misc ] || mkdir -p html/doc/misc
144148 scripts/doc-build.sh $< $@
145149
0 commit comments