1 |
MANAKAI_ROOT_DIR = ../../../ |
2 |
MANAKAI_BIN_DIR = $(MANAKAI_ROOT_DIR)bin/ |
3 |
MANAKAI_LIB_DIR = $(MANAKAI_ROOT_DIR)lib/ |
4 |
MANAKAI_LIB_MANAKAI_DIR = $(MANAKAI_LIB_DIR)manakai/ |
5 |
|
6 |
DIS_SUFFIX = .dis |
7 |
DAC_SUFFIX = .dae |
8 |
DAEM_SUFFIX = .daem |
9 |
PM_SUFFIX = .pm |
10 |
|
11 |
CD = cd |
12 |
MAKE = make |
13 |
RM = rm |
14 |
PERL = perl |
15 |
PERL_OPTIONS3 = -I$(MANAKAI_LIB_DIR) |
16 |
PERL_OPTIONS = $(PERL_OPTIONS3) |
17 |
PERL_ = $(PERL) $(PERL_OPTIONS) |
18 |
PERLC = $(PERL) -c -w |
19 |
PERLC_OPTIONS3 = $(PERL_OPTIONS) |
20 |
PERLC_OPTIONS = $(PERLC_OPTIONS3) |
21 |
PERL_CHK = $(PERLC) $(PERLC_OPTIONS) |
22 |
TOUCH = touch |
23 |
|
24 |
NS_MANAKAIDOM = http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom\# |
25 |
NS_MDOM = http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom\#ManakaiDOM. |
26 |
NS_MARKUP = http://suika.fam.cx/~wakaba/archive/2005/manakai/Markup\# |
27 |
NS_DIS = http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/DIS\# |
28 |
NS_UTIL = http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/ |
29 |
NS_UTIL_ERR = http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/Error/ |
30 |
NS_UTIL_DIS = http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/DIS\# |
31 |
|
32 |
DIS_OPTIONS = |
33 |
DIS_OPTIONS_ALL = $(DIS_OPTIONS) \ |
34 |
--search-path-catalog-file-name="$(MANAKAI_LIB_DIR)manakai/dis-catalog" \ |
35 |
--dis-file-suffix="$(DIS_SUFFIX)" \ |
36 |
--daem-file-suffix="$(DAEM_SUFFIX)" |
37 |
|
38 |
DAC_OPTIONS = |
39 |
DAC_PL = $(MANAKAI_BIN_DIR)dac.pl |
40 |
DAC = $(PERL_) $(DAC_PL) $(DAC_OPTIONS) $(DIS_OPTIONS_ALL) \ |
41 |
--db-base-directory-path="$(MANAKAI_ROOT_DIR)" \ |
42 |
--output-file-name= |
43 |
|
44 |
DAC2PM_OPTIONS3 = --enable-assert |
45 |
DAC2PM_OPTIONS = $(DAC2PM_OPTIONS3) |
46 |
DAC2PM_PL = $(MANAKAI_BIN_DIR)dac2pm.pl |
47 |
DAC2PM = $(PERL_) $(DAC2PM_PL) $(DAC2PM_OPTIONS) $(DIS_OPTIONS_ALL) |
48 |
|
49 |
CORE_DAC_FILE = $(MANAKAI_LIB_DIR)manakai/all$(DAC_SUFFIX) |
50 |
DOM_CORE_DAC_FILE = $(MANAKAI_LIB_DIR)Message/DOM/core$(DAC_SUFFIX) |
51 |
SWCFG_DAC_FILE = $(MANAKAI_LIB_DIR)Message/Markup/all$(DAC_SUFFIX) |
52 |
|
53 |
UTIL_CORE_DIS_FILES = ManakaiNode.dis Error/DOMException.dis Error/Core.dis |
54 |
DIS_CORE_DIS_FILES_ = DIS.dis PerlCode.dis |
55 |
DIS_CORE_DIS_FILES_DIS = DIS/Perl.dis DIS/Value.dis DIS/DNLite.dis |
56 |
DIS_CORE_DIS_FILES = $(DIS_CORE_DIS_FILES_) $(DIS_CORE_DIS_FILES_DIS) |
57 |
DIS_DOC_DIS_FILES = DIS/DISDoc.dis |
58 |
DIS_DUMP_DIS_FILES = DIS/DISDump.dis |
59 |
DIS_FILES = $(UTIL_CORE_DIS_FILES) $(DIS_CORE_DIS_FILES) \ |
60 |
$(DIS_DOC_DIS_FILES) $(DIS_DUMP_DIS_FILES) |
61 |
|
62 |
GENERATED_FILES = \ |
63 |
core$(DAC_SUFFIX) ManakaiNode$(PM_SUFFIX) Error/DOMException$(PM_SUFFIX) \ |
64 |
discore$(DAC_SUFFIX) DIS$(PM_SUFFIX) PerlCode$(PM_SUFFIX) \ |
65 |
DIS/Perl$(PM_SUFFIX) DIS/Value$(PM_SUFFIX) \ |
66 |
DIS/DNLite$(PM_SUFFIX) \ |
67 |
disdoc$(DAC_SUFFIX) DIS/DISDoc$(PM_SUFFIX) \ |
68 |
disdump$(DAC_SUFFIX) DIS/DISDump$(PM_SUFFIX) |
69 |
GENERATED_DAC_FILES = core$(DAC_SUFFIX) discore$(DAC_SUFFIX) disdoc$(DAC_SUFFIX) |
70 |
|
71 |
all: .discore$(PM_SUFFIX) $(GENERATED_FILES) |
72 |
|
73 |
core$(DAC_SUFFIX): $(CORE_DAC_FILE) $(UTIL_CORE_DIS_FILES) $(DAC_PL) |
74 |
$(DAC)$@.1.tmp --input-db-file-name="$<" ManakaiNode.dis |
75 |
$(DAC)$@ --input-db-file-name="$@.1.tmp" Error/DOMException.dis |
76 |
$(RM) $@.1.tmp |
77 |
|
78 |
discore$(DAC_SUFFIX): $(SWCFG_DAC_FILE) $(DIS_CORE_DIS_FILES) $(DAC_PL) |
79 |
$(DAC)$@ --input-db-file-name="$<" DIS/DNLite.dis |
80 |
|
81 |
disdoc$(DAC_SUFFIX): discore$(DAC_SUFFIX) $(DIS_DOC_DIS_FILES) $(DAC_PL) |
82 |
$(DAC)$@ --input-db-file-name="$<" DIS/DISDoc.dis |
83 |
|
84 |
disdump$(DAC_SUFFIX): $(DOM_CORE_DAC_FILE) $(DIS_DUMP_DIS_FILES) $(DAC_PL) |
85 |
$(DAC)$@ --input-db-file-name="$<" DIS/DISDump.dis |
86 |
|
87 |
ManakaiNode$(PM_SUFFIX): core$(DAC_SUFFIX) $(DAC2PM_PL) |
88 |
$(DAC2PM) $< \ |
89 |
--module-uri="$(NS_UTIL)ManakaiNode" \ |
90 |
--output-file-path="$@" |
91 |
$(PERL_CHK) $@ |
92 |
|
93 |
Error/DOMException$(PM_SUFFIX): core$(DAC_SUFFIX) $(DAC2PM_PL) |
94 |
$(DAC2PM) $< \ |
95 |
--module-uri="$(NS_UTIL_ERR)DOMException" \ |
96 |
--output-file-path="$@" |
97 |
$(PERL_CHK) $@ |
98 |
|
99 |
$(DIS_CORE_DIS_FILES_:.dis=$(PM_SUFFIX)): %$(PM_SUFFIX): discore$(DAC_SUFFIX) \ |
100 |
$(DAC2PM_PL) |
101 |
$(DAC2PM) $< \ |
102 |
--module-uri="$(NS_UTIL)$*" \ |
103 |
--output-file-path="$@" |
104 |
$(PERL_CHK) $@ |
105 |
|
106 |
$(DIS_CORE_DIS_FILES_DIS:.dis=$(PM_SUFFIX)): %$(PM_SUFFIX): \ |
107 |
discore$(DAC_SUFFIX) $(DAC2PM_PL) |
108 |
$(DAC2PM) $< \ |
109 |
--module-uri="$(NS_UTIL_DIS)$(*:DIS/%=%)" \ |
110 |
--output-file-path="$@" |
111 |
$(PERL_CHK) $@ |
112 |
|
113 |
.discore$(PM_SUFFIX): discore$(DAC_SUFFIX) $(DAC2PM_PL) |
114 |
$(DAC2PM) $< \ |
115 |
--create-perl-module="$(NS_UTIL)DIS DIS$(PM_SUFFIX)" \ |
116 |
--create-perl-module="$(NS_UTIL)PerlCode PerlCode$(PM_SUFFIX)" \ |
117 |
--create-perl-module="$(NS_UTIL_DIS)Value DIS/Value$(PM_SUFFIX)" \ |
118 |
--create-perl-module="$(NS_UTIL_DIS)Perl DIS/Perl$(PM_SUFFIX)" \ |
119 |
--create-perl-module="$(NS_UTIL_DIS)DNLite DIS/DNLite$(PM_SUFFIX)" |
120 |
$(PERL_CHK) DIS$(PM_SUFFIX) |
121 |
$(PERL_CHK) PerlCode$(PM_SUFFIX) |
122 |
$(PERL_CHK) DIS/Value$(PM_SUFFIX) |
123 |
$(PERL_CHK) DIS/Perl$(PM_SUFFIX) |
124 |
$(PERL_CHK) DIS/DNLite$(PM_SUFFIX) |
125 |
$(TOUCH) $@ |
126 |
|
127 |
.discore-all$(PM_SUFFIX): discore$(DAC_SUFFIX) $(DAC2PM_PL) |
128 |
$(DAC2PM) $< \ |
129 |
--create-perl-module="$(NS_UTIL)ManakaiNode ManakaiNode$(PM_SUFFIX)" \ |
130 |
--create-perl-module="$(NS_UTIL_ERR)DOMException Error/DOMException$(PM_SUFFIX)" \ |
131 |
--create-perl-module="$(NS_MARKUP)SuikaWikiConfig21 ../Markup/SuikaWikiConfig21$(PM_SUFFIX)" \ |
132 |
--create-perl-module="$(NS_UTIL)DIS DIS$(PM_SUFFIX)" \ |
133 |
--create-perl-module="$(NS_UTIL)PerlCode PerlCode$(PM_SUFFIX)" \ |
134 |
--create-perl-module="$(NS_UTIL_DIS)Value DIS/Value$(PM_SUFFIX)" \ |
135 |
--create-perl-module="$(NS_UTIL_DIS)Perl DIS/Perl$(PM_SUFFIX)" \ |
136 |
--create-perl-module="$(NS_UTIL_DIS)DNLite DIS/DNLite$(PM_SUFFIX)" |
137 |
$(PERL_CHK) ../Markup/SuikaWikiConfig21$(PM_SUFFIX) |
138 |
$(PERL_CHK) DIS$(PM_SUFFIX) |
139 |
$(PERL_CHK) PerlCode$(PM_SUFFIX) |
140 |
$(PERL_CHK) DIS/Value$(PM_SUFFIX) |
141 |
$(PERL_CHK) DIS/Perl$(PM_SUFFIX) |
142 |
$(PERL_CHK) DIS/DNLite$(PM_SUFFIX) |
143 |
$(DAC2PM) $< \ |
144 |
--create-perl-module="$(NS_MDOM)DOMFeature ../DOM/DOMFeature$(PM_SUFFIX)" \ |
145 |
--create-perl-module="$(NS_MDOM)DOMMain ../DOM/DOMMain$(PM_SUFFIX)" \ |
146 |
--create-perl-module="$(NS_MDOM)DOMCore ../DOM/DOMCore$(PM_SUFFIX)" \ |
147 |
--create-perl-module="$(NS_MDOM)DOMXML ../DOM/DOMXML$(PM_SUFFIX)" \ |
148 |
--create-perl-module="$(NS_MDOM)DOMLS ../DOM/DOMLS$(PM_SUFFIX)" \ |
149 |
--create-perl-module="$(NS_MDOM)GenericLS ../DOM/GenericLS$(PM_SUFFIX)" |
150 |
$(PERL_CHK) ../DOM/DOMFeature$(PM_SUFFIX) |
151 |
$(PERL_CHK) ../DOM/DOMMain$(PM_SUFFIX) |
152 |
$(PERL_CHK) ../DOM/DOMCore$(PM_SUFFIX) |
153 |
$(PERL_CHK) ../DOM/DOMXML$(PM_SUFFIX) |
154 |
$(PERL_CHK) ../DOM/DOMLS$(PM_SUFFIX) |
155 |
$(PERL_CHK) ../DOM/GenericLS$(PM_SUFFIX) |
156 |
$(TOUCH) $@ |
157 |
|
158 |
DIS/DISDoc$(PM_SUFFIX): disdoc$(DAC_SUFFIX) $(DAC2PM_PL) |
159 |
$(DAC2PM) $< \ |
160 |
--module-uri="$(NS_UTIL_DIS)DISDoc" \ |
161 |
--output-file-path="$@" |
162 |
$(PERL_CHK) $@ |
163 |
|
164 |
DIS/DISDump$(PM_SUFFIX): disdump$(DAC_SUFFIX) $(DAC2PM_PL) |
165 |
$(DAC2PM) $< \ |
166 |
--module-uri="$(NS_UTIL_DIS)DISDump" \ |
167 |
--output-file-path="$@" |
168 |
$(PERL_CHK) $@ |
169 |
|
170 |
# $(CORE_DAC_FILE) |
171 |
$(MANAKAI_LIB_DIR)manakai/all$(DAC_SUFFIX): dummy |
172 |
$(CD) $(MANAKAI_LIB_DIR)manakai/ && $(MAKE) all$(DAC_SUFFIX) |
173 |
|
174 |
# $(SWCFG_DAC_FILE) |
175 |
$(MANAKAI_LIB_DIR)Message/Markup/all$(DAC_SUFFIX): dummy |
176 |
$(CD) $(MANAKAI_LIB_DIR)Message/Markup/ && $(MAKE) all$(DAC_SUFFIX) |
177 |
|
178 |
dummy: |
179 |
|
180 |
clean: |
181 |
$(RM) $(GENERATED_FILES) |
182 |
$(RM) .*.tmp .discore$(PM_SUFFIX) .discore-all$(PM_SUFFIX) |