/[suikacvs]/messaging/manakai/t/Makefile
Suika

Diff of /messaging/manakai/t/Makefile

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

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

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.14

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24