1 |
MANAKAI_ROOT_DIR = ../../../ |
2 |
MANAKAI_BIN_DIR = $(MANAKAI_ROOT_DIR)bin/ |
3 |
MANAKAI_LIB_DIR = $(MANAKAI_ROOT_DIR)lib/ |
4 |
|
5 |
DAC_SUFFIX = .dad |
6 |
PM_SUFFIX = .pm |
7 |
|
8 |
CD = cd |
9 |
MAKE = make |
10 |
RM = rm |
11 |
PERL = perl |
12 |
PERL_OPTIONS3 = -I$(MANAKAI_LIB_DIR) |
13 |
PERL_OPTIONS = $(PERL_OPTIONS3) |
14 |
PERL_ = $(PERL) $(PERL_OPTIONS) |
15 |
PERLC = $(PERL) -c -w |
16 |
PERLC_OPTIONS3 = $(PERL_OPTIONS) |
17 |
PERLC_OPTIONS = $(PERLC_OPTIONS3) |
18 |
PERL_CHK = $(PERLC) $(PERLC_OPTIONS) |
19 |
TOUCH = touch |
20 |
|
21 |
NS_MDOM = http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom\#ManakaiDOM. |
22 |
NS_MANAKAIDOM = http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom\# |
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 |
UTIL_CORE_DAC_FILE = $(MANAKAI_LIB_DIR)Message/Util/core$(DAC_SUFFIX) |
36 |
|
37 |
DOM_CORE_DIS_FILES = DOMFeature.dis DOMMain.dis DOMCore.dis DOMXML.dis \ |
38 |
DOMLS.dis GenericLS.dis |
39 |
DOM_LS_DIS_FILES = SimpleLS.dis |
40 |
DOM_HTML_DIS_FILES = DOMHTML.dis DOMWebForms.dis |
41 |
DIS_FILES = $(DOM_CORE_DIS_FILES) $(DOM_LS_DIS_FILES) $(DOM_HTML_DIS_FILES) |
42 |
|
43 |
_DIS_FILES = \ |
44 |
ManakaiDOMLS2003.dis \ |
45 |
DOMEvents.dis DOMViews.dis |
46 |
|
47 |
GENERATED_FILES = \ |
48 |
core$(DAC_SUFFIX) DOMFeature$(PM_SUFFIX) DOMMain$(PM_SUFFIX) \ |
49 |
DOMCore$(PM_SUFFIX) DOMXML$(PM_SUFFIX) DOMLS$(PM_SUFFIX) \ |
50 |
GenericLS$(PM_SUFFIX) \ |
51 |
ls$(DAC_SUFFIX) SimpleLS$(PM_SUFFIX) \ |
52 |
html$(DAC_SUFFIX) DOMHTML$(PM_SUFFIX) DOMWebForms$(PM_SUFFIX) |
53 |
GENERATED_DAC_FILES = core$(DAC_SUFFIX) ls$(DAC_SUFFIX) html$(DAC_SUFFIX) |
54 |
|
55 |
all: .core$(PM_SUFFIX) .ls$(PM_SUFFIX) .html$(PM_SUFFIX) $(GENERATED_DAC_FILES) |
56 |
|
57 |
core$(DAC_SUFFIX): $(UTIL_CORE_DAC_FILE) $(DOM_CORE_DIS_FILES) $(DAC_PL) |
58 |
$(DAC)$@.tmp.1 --input-db-file-name="$<" DOMLS.dis |
59 |
$(DAC)$@ --input-db-file-name="$@.tmp.1" GenericLS.dis |
60 |
$(RM) $@.tmp.1 |
61 |
|
62 |
ls$(DAC_SUFFIX): core$(DAC_SUFFIX) $(DOM_LS_DIS_FILES) $(DAC_PL) |
63 |
$(DAC)$@ --input-db-file-name="$<" SimpleLS.dis |
64 |
|
65 |
html$(DAC_SUFFIX): core$(DAC_SUFFIX) $(DOM_HTML_DIS_FILES) $(DAC_PL) |
66 |
$(DAC)$@ --input-db-file-name="$<" DOMHTML.dis |
67 |
|
68 |
$(DOM_CORE_DIS_FILES:.dis=$(PM_SUFFIX)): core$(DAC_SUFFIX) $(DAC2PM_PL) |
69 |
$(DAC2PM) $< --module-uri="$(NS_MDOM)$(@:$(PM_SUFFIX)=)" \ |
70 |
--output-file-path="$@" |
71 |
$(PERL_CHK) $@ |
72 |
|
73 |
.core$(PM_SUFFIX): core$(DAC_SUFFIX) $(DAC2PM_PL) |
74 |
$(DAC2PM) $< \ |
75 |
--create-perl-module="$(NS_MDOM)DOMFeature DOMFeature$(PM_SUFFIX)" \ |
76 |
--create-perl-module="$(NS_MDOM)DOMMain DOMMain$(PM_SUFFIX)" \ |
77 |
--create-perl-module="$(NS_MDOM)DOMCore DOMCore$(PM_SUFFIX)" \ |
78 |
--create-perl-module="$(NS_MDOM)DOMXML DOMXML$(PM_SUFFIX)" \ |
79 |
--create-perl-module="$(NS_MDOM)DOMLS DOMLS$(PM_SUFFIX)" \ |
80 |
--create-perl-module="$(NS_MDOM)GenericLS GenericLS$(PM_SUFFIX)" |
81 |
$(PERL_CHK) DOMFeature$(PM_SUFFIX) |
82 |
$(PERL_CHK) DOMMain$(PM_SUFFIX) |
83 |
$(PERL_CHK) DOMCore$(PM_SUFFIX) |
84 |
$(PERL_CHK) DOMXML$(PM_SUFFIX) |
85 |
$(PERL_CHK) DOMLS$(PM_SUFFIX) |
86 |
$(PERL_CHK) GenericLS$(PM_SUFFIX) |
87 |
$(TOUCH) $@ |
88 |
|
89 |
$(DOM_LS_DIS_FILES:.dis=$(PM_SUFFIX)): ls$(DAC_SUFFIX) $(DAC2PM_PL) |
90 |
$(DAC2PM) $< --module-uri="$(NS_MDOM)$(@:$(PM_SUFFIX)=)" \ |
91 |
--output-file-path="$@" |
92 |
$(PERL_CHK) $@ |
93 |
|
94 |
.ls$(PM_SUFFIX): ls$(DAC_SUFFIX) $(DAC2PM_PL) |
95 |
$(DAC2PM) $< \ |
96 |
--create-perl-module="$(NS_MDOM)SimpleLS SimpleLS$(PM_SUFFIX)" |
97 |
$(PERL_CHK) SimpleLS$(PM_SUFFIX) |
98 |
$(TOUCH) $@ |
99 |
|
100 |
$(DOM_HTML_DIS_FILES:.dis=$(PM_SUFFIX)): html$(DAC_SUFFIX) $(DAC2PM_PL) |
101 |
$(DAC2PM) $< --module-uri="$(NS_MDOM)$(@:$(PM_SUFFIX)=)" > $@ |
102 |
$(PERL_CHK) $@ |
103 |
|
104 |
.html$(PM_SUFFIX): html$(DAC_SUFFIX) $(DAC2PM_PL) |
105 |
$(DAC2PM) $< \ |
106 |
--create-perl-module="$(NS_MDOM)DOMHTML DOMHTML$(PM_SUFFIX)" \ |
107 |
--create-perl-module="$(NS_MDOM)DOMWebForms DOMWebForms$(PM_SUFFIX)" |
108 |
$(PERL_CHK) DOMHTML$(PM_SUFFIX) |
109 |
$(PERL_CHK) DOMWebForms$(PM_SUFFIX) |
110 |
$(TOUCH) $@ |
111 |
|
112 |
# $(UTIL_CORE_DAC_FILE) |
113 |
$(MANAKAI_LIB_DIR)Message/Util/core$(DAC_SUFFIX): dummy |
114 |
$(CD) $(MANAKAI_LIB_DIR)Message/Util/ && $(MAKE) core$(DAC_SUFFIX) |
115 |
|
116 |
dummy: |
117 |
|
118 |
clean: |
119 |
$(RM) $(GENERATED_FILES) |
120 |
$(RM) .*.tmp *~ .*~ *.BAK .*.BAK |
121 |
$(RM) .core$(PM_SUFFIX) .ls$(PM_SUFFIX) .html$(PM_SUFFIX) |
122 |
|
123 |
## $Date: 2005/09/22 14:25:47 $ |
124 |
## License: Public Domain. |