Skip to content

Commit

Permalink
use patsubst
Browse files Browse the repository at this point in the history
  • Loading branch information
ggreif committed Jan 18, 2020
1 parent 14304e7 commit 7d1c926
Showing 1 changed file with 4 additions and 30 deletions.
34 changes: 4 additions & 30 deletions stdlib/doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,39 +37,13 @@ $(OUTDIR)/%.html: $(OUTDIR)/%.md
$(PANDOC) -f gfm $^ > $@


DOCS = README prelude array buf option result hash list assocList trie trieSet docTable

# Markdown documentation, extracted from the source directory
docMd: \
$(OUTDIR)/README.md \
$(OUTDIR)/prelude.md \
$(OUTDIR)/array.md \
$(OUTDIR)/buf.md \
$(OUTDIR)/option.md \
$(OUTDIR)/result.md \
$(OUTDIR)/hash.md \
$(OUTDIR)/list.md \
$(OUTDIR)/assocList.md \
$(OUTDIR)/trie.md \
$(OUTDIR)/trieSet.md \
$(OUTDIR)/docTable.md \
| \
$(OUTDIR)/ \
docMd: $(patsubst %,$(OUTDIR)/%.md,$(DOCS)) | $(OUTDIR)

# HTML documentation, extracted from the source directory
docHtml: \
$(OUTDIR)/README.html \
$(OUTDIR)/prelude.html \
$(OUTDIR)/array.html \
$(OUTDIR)/buf.html \
$(OUTDIR)/option.html \
$(OUTDIR)/result.html \
$(OUTDIR)/hash.html \
$(OUTDIR)/list.html \
$(OUTDIR)/assocList.html \
$(OUTDIR)/trie.html \
$(OUTDIR)/docTable.html \
$(OUTDIR)/trieSet.html \
| \
$(OUTDIR)/ \
docHtml: $(patsubst %,$(OUTDIR)/%.html,$(DOCS)) | $(OUTDIR)

$(OUTDIR)/README.md: README.md | $(OUTDIR)
@echo "<!-- **[ DO NOT EDIT -- GENERATED by a Makefile, on `date` ]** -->" > $@
Expand Down

0 comments on commit 7d1c926

Please sign in to comment.