| 1 |
# Top-level makefile for building cdimage.debian.org web site.
|
| 2 |
# This is owned by debian-cd and debian-www teams.
|
| 3 |
# Nothing in here should require any modification.
|
| 4 |
|
| 5 |
langCAP := $(shell echo $(lang) | tr "a-z" "A-Z")
|
| 6 |
templdir := ../webwml/english/template/debian
|
| 7 |
|
| 8 |
destdir = /home/porridge/debian/web/cdimage-www/
|
| 9 |
|
| 10 |
wml = wml -q -I $(top_dir) -I $(top_dir)/$(dir $(templdir)) \
|
| 11 |
-D CUR_YEAR=$(shell date +%Y) \
|
| 12 |
-o UNDEFu$(langCAP):$(@F)@g+w
|
| 13 |
|
| 14 |
wmlfiles = $(wildcard *.wml)
|
| 15 |
htmlfiles = $(patsubst %.wml,%.$(lang).html,$(wmlfiles))
|
| 16 |
htmldestfiles = $(patsubst %.wml,$(destdir)/%.$(lang).html,$(wmlfiles))
|
| 17 |
|
| 18 |
all: $(htmlfiles)
|
| 19 |
|
| 20 |
%.$(lang).html: %.wml $(top_dir)/english/%.wml \
|
| 21 |
$(top_dir)/template/cdimage.wml \
|
| 22 |
$(top_dir)/template/translations.wml \
|
| 23 |
$(dir $(top_dir))/.wmlrc $(top_dir)/.wmlrc
|
| 24 |
$(wml) $(<F)
|
| 25 |
|
| 26 |
template/cdimage.wml: $(templdir)/basic.wml $(templdir)/languages.wml
|
| 27 |
touch $@
|
| 28 |
|
| 29 |
install::
|
| 30 |
test -d $(destdir) || mkdir -m g+w -p $(destdir)
|
| 31 |
install:: $(htmldestfiles)
|
| 32 |
|
| 33 |
$(destdir)/%.$(lang).html: %.$(lang).html
|
| 34 |
@echo copying $(@F) to $(destdir)
|
| 35 |
-@install -m 664 -p $(@F) $(destdir)
|
| 36 |
ifeq "$(lang)" "en"
|
| 37 |
@echo making a link $(@D)/$(*F).html -\> $(@F)
|
| 38 |
@ln -sf $(@F) $(@D)/$(*F).html
|
| 39 |
endif
|
| 40 |
|
| 41 |
clean:
|
| 42 |
rm -f *.html
|
| 43 |
|
| 44 |
.SUFFIXES:
|
| 45 |
.PHONY: all install clean
|