1 |
MHTML_SRC := $(wildcard *.mhtml) |
ifndef WMK |
2 |
HTML_OBJS := $(MHTML_SRC:.mhtml=.html) |
export WMK=wmk |
|
|
|
|
ifndef MHC |
|
|
export MHC=mhc |
|
3 |
endif |
endif |
4 |
|
|
5 |
%.html : %.mhtml ../macros.mhtml |
WML_SRC = $(wildcard *.wml) |
6 |
$(MHC) $< > $@ |
WML_EN_OBJS = $(patsubst %.wml,%.en.html,$(WML_SRC)) |
7 |
|
|
8 |
all : $(HTML_OBJS) index.html |
%.en.html: %.wml ../include/macros.wml |
9 |
|
$(WMK) -f $< |
10 |
|
-rm -f $(patsubst %.wml,%.html,$<) |
11 |
|
|
12 |
index.html : announcements.html |
all : $(WML_EN_OBJS) subdirs |
|
-rm index.html |
|
|
ln -s announcements.html index.html |
|
13 |
|
|
14 |
.PHONY : clean |
.PHONY : clean |
15 |
clean : |
clean : |
16 |
-rm *.html |
$(foreach dir, $(SUBDIRS), sh -c "cd $(dir) && $(MAKE) clean";) |
17 |
|
-rm -f *.html |
18 |
|
|
19 |
|
.PHONY : subdirs |
20 |
|
subdirs : |
21 |
|
$(foreach dir, $(SUBDIRS), sh -c "cd $(dir) && $(MAKE)";) |
22 |
|
|