1 |
LS = ls |
2 |
MAKE = make |
3 |
RM = rm |
4 |
SED = sed |
5 |
XARGS = xargs |
6 |
|
7 |
MANAKAI_ROOT_DIR = ../../../ |
8 |
MANAKAI_BIN_DIR = $(MANAKAI_ROOT_DIR)bin/ |
9 |
MANAKAI_LIB_DIR = $(MANAKAI_ROOT_DIR)lib/ |
10 |
MANAKAI_LIB_MANAKAI_DIR = $(MANAKAI_LIB_DIR)manakai/ |
11 |
|
12 |
PERL = perl -I$(MANAKAI_LIB_DIR) |
13 |
PERL_CHK = $(PERL) -c -w |
14 |
|
15 |
DISC_PL = $(MANAKAI_BIN_DIR)disc.pl |
16 |
DISC = $(PERL) $(DISC_PL) -I=$(MANAKAI_LIB_MANAKAI_DIR) \ |
17 |
-I=$(MANAKAI_LIB_DIR)Message/Util/ \ |
18 |
-I=$(MANAKAI_LIB_DIR)Message/Util/Error/ |
19 |
CDIS2PM_OPTIONS = --enable-assert |
20 |
## TODO: Official release should remove this option. |
21 |
CDIS2PM_PL = ../../../bin/cdis2pm.pl |
22 |
CDIS2PM = $(PERL) $(CDIS2PM_PL) $(CDIS2PM_OPTIONS) |
23 |
DIS2POD_PL = ../../../bin/dis2pm.pl |
24 |
DIS2POD = $(PERL) $(DIS2POD_PL) --output-pod=only |
25 |
|
26 |
IDL2DIS_PL = idl2dis.pl |
27 |
IDL2DIS = $(PERL) $(IDL2DIS_PL) |
28 |
|
29 |
DIS_FILES = DOMMain.dis DOMCore.dis DOMXML.dis \ |
30 |
DOMLS.dis ManakaiDOMLS2003.dis \ |
31 |
DOMEvents.dis DOMViews.dis \ |
32 |
DOMHTML.dis DOMWebForms.dis \ |
33 |
DOMMetaImpl.dis |
34 |
|
35 |
GENERATED_FILES_DOMLATEST = core.cdis ev.cdis ls.cdis html.cdis \ |
36 |
DOMMain.pm DOMCore.pm DOMXML.pm DOMLS.pm ManakaiDOMLS2003.pm \ |
37 |
DOMEvents.pm DOMViews.pm \ |
38 |
DOMHTML.pm DOMWebForms.pm \ |
39 |
meta.cdis DOMMetaImpl.dis |
40 |
GENERATED_FILES = $(MAIN_CDIS_FILE) $(GENERATED_FILES_DOMLATEST) |
41 |
|
42 |
NS_MANAKAIDOM = http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom\# |
43 |
|
44 |
all: dom |
45 |
|
46 |
dom: dom-latest |
47 |
dom-latest: $(GENERATED_FILES_DOMLATEST) |
48 |
|
49 |
meta.cdis: DOMBoot.dis DOMMetaImpl.dis $(DISC_PL) |
50 |
$(DISC) DOMBoot.dis --output-file-name=.$@.1.tmp \ |
51 |
--for="$(NS_MANAKAIDOM)ManakaiDOM1" |
52 |
$(DISC) DOMMetaImpl.dis --input-cdis-file-name=.$@.1.tmp \ |
53 |
--output-file-name=$@ |
54 |
$(RM) .$@.1.tmp |
55 |
|
56 |
core.cdis: DOMCore.dis DOMMain.dis DOMXML.dis $(DISC_PL) |
57 |
$(DISC) DOMCore.dis --output-file-name=$@ |
58 |
|
59 |
ev.cdis: core.cdis DOMEvents.dis DOMViews.dis $(DISC_PL) |
60 |
$(DISC) DOMEvents.dis --input-cdis-file-name=$< \ |
61 |
--output-file-name=.$@.1.tmp |
62 |
$(DISC) DOMViews.dis --input-cdis-file-name=.$@.1.tmp \ |
63 |
--output-file-name=$@ |
64 |
$(RM) .$@.1.tmp |
65 |
|
66 |
ls.cdis: ev.cdis DOMLS.dis ManakaiDOMLS2003.dis $(DISC_PL) |
67 |
$(DISC) DOMLS.dis --input-cdis-file-name=$< \ |
68 |
--output-file-name=.$@.1.tmp |
69 |
$(DISC) ManakaiDOMLS2003.dis --input-cdis-file-name=.$@.1.tmp \ |
70 |
--output-file-name=$@ |
71 |
$(RM) .$@.1.tmp |
72 |
|
73 |
html.cdis: ls.cdis DOMHTML.dis DOMWebForms.dis $(DISC_PL) |
74 |
$(DISC) DOMHTML.dis --input-cdis-file-name=$< \ |
75 |
--output-file-name=.$@.1.tmp |
76 |
$(DISC) DOMWebForms.dis --input-cdis-file-name=.$@.1.tmp \ |
77 |
--output-file-name=$@ |
78 |
$(RM) .$@.1.tmp |
79 |
|
80 |
DOMMetaImpl.pm: meta.cdis $(CDIS2PM_PL) |
81 |
$(CDIS2PM) $< --for="$(NS_MANAKAIDOM)ManakaiDOMLatest" \ |
82 |
--module-name=DOMMetaImpl > $@ |
83 |
$(PERL_CHK) $@ |
84 |
|
85 |
DOMMain.pm: core.cdis $(CDIS2PM_PL) |
86 |
$(CDIS2PM) $< --for="$(NS_MANAKAIDOM)ManakaiDOMCommon" \ |
87 |
--module-name=DOMMain --nooutput-module-version > $@ |
88 |
$(CDIS2PM) $< --for="$(NS_MANAKAIDOM)ManakaiDOMLatest" \ |
89 |
--module-name=DOMMain >> $@ |
90 |
$(PERL_CHK) $@ |
91 |
|
92 |
DOMCore.pm: core.cdis DOMMain.pm $(CDIS2PM_PL) |
93 |
$(CDIS2PM) $< --for="$(NS_MANAKAIDOM)ManakaiDOMLatest" \ |
94 |
--module-name=DOMCore > $@ |
95 |
$(PERL_CHK) $@ |
96 |
|
97 |
DOMXML.pm: core.cdis $(CDIS2PM_PL) |
98 |
$(CDIS2PM) $< --for="$(NS_MANAKAIDOM)ManakaiDOMLatest" \ |
99 |
--module-name=DOMXML > $@ |
100 |
$(PERL_CHK) $@ |
101 |
|
102 |
DOMEvents.pm: ev.cdis $(CDIS2PM_PL) |
103 |
$(CDIS2PM) $< --for="$(NS_MANAKAIDOM)ManakaiDOMLatest" \ |
104 |
--module-name=DOMEvents > $@ |
105 |
$(PERL_CHK) $@ |
106 |
|
107 |
DOMViews.pm: ev.cdis $(CDIS2PM_PL) |
108 |
$(CDIS2PM) $< --for="$(NS_MANAKAIDOM)ManakaiDOMLatest" \ |
109 |
--module-name=DOMViews > $@ |
110 |
$(PERL_CHK) $@ |
111 |
|
112 |
DOMLS.pm: ls.cdis $(CDIS2PM_PL) |
113 |
$(CDIS2PM) $< --for="$(NS_MANAKAIDOM)ManakaiDOMLatest" \ |
114 |
--module-name=DOMLS > $@ |
115 |
$(PERL_CHK) $@ |
116 |
|
117 |
ManakaiDOMLS2003.pm: ls.cdis $(CDIS2PM_PL) |
118 |
$(CDIS2PM) $< --for="$(NS_MANAKAIDOM)ManakaiDOMLatest" \ |
119 |
--module-name=ManakaiDOMLS2003 > $@ |
120 |
$(PERL_CHK) $@ |
121 |
|
122 |
DOMHTML.pm: html.cdis $(CDIS2PM_PL) |
123 |
$(CDIS2PM) $< --for="$(NS_MANAKAIDOM)ManakaiDOMLatest" \ |
124 |
--module-name=DOMHTML > $@ |
125 |
$(PERL_CHK) $@ |
126 |
|
127 |
DOMWebForms.pm: html.cdis $(CDIS2PM_PL) |
128 |
$(CDIS2PM) $< --for="$(NS_MANAKAIDOM)ManakaiDOMLatest" \ |
129 |
--module-name=DOMWebForms > $@ |
130 |
$(PERL_CHK) $@ |
131 |
|
132 |
clean: |
133 |
$(RM) $(GENERATED_FILES) .*.tmp |
134 |
|