aboutsummaryrefslogtreecommitdiffstats
path: root/english/devel/website/stats/Makefile
blob: adbb1bcf0ad8b071d0447f065b3e2352e12b5917 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# If this makefile is not generic enough to support a translation,
# please contact debian-www.

WMLBASE=../../..
CUR_DIR=devel/website/stats
SUBS=

NOGENERICDEP := true

include $(WMLBASE)/Make.lang

SOURCESTATS = $(shell ls $(ENGLISHDIR)/$(CUR_DIR)/*.wml)

STATSOK = $(patsubst $(ENGLISHDIR)/$(CUR_DIR)/%.wml,%.$(LANGUAGE).html, \
	$(SOURCESTATS))

ifndef SUBLANG
STATS = $(STATSOK)
else
STATS = $(sort $(foreach i,$(SUBLANG),\
	$(patsubst $(ENGLISHDIR)/$(CUR_DIR)/%.wml,%.$(LANGUAGE)-$(i).html, \
	$(SOURCESTATS))))
$(STATS): $(STATSOK)
endif

DESTSTATS = $(patsubst %.html,$(HTMLDIR)/%.html,$(STATS))

# The "| $(VCSREVCACHE)" here is an order-only prerequisite - always
# check that the prerequisite exists and is up to date, but don't
# rebuild everything whenever it's updated - see
# https://www.gnu.org/software/make/manual/html_node/Prerequisite-Types.html
%.$(LANGUAGE).html: $(ENGLISHDIR)/$(CUR_DIR)/%.wml $(LOCALEDIR)/stats.mo | $(VCSREVCACHE)
	$(WML) $(shell egrep '^-D (CUR_|CHAR)' $(WMLBASE)/.wmlrc) \
	$(shell echo $<)
ifeq "$(LANGUAGE)" "zh"
	@$(GENERATE_ZH_VARIANTS) $* html
endif

all:: $(STATS)

install:: $(DESTSTATS)

ifeq "$(LANGUAGE)" "en"
install:: $(HTMLDIR)/diffstat.js
$(HTMLDIR)/diffstat.js: diffstat.js
	@test -d $(HTMLDIR) || mkdir -m g+w -p $(HTMLDIR)
	@echo copying $(@F) to $(HTMLDIR)
	$(IGNORE)install -m 664 -p $(@F) $(HTMLDIR)
endif

© 2014-2024 Faster IT GmbH | imprint | privacy policy