aboutsummaryrefslogtreecommitdiffstats
path: root/english/Makefile
blob: c338cb5a3116929e89bd53f1682bb450942a53d7 (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# If this makefile is not generic enough to support a translation,
# please contact debian-www.

WMLBASE=.
CUR_DIR=
SUBS=Bugs CD MailingLists News Pics blends community consultants devel \
distrib doc events intro international legal logos lts mirror partners \
ports releases reports security software users vote women derivatives webfonts

all install:: install-locale

clean:: clean-locale

include $(WMLBASE)/Make.lang

ifndef SUBLANG
INDEXPAGE = index.$(LANGUAGE).html
SITEMAP = sitemap.$(LANGUAGE).html
DESTSITEMAP = $(HTMLDIR)/$(SITEMAP)
SEARCHXML = search.$(LANGUAGE).xml
DESTSEARCHXML =  $(HTMLDIR)/$(SEARCHXML)
else
INDEXPAGE = $(sort $(foreach i,$(SUBLANG),$(subst index,index.$(LANGUAGE)-$(i),index.html)))
SITEMAP = $(sort $(foreach i,$(SUBLANG),\
	$(patsubst %.wml,%.$(LANGUAGE)-$(i).html,sitemap.wml)))
DESTSITEMAP = $(patsubst %.html,$(HTMLDIR)/%.html,$(SITEMAP))
SEARCHXML = $(sort $(foreach i,$(SUBLANG),$(subst search,search.$(LANGUAGE)-$(i),search.xml)))
DESTSEARCHXML = $(patsubst %.xml,$(HTMLDIR)/%.xml,$(SEARCHXML))
endif

$(INDEXPAGE): index.wml $(ENGLISHSRCDIR)/index.def $(ENGLISHSRCDIR)/index.inc $(TEMPLDIR)/mainpage.wml $(GETTEXTDEP) \
		$(ENGLISHSRCDIR)/homepagenews.data \
		$(wildcard News/$(CUR_YEAR)/[0-9]*.wml) $(wildcard $(ENGLISHSRCDIR)/News/$(CUR_YEAR)/[0-9]*.wml) \
		$(wildcard News/$(CUR_YEAR)/[0-9]*.title) \
		$(TEMPLDIR)/ctime.wml $(TEMPLDIR)/recent_list.wml $(TEMPLDIR)/languages.wml \
		$(TEMPLDIR)/release_info.wml $(TEMPLDIR)/release_images.wml $(TEMPLDIR)/links.tags.wml
ifeq "$(LANGUAGE)" "zh"
	@echo -n "Processing $(<F): "
	$(shell echo $(WML) | perl -pe 's,:.zh-(..)\.html,:index.zh-$$1.html,g') \
          $(shell egrep '^-D (CUR_|CHAR)' ../.wmlrc) index.wml
	@$(GENERATE_ZH_VARIANTS) index html
else
	$(WML) index.wml
endif

$(SITEMAP): $(ENGLISHDIR)/sitemap.wml \
  $(TEMPLDIR)/links.tags.wml $(TEMPLDIR)/template.wml $(GETTEXTDEP) \
  $(TEMPLDIR)/release_info.wml $(ENGLISHDIR)/MailingLists/mklist.tags
ifeq "$(LANGUAGE)" "zh"
	@echo -n "Processing $(<F): "
	$(subst :.zh,:sitemap.zh,$(WML)) \
          $(shell egrep '^-D (CUR_|CHAR)' .wmlrc) \
            sitemap.wml
	@$(GENERATE_ZH_VARIANTS) sitemap html
else
	$(WML) $(shell egrep '^-D (CUR_|CHAR)' .wmlrc) \
          sitemap.wml
endif

ifneq "$(LANGUAGE)" "en"
contact.$(LANGUAGE).html : contact.wml $(WMLBASE)/../.wmlrc $(WMLBASE)/.wmlrc \
  $(TEMPLDIR)/template.wml $(TEMPLDIR)/languages.wml \
  $(ENGLISHDIR)/devel/website/tc.data $(LOCALEDIR)/others.mo
endif

all:: $(SITEMAP) $(SEARCHXML)

install:: $(DESTSITEMAP) $(DESTSEARCHXML)
ifeq "$(LANGUAGE)" "en"

install:: $(HTMLDIR)/favicon.ico

$(HTMLDIR)/favicon.ico: favicon.ico
	install -p -m 664 favicon.ico $(HTMLDIR)
endif

$(SEARCHXML): $(ENGLISHDIR)/search.xml.in $(GETTEXTDEP)
ifeq "$(LANGUAGE)" "zh"
	@echo -n "Processing $(<F): "
	$(shell echo $(WML) | perl -pe 's,:.zh-(..)\.html,:search.zh-$$1.xml,g') \
	$(shell egrep '^-D (CUR_|CHAR)' .wmlrc) \
	  $(shell echo $(ENGLISHDIR) | sed s,./,,)/search.xml.in
	@$(GENERATE_ZH_VARIANTS) search xml
else
	$(WML) $(shell egrep '^-D (CUR_|CHAR)' .wmlrc) \
	  $(shell echo $(ENGLISHDIR) | sed s,./,,)/search.xml.in
endif

$(DESTSEARCHXML): $(HTMLDIR)/%: %
	@test -d $(HTMLDIR) || mkdir -m g+w -p $(HTMLDIR)
	install -m 664 -p $< $(HTMLDIR)

install-locale:
	$(MAKE) -C po install

clean-locale:
	$(MAKE) -C po clean

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