From 9a73e4b0c0e5e3862c8c431b25d153be5bbdb926 Mon Sep 17 00:00:00 2001 From: Bruno Raoult Date: Sat, 14 May 2022 18:33:46 +0200 Subject: [PATCH] Move css.inc in main directory, fix wong .PHONY --- patrick-markdown/.gitignore | 2 +- patrick-markdown/Makefile | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/patrick-markdown/.gitignore b/patrick-markdown/.gitignore index 5b9f662..64926ec 100644 --- a/patrick-markdown/.gitignore +++ b/patrick-markdown/.gitignore @@ -1,2 +1,2 @@ /*.html -/assets/css.inc \ No newline at end of file +/css.inc diff --git a/patrick-markdown/Makefile b/patrick-markdown/Makefile index 7d46cc4..36d826b 100644 --- a/patrick-markdown/Makefile +++ b/patrick-markdown/Makefile @@ -5,7 +5,7 @@ CSS := assets/ghost.css ALTCSS := assets/ghost-dark.css assets/ghost-caca.css TARGETS := $(patsubst %.md,%.html,$(wildcard *.md)) -CSSINC := assets/css.inc +CSSINC := css.inc # our main html5 template, mostly taken from : # https://github.com/jgm/pandoc-templates/blob/master/default.html5 @@ -22,7 +22,7 @@ TITLE = $(shell sed -n '0,/^#/ s/^[# ]*//p' $1) OPTS = --standalone --include-in-header=$(CSSINC) --template=$(TEMPLATE) \ --from=gfm --to=html5 -.PHONY: all html clean $(CSSINC) +.PHONY: all html clean all: $(CSSINC) html @@ -34,10 +34,11 @@ clean: $(CSSINC): $(CSS) $(ALTCSS) @echo generating $@ - rm -f $@ - $(foreach css,$(CSS),$(call ADD_LINE,$(css),stylesheet,$@)) - $(foreach css,$(ALTCSS),$(call ADD_LINE,$(css),alternate stylesheet,$@)) + @#echo deps=$^ + @rm -f $@ + @$(foreach css,$(CSS),$(call ADD_LINE,$(css),stylesheet,$@)) + @$(foreach css,$(ALTCSS),$(call ADD_LINE,$(css),alternate stylesheet,$@)) %.html: %.md $(CSSINC) @echo generating $@ - pandoc $(OPTS) --metadata=title:"$(call TITLE,$<)" -o $@ $< + @pandoc $(OPTS) --metadata=title:"$(call TITLE,$<)" -o $@ $<