OSDN Git Service

deleted: docs/kernel-docs-2.6/support/template.m4.orig
[linuxjf/JF.git] / textonly.rules
1 #
2 # Makefile Rules for text only documents.
3 # $Id: textonly.rules,v 1.1 2004/10/08 11:33:11 mdk Exp $
4 #
5
6 ifeq ($(origin BASENAME), undefined)
7 BASENAME := $(notdir $(CURDIR))
8 NODELETE_OLDDOCS = yes
9 endif
10
11 .SUFFIXES:
12 .SUFFIXES: .html
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: $(LAST_MODIFIED) $(BASENAME).sjis
28
29 install: install-work \
30         install-www \
31         install-ftp \
32         install-ldp-mirror
33 else
34 all:
35
36 install: 
37         @echo Skip installation.
38 endif
39
40 #
41 # rules
42 #
43 $(LAST_MODIFIED): info $(BASENAME).txt
44         touch $(LAST_MODIFIED)
45
46 $(BASENAME).sjis: $(BASENAME).txt
47         nkf -s $< | perl $(BINDIR)/crlf_trim_blanks.pl > $@
48
49 FIND_EXPR =     -name "$(BASENAME).gz" \
50                 -o -name "$(BASENAME).tar.gz" \
51                 -o -name "$(BASENAME).txt" \
52
53 #
54 # Create JF archives
55 #
56 install-work: $(WORK_TEXT)/$(BASENAME).txt
57
58 $(WORK_TEXT)/$(BASENAME).txt: $(BASENAME).sjis
59         mkdir -p $(@D)
60         $(INSTALL) $< $@
61
62 #
63 # Install WWW contents
64 #
65 ifneq ($(INSTALL_WWW), yes)
66 install-www:
67 else
68 install-www: $(DEST_WWW_TEXT)/$(BASENAME).txt
69
70 $(DEST_WWW_TEXT)/$(BASENAME).txt: $(BASENAME).sjis
71         mkdir -p $(@D)
72         $(INSTALL) $< $@
73
74 endif
75
76 #
77 # Install FTP contents
78 #
79 ifneq ($(INSTALL_FTP), yes)
80 install-ftp:
81 else
82 install-ftp: $(DEST_FTP_TEXT)/$(BASENAME).txt.gz
83
84 $(DEST_FTP_TEXT)/$(BASENAME).txt.gz: $(BASENAME).sjis
85         mkdir -p $(@D)
86         $(INSTALL) $< $(@:.gz=)
87         rm -f $@
88         gzip $(@:.gz=)
89
90 endif
91
92 #
93 # Install LDP translations for mirror
94 #
95 ifneq ($(INSTALL_LDP), yes)
96 install-ldp-mirror:
97 else
98 ifneq ($(KIND), LDP-TRANS)
99 install-ldp-mirror: 
100         @echo Non-LDP document. Skipped.
101 else
102 install-ldp-mirror: $(DEST_LDP_TEXT)/$(BASENAME).gz
103
104 $(DEST_LDP_TEXT)/$(BASENAME).gz: $(BASENAME).sjis
105         mkdir -p $(@D)
106         $(INSTALL) $< $(@:.gz=)
107         rm -f $@
108         gzip $(@:.gz=)
109
110 endif
111 endif
112
113 #
114 clean:
115         rm -f $(BASENAME).sjis
116         rm -f $(BASENAME).tar.gz
117