1 |
wakaba |
1.13 |
MANAKAI_ROOT_DIR = ../../../ |
2 |
|
|
MANAKAI_BIN_DIR = $(MANAKAI_ROOT_DIR)bin/ |
3 |
|
|
MANAKAI_LIB_DIR = $(MANAKAI_ROOT_DIR)lib/ |
4 |
|
|
|
5 |
wakaba |
1.24 |
DIS_SUFFIX = .dis |
6 |
|
|
DAC_SUFFIX = .dae |
7 |
|
|
DAEM_SUFFIX = .daem |
8 |
wakaba |
1.21 |
PM_SUFFIX = .pm |
9 |
|
|
|
10 |
wakaba |
1.13 |
CD = cd |
11 |
wakaba |
1.1 |
MAKE = make |
12 |
wakaba |
1.3 |
RM = rm |
13 |
wakaba |
1.13 |
PERL = perl |
14 |
wakaba |
1.28 |
PERL_OPTIONS = |
15 |
|
|
PERL_OPTIONS_ALL = $(PERL_OPTIONS) -I$(MANAKAI_LIB_DIR) |
16 |
|
|
PERL_ = $(PERL) $(PERL_OPTIONS_ALL) |
17 |
wakaba |
1.13 |
PERLC = $(PERL) -c -w |
18 |
wakaba |
1.28 |
PERLC_OPTIONS = |
19 |
|
|
PERLC_OPTIONS_ALL = $(PERLC_OPTIONS) -I$(MANAKAI_LIB_DIR) |
20 |
|
|
PERL_CHK = $(PERLC) $(PERLC_OPTIONS_ALL) |
21 |
wakaba |
1.22 |
TOUCH = touch |
22 |
wakaba |
1.1 |
|
23 |
wakaba |
1.13 |
NS_MDOM = http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom\#ManakaiDOM. |
24 |
|
|
NS_MANAKAIDOM = http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom\# |
25 |
wakaba |
1.7 |
|
26 |
wakaba |
1.24 |
DIS_OPTIONS = |
27 |
|
|
DIS_OPTIONS_ALL = $(DIS_OPTIONS) \ |
28 |
|
|
--search-path-catalog-file-name="$(MANAKAI_LIB_DIR)manakai/dis-catalog" \ |
29 |
|
|
--dis-file-suffix="$(DIS_SUFFIX)" \ |
30 |
|
|
--daem-file-suffix="$(DAEM_SUFFIX)" |
31 |
|
|
|
32 |
|
|
DAC_OPTIONS = |
33 |
wakaba |
1.13 |
DAC_PL = $(MANAKAI_BIN_DIR)dac.pl |
34 |
wakaba |
1.24 |
DAC = $(PERL_) $(DAC_PL) $(DAC_OPTIONS) $(DIS_OPTIONS_ALL) \ |
35 |
wakaba |
1.13 |
--db-base-directory-path="$(MANAKAI_ROOT_DIR)" \ |
36 |
|
|
--output-file-name= |
37 |
|
|
|
38 |
|
|
DAC2PM_OPTIONS3 = --enable-assert |
39 |
|
|
DAC2PM_OPTIONS = $(DAC2PM_OPTIONS3) |
40 |
|
|
DAC2PM_PL = $(MANAKAI_BIN_DIR)dac2pm.pl |
41 |
wakaba |
1.24 |
DAC2PM = $(PERL_) $(DAC2PM_PL) $(DAC2PM_OPTIONS) $(DIS_OPTIONS_ALL) |
42 |
wakaba |
1.1 |
|
43 |
wakaba |
1.21 |
UTIL_CORE_DAC_FILE = $(MANAKAI_LIB_DIR)Message/Util/core$(DAC_SUFFIX) |
44 |
wakaba |
1.1 |
|
45 |
wakaba |
1.32 |
DOM_FEATURE_DIS_FILES = DOMFeature$(DIS_SUFFIX) GenericLS$(DIS_SUFFIX) |
46 |
wakaba |
1.25 |
DOM_CORE_DIS_FILES = DOMMain.dis DOMCore.dis DOMXML.dis \ |
47 |
wakaba |
1.32 |
Tree$(DIS_SUFFIX) \ |
48 |
wakaba |
1.31 |
XDoctype$(DIS_SUFFIX) |
49 |
wakaba |
1.32 |
DOM_LS_DIS_FILES = SimpleLS$(DIS_SUFFIX) DOMLS$(DIS_SUFFIX) \ |
50 |
|
|
ManakaiDOMLS2003$(DIS_SUFFIX) |
51 |
wakaba |
1.30 |
XP_DIS_FILES = XMLParser$(DIS_SUFFIX) |
52 |
wakaba |
1.20 |
DOM_HTML_DIS_FILES = DOMHTML.dis DOMWebForms.dis |
53 |
wakaba |
1.25 |
DIS_FILES = $(DOM_FEATURE_DIS_FILES) $(DOM_CORE_DIS_FILES) \ |
54 |
wakaba |
1.30 |
$(DOM_LS_DIS_FILES) $(DOM_HTML_DIS_FILES) $(XP_DIS_FILES) |
55 |
wakaba |
1.9 |
|
56 |
wakaba |
1.20 |
GENERATED_FILES = \ |
57 |
wakaba |
1.32 |
feature$(DAC_SUFFIX) DOMFeature$(PM_SUFFIX) GenericLS$(PM_SUFFIX) \ |
58 |
wakaba |
1.25 |
core$(DAC_SUFFIX) DOMMain$(PM_SUFFIX) \ |
59 |
wakaba |
1.32 |
DOMCore$(PM_SUFFIX) DOMXML$(PM_SUFFIX) \ |
60 |
|
|
Tree$(PM_SUFFIX) \ |
61 |
wakaba |
1.31 |
XDoctype$(PM_SUFFIX) \ |
62 |
wakaba |
1.26 |
ls$(DAC_SUFFIX) SimpleLS$(PM_SUFFIX) ManakaiDOMLS2003$(PM_SUFFIX) \ |
63 |
wakaba |
1.32 |
DOMLS$(PM_SUFFIX) \ |
64 |
wakaba |
1.30 |
xp$(DAC_SUFFIX) XMLParser$(PM_SUFFIX) \ |
65 |
wakaba |
1.21 |
html$(DAC_SUFFIX) DOMHTML$(PM_SUFFIX) DOMWebForms$(PM_SUFFIX) |
66 |
wakaba |
1.25 |
GENERATED_DAC_FILES = feature$(DAC_SUFFIX) \ |
67 |
wakaba |
1.30 |
core$(DAC_SUFFIX) ls$(DAC_SUFFIX) html$(DAC_SUFFIX) xp$(DAC_SUFFIX) |
68 |
wakaba |
1.7 |
|
69 |
wakaba |
1.32 |
all: .core$(PM_SUFFIX) .html$(PM_SUFFIX) \ |
70 |
wakaba |
1.30 |
$(GENERATED_DAC_FILES) \ |
71 |
|
|
XMLParser$(PM_SUFFIX) |
72 |
wakaba |
1.7 |
|
73 |
wakaba |
1.25 |
feature$(DAC_SUFFIX): $(UTIL_CORE_DAC_FILE) $(DOM_FEATURE_DIS_FILES) $(DAC_PL) |
74 |
wakaba |
1.32 |
$(DAC)$@ --input-db-file-name="$<" GenericLS.dis |
75 |
wakaba |
1.25 |
|
76 |
|
|
core$(DAC_SUFFIX): feature$(DAC_SUFFIX) $(DOM_CORE_DIS_FILES) $(DAC_PL) |
77 |
wakaba |
1.32 |
$(DAC)$@ --input-db-file-name="$<" XDoctype.dis |
78 |
wakaba |
1.23 |
|
79 |
|
|
ls$(DAC_SUFFIX): core$(DAC_SUFFIX) $(DOM_LS_DIS_FILES) $(DAC_PL) |
80 |
wakaba |
1.26 |
$(DAC)$@.tmp.1 --input-db-file-name="$<" SimpleLS.dis |
81 |
wakaba |
1.32 |
$(DAC)$@.tmp.2 --input-db-file-name="$@.tmp.1" ManakaiDOMLS2003.dis |
82 |
|
|
$(DAC)$@ --input-db-file-name="$@.tmp.2" DOMLS.dis |
83 |
|
|
$(RM) $@.tmp.1 $@.tmp.2 |
84 |
wakaba |
1.14 |
|
85 |
wakaba |
1.30 |
xp$(DAC_SUFFIX): ls$(DAC_SUFFIX) $(XP_DIS_FILES) $(DAC_PL) |
86 |
|
|
$(DAC)$@ --input-db-file-name="$<" XMLParser.dis |
87 |
|
|
|
88 |
wakaba |
1.21 |
html$(DAC_SUFFIX): core$(DAC_SUFFIX) $(DOM_HTML_DIS_FILES) $(DAC_PL) |
89 |
wakaba |
1.20 |
$(DAC)$@ --input-db-file-name="$<" DOMHTML.dis |
90 |
wakaba |
1.19 |
|
91 |
wakaba |
1.27 |
$(DOM_FEATURE_DIS_FILES:$(DIS_SUFFIX)=$(PM_SUFFIX)): \ |
92 |
|
|
feature$(DAC_SUFFIX) $(DAC2PM_PL) |
93 |
|
|
$(DAC2PM) $< --module-uri="$(NS_MDOM)$(@:$(PM_SUFFIX)=)" \ |
94 |
|
|
--output-file-path="$@" |
95 |
|
|
$(PERL_CHK) $@ |
96 |
|
|
|
97 |
wakaba |
1.21 |
$(DOM_CORE_DIS_FILES:.dis=$(PM_SUFFIX)): core$(DAC_SUFFIX) $(DAC2PM_PL) |
98 |
|
|
$(DAC2PM) $< --module-uri="$(NS_MDOM)$(@:$(PM_SUFFIX)=)" \ |
99 |
|
|
--output-file-path="$@" |
100 |
wakaba |
1.19 |
$(PERL_CHK) $@ |
101 |
wakaba |
1.9 |
|
102 |
wakaba |
1.22 |
.core$(PM_SUFFIX): core$(DAC_SUFFIX) $(DAC2PM_PL) |
103 |
|
|
$(DAC2PM) $< \ |
104 |
|
|
--create-perl-module="$(NS_MDOM)DOMFeature DOMFeature$(PM_SUFFIX)" \ |
105 |
wakaba |
1.32 |
--create-perl-module="$(NS_MDOM)GenericLS GenericLS$(PM_SUFFIX)" \ |
106 |
wakaba |
1.22 |
--create-perl-module="$(NS_MDOM)DOMMain DOMMain$(PM_SUFFIX)" \ |
107 |
|
|
--create-perl-module="$(NS_MDOM)DOMCore DOMCore$(PM_SUFFIX)" \ |
108 |
wakaba |
1.29 |
--create-perl-module="$(NS_MDOM)Tree Tree$(PM_SUFFIX)" \ |
109 |
wakaba |
1.22 |
--create-perl-module="$(NS_MDOM)DOMXML DOMXML$(PM_SUFFIX)" \ |
110 |
wakaba |
1.32 |
--create-perl-module="$(NS_MDOM)XDoctype XDoctype$(PM_SUFFIX)" |
111 |
wakaba |
1.22 |
$(PERL_CHK) DOMFeature$(PM_SUFFIX) |
112 |
wakaba |
1.32 |
$(PERL_CHK) GenericLS$(PM_SUFFIX) |
113 |
wakaba |
1.22 |
$(PERL_CHK) DOMMain$(PM_SUFFIX) |
114 |
|
|
$(PERL_CHK) DOMCore$(PM_SUFFIX) |
115 |
wakaba |
1.29 |
$(PERL_CHK) Tree$(PM_SUFFIX) |
116 |
wakaba |
1.22 |
$(PERL_CHK) DOMXML$(PM_SUFFIX) |
117 |
wakaba |
1.31 |
$(PERL_CHK) XDoctype$(PM_SUFFIX) |
118 |
wakaba |
1.23 |
$(TOUCH) $@ |
119 |
wakaba |
1.31 |
## NOTE: When you modify this rule, update |../Util/Makefile|, too. |
120 |
wakaba |
1.23 |
|
121 |
wakaba |
1.26 |
$(DOM_LS_DIS_FILES:$(DIS_SUFFIX)=$(PM_SUFFIX)): ls$(DAC_SUFFIX) $(DAC2PM_PL) |
122 |
wakaba |
1.23 |
$(DAC2PM) $< --module-uri="$(NS_MDOM)$(@:$(PM_SUFFIX)=)" \ |
123 |
|
|
--output-file-path="$@" |
124 |
|
|
$(PERL_CHK) $@ |
125 |
|
|
|
126 |
wakaba |
1.30 |
$(XP_DIS_FILES:$(DIS_SUFFIX)=$(PM_SUFFIX)): xp$(DAC_SUFFIX) $(DAC2PM_PL) |
127 |
|
|
$(DAC2PM) $< --module-uri="$(NS_MDOM)$(@:$(PM_SUFFIX)=)" \ |
128 |
|
|
--output-file-path="$@" |
129 |
|
|
$(PERL_CHK) $@ |
130 |
|
|
|
131 |
wakaba |
1.21 |
$(DOM_HTML_DIS_FILES:.dis=$(PM_SUFFIX)): html$(DAC_SUFFIX) $(DAC2PM_PL) |
132 |
|
|
$(DAC2PM) $< --module-uri="$(NS_MDOM)$(@:$(PM_SUFFIX)=)" > $@ |
133 |
wakaba |
1.13 |
$(PERL_CHK) $@ |
134 |
wakaba |
1.12 |
|
135 |
wakaba |
1.25 |
feature-spec$(DAC_SUFFIX): feature$(DAC_SUFFIX) DOMFeature.dis $(DAC_PL) |
136 |
|
|
$(DAC)$@ --input-db-file-name="$<" DOMFeature.dis \ |
137 |
|
|
--for="$(NS_MANAKAIDOM)ForSpecLatest" |
138 |
|
|
|
139 |
wakaba |
1.20 |
# $(UTIL_CORE_DAC_FILE) |
140 |
wakaba |
1.21 |
$(MANAKAI_LIB_DIR)Message/Util/core$(DAC_SUFFIX): dummy |
141 |
|
|
$(CD) $(MANAKAI_LIB_DIR)Message/Util/ && $(MAKE) core$(DAC_SUFFIX) |
142 |
wakaba |
1.7 |
|
143 |
wakaba |
1.20 |
dummy: |
144 |
wakaba |
1.16 |
|
145 |
wakaba |
1.20 |
clean: |
146 |
wakaba |
1.22 |
$(RM) $(GENERATED_FILES) |
147 |
wakaba |
1.23 |
$(RM) .*.tmp *~ .*~ *.BAK .*.BAK |
148 |
wakaba |
1.32 |
$(RM) .core$(PM_SUFFIX) |
149 |
wakaba |
1.14 |
|
150 |
wakaba |
1.32 |
## $Date: 2006/01/07 12:30:53 $ |
151 |
wakaba |
1.22 |
## License: Public Domain. |