summaryrefslogtreecommitdiff
path: root/libjava/classpath/doc/www.gnu.org/cp-tools/Makefile
blob: 93ec48c625f85dea09ca0eca51d781b6a15ee37a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
ifndef WMK
  export WMK=wmk
endif
ifndef WML
  export WML=wml
endif

WML_SRC = $(wildcard *.wml)
WML_OBJS = $(patsubst %.wml,%.html,$(WML_SRC))

%.html: %.wml ../include/macros.wml  ../include/layout.wml
	$(WML) -o $@ $<
#	-rm -f $(patsubst %.wml,%.html,$<)

all : $(WML_OBJS) subdirs

.PHONY : clean
clean :
	$(foreach dir, $(SUBDIRS), sh -c "cd $(dir) && $(MAKE) clean";)
	-rm -f *.html

.PHONY : subdirs
subdirs :
	$(foreach dir, $(SUBDIRS), sh -c "cd $(dir) && $(MAKE)";)

.PHONY : publish
publish : 
	@sh -c "if [ "$(CLASSPATH_WEBROOT)x" = x ]; then echo 'You must set CLASSPATH_WEBROOT in your environment first'; exit 1; fi"
	@sh -c "if [ ! -d $(CLASSPATH_WEBROOT) ]; then echo 'You must set CLASSPATH_WEBROOT in your environment first'; exit 1; fi"
	$(foreach dir, $(SUBDIRS), sh -c "cd $(dir) && $(MAKE) publish";)
	-cp -f *.html $(CLASSPATH_WEBROOT)/cp-tools/