1 |
wakaba |
1.3 |
MANAKAI_ROOT_DIR = ../ |
2 |
|
|
MANAKAI_BIN_DIR = $(MANAKAI_ROOT_DIR)bin/ |
3 |
|
|
MANAKAI_LIB_DIR = $(MANAKAI_ROOT_DIR)lib/ |
4 |
|
|
MANAKAI_TEST_DIR = $(MANAKAI_ROOT_DIR)t/ |
5 |
|
|
|
6 |
|
|
DIS_SUFFIX = .dis |
7 |
|
|
DAC_SUFFIX = .dae |
8 |
|
|
DAEM_SUFFIX = .daem |
9 |
wakaba |
1.10 |
PM_SUFFIX = .pm |
10 |
wakaba |
1.3 |
|
11 |
wakaba |
1.4 |
CD = cd |
12 |
|
|
MAKE = make |
13 |
wakaba |
1.1 |
MKDIR = mkdir -p |
14 |
|
|
|
15 |
wakaba |
1.2 |
RM = rm |
16 |
|
|
RMALL = $(RM) -fv |
17 |
|
|
|
18 |
wakaba |
1.1 |
TEST_VERBOSE = 0 |
19 |
|
|
INST_ARCHLIB = $(MANAKAI_ROOT_DIR)blib/arch |
20 |
|
|
INST_LIB = $(MANAKAI_ROOT_DIR)blib/lib |
21 |
|
|
|
22 |
wakaba |
1.3 |
PERL_OPTIONS = |
23 |
|
|
PERL = perl |
24 |
|
|
PERL_ = $(PERL) $(PERL_OPTIONS) -I$(MANAKAI_LIB_DIR) |
25 |
wakaba |
1.1 |
PERLC = $(PERL) -c |
26 |
wakaba |
1.3 |
PERLC_ = $(PERLC) $(PERL_OPTIONS) -I$(MANAKAI_LIB_DIR) |
27 |
|
|
PERL_TEST_ = $(PERL) \ |
28 |
|
|
$(PERL_OPTIONS) -I$(MANAKAI_LIB_DIR) \ |
29 |
|
|
-MExtUtils::Command::MM \ |
30 |
|
|
-e "test_harness ($(TEST_VERBOSE), '$(INST_LIB)', \ |
31 |
wakaba |
1.1 |
'$(INST_ARCHLIB)')" |
32 |
|
|
|
33 |
wakaba |
1.3 |
DIS_OPTIONS = |
34 |
|
|
DIS_OPTIONS_ALL = $(DIS_OPTIONS) \ |
35 |
|
|
--search-path-catalog-file-name="$(MANAKAI_LIB_DIR)manakai/dis-catalog" \ |
36 |
|
|
--dis-file-suffix="$(DIS_SUFFIX)" \ |
37 |
|
|
--daem-file-suffix="$(DAEM_SUFFIX)" |
38 |
|
|
|
39 |
wakaba |
1.1 |
DOMTEST_TESTS_DIR = $(MANAKAI_ROOT_DIR)../domts/tests/ |
40 |
wakaba |
1.3 |
DOMTEST_PERL_DIR = $(MANAKAI_TEST_DIR)dom/ |
41 |
wakaba |
1.1 |
DOMTEST_FILE = *.xml |
42 |
|
|
|
43 |
wakaba |
1.3 |
DOMTS2PERL_PL = $(MANAKAI_BIN_DIR)domts2perl.pl |
44 |
|
|
DOMTS2PERL = $(PERL_) -I$(MANAKAI_BIN_DIR) $(DOMTS2PERL_PL) |
45 |
|
|
DOMTEST2PERL_PL = $(MANAKAI_BIN_DIR)domtest2perl.pl |
46 |
wakaba |
1.1 |
|
47 |
wakaba |
1.4 |
DAC2TEST_OPTIONS = |
48 |
|
|
DAC2TEST_PL = $(MANAKAI_BIN_DIR)dac2test.pl |
49 |
|
|
DAC2TEST = $(PERL_) $(DAC2TEST_PL) $(DAC2TEST_OPTIONS) $(DIS_OPTIONS_ALL) |
50 |
|
|
|
51 |
|
|
DOM_FEATURE_DAC = $(MANAKAI_LIB_DIR)Message/DOM/feature$(DAC_SUFFIX) |
52 |
|
|
DOM_CORE_DAC = $(MANAKAI_LIB_DIR)Message/DOM/core$(DAC_SUFFIX) |
53 |
wakaba |
1.5 |
DOM_LS_DAC = $(MANAKAI_LIB_DIR)Message/DOM/ls$(DAC_SUFFIX) |
54 |
wakaba |
1.9 |
DOM_XP_DAC = $(MANAKAI_LIB_DIR)Message/DOM/xp$(DAC_SUFFIX) |
55 |
|
|
DOM_DAC_FILES = $(DOM_FEATURE_DAC) $(DOM_CORE_DAC) $(DOM_LS_DAC) $(DOM_XP_DAC) |
56 |
wakaba |
1.5 |
|
57 |
wakaba |
1.10 |
UTIL_TEST_DAC = $(MANAKAI_LIB_DIR)Message/Util/coretest$(DAC_SUFFIX) |
58 |
|
|
UTIL_MNTEST_PM = $(MANAKAI_LIB_DIR)Message/Util/ManakaiNodeTest$(PM_SUFFIX) |
59 |
wakaba |
1.5 |
UTIL_PC_DAC = $(MANAKAI_LIB_DIR)Message/Util/pc$(DAC_SUFFIX) |
60 |
wakaba |
1.6 |
DIS_CORE_DAC = $(MANAKAI_LIB_DIR)Message/Util/discore$(DAC_SUFFIX) |
61 |
wakaba |
1.4 |
|
62 |
|
|
NS_MDOM = http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom\#ManakaiDOM. |
63 |
|
|
NS_MANAKAIDOM = http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom\# |
64 |
wakaba |
1.5 |
NS_UTIL = http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/ |
65 |
wakaba |
1.6 |
NS_DIS = http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/DIS\# |
66 |
wakaba |
1.4 |
|
67 |
wakaba |
1.10 |
GENERATED_FILES = \ |
68 |
|
|
util-mntest.t \ |
69 |
|
|
util-perlcode.t dom-feature.t dom-tree.t dom-genericls.t \ |
70 |
wakaba |
1.9 |
dom-core.t dom-xdoctype.t dom-xmlparser.t \ |
71 |
wakaba |
1.6 |
dom-mdomls2003.t util-dis-dnlite.t |
72 |
wakaba |
1.4 |
|
73 |
|
|
all: $(GENERATED_FILES) |
74 |
|
|
|
75 |
wakaba |
1.1 |
dom1core-perl: $(DOMTS2PERL_PL) |
76 |
|
|
$(MKDIR) $(DOMTEST_PERL_DIR)level1/core/ |
77 |
wakaba |
1.3 |
$(DOMTS2PERL) --test-directory="$(DOMTEST_TESTS_DIR)level1/core/" \ |
78 |
|
|
--output-directory="$(DOMTEST_PERL_DIR)level1/core/" \ |
79 |
|
|
--domtest2perl-path="$(DOMTEST2PERL_PL)" |
80 |
wakaba |
1.1 |
|
81 |
|
|
dom1core: |
82 |
|
|
MANAKAI_DOMTEST_FILE_DIR=$(DOMTEST_TESTS_DIR)level1/core/files/ \ |
83 |
wakaba |
1.3 |
$(PERL_TEST_) $(DOMTEST_PERL_DIR)level1/core/$(DOMTEST_FILE).pl |
84 |
wakaba |
1.2 |
|
85 |
wakaba |
1.8 |
test-module-all: test-module-dom test-module-util |
86 |
|
|
|
87 |
|
|
test-module-dom: \ |
88 |
|
|
dom-feature.t \ |
89 |
|
|
dom-core.t dom-tree.t dom-xdoctype.t \ |
90 |
|
|
dom-genericls.t \ |
91 |
wakaba |
1.9 |
dom-mdomls2003.t dom-xmlparser.t |
92 |
wakaba |
1.8 |
$(PERL_TEST_) dom-*.t |
93 |
|
|
|
94 |
wakaba |
1.4 |
dom-feature.t: $(DOM_FEATURE_DAC) $(DAC2TEST_PL) |
95 |
|
|
$(DAC2TEST) $< --source-module="$(NS_MDOM)DOMFeature" > $@ |
96 |
|
|
|
97 |
|
|
dom-genericls.t: $(DOM_CORE_DAC) $(DAC2TEST_PL) |
98 |
|
|
$(DAC2TEST) $< --source-module="$(NS_MDOM)GenericLS" > $@ |
99 |
wakaba |
1.7 |
|
100 |
|
|
dom-tree.t: $(DOM_CORE_DAC) $(DAC2TEST_PL) |
101 |
|
|
$(DAC2TEST) $< --source-module="$(NS_MDOM)Tree" > $@ |
102 |
wakaba |
1.4 |
|
103 |
wakaba |
1.8 |
dom-core.t: $(DOM_CORE_DAC) $(DAC2TEST_PL) |
104 |
|
|
$(DAC2TEST) $< --source-module="$(NS_MDOM)DOMCore" > $@ |
105 |
|
|
|
106 |
|
|
dom-xdoctype.t: $(DOM_CORE_DAC) $(DAC2TEST_PL) |
107 |
|
|
$(DAC2TEST) $< --source-module="$(NS_MDOM)XDoctype" > $@ |
108 |
|
|
|
109 |
wakaba |
1.5 |
dom-mdomls2003.t: $(DOM_LS_DAC) $(DAC2TEST_PL) |
110 |
|
|
$(DAC2TEST) $< --source-module="$(NS_MDOM)ManakaiDOMLS2003" > $@ |
111 |
wakaba |
1.9 |
|
112 |
|
|
dom-xmlparser.t: $(DOM_XP_DAC) $(DAC2TEST_PL) |
113 |
|
|
$(DAC2TEST) $< --source-module="$(NS_MDOM)XMLParser" > $@ |
114 |
wakaba |
1.8 |
|
115 |
|
|
test-module-util: \ |
116 |
wakaba |
1.10 |
util-mntest.t \ |
117 |
wakaba |
1.8 |
util-perlcode.t \ |
118 |
|
|
util-dis-dnlite.t |
119 |
|
|
$(PERL_TEST_) util-*.t |
120 |
wakaba |
1.5 |
|
121 |
wakaba |
1.10 |
util-mntest.t: $(UTIL_TEST_DAC) $(UTIL_MNTEST_PM) $(DAC2TEST_PL) |
122 |
|
|
$(DAC2TEST) $< --source-module="$(NS_UTIL)ManakaiNodeTest" > $@ |
123 |
|
|
|
124 |
wakaba |
1.5 |
util-perlcode.t: $(UTIL_PC_DAC) $(DAC2TEST_PL) |
125 |
|
|
$(DAC2TEST) $< --source-module="$(NS_UTIL)PerlCode" > $@ |
126 |
|
|
|
127 |
wakaba |
1.6 |
util-dis-dnlite.t: $(DIS_CORE_DAC) $(DAC2TEST_PL) |
128 |
|
|
$(DAC2TEST) $< --source-module="$(NS_DIS)DNLite" > $@ |
129 |
|
|
|
130 |
wakaba |
1.5 |
$(DOM_DAC_FILES): $(MANAKAI_LIB_DIR)Message/DOM/%: always |
131 |
wakaba |
1.4 |
$(CD) $(MANAKAI_LIB_DIR)Message/DOM/ && $(MAKE) $* |
132 |
wakaba |
1.5 |
|
133 |
wakaba |
1.10 |
$(UTIL_TEST_DAC) $(UTIL_MNTEST_PM) $(UTIL_PC_DAC) $(DIS_CORE_DAC): \ |
134 |
|
|
$(MANAKAI_LIB_DIR)Message/Util/%: always |
135 |
wakaba |
1.5 |
$(CD) $(MANAKAI_LIB_DIR)Message/Util/ && $(MAKE) $* |
136 |
wakaba |
1.4 |
|
137 |
wakaba |
1.2 |
clean: clean-dom1core-perl |
138 |
wakaba |
1.4 |
$(RMALL) $(GENERATED_FILES) |
139 |
wakaba |
1.2 |
|
140 |
|
|
clean-dom1core-perl: |
141 |
|
|
$(RMALL) $(DOMTEST_PERL_DIR)level1/core/* |
142 |
|
|
$(RMALL) *~ .*~ *.BAK .*.BAK |
143 |
wakaba |
1.4 |
|
144 |
|
|
always: |