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