Welcome to mirror list, hosted at ThFree Co, Russian Federation.

GNUmakefile « web - github.com/windirstat/windirstat.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5016a602c03741d75cb04becdf5eeea95beaeca8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
TEMPLATES:=$(wildcard templates/*.tmpl)
TMPLINCLS:=$(wildcard templates/include/*.tt)
HTMLPAGES:=$(patsubst templates/%.tmpl,%,$(TEMPLATES))
TPAGEFLAG:=--pre_chomp --post_chomp --trim --include_path=templates/include
AUTOMENU:=templates/include/automenu.inc
STYLESHEET:=templates/include/styles.css

all: $(HTMLPAGES)

$(AUTOMENU): $(filter-out %.j2.tmpl,$(TEMPLATES))
	(echo "[%\npages = ["; for i in $^; do FNAME="$${i##*/}"; echo " {\n   fname = '$${FNAME%.tmpl}'"; grep -E '^\s+(description|norder|uuid|title) = ' $$i; echo " }\n"; done; echo "\n]\n%]";) > $@

%: templates/%.tmpl $(AUTOMENU) $(TMPLINCLS) $(STYLESHEET)
	-@echo "$< --> $@"
	tpage $(TPAGEFLAG) $< > $@

clean:
	rm -f $(HTMLPAGES) $(AUTOMENU)
rebuild: clean all

.PHONY: all clean rebuild $(AUTOMENU)
.NOTPARALLEL: clean rebuild