Skip to content

Commit

Permalink
Add script for building EEP index, adapt index
Browse files Browse the repository at this point in the history
  • Loading branch information
RaimoNiskanen committed Apr 8, 2010
1 parent 6a5224b commit c09f57a
Show file tree
Hide file tree
Showing 4 changed files with 519 additions and 110 deletions.
20 changes: 14 additions & 6 deletions Makefile
Expand Up @@ -6,9 +6,14 @@
## Author: Erlang/OTP, Raimo Niskanen
#

PERL = perl -w
PERL = perl -w -CSD
EEPS_DIR = eeps
MD = ./md/Markdown.pl
MD = md/Markdown.pl
MK = Makefile
IX = eep-index.pl
PRE = eep-pre.pl



all: README.html
@$(MAKE) `$(PERL) -e '\
Expand All @@ -18,9 +23,12 @@ all: README.html
print "$$d/$$_\n" if s/[.]md$$/.html/; \
}' $(EEPS_DIR)`

README.html: README.md Makefile $(MD)
$(PERL) ./md/Markdown.pl $< > $@
README.html: README.md $(MK) $(MD)
$(PERL) $(MD) $< > $@

eeps/eep-%.html: eeps/eep-%.md Makefile $(MD)
$(PERL) -lpe 's{^(\[EEP\s+\d+\]:\s+\<eep-\d+)[.]md\>}{$$1.html>}' $< |\
eeps/eep-0000.html: eeps/eep-*.md $(MK) $(IX) $(PRE)
$(PERL) $(IX) eeps/eep-0000.md | $(PERL) $(PRE) |\
$(PERL) $(MD) > $@

eeps/eep-%.html: eeps/eep-%.md $(MK) $(MD) $(PRE)
$(PERL) $(PRE) $< | $(PERL) $(MD) > $@

0 comments on commit c09f57a

Please sign in to comment.