OSDN Git Service

www: Add cups to misc.list
[linuxjm/jm.git] / www / Makefile
1 #
2 # Makefile for contents in www
3 #
4 include ../JM.rules
5
6 ifndef WORKDIR
7         WORKDIR = /var/tmp/JM
8 endif
9
10 ifndef DATE
11         DATE := $(shell env LANG=C date +"%Y%m%d")
12 endif
13
14 .SUFFIXES: .m4 .html
15
16 .m4.html:
17         m4 -P -D _WORKDIR=$(WORKDIR) $*.m4 | cat -s | nkf -w > $*.html
18
19 CONTENTS = index.html download.html section.html copyright.html \
20         README.html INSTALL.html \
21         missing.html nosuchpage.html manerror.html
22 #
23 # rules
24 #
25 all: contents
26         make -C INDEX/
27         make -C guidance/ WWWROOT=$(WWWROOT)
28         make -C man-ja/
29         make -C rpm/ DATE=$(DATE)
30         make -C announcement/
31         make -C news/
32
33 contents: $(CONTENTS)
34
35 *.html: jm_www.m4
36
37 index.html: news/index.m4 ../stamp/latest-archive-modified
38
39 README.html: ../dist/README
40
41 INSTALL.html: ../dist/INSTALL
42
43 ../dist/README ../dist/INSTALL:
44         $(MAKE) -C .. -f Makefile.dist
45
46 download.html: download.m4 ../stamp/latest-archive-modified
47         m4 -P -D _WORKDIR=$(WORKDIR) -D _DATE=$(DATE) $< | nkf -w > $@
48
49 ../stamp/latest-archive-modified:
50         make -C .. stamp/latest-archive-modified
51
52 clean:
53         @rm -f $(CONTENTS) *.tar.gz
54         -$(RM) -rf per-pkg/
55         -$(RM) -f rpm/*.rpm rpm/index.html
56         make -C INDEX/ clean
57         make -C guidance/ clean
58         make -C man-ja/ clean
59         make -C announcement/ clean
60
61 install: all
62         $(MAKE) -C guidance  WWWROOT=$(WWWROOT) install
63         $(RSYNC) -a --delete -v \
64         --exclude='bin' \
65         --exclude='*.m4' \
66         --exclude='*.perl' \
67         --exclude='*.list' \
68         --exclude='Makefile' \
69         --exclude='ChangeLog' \
70         --exclude='.gitignore' \
71         * .htaccess $(WWWROOT)
72         $(MAKE) -C ../admin/site WWWROOT=$(WWWROOT) install