Move css.inc in main directory, fix wong .PHONY

This commit is contained in:
2022-05-14 18:33:46 +02:00
parent 9af05d6ffa
commit 9a73e4b0c0
2 changed files with 8 additions and 7 deletions

View File

@@ -1,2 +1,2 @@
/*.html
/assets/css.inc
/css.inc

View File

@@ -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 $@ $<