1 |
LS = ls |
MANAKAI_ROOT_DIR = ../../../ |
2 |
|
MANAKAI_BIN_DIR = $(MANAKAI_ROOT_DIR)bin/ |
3 |
|
MANAKAI_LIB_DIR = $(MANAKAI_ROOT_DIR)lib/ |
4 |
|
|
5 |
|
CD = cd |
6 |
MAKE = make |
MAKE = make |
7 |
RM = rm |
RM = rm |
8 |
SED = sed |
PERL = perl |
9 |
XARGS = xargs |
PERL_OPTIONS3 = -I$(MANAKAI_LIB_DIR) |
10 |
|
PERL_OPTIONS = $(PERL_OPTIONS3) |
11 |
|
PERL_ = $(PERL) $(PERL_OPTIONS) |
12 |
|
PERLC = $(PERL) -c -w |
13 |
|
PERLC_OPTIONS3 = $(PERL_OPTIONS) |
14 |
|
PERLC_OPTIONS = $(PERLC_OPTIONS3) |
15 |
|
PERL_CHK = $(PERLC) $(PERLC_OPTIONS) |
16 |
|
|
17 |
|
NS_MDOM = http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom\#ManakaiDOM. |
18 |
|
NS_MANAKAIDOM = http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom\# |
19 |
|
|
20 |
|
DAC_PL = $(MANAKAI_BIN_DIR)dac.pl |
21 |
|
DAC = $(PERL_) $(DAC_PL) \ |
22 |
|
--search-path-catalog-file-name="$(MANAKAI_LIB_DIR)manakai/dis-catalog" \ |
23 |
|
--db-base-directory-path="$(MANAKAI_ROOT_DIR)" \ |
24 |
|
--output-file-name= |
25 |
|
|
26 |
|
DAC2PM_OPTIONS3 = --enable-assert |
27 |
|
DAC2PM_OPTIONS = $(DAC2PM_OPTIONS3) |
28 |
|
DAC2PM_PL = $(MANAKAI_BIN_DIR)dac2pm.pl |
29 |
|
DAC2PM = $(PERL_) $(DAC2PM_PL) $(DAC2PM_OPTIONS) |
30 |
|
|
31 |
|
CORE_DAC_FILE = $(MANAKAI_LIB_DIR)manakai/all.dac |
32 |
|
UTIL_DAC_FILE = $(MANAKAI_LIB_DIR)Message/Util/all.dac |
33 |
|
|
34 |
|
DIS_FILES_CORE = DOMMain.dis DOMCore.dis DOMXML.dis DOMLS.dis DOMFeature.dis |
35 |
|
DIS_FILES_HTML = DOMHTML.dis DOMWebForms.dis |
36 |
|
|
37 |
|
DIS_FILES = DOMMetaImpl.dis $(DIS_FILES_CORE) $(DIS_FILES_HTML) |
38 |
|
|
39 |
|
_DIS_FILES = \ |
40 |
|
ManakaiDOMLS2003.dis \ |
41 |
|
DOMEvents.dis DOMViews.dis |
42 |
|
|
43 |
|
GENERATED_FILES = core.dac DOMMain.pm DOMCore.pm DOMXML.pm DOMLS.pm \ |
44 |
|
html.dac DOMHTML.pm DOMWebForms.pm DOMFeature.pm |
45 |
|
BOOT_GENERATED_FILES = boot.dac DOMMetaImpl.pm |
46 |
|
|
47 |
|
all: $(GENERATED_FILES) |
48 |
|
|
49 |
|
core.dac: $(DIS_FILES_CORE) $(DAC_PL) $(CORE_DAC_FILE) \ |
50 |
|
$(MANAKAI_LIB_DIR)Message/Util/ManakaiNode.dis \ |
51 |
|
$(MANAKAI_LIB_DIR)Message/Util/Error/DOMException.dis |
52 |
|
$(CD) $(MANAKAI_LIB_DIR) && $(MAKE) ../lib/Message/DOM/DOMLS.pm |
53 |
|
$(DAC)$@ --input-db-file-name="$(CORE_DAC_FILE)" DOMLS.dis |
54 |
|
|
55 |
|
html.dac: $(DIS_FILES_HTML) $(DAC_PL) core.dac |
56 |
|
$(DAC)$@ --input-db-file-name="core.dac" DOMHTML.dis |
57 |
|
|
58 |
PERL = perl -I../../ |
DOMFeature.pm: core.dac $(DAC2PM_PL) |
59 |
PERL_CHK = $(PERL) -c -w |
$(DAC2PM) $< --module-uri="$(NS_MDOM)DOMFeature" --output-file-path="$@" |
60 |
|
$(PERL_CHK) $@ |
61 |
|
|
62 |
DIS2PM_PL = dis2pm.pl |
DOMMain.pm: core.dac $(DAC2PM_PL) |
63 |
DIS2PM = $(PERL) $(DIS2PM_PL) |
$(DAC2PM) $< --module-uri="$(NS_MDOM)DOMMain" --output-file-path="$@" |
64 |
|
$(PERL_CHK) $@ |
65 |
|
|
66 |
IDL2DIS_PL = idl2dis.pl |
DOMCore.pm: core.dac $(DAC2PM_PL) |
67 |
IDL2DIS = $(PERL) $(IDL2DIS_PL) |
$(DAC2PM) $< --module-uri="$(NS_MDOM)DOMCore" --output-file-path="$@" |
68 |
|
$(PERL_CHK) $@ |
69 |
|
|
70 |
all: dom-modules |
DOMXML.pm: core.dac $(DAC2PM_PL) |
71 |
|
$(DAC2PM) $< --module-uri="$(NS_MDOM)DOMXML" --output-file-path="$@" |
72 |
|
$(PERL_CHK) $@ |
73 |
|
|
74 |
dom-modules: ManakaiDOM.pm DOMMain.pm DOMCore.pm |
DOMLS.pm: core.dac $(DAC2PM_PL) |
75 |
$(LS) *.dis | $(SED) s/\.dis/.pm/ | $(XARGS) $(MAKE) |
$(CD) $(MANAKAI_LIB_DIR) && $(MAKE) ../lib/Message/DOM/DOMLS.pm |
76 |
|
$(DAC2PM) $< --module-uri="$(NS_MDOM)DOMLS" --output-file-path="$@" |
77 |
|
$(PERL_CHK) $@ |
78 |
|
|
79 |
%.pm: %.dis $(DIS2PM_PL) |
DOMHTML.pm: html.dac $(DAC2PM_PL) |
80 |
$(DIS2PM) $< > $@ |
$(DAC2PM) $< --module-uri="$(NS_MDOM)DOMHTML" > $@ |
81 |
$(PERL_CHK) $@ |
$(PERL_CHK) $@ |
|
|
|
|
clean: |
|
|
$(LS) *.dis | $(SED) s/\.dis/.pm/ | $(XARGS) $(RM) |
|
82 |
|
|
83 |
|
DOMWebForms.pm: html.dac $(DAC2PM_PL) |
84 |
|
$(DAC2PM) $< --module-uri="$(NS_MDOM)DOMWebForms" > $@ |
85 |
|
$(PERL_CHK) $@ |
86 |
|
|
87 |
|
boot: $(BOOT_GENERATED_FILES) |
88 |
|
|
89 |
|
boot.dac: DOMMetaImpl.dis DOMBoot.dis $(DAC_PL) $(UTIL_DAC_FILE) |
90 |
|
$(DAC)$@ --input-db-file-name="$(UTIL_DAC_FILE)" DOMMetaImpl.dis |
91 |
|
|
92 |
|
DOMMetaImpl.pm: boot.dac $(DAC2PM_PL) |
93 |
|
$(DAC2PM) $< --module-uri="$(NS_MDOM)DOMMetaImpl" --output-file-path="$@" |
94 |
|
$(PERL_CHK) $@ |
95 |
|
|
96 |
|
# $(CORE_DAC_FILE) |
97 |
|
$(MANAKAI_LIB_DIR)manakai/all.dac: \ |
98 |
|
$(MANAKAI_LIB_DIR)manakai/DISCore.dis \ |
99 |
|
$(MANAKAI_LIB_DIR)manakai/DISRDF.dis \ |
100 |
|
$(MANAKAI_LIB_DIR)manakai/DISLang.dis \ |
101 |
|
$(MANAKAI_LIB_DIR)manakai/DISIDL.dis \ |
102 |
|
$(MANAKAI_LIB_DIR)manakai/DISPerl.dis \ |
103 |
|
$(MANAKAI_LIB_DIR)manakai/XML.dis \ |
104 |
|
$(MANAKAI_LIB_DIR)manakai/DISMarkup.dis \ |
105 |
|
$(MANAKAI_LIB_DIR)manakai/NaturalLanguage.dis |
106 |
|
$(CD) $(MANAKAI_LIB_DIR)manakai/ && \ |
107 |
|
$(MAKE) all.dac |
108 |
|
|
109 |
|
# $(UTIL_DAC_FILE) |
110 |
|
$(MANAKAI_LIB_DIR)Message/Util/all.dac: \ |
111 |
|
DOMMetaImpl.dis DOMBoot.dis |
112 |
|
$(CD) $(MANAKAI_LIB_DIR)Message/Util/ && \ |
113 |
|
$(MAKE) all.dac |
114 |
|
|
115 |
|
clean: |
116 |
|
$(RM) $(GENERATED_FILES) $(BOOT_GENERATED_FILES) .*.tmp *~ .*~ |