Skip to content

Commit 5487f14

Browse files
committed
Tidy up doc make rules.
1 parent 59336b8 commit 5487f14

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

mk/docs.mk

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,12 @@ else
1616
$(info cfg: no node found, omitting doc/tutorial.html)
1717
else
1818

19+
doc/rust.css: rust.css
20+
@$(call E, cp: $@)
21+
$(Q)cp -a $< $@ 2> /dev/null
22+
1923
DOCS += doc/rust.html
20-
doc/rust.html: rust.md doc/version.md doc/keywords.md $(S)doc/rust.css
24+
doc/rust.html: rust.md doc/version.md doc/keywords.md doc/rust.css
2125
@$(call E, pandoc: $@)
2226
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
2327
"$(CFG_PANDOC)" \
@@ -27,9 +31,6 @@ doc/rust.html: rust.md doc/version.md doc/keywords.md $(S)doc/rust.css
2731
--from=markdown --to=html \
2832
--css=rust.css \
2933
--output=$@
30-
@$(call E, cp: $(S)doc/rust.css)
31-
-$(Q)cp -a $(S)doc/rust.css doc/rust.css 2> /dev/null
32-
3334
endif
3435

3536
ifeq ($(CFG_PDFLATEX),)
@@ -71,9 +72,7 @@ doc/rust.pdf: doc/rust.tex
7172
else
7273

7374
DOCS += doc/tutorial.html
74-
doc/tutorial.html: $(S)doc/tutorial.md $(S)doc/rust.css
75-
@$(call E, cp: $(S)doc/rust.css)
76-
-$(Q)cp -a $(S)doc/rust.css doc/ 2> /dev/null
75+
doc/tutorial.html: tutorial.md doc/rust.css
7776
@$(call E, pandoc: $@)
7877
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
7978
$(CFG_PANDOC) --standalone --toc \
@@ -124,7 +123,7 @@ doc/$(1)/index.html: $(2) $(3) $$(RUSTDOC) doc/$(1)/rust.css
124123
@$$(call E, rustdoc: $$@)
125124
$(Q)$(RUSTDOC) $(2) --output-dir=doc/$(1)
126125

127-
doc/$(1)/rust.css: $(S)doc/rust.css
126+
doc/$(1)/rust.css: rust.css
128127
@$$(call E, cp: $$@)
129128
$(Q)cp $$< $$@
130129

@@ -146,7 +145,7 @@ doc/version.md: $(MKFILE_DEPS) rust.md
146145
@$(call E, version-stamp: $@)
147146
$(Q)echo "$(CFG_VERSION)" >$@
148147

149-
doc/keywords.md: $(MKFILE_DEPS) rust.md
148+
doc/keywords.md: $(S)doc/keywords.txt $(MKFILE_DEPS) rust.md
150149
@$(call E, grep -v: $$@)
151150
$(Q)grep -v '^#' $< >$@
152151

0 commit comments

Comments
 (0)