Files
china-dictatorship/Makefile

34 lines
868 B
Makefile
Raw Normal View History

.PHONY: clean
OUT = README.html
HEAD = head.html
BODY = README.body.html
FOOT = foot.html
2020-09-14 02:00:01 +00:00
MEDIA =
ifeq ($(MEDIA),)
MEDIA_CMD =
else
MEDIA_CMD = -a china-dictatorship-media-base='$(MEDIA)'
endif
2020-09-15 01:00:00 +00:00
$(OUT): README.adoc $(HEAD) $(FOOT) template_dir/*
2020-09-16 08:00:07 +00:00
@# --embedded + head/foot originally added to fix image height:
@# https://stackoverflow.com/questions/63464732/how-to-set-a-custom-image-height-for-an-image-in-asciidoctor
@#
@# --template-dir initially added for loading="lazy" on images and youtube iframes:
@# https://stackoverflow.com/questions/63917971/how-to-create-custom-html-output-for-an-existing-asciidoctor-asciidoc-macro
2020-09-07 10:00:09 +00:00
bundle exec asciidoctor \
2020-09-14 02:00:01 +00:00
$(MEDIA_CMD) \
2020-09-07 10:00:09 +00:00
--embedded \
--failure-level info \
-o $(BODY) \
2020-09-15 01:00:00 +00:00
--template-dir template_dir \
--trace \
2020-09-07 10:00:09 +00:00
-v \
'$<'
cat $(HEAD) $(BODY) $(FOOT) > '$@'
clean:
rm -rf $(OUT) $(BODY)