update `Makefile`
parent
08cfba2c7d
commit
4040d8aa26
12
Makefile
12
Makefile
|
@ -11,16 +11,16 @@ orphans = $(filter-out \
|
||||||
$(call getpages,$(notes)),\
|
$(call getpages,$(notes)),\
|
||||||
$(wildcard public_html/*.html) $(wildcard public_html/.*.html))
|
$(wildcard public_html/*.html) $(wildcard public_html/.*.html))
|
||||||
|
|
||||||
.PHONY: all
|
|
||||||
all: $(call getpages,$(notes))
|
all: $(call getpages,$(notes))
|
||||||
$(if $(orphans),$(RM) $(orphans))
|
$(if $(orphans),$(RM) $(orphans))
|
||||||
|
.PHONY: all
|
||||||
|
|
||||||
.PHONY: hidden
|
|
||||||
hidden: notes := $(wildcard $(shell ls -t .*.md *.md))
|
hidden: notes := $(wildcard $(shell ls -t .*.md *.md))
|
||||||
hidden: all
|
hidden: all
|
||||||
|
.PHONY: hidden
|
||||||
|
|
||||||
public_html/%.html: %.md sitemap.json links.json pandoc/templates/bavbavhaus.net.html5
|
public_html/%.html: %.md sitemap.json links.json pandoc/templates/bavbavhaus.net.html5
|
||||||
$(eval deps := $(shell jq -r '.["$<"] | unique | join(" ")' links.json))
|
$(eval deps := $(shell jq -r '.["$<"] | join(" ")' links.json))
|
||||||
$(if $(deps), $(MAKE) $(call getparts,$(deps)))
|
$(if $(deps), $(MAKE) $(call getparts,$(deps)))
|
||||||
pandoc \
|
pandoc \
|
||||||
--data-dir pandoc \
|
--data-dir pandoc \
|
||||||
|
@ -33,8 +33,6 @@ public_html/%.html: %.md sitemap.json links.json pandoc/templates/bavbavhaus.net
|
||||||
--output $@ \
|
--output $@ \
|
||||||
$<
|
$<
|
||||||
|
|
||||||
# preserve `partials/%.html` intermediate files
|
|
||||||
.PRECIOUS: partials/%.html
|
|
||||||
partials/%.html: %.md pandoc/templates/bavbavhaus.net.inline.html5 | partials
|
partials/%.html: %.md pandoc/templates/bavbavhaus.net.inline.html5 | partials
|
||||||
pandoc \
|
pandoc \
|
||||||
--data-dir pandoc \
|
--data-dir pandoc \
|
||||||
|
@ -45,6 +43,8 @@ partials/%.html: %.md pandoc/templates/bavbavhaus.net.inline.html5 | partials
|
||||||
--lua-filter update_internal_targets.lua \
|
--lua-filter update_internal_targets.lua \
|
||||||
--output $@ \
|
--output $@ \
|
||||||
$<
|
$<
|
||||||
|
# preserve `partials/%.html` intermediate files
|
||||||
|
.PRECIOUS: partials/%.html
|
||||||
|
|
||||||
# create `partials` directory if it doesn't exist
|
# create `partials` directory if it doesn't exist
|
||||||
partials:
|
partials:
|
||||||
|
@ -61,11 +61,11 @@ links.json: FORCE
|
||||||
FORCE: ;
|
FORCE: ;
|
||||||
|
|
||||||
# clean all targets
|
# clean all targets
|
||||||
.PHONY: clean
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) $(patsubst %.md,public_html/%.html,$(notes))
|
$(RM) $(patsubst %.md,public_html/%.html,$(notes))
|
||||||
$(RM) sitemap.json links.json
|
$(RM) sitemap.json links.json
|
||||||
$(RM) -r partials
|
$(RM) -r partials
|
||||||
|
.PHONY: clean
|
||||||
|
|
||||||
# # dest
|
# # dest
|
||||||
# .PHONY: dest
|
# .PHONY: dest
|
||||||
|
|
Loading…
Reference in New Issue