1 |
LS = ls |
MANAKAI_ROOT_DIR = ../../../ |
2 |
|
MANAKAI_BIN_DIR = $(MANAKAI_ROOT_DIR)bin/ |
3 |
|
MANAKAI_LIB_DIR = $(MANAKAI_ROOT_DIR)lib/ |
4 |
|
|
5 |
|
DIS_SUFFIX = .dis |
6 |
|
DAC_SUFFIX = .dae |
7 |
|
DAEM_SUFFIX = .daem |
8 |
|
PM_SUFFIX = .pm |
9 |
|
|
10 |
|
CD = cd |
11 |
MAKE = make |
MAKE = make |
12 |
RM = rm |
RM = rm |
13 |
SED = sed |
PERL = perl |
14 |
XARGS = xargs |
PERL_OPTIONS3 = -I$(MANAKAI_LIB_DIR) |
15 |
|
PERL_OPTIONS = $(PERL_OPTIONS3) |
16 |
|
PERL_ = $(PERL) $(PERL_OPTIONS) |
17 |
|
PERLC = $(PERL) -c -w |
18 |
|
PERLC_OPTIONS3 = $(PERL_OPTIONS) |
19 |
|
PERLC_OPTIONS = $(PERLC_OPTIONS3) |
20 |
|
PERL_CHK = $(PERLC) $(PERLC_OPTIONS) |
21 |
|
TOUCH = touch |
22 |
|
|
23 |
|
NS_MDOM = http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom\#ManakaiDOM. |
24 |
|
NS_MANAKAIDOM = http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom\# |
25 |
|
|
26 |
|
DIS_OPTIONS = |
27 |
|
DIS_OPTIONS_ALL = $(DIS_OPTIONS) \ |
28 |
|
--search-path-catalog-file-name="$(MANAKAI_LIB_DIR)manakai/dis-catalog" \ |
29 |
|
--dis-file-suffix="$(DIS_SUFFIX)" \ |
30 |
|
--daem-file-suffix="$(DAEM_SUFFIX)" |
31 |
|
|
32 |
|
DAC_OPTIONS = |
33 |
|
DAC_PL = $(MANAKAI_BIN_DIR)dac.pl |
34 |
|
DAC = $(PERL_) $(DAC_PL) $(DAC_OPTIONS) $(DIS_OPTIONS_ALL) \ |
35 |
|
--db-base-directory-path="$(MANAKAI_ROOT_DIR)" \ |
36 |
|
--output-file-name= |
37 |
|
|
38 |
|
DAC2PM_OPTIONS3 = --enable-assert |
39 |
|
DAC2PM_OPTIONS = $(DAC2PM_OPTIONS3) |
40 |
|
DAC2PM_PL = $(MANAKAI_BIN_DIR)dac2pm.pl |
41 |
|
DAC2PM = $(PERL_) $(DAC2PM_PL) $(DAC2PM_OPTIONS) $(DIS_OPTIONS_ALL) |
42 |
|
|
43 |
|
UTIL_CORE_DAC_FILE = $(MANAKAI_LIB_DIR)Message/Util/core$(DAC_SUFFIX) |
44 |
|
|
45 |
|
DOM_CORE_DIS_FILES = DOMFeature.dis DOMMain.dis DOMCore.dis DOMXML.dis \ |
46 |
|
DOMLS.dis GenericLS.dis |
47 |
|
DOM_LS_DIS_FILES = SimpleLS.dis |
48 |
|
DOM_HTML_DIS_FILES = DOMHTML.dis DOMWebForms.dis |
49 |
|
DIS_FILES = $(DOM_CORE_DIS_FILES) $(DOM_LS_DIS_FILES) $(DOM_HTML_DIS_FILES) |
50 |
|
|
51 |
|
_DIS_FILES = \ |
52 |
|
ManakaiDOMLS2003.dis \ |
53 |
|
DOMEvents.dis DOMViews.dis |
54 |
|
|
55 |
|
GENERATED_FILES = \ |
56 |
|
core$(DAC_SUFFIX) DOMFeature$(PM_SUFFIX) DOMMain$(PM_SUFFIX) \ |
57 |
|
DOMCore$(PM_SUFFIX) DOMXML$(PM_SUFFIX) DOMLS$(PM_SUFFIX) \ |
58 |
|
GenericLS$(PM_SUFFIX) \ |
59 |
|
ls$(DAC_SUFFIX) SimpleLS$(PM_SUFFIX) \ |
60 |
|
html$(DAC_SUFFIX) DOMHTML$(PM_SUFFIX) DOMWebForms$(PM_SUFFIX) |
61 |
|
GENERATED_DAC_FILES = core$(DAC_SUFFIX) ls$(DAC_SUFFIX) html$(DAC_SUFFIX) |
62 |
|
|
63 |
|
all: .core$(PM_SUFFIX) .ls$(PM_SUFFIX) .html$(PM_SUFFIX) $(GENERATED_DAC_FILES) |
64 |
|
|
65 |
|
core$(DAC_SUFFIX): $(UTIL_CORE_DAC_FILE) $(DOM_CORE_DIS_FILES) $(DAC_PL) |
66 |
|
$(DAC)$@.tmp.1 --input-db-file-name="$<" DOMLS.dis |
67 |
|
$(DAC)$@ --input-db-file-name="$@.tmp.1" GenericLS.dis |
68 |
|
$(RM) $@.tmp.1 |
69 |
|
|
70 |
|
ls$(DAC_SUFFIX): core$(DAC_SUFFIX) $(DOM_LS_DIS_FILES) $(DAC_PL) |
71 |
|
$(DAC)$@ --input-db-file-name="$<" SimpleLS.dis |
72 |
|
|
73 |
|
html$(DAC_SUFFIX): core$(DAC_SUFFIX) $(DOM_HTML_DIS_FILES) $(DAC_PL) |
74 |
|
$(DAC)$@ --input-db-file-name="$<" DOMHTML.dis |
75 |
|
|
76 |
|
$(DOM_CORE_DIS_FILES:.dis=$(PM_SUFFIX)): core$(DAC_SUFFIX) $(DAC2PM_PL) |
77 |
|
$(DAC2PM) $< --module-uri="$(NS_MDOM)$(@:$(PM_SUFFIX)=)" \ |
78 |
|
--output-file-path="$@" |
79 |
|
$(PERL_CHK) $@ |
80 |
|
|
81 |
PERL = perl -I../../ |
.core$(PM_SUFFIX): core$(DAC_SUFFIX) $(DAC2PM_PL) |
82 |
PERL_CHK = $(PERL) -c -w |
$(DAC2PM) $< \ |
83 |
|
--create-perl-module="$(NS_MDOM)DOMFeature DOMFeature$(PM_SUFFIX)" \ |
84 |
|
--create-perl-module="$(NS_MDOM)DOMMain DOMMain$(PM_SUFFIX)" \ |
85 |
|
--create-perl-module="$(NS_MDOM)DOMCore DOMCore$(PM_SUFFIX)" \ |
86 |
|
--create-perl-module="$(NS_MDOM)DOMXML DOMXML$(PM_SUFFIX)" \ |
87 |
|
--create-perl-module="$(NS_MDOM)DOMLS DOMLS$(PM_SUFFIX)" \ |
88 |
|
--create-perl-module="$(NS_MDOM)GenericLS GenericLS$(PM_SUFFIX)" |
89 |
|
$(PERL_CHK) DOMFeature$(PM_SUFFIX) |
90 |
|
$(PERL_CHK) DOMMain$(PM_SUFFIX) |
91 |
|
$(PERL_CHK) DOMCore$(PM_SUFFIX) |
92 |
|
$(PERL_CHK) DOMXML$(PM_SUFFIX) |
93 |
|
$(PERL_CHK) DOMLS$(PM_SUFFIX) |
94 |
|
$(PERL_CHK) GenericLS$(PM_SUFFIX) |
95 |
|
$(TOUCH) $@ |
96 |
|
|
97 |
|
$(DOM_LS_DIS_FILES:.dis=$(PM_SUFFIX)): ls$(DAC_SUFFIX) $(DAC2PM_PL) |
98 |
|
$(DAC2PM) $< --module-uri="$(NS_MDOM)$(@:$(PM_SUFFIX)=)" \ |
99 |
|
--output-file-path="$@" |
100 |
|
$(PERL_CHK) $@ |
101 |
|
|
102 |
DIS2PM_PL = ../../../bin/dis2pm.pl |
.ls$(PM_SUFFIX): ls$(DAC_SUFFIX) $(DAC2PM_PL) |
103 |
DIS2PM = $(PERL) $(DIS2PM_PL) |
$(DAC2PM) $< \ |
104 |
|
--create-perl-module="$(NS_MDOM)SimpleLS SimpleLS$(PM_SUFFIX)" |
105 |
|
$(PERL_CHK) SimpleLS$(PM_SUFFIX) |
106 |
|
$(TOUCH) $@ |
107 |
|
|
108 |
IDL2DIS_PL = idl2dis.pl |
$(DOM_HTML_DIS_FILES:.dis=$(PM_SUFFIX)): html$(DAC_SUFFIX) $(DAC2PM_PL) |
109 |
IDL2DIS = $(PERL) $(IDL2DIS_PL) |
$(DAC2PM) $< --module-uri="$(NS_MDOM)$(@:$(PM_SUFFIX)=)" > $@ |
110 |
|
$(PERL_CHK) $@ |
111 |
|
|
112 |
all: dom-modules |
.html$(PM_SUFFIX): html$(DAC_SUFFIX) $(DAC2PM_PL) |
113 |
|
$(DAC2PM) $< \ |
114 |
|
--create-perl-module="$(NS_MDOM)DOMHTML DOMHTML$(PM_SUFFIX)" \ |
115 |
|
--create-perl-module="$(NS_MDOM)DOMWebForms DOMWebForms$(PM_SUFFIX)" |
116 |
|
$(PERL_CHK) DOMHTML$(PM_SUFFIX) |
117 |
|
$(PERL_CHK) DOMWebForms$(PM_SUFFIX) |
118 |
|
$(TOUCH) $@ |
119 |
|
|
120 |
|
# $(UTIL_CORE_DAC_FILE) |
121 |
|
$(MANAKAI_LIB_DIR)Message/Util/core$(DAC_SUFFIX): dummy |
122 |
|
$(CD) $(MANAKAI_LIB_DIR)Message/Util/ && $(MAKE) core$(DAC_SUFFIX) |
123 |
|
|
124 |
dom-modules: ManakaiDOMMain.pm DOMMain.pm DOMCore.pm ManakaiDOMCore.pm |
dummy: |
|
$(LS) *.dis | $(SED) s/\.dis/.pm/ | $(XARGS) $(MAKE) |
|
125 |
|
|
|
%.pm: %.dis $(DIS2PM_PL) |
|
|
$(DIS2PM) $< > $@ |
|
|
$(PERL_CHK) $@ |
|
|
|
|
126 |
clean: |
clean: |
127 |
$(LS) *.dis | $(SED) s/\.dis/.pm/ | $(XARGS) $(RM) |
$(RM) $(GENERATED_FILES) |
128 |
|
$(RM) .*.tmp *~ .*~ *.BAK .*.BAK |
129 |
|
$(RM) .core$(PM_SUFFIX) .ls$(PM_SUFFIX) .html$(PM_SUFFIX) |
130 |
|
|
131 |
|
## $Date$ |
132 |
|
## License: Public Domain. |