Move css.inc in main directory, fix wong .PHONY
This commit is contained in:
2
patrick-markdown/.gitignore
vendored
2
patrick-markdown/.gitignore
vendored
@@ -1,2 +1,2 @@
|
||||
/*.html
|
||||
/assets/css.inc
|
||||
/css.inc
|
||||
|
@@ -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 $@ $<
|
||||
|
Reference in New Issue
Block a user