This commit is contained in:
parent
634613a2d4
commit
4f8b9c95aa
9
Makefile
9
Makefile
@ -1,5 +1,8 @@
|
|||||||
.PHONY: default clean
|
.PHONY: default clean
|
||||||
|
|
||||||
|
COPY_PDF=$(shell find . -name '*.pdf' -not -path './build/*')
|
||||||
|
COPY_TARGETS=$(COPY_PDF:%.pdf=build/%.pdf)
|
||||||
|
|
||||||
MD_SOURCES=$(shell find . -name '*.md' -not -path "./templates/*")
|
MD_SOURCES=$(shell find . -name '*.md' -not -path "./templates/*")
|
||||||
HTML_TARGETS=$(MD_SOURCES:%.md=build/%.html)
|
HTML_TARGETS=$(MD_SOURCES:%.md=build/%.html)
|
||||||
PDF_TARGETS=$(MD_SOURCES:%.md=build/%.pdf)
|
PDF_TARGETS=$(MD_SOURCES:%.md=build/%.pdf)
|
||||||
@ -14,7 +17,7 @@ COMPRESS_TARGETS=$(HTML_TARGETS:%=%.gz)
|
|||||||
COMPRESS_TARGETS+=$(PDF_TARGETS:%=%.gz)
|
COMPRESS_TARGETS+=$(PDF_TARGETS:%=%.gz)
|
||||||
COMPRESS_TARGETS+=$(TEX_TARGETS:%=%.gz)
|
COMPRESS_TARGETS+=$(TEX_TARGETS:%=%.gz)
|
||||||
|
|
||||||
default: $(DOT_TARGETS) $(HTML_TARGETS) $(PDF_TARGETS) $(TEX_TARGETS)
|
default: $(DOT_TARGETS) $(HTML_TARGETS) $(PDF_TARGETS) $(TEX_TARGETS) $(COPY_TARGETS)
|
||||||
|
|
||||||
compress: default $(COMPRESS_TARGETS)
|
compress: default $(COMPRESS_TARGETS)
|
||||||
|
|
||||||
@ -37,5 +40,9 @@ build/%.pdf: %.tex
|
|||||||
%.gz: %
|
%.gz: %
|
||||||
gzip -k -f -9 $<
|
gzip -k -f -9 $<
|
||||||
|
|
||||||
|
build/%.pdf: %.pdf
|
||||||
|
@mkdir -p $$(dirname $@)
|
||||||
|
cp $< $@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -r build
|
rm -r build
|
||||||
|
Loading…
Reference in New Issue
Block a user