OSDN Git Service

define AddCharset UTF-8 .html in .htaccess
[linuxjf/JF.git] / Exception_2.rules
1 #
2 # This Makefile is for documents supplied by  only one HTML.
3 #
4
5 .SUFFIXES:
6 .SUFFIXES: .html .txt .gz .html.gz
7
8 .html.txt:
9         $(HTML2TEXT) $*.html | nkf -s | \
10         perl -e 'while (<>) {chop; print; print "\r\n";}'> $*.txt
11
12 COMPILE=yes
13
14 #
15 # condition check
16 #
17 ifeq ($(RESTRICT_COMMERCIAL), yes)
18 ifeq ($(RESTRICT-DIST), yes)
19 COMPILE=no
20 endif
21 endif
22
23 #
24 # default target by condition.
25 #
26 ifeq ($(COMPILE), yes)
27 all: $(BASENAME).txt
28
29 install: install-work \
30         install-www \
31         install-ftp
32 else
33 all:
34         @echo Skip compilation.
35 install: 
36         @echo Skip installation.
37 endif
38
39 $(BASENAME).txt: info
40
41 install-work: \
42         $(WORK_TEXT)/$(BASENAME).txt \
43         $(WORK_HTML)/$(BASENAME).html
44
45 $(WORK_TEXT)/$(BASENAME).txt: $(BASENAME).txt
46         mkdir -p $(@D)
47         $(INSTALL) $< $@
48
49 $(WORK_HTML)/$(BASENAME).html: $(BASENAME).html
50         mkdir -p $(@D)
51         for i in *.html ; do $(INSTALL) $$i $(@D) ; done
52
53 ifneq ($(INSTALL_WWW), yes)
54 install-www: 
55 else
56 install-www: \
57         $(DEST_WWW_TEXT)/$(BASENAME).txt \
58         $(DEST_WWW_HTML)/$(BASENAME).html
59
60 $(DEST_WWW_TEXT)/$(BASENAME).txt: $(BASENAME).txt
61         mkdir -p $(@D)
62         $(INSTALL) $< $@
63
64 $(DEST_WWW_HTML)/$(BASENAME).html: $(BASENAME).html
65         mkdir -p $(@D)
66         $(INSTALL) $< $@
67 endif
68
69 ifneq ($(INSTALL_FTP), yes)
70 install-ftp:
71 else
72 install-ftp: \
73         $(DEST_FTP_TEXT)/$(BASENAME).gz \
74         $(DEST_FTP_HTML)/$(BASENAME).html.gz
75
76 $(DEST_FTP_TEXT)/$(BASENAME).gz: $(BASENAME).txt
77         mkdir -p $(@D)
78         $(INSTALL) $< $*
79         rm -f $@
80         gzip $*
81
82 $(DEST_FTP_HTML)/$(BASENAME).html.gz: $(BASENAME).html
83         mkdir -p $(@D)
84         $(INSTALL) $< $(@D)
85         rm -f $@
86         gzip $*
87 endif
88
89 clean:
90         rm -f $(BASENAME).txt