| 1 |
joy |
1.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 |
|
|
TEMPLDIR := ../webwml/english/template/debian
|
| 6 |
|
|
TEMPLATES := $(wildcard $(TEMPLDIR)/*.wml) $(wildcard template/*.wml)
|
| 7 |
|
|
|
| 8 |
|
|
HTMLDIR = /org/cdimage.debian.org/www/
|
| 9 |
|
|
|
| 10 |
|
|
WML = wml -q -I. -I $(dir $(TEMPLDIR)) -D CUR_YEAR=$(shell date +%Y) -o UNDEFuEN:$(@F)@g+w
|
| 11 |
|
|
|
| 12 |
|
|
WMLFILES = $(wildcard *.wml)
|
| 13 |
|
|
HTMLFILES = $(patsubst %.wml,%.html,$(WMLFILES))
|
| 14 |
|
|
HTMLDESTFILES = $(patsubst %.wml,$(HTMLDIR)/%.html,$(WMLFILES))
|
| 15 |
|
|
|
| 16 |
|
|
all: $(HTMLFILES)
|
| 17 |
|
|
|
| 18 |
|
|
%.html: %.wml template/cdimage.wml .wmlrc
|
| 19 |
|
|
$(WML) $(<F)
|
| 20 |
|
|
|
| 21 |
|
|
template/cdimage.wml: $(TEMPLDIR)/basic.wml $(TEMPLDIR)/languages.wml
|
| 22 |
|
|
touch $@
|
| 23 |
|
|
|
| 24 |
|
|
install::
|
| 25 |
|
|
test -d $(HTMLDIR) || mkdir -m g+w -p $(HTMLDIR)
|
| 26 |
|
|
install:: $(HTMLDESTFILES)
|
| 27 |
|
|
|
| 28 |
|
|
$(HTMLDIR)/%.html: %.html
|
| 29 |
|
|
@echo copying $(@F) to $(HTMLDIR)
|
| 30 |
|
|
-@install -m 664 -p $(@F) $(HTMLDIR)
|
| 31 |
|
|
|
| 32 |
|
|
clean:
|
| 33 |
|
|
rm -f *.html
|
| 34 |
|
|
|
| 35 |
|
|
.SUFFIXES:
|
| 36 |
|
|
.PHONY: all install clean
|