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 |
|
CD = cd |
7 |
|
MAKE = make |
8 |
RM = rm |
RM = rm |
9 |
PERL = perl -I$(MANAKAI_LIB_DIR) |
PERL = perl |
10 |
PERL_CHK = $(PERL) -c -w |
PERL_OPTIONS3 = -I$(MANAKAI_LIB_DIR) |
11 |
|
PERL_OPTIONS = $(PERL_OPTIONS3) |
12 |
DISC_PL = $(MANAKAI_BIN_DIR)disc.pl |
PERL_ = $(PERL) $(PERL_OPTIONS) |
13 |
DISC = $(PERL) $(DISC_PL) \ |
PERLC = $(PERL) -c -w |
14 |
-I=$(MANAKAI_LIB_MANAKAI_DIR) \ |
PERLC_OPTIONS3 = $(PERL_OPTIONS) |
15 |
-I=$(MANAKAI_LIB_DIR)Message/Util/Error/ \ |
PERLC_OPTIONS = $(PERLC_OPTIONS3) |
16 |
-I=$(MANAKAI_LIB_DIR)Message/DOM/ |
PERL_CHK = $(PERLC) $(PERLC_OPTIONS) |
|
CDIS2PM_OPTIONS = --enable-assert |
|
|
## TODO: Official release should remove this option. |
|
|
CDIS2PM_PL = ../../../bin/cdis2pm.pl |
|
|
CDIS2PM = $(PERL) $(CDIS2PM_PL) $(CDIS2PM_OPTIONS) |
|
|
|
|
|
DIS_FILES = ManakaiNode.dis |
|
|
GENERATED_FILES = mnode.cdis ManakaiNode.pm |
|
17 |
|
|
18 |
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\# |
19 |
|
NS_DIS = http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/DIS\# |
20 |
|
NS_UTIL = http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/ |
21 |
|
NS_UTIL_ERR = http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/Error/ |
22 |
|
NS_UTIL_DIS = http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/DIS\# |
23 |
|
|
24 |
|
DAC_PL = $(MANAKAI_BIN_DIR)dac.pl |
25 |
|
DAC = $(PERL_) $(DAC_PL) \ |
26 |
|
--search-path-catalog-file-name="$(MANAKAI_LIB_DIR)manakai/dis-catalog" \ |
27 |
|
--db-base-directory-path="$(MANAKAI_ROOT_DIR)" \ |
28 |
|
--output-file-name= |
29 |
|
|
30 |
|
DAC2PM_OPTIONS3 = --enable-assert |
31 |
|
DAC2PM_OPTIONS = $(DAC2PM_OPTIONS3) |
32 |
|
DAC2PM_PL = $(MANAKAI_BIN_DIR)dac2pm.pl |
33 |
|
DAC2PM = $(PERL_) $(DAC2PM_PL) $(DAC2PM_OPTIONS) |
34 |
|
|
35 |
|
CORE_DAC_FILE = $(MANAKAI_LIB_DIR)manakai/all.dac |
36 |
|
SWCFG_DAC_FILE = $(MANAKAI_LIB_DIR)Message/Markup/all.dac |
37 |
|
|
38 |
|
UTIL_CORE_DIS_FILES = ManakaiNode.dis Error/DOMException.dis Error/Core.dis |
39 |
|
DIS_CORE_DIS_FILES = DIS.dis PerlCode.dis |
40 |
|
DIS_DOC_DIS_FILES = DIS/DISDoc.dis DIS/DISDump.dis |
41 |
|
DIS_FILES = $(UTIL_CORE_DIS_FILES) $(DIS_CORE_DIS_FILES) \ |
42 |
|
$(DIS_DOC_DIS_FILES) |
43 |
|
|
44 |
|
GENERATED_FILES = \ |
45 |
|
core.dac ManakaiNode.pm Error/DOMException.pm \ |
46 |
|
discore.dac DIS.pm PerlCode.pm \ |
47 |
|
disdoc.dac DIS/DISDoc.pm DIS/DISDump.pm |
48 |
|
|
49 |
all: $(GENERATED_FILES) |
all: $(GENERATED_FILES) |
50 |
|
|
51 |
mnode.cdis: ManakaiNode.dis $(DISC_PL) |
core.dac: $(CORE_DAC_FILE) $(UTIL_CORE_DIS_FILES) $(DAC_PL) |
52 |
$(DISC) $< --output-file-name=$@ |
$(DAC)$@.1.tmp --input-db-file-name="$<" ManakaiNode.dis |
53 |
|
$(DAC)$@ --input-db-file-name="$@.1.tmp" Error/DOMException.dis |
54 |
|
$(RM) $@.1.tmp |
55 |
|
|
56 |
|
discore.dac: $(SWCFG_DAC_FILE) $(DIS_CORE_DIS_FILES) $(DAC_PL) |
57 |
|
$(DAC)$@ --input-db-file-name="$<" DIS.dis |
58 |
|
|
59 |
|
disdoc.dac: discore.dac $(DIS_DOC_DIS_FILES) $(DAC_PL) |
60 |
|
$(DAC)$@ --input-db-file-name="$<" DIS/DISDump.dis |
61 |
|
|
62 |
|
ManakaiNode.pm: core.dac $(DAC2PM_PL) |
63 |
|
$(DAC2PM) $< \ |
64 |
|
--module-uri="$(NS_UTIL)ManakaiNode" \ |
65 |
|
--output-file-path="$@" |
66 |
|
$(PERL_CHK) $@ |
67 |
|
|
68 |
|
DIS.pm: discore.dac $(DAC2PM_PL) |
69 |
|
$(DAC2PM) $< \ |
70 |
|
--module-uri="$(NS_UTIL)DIS" \ |
71 |
|
--output-file-path="$@" |
72 |
|
$(PERL_CHK) $@ |
73 |
|
|
74 |
|
PerlCode.pm: discore.dac $(DAC2PM_PL) |
75 |
|
$(DAC2PM) $< \ |
76 |
|
--module-uri="$(NS_UTIL)PerlCode" \ |
77 |
|
--output-file-path="$@" |
78 |
|
$(PERL_CHK) $@ |
79 |
|
|
80 |
ManakaiNode.pm: mnode.cdis $(CDIS2PM_PL) |
Error/DOMException.pm: core.dac $(DAC2PM_PL) |
81 |
$(CDIS2PM) $< --for="$(NS_MANAKAIDOM)Perl" \ |
$(DAC2PM) $< \ |
82 |
--module-name=ManakaiNode > $@ |
--module-uri="$(NS_UTIL_ERR)DOMException" \ |
83 |
|
--output-file-path="$@" |
84 |
$(PERL_CHK) $@ |
$(PERL_CHK) $@ |
85 |
|
|
86 |
|
DIS/DISDoc.pm: disdoc.dac $(DAC2PM_PL) |
87 |
|
$(DAC2PM) $< \ |
88 |
|
--module-uri="$(NS_UTIL_DIS)DISDoc" \ |
89 |
|
--output-file-path="$@" |
90 |
|
$(PERL_CHK) $@ |
91 |
|
|
92 |
|
DIS/DISDump.pm: disdoc.dac $(DAC2PM_PL) |
93 |
|
$(DAC2PM) $< \ |
94 |
|
--module-uri="$(NS_UTIL_DIS)DISDump" \ |
95 |
|
--output-file-path="$@" |
96 |
|
$(PERL_CHK) $@ |
97 |
|
|
98 |
|
# $(CORE_DAC_FILE) |
99 |
|
$(MANAKAI_LIB_DIR)manakai/all.dac: dummy |
100 |
|
$(CD) $(MANAKAI_LIB_DIR)manakai/ && $(MAKE) all.dac |
101 |
|
|
102 |
|
# $(SWCFG_DAC_FILE) |
103 |
|
$(MANAKAI_LIB_DIR)Message/Markup/all.dac: dummy |
104 |
|
$(CD) $(MANAKAI_LIB_DIR)Message/Markup/ && $(MAKE) all.dac |
105 |
|
|
106 |
|
dummy: |
107 |
|
|
108 |
clean: |
clean: |
109 |
$(RM) $(GENERATED_FILES) .*.tmp |
$(RM) $(GENERATED_FILES) .*.tmp |