1 |
wakaba |
1.1 |
MANAKAI_ROOT_DIR = ../ |
2 |
|
|
MANAKAI_LIB_DIR = $(MANAKAI_ROOT_DIR)lib/ |
3 |
|
|
MANAKAI_BIN_DIR = $(MANAKAI_ROOT_DIR)bin/ |
4 |
|
|
TEMP_LIB_DIR = $(MANAKAI_LIB_DIR).phase1.tmp/ |
5 |
|
|
TEMP_LIB2_DIR = $(MANAKAI_LIB_DIR).phase2.tmp/ |
6 |
|
|
|
7 |
|
|
NS_MDOM = http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom\#ManakaiDOM. |
8 |
|
|
NS_MARKUP = http://suika.fam.cx/~wakaba/archive/2005/manakai/Markup\# |
9 |
|
|
NS_UTIL = http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/ |
10 |
|
|
NS_UTIL_ERR = http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/Error/ |
11 |
|
|
|
12 |
|
|
MKDIR = mkdir |
13 |
|
|
RM = rm |
14 |
|
|
|
15 |
|
|
PERL = perl |
16 |
|
|
PERL1 = $(PERL) -I$(MANAKAI_LIB_DIR) |
17 |
|
|
PERL1_CHK = $(PERL) -I$(TEMP_LIB_DIR) -I$(MANAKAI_LIB_DIR) -c -w |
18 |
|
|
PERL2 = $(PERL) -I$(TEMP_LIB_DIR) -I$(MANAKAI_LIB_DIR) |
19 |
|
|
PERL2_CHK = $(PERL) -I$(TEMP_LIB2_DIR) -I$(TEMP_LIB_DIR) -I$(MANAKAI_LIB_DIR) |
20 |
|
|
|
21 |
|
|
DISC_PL = $(MANAKAI_BIN_DIR)disc.pl |
22 |
|
|
DISC = $(PERL1) $(DISC_PL) \ |
23 |
|
|
-I=$(MANAKAI_LIB_DIR)manakai/ \ |
24 |
|
|
-I=$(MANAKAI_LIB_DIR)Message/Util/ \ |
25 |
|
|
-I=$(MANAKAI_LIB_DIR)Message/Util/Error/ \ |
26 |
|
|
-I=$(MANAKAI_LIB_DIR)Message/Markup/ \ |
27 |
|
|
-I=$(MANAKAI_LIB_DIR)Message/DOM/ |
28 |
|
|
CDIS2PM_OPTIONS = |
29 |
|
|
CDIS2PM_PL = $(MANAKAI_BIN_DIR)cdis2pm.pl |
30 |
|
|
CDIS2PM = $(PERL1) $(CDIS2PM_PL) $(CDIS2PM_OPTIONS) |
31 |
|
|
|
32 |
|
|
DAC_PL = $(MANAKAI_BIN_DIR)dac.pl |
33 |
|
|
DAC = $(PERL2) \ |
34 |
|
|
-MMessage::Util::Error::DOMException \ |
35 |
|
|
$(DAC_PL) \ |
36 |
|
|
--search-path-catalog-file-name="$(MANAKAI_LIB_DIR)manakai/dis-catalog" \ |
37 |
|
|
--db-base-directory-path="$(MANAKAI_ROOT_DIR)" \ |
38 |
|
|
--output-file-name= |
39 |
|
|
|
40 |
|
|
DAC2PM_OPTIONS = |
41 |
|
|
DAC2PM_PL = $(MANAKAI_BIN_DIR)dac2pm.pl |
42 |
|
|
DAC2PM = $(PERL2) \ |
43 |
|
|
-MMessage::Util::Error::DOMException \ |
44 |
|
|
$(DAC2PM_PL) $(DAC2PM_OPTIONS) |
45 |
|
|
|
46 |
|
|
DIS_FILES_FOR_DOMMETAIMPL = \ |
47 |
|
|
$(MANAKAI_LIB_DIR)Message/DOM/DOMBoot.dis \ |
48 |
|
|
$(MANAKAI_LIB_DIR)Message/DOM/DOMMetaImpl.dis \ |
49 |
|
|
$(MANAKAI_LIB_DIR)Message/Util/ManakaiNode.dis \ |
50 |
|
|
$(MANAKAI_LIB_DIR)manakai/DISCore.dis \ |
51 |
|
|
$(MANAKAI_LIB_DIR)manakai/DISRDF.dis \ |
52 |
|
|
$(MANAKAI_LIB_DIR)manakai/DISLang.dis \ |
53 |
|
|
$(MANAKAI_LIB_DIR)manakai/DISIDL.dis \ |
54 |
|
|
$(MANAKAI_LIB_DIR)manakai/DISPerl.dis \ |
55 |
|
|
$(MANAKAI_LIB_DIR)manakai/XML.dis |
56 |
|
|
## NOTE: DOMBoot.dis must be first |
57 |
|
|
|
58 |
|
|
DIS_FILES_FOR_DIS = \ |
59 |
|
|
$(MANAKAI_LIB_DIR)Message/Util/DIS.dis \ |
60 |
|
|
$(MANAKAI_LIB_DIR)Message/Markup/SuikaWikiConfig21.dis \ |
61 |
|
|
$(MANAKAI_LIB_DIR)Message/Util/Error/DOMException.dis \ |
62 |
|
|
$(MANAKAI_LIB_DIR)Message/Util/PerlCode.dis |
63 |
|
|
## NOTE: DIS.dis must be first |
64 |
|
|
|
65 |
wakaba |
1.2 |
PHASE1_PM_FILES = \ |
66 |
wakaba |
1.1 |
$(TEMP_LIB_DIR)Message/Util/ManakaiNode.pm \ |
67 |
|
|
$(TEMP_LIB_DIR)Message/DOM/DOMMetaImpl.pm \ |
68 |
|
|
$(TEMP_LIB_DIR)Message/Markup/SuikaWikiConfig21.pm \ |
69 |
|
|
$(TEMP_LIB_DIR)Message/Util/Error/DOMException.pm \ |
70 |
|
|
$(TEMP_LIB_DIR)Message/Util/PerlCode.pm \ |
71 |
wakaba |
1.2 |
$(TEMP_LIB_DIR)Message/Util/DIS.pm |
72 |
|
|
|
73 |
|
|
GENERATED_FILES = $(TEMP_LIB_DIR) $(PHASE1_PM_FILES) \ |
74 |
wakaba |
1.1 |
\ |
75 |
|
|
$(TEMP_LIB2_DIR) \ |
76 |
|
|
$(TEMP_LIB2_DIR)Message/Util/ManakaiNode.pm \ |
77 |
|
|
$(TEMP_LIB2_DIR)Message/DOM/DOMMetaImpl.pm \ |
78 |
|
|
$(TEMP_LIB2_DIR)Message/Markup/SuikaWikiConfig21.pm \ |
79 |
|
|
$(TEMP_LIB2_DIR)Message/Util/Error/DOMException.pm \ |
80 |
|
|
$(TEMP_LIB2_DIR)Message/Util/PerlCode.pm \ |
81 |
|
|
$(TEMP_LIB2_DIR)Message/Util/DIS.pm |
82 |
|
|
|
83 |
|
|
all: $(GENERATED_FILES) |
84 |
|
|
|
85 |
|
|
## Phase 1 - Making Perl modules by old disc and cdis2pm tools |
86 |
|
|
|
87 |
|
|
$(TEMP_LIB_DIR): |
88 |
|
|
$(MKDIR) -p $(TEMP_LIB_DIR)Message/Util/Error |
89 |
|
|
$(MKDIR) -p $(TEMP_LIB_DIR)Message/DOM |
90 |
|
|
$(MKDIR) -p $(TEMP_LIB_DIR)Message/Markup |
91 |
|
|
|
92 |
|
|
$(TEMP_LIB_DIR)dom.cdis: $(DIS_FILES_FOR_DOMMETAIMPL) $(DISC_PL) |
93 |
|
|
$(DISC) $< --output-file-name="$@" |
94 |
|
|
|
95 |
|
|
$(TEMP_LIB_DIR)dis.cdis: $(DIS_FILES_FOR_DIS) \ |
96 |
|
|
$(TEMP_LIB_DIR)dom.cdis $(DISC_PL) |
97 |
|
|
$(DISC) $< --input-cdis-file-name="$(TEMP_LIB_DIR)dom.cdis" \ |
98 |
|
|
--output-file-name="$@" |
99 |
|
|
|
100 |
|
|
$(TEMP_LIB_DIR)Message/DOM/DOMMetaImpl.pm: $(TEMP_LIB_DIR)dom.cdis $(CDIS2PM_PL) |
101 |
|
|
$(CDIS2PM) $< --module-name=DOMMetaImpl > $@ |
102 |
|
|
$(PERL1_CHK) $@ |
103 |
|
|
|
104 |
|
|
$(TEMP_LIB_DIR)Message/Util/ManakaiNode.pm: $(TEMP_LIB_DIR)dom.cdis $(CDIS2PM_PL) |
105 |
|
|
$(CDIS2PM) $< --module-name=ManakaiNode > $@ |
106 |
|
|
$(PERL1_CHK) $@ |
107 |
|
|
|
108 |
|
|
$(TEMP_LIB_DIR)Message/Util/DIS.pm: $(TEMP_LIB_DIR)dis.cdis $(CDIS2PM_PL) |
109 |
|
|
$(CDIS2PM) $< --module-name=DIS > $@ |
110 |
|
|
$(PERL1_CHK) $@ |
111 |
|
|
|
112 |
|
|
$(TEMP_LIB_DIR)Message/Util/PerlCode.pm: $(TEMP_LIB_DIR)dis.cdis $(CDIS2PM_PL) |
113 |
|
|
$(CDIS2PM) $< --module-name=PerlCode > $@ |
114 |
|
|
$(PERL1_CHK) $@ |
115 |
|
|
|
116 |
|
|
$(TEMP_LIB_DIR)Message/Util/Error/DOMException.pm: $(TEMP_LIB_DIR)dis.cdis \ |
117 |
|
|
$(CDIS2PM_PL) |
118 |
|
|
$(CDIS2PM) $< --module-name=DOMException > $@ |
119 |
|
|
$(PERL1_CHK) $@ |
120 |
|
|
|
121 |
|
|
$(TEMP_LIB_DIR)Message/Markup/SuikaWikiConfig21.pm: $(TEMP_LIB_DIR)dis.cdis \ |
122 |
|
|
$(CDIS2PM_PL) |
123 |
|
|
$(CDIS2PM) $< --module-name=SuikaWikiConfig21 > $@ |
124 |
|
|
$(PERL1_CHK) $@ |
125 |
|
|
|
126 |
|
|
## Phase 2 - Making Perl modules by dac tools generated |
127 |
|
|
## by old disc and cdis2pm tools |
128 |
|
|
|
129 |
|
|
$(TEMP_LIB2_DIR): |
130 |
|
|
$(MKDIR) -p $(TEMP_LIB2_DIR)Message/Util/Error |
131 |
|
|
$(MKDIR) -p $(TEMP_LIB2_DIR)Message/DOM |
132 |
|
|
$(MKDIR) -p $(TEMP_LIB2_DIR)Message/Markup |
133 |
|
|
|
134 |
wakaba |
1.2 |
$(TEMP_LIB2_DIR)dom.dac: $(DIS_FILES_FOR_DOMMETAIMPL) \ |
135 |
|
|
$(DAC_PL) $(PHASE1_PM_FILES) |
136 |
wakaba |
1.1 |
$(DAC)$@ $< |
137 |
|
|
|
138 |
|
|
$(TEMP_LIB2_DIR)dis.dac: $(DIS_FILES_FOR_DIS) $(TEMP_LIB2_DIR)dom.dac $(DAC_PL) |
139 |
|
|
$(DAC)$@ --input-db-file-name="$(TEMP_LIB2_DIR)dom.dac" $< |
140 |
|
|
|
141 |
|
|
$(TEMP_LIB2_DIR)Message/DOM/DOMMetaImpl.pm: \ |
142 |
|
|
$(TEMP_LIB2_DIR)dom.dac $(DAC2PM_PL) |
143 |
|
|
$(DAC2PM) $< --module-uri="$(NS_MDOM)DOMMetaImpl" > $@ |
144 |
|
|
$(PERL2_CHK) $@ |
145 |
|
|
|
146 |
|
|
$(TEMP_LIB2_DIR)Message/Markup/SuikaWikiConfig21.pm: \ |
147 |
|
|
$(TEMP_LIB2_DIR)dis.dac $(DAC2PM_PL) |
148 |
|
|
$(DAC2PM) $< --module-uri="$(NS_MARKUP)SuikaWikiConfig21" > $@ |
149 |
|
|
$(PERL2_CHK) $@ |
150 |
|
|
|
151 |
|
|
$(TEMP_LIB2_DIR)Message/Util/ManakaiNode.pm: \ |
152 |
|
|
$(TEMP_LIB2_DIR)dom.dac $(DAC2PM_PL) |
153 |
|
|
$(DAC2PM) $< --module-uri="$(NS_UTIL)ManakaiNode" > $@ |
154 |
|
|
$(PERL2_CHK) $@ |
155 |
|
|
|
156 |
|
|
$(TEMP_LIB2_DIR)Message/Util/DIS.pm: \ |
157 |
|
|
$(TEMP_LIB2_DIR)dis.dac $(DAC2PM_PL) |
158 |
|
|
$(DAC2PM) $< --module-uri="$(NS_UTIL)DIS" > $@ |
159 |
|
|
$(PERL2_CHK) $@ |
160 |
|
|
|
161 |
|
|
$(TEMP_LIB2_DIR)Message/Util/PerlCode.pm: \ |
162 |
|
|
$(TEMP_LIB2_DIR)dis.dac $(DAC2PM_PL) |
163 |
|
|
$(DAC2PM) $< --module-uri="$(NS_UTIL)PerlCode" > $@ |
164 |
|
|
$(PERL2_CHK) $@ |
165 |
|
|
|
166 |
|
|
$(TEMP_LIB2_DIR)Message/Util/Error/DOMException.pm: \ |
167 |
|
|
$(TEMP_LIB2_DIR)dis.dac $(DAC2PM_PL) |
168 |
|
|
$(DAC2PM) $< --module-uri="$(NS_UTIL_ERR)DOMException" > $@ |
169 |
|
|
$(PERL2_CHK) $@ |
170 |
|
|
|
171 |
|
|
## Phase 3 - Making Perl modules by dac tools generated by dac tools |
172 |
|
|
|
173 |
|
|
## Misc. |
174 |
|
|
|
175 |
|
|
clean: |
176 |
|
|
$(RM) -frv $(TEMP_LIB_DIR) |
177 |
|
|
$(RM) -fv *~ .*~ *.BAK .*.BAK |