/[webwml]/webwml/Makefile.common
ViewVC logotype

Contents of /webwml/Makefile.common

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.37 - (hide annotations) (download)
Sun Jun 10 15:13:59 2001 UTC (11 years, 11 months ago) by finnish
Branch: MAIN
Changes since 1.36: +2 -1 lines
Now it is possible to translate "Debian Weekly News".  NOTE TO TRANSLATORS: tag is in links.tags.wml
1 joy 1.1 # Nothing in here should require any modification. If you feel you need to
2     # modify something first send mail to debian-www explaining why.
3    
4 joy 1.4 CUR_YEAR := $(shell date +%Y)
5    
6 joy 1.1 RELHTMLBASE := ../../debian.org
7 joy 1.12 ENGLISHSRCDIR := $(WMLBASE)/../english
8     TEMPLDIR := $(ENGLISHSRCDIR)/template/debian
9 joy 1.1
10 joy 1.11 ENGLISHDIR := $(ENGLISHSRCDIR)
11     # ^ just an alias ^
12 joy 1.1 HTMLDIR = $(WMLBASE)/$(RELHTMLBASE)/$(CUR_DIR)
13    
14     LANGUAGECAP = $(shell echo $(LANGUAGE) | tr "a-z" "A-Z")
15 joy 1.15 WMLOPTIONS := -q -D CUR_YEAR=$(CUR_YEAR)
16 joy 1.1 WMLOUTFILE = $(@F)
17     WMLPROLOG :=
18     WMLEPILOG :=
19     WML = wml $(WMLOPTIONS) -o UNDEFu$(LANGUAGECAP):$(WMLOUTFILE)@g+w $(WMLPROLOG) $(WMLEPILOG)
20    
21     WMLFILES = $(wildcard *.wml)
22 joy 1.4 ifndef SUBLANG
23 joy 1.1 HTMLFILES = $(patsubst %.wml,%.$(LANGUAGE).html,$(WMLFILES))
24     HTMLDESTFILES = $(patsubst %.wml,$(HTMLDIR)/%.$(LANGUAGE).html,$(WMLFILES))
25 joy 1.4 else
26 foka 1.3 HTMLFILES = $(sort $(foreach i,$(SUBLANG),\
27     $(patsubst %.wml,%.$(LANGUAGE)-$(i).html,$(WMLFILES))))
28     HTMLDESTFILES = $(sort $(foreach i,$(SUBLANG),\
29     $(patsubst %.wml,$(HTMLDIR)/%.$(LANGUAGE)-$(i).html,$(WMLFILES))))
30     endif
31 finnish 1.36
32 joy 1.1 JPGSOURCE := $(wildcard *.jpg)
33     GIFSOURCE := $(wildcard *.gif)
34     PNGSOURCE := $(wildcard *.png)
35     PSSOURCE := $(wildcard *.ps.gz)
36     EPSSOURCE := $(wildcard *.eps)
37     PDFSOURCE := $(wildcard *.pdf)
38     FIGSOURCE := $(wildcard *.fig)
39     XCFSOURCE := $(wildcard *.xcf.gz)
40 foka 1.3 CSSSOURCE := $(wildcard *.css)
41     IMGFILES := $(JPGSOURCE) $(GIFSOURCE) $(PNGSOURCE) $(PSSOURCE) $(EPSSOURCE) $(PDFSOURCE) $(FIGSOURCE) $(XCFSOURCE) $(CSSSOURCE)
42 finnish 1.36 IMGDESTFILES := $(patsubst %,$(HTMLDIR)/%,$(IMGFILES))
43 joy 1.1
44     existing-SUBS := $(shell for dir in $(wildcard $(SUBS)) ''; do test -d $$dir && echo $$dir; done)
45 joy 1.4 existing-SUBS-install := $(addsuffix -install,$(existing-SUBS))
46     existing-SUBS-clean := $(addsuffix -clean,$(existing-SUBS))
47     existing-SUBS-cleandest := $(addsuffix -cleandest,$(existing-SUBS))
48 joy 1.1
49 joy 1.4 # rules
50 joy 1.1 all:: $(HTMLFILES) $(existing-SUBS)
51    
52     $(existing-SUBS):
53 joy 1.8 -$(MAKE) -C $@
54 joy 1.1
55     install::
56 foka 1.24 test -d $(HTMLDIR) || mkdir -m g+w -p $(HTMLDIR)
57 joy 1.1 install:: $(HTMLDESTFILES) $(IMGDESTFILES) $(existing-SUBS-install)
58    
59     $(existing-SUBS-install):
60 joy 1.8 -$(MAKE) -C $(subst -install,,$@) install
61 joy 1.1
62     clean::
63 joy 1.29 rm -f *.$(LANGUAGE).html *~
64 joy 1.1 clean:: $(existing-SUBS-clean)
65    
66     $(existing-SUBS-clean):
67 joy 1.8 -$(MAKE) -C $(subst -clean,,$@) clean
68 joy 1.1
69     cleandest::
70     rm -f $(HTMLDIR)/*.$(LANGUAGE).html
71     cleandest:: $(existing-SUBS-cleandest)
72    
73     $(existing-SUBS-cleandest):
74 joy 1.8 -$(MAKE) -C $(subst -cleandest,,$@) cleandest
75 joy 1.1
76 joy 1.21 # subdirectories of News, events and security dirs each have
77 foka 1.9 # their own generic wml file deps
78 joy 1.18 ifneq "$(findstring /News/,$(CURDIR))" ""
79 joy 1.5 NOGENERICDEP := true
80     endif
81     ifneq "$(findstring /events/,$(CURDIR))" ""
82     NOGENERICDEP := true
83     endif
84     ifneq "$(findstring /security/,$(CURDIR))" ""
85     NOGENERICDEP := true
86     endif
87    
88 joy 1.1 # the rule for every wml file
89 joy 1.2 ifndef NOGENERICDEP
90 joy 1.12 %.$(LANGUAGE).html : %.wml $(WMLBASE)/../.wmlrc $(WMLBASE)/.wmlrc \
91     $(TEMPLDIR)/template.wml $(TEMPLDIR)/languages.wml $(HTMLDEP)
92 joy 1.1 $(WML) $(<F)
93 joy 1.14 ifeq "$(LANGUAGE)" "en"
94     $(WMLBASE)/../touch_translations.pl $(CURDIR)/$(<F) $(LANGUAGE)
95     endif
96 joey 1.30 ifneq "$(findstring /international/,$(CURDIR)/)" ""
97 joy 1.14 $(WMLBASE)/../touch_translations.pl $(CURDIR)/$(<F) $(LANGUAGE)
98 joy 1.2 endif
99 joy 1.4 endif
100 joy 1.1
101 joy 1.10 ifndef NOGENERICINSTDEP
102 joy 1.1 $(HTMLDIR)/%.$(LANGUAGE).html: %.$(LANGUAGE).html
103     @echo copying $(@F) to $(HTMLDIR)
104 foka 1.23 -@install -m 664 -p $(@F) $(HTMLDIR)
105 joy 1.1 ifeq ($(LANGUAGE),en)
106     @echo making a link $(@D)/$(*F).html -\> $(@F)
107 joy 1.4 @ln -sf $(@F) $(@D)/$(*F).html
108 joy 1.10 endif
109 joy 1.1 endif
110    
111 finnish 1.36 $(IMGDESTFILES): $(HTMLDIR)/%: %
112     install -m 664 -p $< $(HTMLDIR)
113 joy 1.13 ifeq "$(LANGUAGE)" "en"
114 finnish 1.36 [ -f "$(HTMLDIR)/$(basename $(basename $<))$(suffix $<)" ] || ln -s $< $(HTMLDIR)/$(basename $(basename $<))$(suffix $<)
115 joy 1.13 endif
116 joy 1.1
117     # template dependencies
118 joy 1.15 $(TEMPLDIR)/%.wml:
119     touch $@
120    
121 joy 1.1 $(TEMPLDIR)/basic.wml: $(TEMPLDIR)/navbar.wml
122     $(TEMPLDIR)/footer.wml: $(TEMPLDIR)/ctime.wml
123 joy 1.26 $(TEMPLDIR)/languages.wml: $(TEMPLDIR)/language_names.wml
124 joy 1.32 $(TEMPLDIR)/mainpage.wml: $(TEMPLDIR)/basic.wml $(TEMPLDIR)/mirrors.wml \
125     $(TEMPLDIR)/languages.wml $(TEMPLDIR)/footer.wml $(TEMPLDIR)/links.tags.wml \
126 joy 1.19 $(ENGLISHSRCDIR)/Pics/blue-upperleft.png $(ENGLISHSRCDIR)/Pics/blue-upperright.png \
127     $(ENGLISHSRCDIR)/Pics/blue-lowerleft.png $(ENGLISHSRCDIR)/Pics/blue-lowerright.png
128 joy 1.32 $(TEMPLDIR)/mirrors.wml: $(TEMPLDIR)/countries.wml
129 joy 1.19 $(TEMPLDIR)/template.wml: $(TEMPLDIR)/basic.wml $(TEMPLDIR)/languages.wml \
130     $(TEMPLDIR)/footer.wml
131 joy 1.1 $(TEMPLDIR)/news.wml: $(TEMPLDIR)/basic.wml $(TEMPLDIR)/footer.wml \
132 joy 1.19 $(TEMPLDIR)/languages.wml $(TEMPLDIR)/common_translation.wml \
133     $(TEMPLDIR)/ctime.wml
134     $(TEMPLDIR)/consultant.wml: $(TEMPLDIR)/basic.wml $(TEMPLDIR)/languages.wml \
135     $(TEMPLDIR)/footer.wml
136 joy 1.15 $(TEMPLDIR)/event.wml: $(TEMPLDIR)/footer.wml $(TEMPLDIR)/languages.wml \
137 joy 1.25 $(TEMPLDIR)/basic.wml $(TEMPLDIR)/events_common.wml
138     $(TEMPLDIR)/past_event.wml: $(TEMPLDIR)/footer.wml $(TEMPLDIR)/languages.wml \
139     $(TEMPLDIR)/basic.wml $(TEMPLDIR)/events_common.wml
140 joy 1.35 ifndef SUBLANG
141 joy 1.19 $(TEMPLDIR)/navbar.wml: $(TEMPLDIR)/common_translation.wml \
142 foka 1.22 $(ENGLISHSRCDIR)/Pics/debian.jpg $(ENGLISHSRCDIR)/Pics/logo-50.jpg \
143 joy 1.19 $(ENGLISHSRCDIR)/Pics/red-upperleft.png $(ENGLISHSRCDIR)/Pics/red-upperright.png \
144 joy 1.33 $(ENGLISHSRCDIR)/Pics/red-lowerleft.png $(ENGLISHSRCDIR)/Pics/red-lowerright.png \
145 joy 1.34 $(WMLBASE)/Pics/home.$(LANGUAGE).gif \
146     $(WMLBASE)/Pics/about.$(LANGUAGE).gif \
147     $(WMLBASE)/Pics/news.$(LANGUAGE).gif \
148     $(WMLBASE)/Pics/distrib.$(LANGUAGE).gif \
149     $(WMLBASE)/Pics/support.$(LANGUAGE).gif \
150     $(WMLBASE)/Pics/devel.$(LANGUAGE).gif \
151     # $(WMLBASE)/Pics/sitemap.$(LANGUAGE).gif \
152     $(WMLBASE)/Pics/search.$(LANGUAGE).gif
153 joy 1.35 else
154     $(TEMPLDIR)/navbar.wml: $(TEMPLDIR)/common_translation.wml \
155     $(ENGLISHSRCDIR)/Pics/debian.jpg $(ENGLISHSRCDIR)/Pics/logo-50.jpg \
156     $(ENGLISHSRCDIR)/Pics/red-upperleft.png $(ENGLISHSRCDIR)/Pics/red-upperright.png \
157     $(ENGLISHSRCDIR)/Pics/red-lowerleft.png $(ENGLISHSRCDIR)/Pics/red-lowerright.png \
158     $(foreach i,$(SUBLANG),$(WMLBASE)/Pics/home.$(LANGUAGE)-$(i).gif) \
159     $(foreach i,$(SUBLANG),$(WMLBASE)/Pics/about.$(LANGUAGE)-$(i).gif) \
160     $(foreach i,$(SUBLANG),$(WMLBASE)/Pics/news.$(LANGUAGE)-$(i).gif) \
161     $(foreach i,$(SUBLANG),$(WMLBASE)/Pics/distrib.$(LANGUAGE)-$(i).gif) \
162     $(foreach i,$(SUBLANG),$(WMLBASE)/Pics/support.$(LANGUAGE)-$(i).gif) \
163     $(foreach i,$(SUBLANG),$(WMLBASE)/Pics/devel.$(LANGUAGE)-$(i).gif) \
164     # $(foreach i,$(SUBLANG),$(WMLBASE)/Pics/sitemap.$(LANGUAGE)-$(i).gif) \
165     $(foreach i,$(SUBLANG),$(WMLBASE)/Pics/search.$(LANGUAGE)-$(i).gif)
166     endif
167 joy 1.1 $(TEMPLDIR)/security.wml: $(TEMPLDIR)/common_translation.wml \
168 joy 1.15 $(TEMPLDIR)/basic.wml $(TEMPLDIR)/fixes_link.wml $(TEMPLDIR)/languages.wml \
169     $(TEMPLDIR)/ctime.wml $(TEMPLDIR)/footer.wml
170 joy 1.1 $(TEMPLDIR)/ddp.wml: $(TEMPLDIR)/basic.wml $(TEMPLDIR)/languages.wml \
171 joy 1.15 $(TEMPLDIR)/footer.wml
172 joy 1.19 $(TEMPLDIR)/votebar.wml: $(TEMPLDIR)/footer.wml $(TEMPLDIR)/languages.wml \
173     $(TEMPLDIR)/basic.wml $(TEMPLDIR)/common_translation.wml \
174     $(ENGLISHSRCDIR)/Pics/blue-upperleft.png $(ENGLISHSRCDIR)/Pics/blue-upperright.png \
175     $(ENGLISHSRCDIR)/Pics/blue-lowerleft.png $(ENGLISHSRCDIR)/Pics/blue-lowerright.png
176 finnish 1.37 $(TEMPLDIR)/weeklynews/header.wml: $(TEMPLDIR)/ctime.wml \
177     $(TEMPLDIR)/template.wml $(TEMPLDIR)/links.tags.wml
178 joy 1.1
179     .SUFFIXES:
180     .PHONY: all $(existing-SUBS) install $(existing-SUBS-install)
181     .PHONY: clean $(existing-SUBS-clean) cleandest $(existing-SUBS-cleandest)

  ViewVC Help
Powered by ViewVC 1.1.5