diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -13,36 +13,45 @@ endif RST := $(wildcard quip-[0-9][0-9][0-9][0-9]*.rst) RSTHTML := $(RST:%.rst=$(HTMLDIR)/%.html) HTML := $(HTMLDIR)/quip-0000.html $(RSTHTML) +ifeq ($(QUIP_TEMPLATE),) WEBLINK := favicon.ico \ cookiebar-x.png cookie_small.png list_arrow.png theqtcompany.png \ extras.js main.js modernizr.custom.84855.js \ online.css style.css \ images LINK := $(HTMLDIR)/.web $(HTMLDIR)/index.html $(WEBLINK:%=$(HTMLDIR)/%) +endif html: $(HTML) $(LINK) $(HTML) $(LINK): $(HTMLDIR)/.ready -$(WEBLINK:%=$(HTMLDIR)/%) $(WEBLINK:%=$(HTMLDIR)/.web/%): $(HTMLDIR)/.web %/.ready: $Q mkdir -p $(@D) && touch $@ $(HTMLDIR)/index.html: $(HTMLDIR)/quip-0000.html $Q [ -h $@ ] || (cd $(@D) && ln -s $(<F) $(@F)) +ifeq ($(QUIP_TEMPLATE),) +$(WEBLINK:%=$(HTMLDIR)/%) $(WEBLINK:%=$(HTMLDIR)/.web/%): $(HTMLDIR)/.web $(WEBLINK:%=$(HTMLDIR)/%): $(HTMLDIR)/%: $(HTMLDIR)/.web/% $Q [ -h $@ ] || (cd $(@D) && ln -s .web/$(@F) $(@F)) $(HTMLDIR)/.web: planetqt/website $Q [ -h $@ ] || (cd $(@D) && ln -s $(abspath $<) $(@F)) +endif $(HTMLDIR)/quip-0000.html: scripts/gen-quip-0000.py scripts/quip2html.py $(RST) template.html scripts/gen-quip-0000.py $(RST) | scripts/quip2html.py - >$@ $(RSTHTML): $(HTMLDIR)/%.html: %.rst scripts/quip2html.py template.html scripts/quip2html.py $< >$@ +ifeq ($(QUIP_TEMPLATE),) .INTERMEDIATE: scripts/template.html template.html: scripts/template.diff planetqt/template.qt $Q patch -l -p0 -i $< -o scripts/$@ && mv scripts/$@ $@ # We only stomp template.html if patch succeeds. +else +template.html: $(QUIP_TEMPLATE) + $Q rm -f $@; ln -s $< $@ +endif .PHONY: clean clean: |