...
 
Commits (2)
# find all .md files in the directory
mdsrc=$(shell ls *.md)
# map *.mp => *.html for mdsrc
html_from_md=$(mdsrc:%.md=%.html)
all: $(html_from_md)
today:
touch `date +"%Y-%m-%d.md"`
# Implicit rule to know how to make .html from .md
%.html: %.md
include.py $< | \
pandoc --from markdown \
--to html \
--standalone \
--css styles.css \
-o $@
# special rule for debugging variables
print-%:
@echo '$*=$($*)'
......@@ -207,9 +207,10 @@ class MakeDirectoryListing (object):
})
tvars['items'] = items
tvars['targets'] = targets(self.makefile)
if self.makefile:
tvars['targets'] = targets(self.makefile)
else:
tvars['targets'] = []
return self.template.render(tvars).encode("utf-8")
......