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

Contents of /webwml/Makefile.common

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.34 - (hide annotations) (download)
Mon Jun 4 18:17:03 2001 UTC (12 years ago) by joy
Branch: MAIN
Changes since 1.33: +8 -10 lines
some moron broke the translations ;)
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 joy 1.1 JPGSOURCE := $(wildcard *.jpg)
32     JPGDESTFILES := $(patsubst %,$(HTMLDIR)/%,$(JPGSOURCE))
33     GIFSOURCE := $(wildcard *.gif)
34     GIFDESTFILES := $(patsubst %,$(HTMLDIR)/%,$(GIFSOURCE))
35     PNGSOURCE := $(wildcard *.png)
36     PNGDESTFILES := $(patsubst %,$(HTMLDIR)/%,$(PNGSOURCE))
37     PSSOURCE := $(wildcard *.ps.gz)
38     PSDESTFILES := $(patsubst %,$(HTMLDIR)/%,$(PSSOURCE))
39     EPSSOURCE := $(wildcard *.eps)
40     EPSDESTFILES := $(patsubst %,$(HTMLDIR)/%,$(EPSSOURCE))
41     PDFSOURCE := $(wildcard *.pdf)
42     PDFDESTFILES := $(patsubst %,$(HTMLDIR)/%,$(PDFSOURCE))
43     FIGSOURCE := $(wildcard *.fig)
44     FIGDESTFILES := $(patsubst %,$(HTMLDIR)/%,$(FIGSOURCE))
45     XCFSOURCE := $(wildcard *.xcf.gz)
46     XCFDESTFILES := $(patsubst %,$(HTMLDIR)/%,$(XCFSOURCE))
47 foka 1.3 CSSSOURCE := $(wildcard *.css)
48     CSSDESTFILES := $(patsubst %,$(HTMLDIR)/%,$(CSSSOURCE))
49     IMGFILES := $(JPGSOURCE) $(GIFSOURCE) $(PNGSOURCE) $(PSSOURCE) $(EPSSOURCE) $(PDFSOURCE) $(FIGSOURCE) $(XCFSOURCE) $(CSSSOURCE)
50 joy 1.6 IMGDESTFILES := $(JPGDESTFILES) $(GIFDESTFILES) $(PNGDESTFILES) $(PSDESTFILES) $(EPSDESTFILES) $(PDFDESTFILES) $(FIGDESTFILES) $(XCFDESTFILES) $(CSSDESTFILES)
51 joy 1.1
52     existing-SUBS := $(shell for dir in $(wildcard $(SUBS)) ''; do test -d $$dir && echo $$dir; done)
53 joy 1.4 existing-SUBS-install := $(addsuffix -install,$(existing-SUBS))
54     existing-SUBS-clean := $(addsuffix -clean,$(existing-SUBS))
55     existing-SUBS-cleandest := $(addsuffix -cleandest,$(existing-SUBS))
56 joy 1.1
57 joy 1.4 # rules
58 joy 1.1 all:: $(HTMLFILES) $(existing-SUBS)
59    
60     $(existing-SUBS):
61 joy 1.8 -$(MAKE) -C $@
62 joy 1.1
63     install::
64 foka 1.24 test -d $(HTMLDIR) || mkdir -m g+w -p $(HTMLDIR)
65 joy 1.1 install:: $(HTMLDESTFILES) $(IMGDESTFILES) $(existing-SUBS-install)
66    
67     $(existing-SUBS-install):
68 joy 1.8 -$(MAKE) -C $(subst -install,,$@) install
69 joy 1.1
70     clean::
71 joy 1.29 rm -f *.$(LANGUAGE).html *~
72 joy 1.1 clean:: $(existing-SUBS-clean)
73    
74     $(existing-SUBS-clean):
75 joy 1.8 -$(MAKE) -C $(subst -clean,,$@) clean
76 joy 1.1
77     cleandest::
78     rm -f $(HTMLDIR)/*.$(LANGUAGE).html
79     cleandest:: $(existing-SUBS-cleandest)
80    
81     $(existing-SUBS-cleandest):
82 joy 1.8 -$(MAKE) -C $(subst -cleandest,,$@) cleandest
83 joy 1.1
84 joy 1.21 # subdirectories of News, events and security dirs each have
85 foka 1.9 # their own generic wml file deps
86 joy 1.18 ifneq "$(findstring /News/,$(CURDIR))" ""
87 joy 1.5 NOGENERICDEP := true
88     endif
89     ifneq "$(findstring /events/,$(CURDIR))" ""
90     NOGENERICDEP := true
91     endif
92     ifneq "$(findstring /security/,$(CURDIR))" ""
93     NOGENERICDEP := true
94     endif
95    
96 joy 1.1 # the rule for every wml file
97 joy 1.2 ifndef NOGENERICDEP
98 joy 1.12 %.$(LANGUAGE).html : %.wml $(WMLBASE)/../.wmlrc $(WMLBASE)/.wmlrc \
99     $(TEMPLDIR)/template.wml $(TEMPLDIR)/languages.wml $(HTMLDEP)
100 joy 1.1 $(WML) $(<F)
101 joy 1.14 ifeq "$(LANGUAGE)" "en"
102     $(WMLBASE)/../touch_translations.pl $(CURDIR)/$(<F) $(LANGUAGE)
103     endif
104 joey 1.30 ifneq "$(findstring /international/,$(CURDIR)/)" ""
105 joy 1.14 $(WMLBASE)/../touch_translations.pl $(CURDIR)/$(<F) $(LANGUAGE)
106 joy 1.2 endif
107 joy 1.4 endif
108 joy 1.1
109 joy 1.10 ifndef NOGENERICINSTDEP
110 joy 1.1 $(HTMLDIR)/%.$(LANGUAGE).html: %.$(LANGUAGE).html
111     @echo copying $(@F) to $(HTMLDIR)
112 foka 1.23 -@install -m 664 -p $(@F) $(HTMLDIR)
113 joy 1.1 ifeq ($(LANGUAGE),en)
114     @echo making a link $(@D)/$(*F).html -\> $(@F)
115 joy 1.4 @ln -sf $(@F) $(@D)/$(*F).html
116 joy 1.10 endif
117 joy 1.1 endif
118    
119     $(IMGDESTFILES): $(IMGFILES)
120 foka 1.23 install -m 664 -p $(@F) $(HTMLDIR)
121 joy 1.13 ifeq "$(LANGUAGE)" "en"
122     [ -f "$(HTMLDIR)/$(basename $(basename $(@F)))$(suffix $(@F))" ] || ln -s $(@F) $(HTMLDIR)/$(basename $(basename $(@F)))$(suffix $(@F))
123     endif
124 joy 1.1
125     # template dependencies
126 joy 1.15 $(TEMPLDIR)/%.wml:
127     touch $@
128    
129 joy 1.1 $(TEMPLDIR)/basic.wml: $(TEMPLDIR)/navbar.wml
130     $(TEMPLDIR)/footer.wml: $(TEMPLDIR)/ctime.wml
131 joy 1.26 $(TEMPLDIR)/languages.wml: $(TEMPLDIR)/language_names.wml
132 joy 1.32 $(TEMPLDIR)/mainpage.wml: $(TEMPLDIR)/basic.wml $(TEMPLDIR)/mirrors.wml \
133     $(TEMPLDIR)/languages.wml $(TEMPLDIR)/footer.wml $(TEMPLDIR)/links.tags.wml \
134 joy 1.19 $(ENGLISHSRCDIR)/Pics/blue-upperleft.png $(ENGLISHSRCDIR)/Pics/blue-upperright.png \
135     $(ENGLISHSRCDIR)/Pics/blue-lowerleft.png $(ENGLISHSRCDIR)/Pics/blue-lowerright.png
136 joy 1.32 $(TEMPLDIR)/mirrors.wml: $(TEMPLDIR)/countries.wml
137 joy 1.19 $(TEMPLDIR)/template.wml: $(TEMPLDIR)/basic.wml $(TEMPLDIR)/languages.wml \
138     $(TEMPLDIR)/footer.wml
139 joy 1.1 $(TEMPLDIR)/news.wml: $(TEMPLDIR)/basic.wml $(TEMPLDIR)/footer.wml \
140 joy 1.19 $(TEMPLDIR)/languages.wml $(TEMPLDIR)/common_translation.wml \
141     $(TEMPLDIR)/ctime.wml
142     $(TEMPLDIR)/consultant.wml: $(TEMPLDIR)/basic.wml $(TEMPLDIR)/languages.wml \
143     $(TEMPLDIR)/footer.wml
144 joy 1.15 $(TEMPLDIR)/event.wml: $(TEMPLDIR)/footer.wml $(TEMPLDIR)/languages.wml \
145 joy 1.25 $(TEMPLDIR)/basic.wml $(TEMPLDIR)/events_common.wml
146     $(TEMPLDIR)/past_event.wml: $(TEMPLDIR)/footer.wml $(TEMPLDIR)/languages.wml \
147     $(TEMPLDIR)/basic.wml $(TEMPLDIR)/events_common.wml
148 joy 1.19 $(TEMPLDIR)/navbar.wml: $(TEMPLDIR)/common_translation.wml \
149 foka 1.22 $(ENGLISHSRCDIR)/Pics/debian.jpg $(ENGLISHSRCDIR)/Pics/logo-50.jpg \
150 joy 1.19 $(ENGLISHSRCDIR)/Pics/red-upperleft.png $(ENGLISHSRCDIR)/Pics/red-upperright.png \
151 joy 1.33 $(ENGLISHSRCDIR)/Pics/red-lowerleft.png $(ENGLISHSRCDIR)/Pics/red-lowerright.png \
152 joy 1.34 $(WMLBASE)/Pics/home.$(LANGUAGE).gif \
153     $(WMLBASE)/Pics/about.$(LANGUAGE).gif \
154     $(WMLBASE)/Pics/news.$(LANGUAGE).gif \
155     $(WMLBASE)/Pics/distrib.$(LANGUAGE).gif \
156     $(WMLBASE)/Pics/support.$(LANGUAGE).gif \
157     $(WMLBASE)/Pics/devel.$(LANGUAGE).gif \
158     # $(WMLBASE)/Pics/sitemap.$(LANGUAGE).gif \
159     $(WMLBASE)/Pics/search.$(LANGUAGE).gif
160 joy 1.1 $(TEMPLDIR)/security.wml: $(TEMPLDIR)/common_translation.wml \
161 joy 1.15 $(TEMPLDIR)/basic.wml $(TEMPLDIR)/fixes_link.wml $(TEMPLDIR)/languages.wml \
162     $(TEMPLDIR)/ctime.wml $(TEMPLDIR)/footer.wml
163 joy 1.1 $(TEMPLDIR)/ddp.wml: $(TEMPLDIR)/basic.wml $(TEMPLDIR)/languages.wml \
164 joy 1.15 $(TEMPLDIR)/footer.wml
165 joy 1.19 $(TEMPLDIR)/votebar.wml: $(TEMPLDIR)/footer.wml $(TEMPLDIR)/languages.wml \
166     $(TEMPLDIR)/basic.wml $(TEMPLDIR)/common_translation.wml \
167     $(ENGLISHSRCDIR)/Pics/blue-upperleft.png $(ENGLISHSRCDIR)/Pics/blue-upperright.png \
168     $(ENGLISHSRCDIR)/Pics/blue-lowerleft.png $(ENGLISHSRCDIR)/Pics/blue-lowerright.png
169 joy 1.20 $(TEMPLDIR)/weeklynews/header.wml: $(TEMPLDIR)/ctime.wml $(TEMPLDIR)/template.wml
170 joy 1.1
171     .SUFFIXES:
172     .PHONY: all $(existing-SUBS) install $(existing-SUBS-install)
173     .PHONY: clean $(existing-SUBS-clean) cleandest $(existing-SUBS-cleandest)

  ViewVC Help
Powered by ViewVC 1.1.5