OSDN Git Service

GNU diffutils 3.8: Update sources.
[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 man-ja/
28         make -C rpm/ DATE=$(DATE)
29         make -C announcement/
30         make -C news/
31
32 contents: $(CONTENTS)
33
34 *.html: jm_www.m4
35
36 index.html: news/index.m4 ../stamp/latest-archive-modified
37
38 README.html: ../dist/README
39
40 INSTALL.html: ../dist/INSTALL
41
42 ../dist/README ../dist/INSTALL:
43         $(MAKE) -C .. -f Makefile.dist
44
45 download.html: download.m4 ../stamp/latest-archive-modified ../stamp/www-info-modified
46         m4 -P -D _WORKDIR=$(WORKDIR) -D _DATE=$(DATE) $< | nkf -w > $@
47
48 ../stamp/latest-archive-modified:
49         make -C .. stamp/latest-archive-modified
50
51 clean:
52         @rm -f $(CONTENTS) *.tar.gz
53         -$(RM) -rf per-pkg/
54         -$(RM) -f rpm/*.rpm rpm/index.html
55         make -C INDEX/ clean
56         make -C man-ja/ clean
57         make -C announcement/ clean
58
59 install: all
60         $(RSYNC) -a --delete -v \
61         --exclude='bin' \
62         --exclude='*.m4' \
63         --exclude='*.perl' \
64         --exclude='*.list' \
65         --exclude='Makefile' \
66         --exclude='ChangeLog' \
67         --exclude='.gitignore' \
68         * .htaccess $(WWWROOT)
69         $(MAKE) -C ../admin/site WWWROOT=$(WWWROOT) install