You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

48 lines
958 B

outdir ?= ./public
tmpdir ?= ./tmp
veraMonoSrc ?= ./VeraMono.ttf
all = $(addprefix ${outdir}/, $(addsuffix .html, $(basename $(wildcard *.md))))
files = $(addprefix ${outdir}/, $(wildcard files/*))
all: ${all} ${files} ${outdir}/VeraMono.subset.woff2
show:
@echo ${all}
@echo ${static}
${outdir}:
mkdir -p ${outdir}
${tmpdir}:
mkdir -p ${tmpdir}
${outdir}/files:
mkdir -p ${outdir}/files
${outdir}/%.html: %.md template.html ${outdir}
pandoc --standalone --template template.html $< -o $@
${outdir}/files/%: files/% ${outdir}/files
cp $< $@
${tmpdir}/VeraMono.ttf: ${veraMonoSrc} ${tmpdir}
cp $< $@
${tmpdir}/%.subset.ttf: ${tmpdir}/%.ttf
fontforge -script make-font.pe $< $@
${tmpdir}/%.woff2: ${tmpdir}/%.ttf
woff2_compress $<
${outdir}/%: ${tmpdir}/% ${outdir}
cp $< $@
clean:
rm -r ${outdir} ${tmpdir}
start: ${all}
{ php -S 127.0.0.1:8123 -t ${outdir} & \
echo $$! > ${tmpdir}/php.pid; }
stop:
kill `cat ${tmpdir}/php.pid`