diff options
author | Cristián Maureira-Fredes <cristian.maureira-fredes@qt.io> | 2022-11-30 10:44:15 +0100 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2023-02-13 11:57:41 +0000 |
commit | 0818c469d0364c9557463086b958abb224de704a (patch) | |
tree | ea75e290717437be407c7c408c5b409e9bed6734 /Makefile | |
parent | 478fcbedd224fe0ff0bc41b24a62cda521acbd07 (diff) |
Add simple template option
This includes a new minimal HTML template to be used to render
the QUIPs, motivated by the inclusion of the generated HTML
files into the qt-project.org website.
A new make variable is used QUIP_TEMPLATE,
so one can select a different HTML base file, skipping the current
default approach of patching the PlanetQt theme.
Change-Id: Iefbc7024d2fccc66241d541c53e46a9b4fdf9cff
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
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: |