|
LS = ls |
|
|
MAKE = make |
|
|
RM = rm |
|
|
SED = sed |
|
|
XARGS = xargs |
|
|
|
|
1 |
MANAKAI_ROOT_DIR = ../../../ |
MANAKAI_ROOT_DIR = ../../../ |
2 |
MANAKAI_BIN_DIR = $(MANAKAI_ROOT_DIR)bin/ |
MANAKAI_BIN_DIR = $(MANAKAI_ROOT_DIR)bin/ |
3 |
MANAKAI_LIB_DIR = $(MANAKAI_ROOT_DIR)lib/ |
MANAKAI_LIB_DIR = $(MANAKAI_ROOT_DIR)lib/ |
|
MANAKAI_LIB_MANAKAI_DIR = $(MANAKAI_LIB_DIR)manakai/ |
|
4 |
|
|
5 |
PERL = perl -I$(MANAKAI_LIB_DIR) |
DIS_SUFFIX = .dis |
6 |
PERL_CHK = $(PERL) -c -w |
DAEM_SUFFIX = .dafm |
7 |
|
DAFX_SUFFIX = .dafx |
8 |
|
PM_SUFFIX = .pm |
9 |
|
|
10 |
DISC_PL = $(MANAKAI_BIN_DIR)disc.pl |
CD = cd |
11 |
DISC = $(PERL) $(DISC_PL) -I=$(MANAKAI_LIB_MANAKAI_DIR) |
MAKE = make |
12 |
CDIS2PM_OPTIONS = --enable-assert |
RM = rm |
13 |
## TODO: Official release should remove this option. |
RMALL = $(RM) -fv |
14 |
CDIS2PM_PL = ../../../bin/cdis2pm.pl |
PERL = perl |
15 |
CDIS2PM = $(PERL) $(CDIS2PM_PL) $(CDIS2PM_OPTIONS) |
PERL_OPTIONS = |
16 |
DIS2POD_PL = ../../../bin/dis2pm.pl |
PERL_OPTIONS_ALL = $(PERL_OPTIONS) -I$(MANAKAI_LIB_DIR) |
17 |
DIS2POD = $(PERL) $(DIS2POD_PL) --output-pod=only |
PERL_ = $(PERL) $(PERL_OPTIONS_ALL) |
18 |
|
PERLC = $(PERL) -c -w |
19 |
IDL2DIS_PL = idl2dis.pl |
PERLC_OPTIONS = |
20 |
IDL2DIS = $(PERL) $(IDL2DIS_PL) |
PERLC_OPTIONS_ALL = $(PERLC_OPTIONS) -I$(MANAKAI_LIB_DIR) |
21 |
|
PERL_CHK = $(PERLC) $(PERLC_OPTIONS_ALL) |
22 |
DIS_FILES = DOMMain.dis DOMCore.dis DOMXML.dis \ |
TOUCH = touch |
|
DOMLS.dis ManakaiDOMLS2003.dis \ |
|
|
DOMEvents.dis DOMViews.dis \ |
|
|
DOMHTML.dis DOMWebForms.dis |
|
|
|
|
|
GENERATED_FILES_DOMLATEST = core.cdis ev.cdis ls.cdis html.cdis \ |
|
|
DOMMain.pm DOMCore.pm DOMXML.pm DOMLS.pm ManakaiDOMLS2003.pm \ |
|
|
DOMEvents.pm DOMViews.pm \ |
|
|
DOMHTML.pm DOMWebForms.pm |
|
|
GENERATED_FILES = $(MAIN_CDIS_FILE) $(GENERATED_FILES_DOMLATEST) |
|
23 |
|
|
24 |
|
NS_MDOM = http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom\#ManakaiDOM. |
25 |
NS_MANAKAIDOM = http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom\# |
NS_MANAKAIDOM = http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom\# |
26 |
|
|
27 |
all: dom |
DIS_OPTIONS = |
28 |
|
DIS_OPTIONS_ALL = $(DIS_OPTIONS) \ |
29 |
dom: dom-latest |
--search-path-catalog-file-name="$(MANAKAI_LIB_DIR)manakai/dis-catalog" \ |
30 |
dom-latest: $(GENERATED_FILES_DOMLATEST) |
--dis-file-suffix="$(DIS_SUFFIX)" \ |
31 |
|
--daem-file-suffix="$(DAEM_SUFFIX)" \ |
32 |
core.cdis: DOMCore.dis DOMMain.dis DOMXML.dis $(DISC_PL) |
--dafx-file-suffix="$(DAFX_SUFFIX)" |
33 |
$(DISC) DOMCore.dis --output-file-name=$@ |
|
34 |
|
DAF_OPTIONS = |
35 |
ev.cdis: core.cdis DOMEvents.dis DOMViews.dis $(DISC_PL) |
DAF_PL = $(MANAKAI_BIN_DIR)daf.pl |
36 |
$(DISC) DOMEvents.dis --input-cdis-file-name=$< \ |
DAF = $(PERL_) $(DAF_PL) $(DAF_OPTIONS) $(DIS_OPTIONS_ALL) |
37 |
--output-file-name=.$@.1.tmp |
|
38 |
$(DISC) DOMViews.dis --input-cdis-file-name=.$@.1.tmp \ |
DOM_FEATURE_DIS_FILES = DOMFeature$(DIS_SUFFIX) GenericLS$(DIS_SUFFIX) |
39 |
--output-file-name=$@ |
DOM_CORE_DIS_FILES = DOMMain.dis DOMCore.dis \ |
40 |
$(RM) .$@.1.tmp |
TreeCore$(DIS_SUFFIX) Document$(DIS_SUFFIX) \ |
41 |
|
Element$(DIS_SUFFIX) CharacterData$(DIS_SUFFIX) \ |
42 |
ls.cdis: ev.cdis DOMLS.dis ManakaiDOMLS2003.dis $(DISC_PL) |
XML$(DIS_SUFFIX) XDoctype$(DIS_SUFFIX) |
43 |
$(DISC) DOMLS.dis --input-cdis-file-name=$< \ |
DOM_LS_DIS_FILES = SimpleLS$(DIS_SUFFIX) DOMLS$(DIS_SUFFIX) \ |
44 |
--output-file-name=.$@.1.tmp |
TreeStore$(DIS_SUFFIX) |
45 |
$(DISC) ManakaiDOMLS2003.dis --input-cdis-file-name=.$@.1.tmp \ |
XP_DIS_FILES = XMLParser$(DIS_SUFFIX) |
46 |
--output-file-name=$@ |
DOM_MISC_DIS_FILES = Traversal$(DIS_SUFFIX) XDP$(DIS_SUFFIX) |
47 |
$(RM) .$@.1.tmp |
DOM_HTML_DIS_FILES = DOMHTML.dis DOMWebForms.dis |
48 |
|
DIS_FILES = $(DOM_FEATURE_DIS_FILES) $(DOM_CORE_DIS_FILES) \ |
49 |
html.cdis: ls.cdis DOMHTML.dis DOMWebForms.dis $(DISC_PL) |
$(DOM_LS_DIS_FILES) $(DOM_HTML_DIS_FILES) $(XP_DIS_FILES) \ |
50 |
$(DISC) DOMHTML.dis --input-cdis-file-name=$< \ |
$(DOM_MISC_DIS_FILES) |
51 |
--output-file-name=.$@.1.tmp |
DOT_CORE_DIS_FILES = \ |
52 |
$(DISC) DOMWebForms.dis --input-cdis-file-name=.$@.1.tmp \ |
$(DOM_FEATURE_DIS_FILES) \ |
53 |
--output-file-name=$@ |
$(DOM_CORE_DIS_FILES) \ |
54 |
$(RM) .$@.1.tmp |
TreeStore$(DIS_SUFFIX) |
55 |
|
|
56 |
DOMMain.pm: core.cdis $(CDIS2PM_PL) |
PM_FILES = \ |
57 |
$(CDIS2PM) $< --for="$(NS_MANAKAIDOM)ManakaiDOMCommon" \ |
DOMFeature$(PM_SUFFIX) GenericLS$(PM_SUFFIX) \ |
58 |
--module-name=DOMMain --nooutput-module-version > $@ |
DOMMain$(PM_SUFFIX) DOMCore$(PM_SUFFIX) \ |
59 |
$(CDIS2PM) $< --for="$(NS_MANAKAIDOM)ManakaiDOMLatest" \ |
TreeCore$(PM_SUFFIX) Document$(PM_SUFFIX) Element$(PM_SUFFIX) \ |
60 |
--module-name=DOMMain >> $@ |
CharacterData$(PM_SUFFIX) XML$(PM_SUFFIX) XDoctype$(PM_SUFFIX) \ |
61 |
$(PERL_CHK) $@ |
DOMLS$(PM_SUFFIX) XMLParser$(PM_SUFFIX) \ |
62 |
|
SimpleLS$(PM_SUFFIX) TreeStore$(PM_SUFFIX) \ |
63 |
DOMCore.pm: core.cdis DOMMain.pm $(CDIS2PM_PL) |
Traversal$(PM_SUFFIX) \ |
64 |
$(CDIS2PM) $< --for="$(NS_MANAKAIDOM)ManakaiDOMLatest" \ |
XDP$(PM_SUFFIX) \ |
65 |
--module-name=DOMCore > $@ |
DOMHTML$(PM_SUFFIX) DOMWebForms$(PM_SUFFIX) |
66 |
$(PERL_CHK) $@ |
|
67 |
|
GENERATED_FILES = $(PM_FILES) |
68 |
DOMXML.pm: core.cdis $(CDIS2PM_PL) |
|
69 |
$(CDIS2PM) $< --for="$(NS_MANAKAIDOM)ManakaiDOMLatest" \ |
all: .core$(PM_SUFFIX) $(PM_FILES) |
70 |
--module-name=DOMXML > $@ |
|
71 |
$(PERL_CHK) $@ |
$(PM_FILES): %$(PM_SUFFIX): %$(DIS_SUFFIX) $(DAF_PL) |
72 |
|
$(DAF) --create-perl-module="$(NS_MDOM)$* $@" |
73 |
DOMEvents.pm: ev.cdis $(CDIS2PM_PL) |
$(PERL_CHK) $@ |
74 |
$(CDIS2PM) $< --for="$(NS_MANAKAIDOM)ManakaiDOMLatest" \ |
|
75 |
--module-name=DOMEvents > $@ |
.core$(PM_SUFFIX): $(DOT_CORE_DIS_FILES) $(DAF_PL) |
76 |
$(PERL_CHK) $@ |
$(DAF) \ |
77 |
|
--create-perl-module="$(NS_MDOM)DOMFeature DOMFeature$(PM_SUFFIX)" \ |
78 |
DOMViews.pm: ev.cdis $(CDIS2PM_PL) |
--create-perl-module="$(NS_MDOM)GenericLS GenericLS$(PM_SUFFIX)" \ |
79 |
$(CDIS2PM) $< --for="$(NS_MANAKAIDOM)ManakaiDOMLatest" \ |
--create-perl-module="$(NS_MDOM)DOMMain DOMMain$(PM_SUFFIX)" \ |
80 |
--module-name=DOMViews > $@ |
--create-perl-module="$(NS_MDOM)DOMCore DOMCore$(PM_SUFFIX)" \ |
81 |
$(PERL_CHK) $@ |
--create-perl-module="$(NS_MDOM)TreeCore TreeCore$(PM_SUFFIX)" \ |
82 |
|
--create-perl-module="$(NS_MDOM)Document Document$(PM_SUFFIX)" \ |
83 |
DOMLS.pm: ls.cdis $(CDIS2PM_PL) |
--create-perl-module="$(NS_MDOM)Element Element$(PM_SUFFIX)" \ |
84 |
$(CDIS2PM) $< --for="$(NS_MANAKAIDOM)ManakaiDOMLatest" \ |
--create-perl-module="$(NS_MDOM)CharacterData CharacterData$(PM_SUFFIX)" \ |
85 |
--module-name=DOMLS > $@ |
--create-perl-module="$(NS_MDOM)XML XML$(PM_SUFFIX)" \ |
86 |
$(PERL_CHK) $@ |
--create-perl-module="$(NS_MDOM)XDoctype XDoctype$(PM_SUFFIX)" \ |
87 |
|
--create-perl-module="$(NS_MDOM)TreeStore TreeStore$(PM_SUFFIX)" |
88 |
|
$(PERL_CHK) DOMFeature$(PM_SUFFIX) |
89 |
|
$(PERL_CHK) GenericLS$(PM_SUFFIX) |
90 |
|
$(PERL_CHK) DOMMain$(PM_SUFFIX) |
91 |
|
$(PERL_CHK) DOMCore$(PM_SUFFIX) |
92 |
|
$(PERL_CHK) TreeCore$(PM_SUFFIX) |
93 |
|
$(PERL_CHK) Document$(PM_SUFFIX) |
94 |
|
$(PERL_CHK) Element$(PM_SUFFIX) |
95 |
|
$(PERL_CHK) CharacterData$(PM_SUFFIX) |
96 |
|
$(PERL_CHK) XML$(PM_SUFFIX) |
97 |
|
$(PERL_CHK) XDoctype$(PM_SUFFIX) |
98 |
|
$(PERL_CHK) TreeStore$(PM_SUFFIX) |
99 |
|
$(TOUCH) $@ |
100 |
|
## NOTE: When you modify this rule, update |../Util/Makefile|, too. |
101 |
|
|
102 |
ManakaiDOMLS2003.pm: ls.cdis $(CDIS2PM_PL) |
clean: |
103 |
$(CDIS2PM) $< --for="$(NS_MANAKAIDOM)ManakaiDOMLatest" \ |
$(RMALL) $(GENERATED_FILES) |
104 |
--module-name=ManakaiDOMLS2003 > $@ |
$(RMALL) .*.tmp *~ .*~ *.BAK .*.BAK |
105 |
$(PERL_CHK) $@ |
$(RMALL) .core$(PM_SUFFIX) |
106 |
|
|
107 |
DOMHTML.pm: html.cdis $(CDIS2PM_PL) |
clean-db: |
108 |
$(CDIS2PM) $< --for="$(NS_MANAKAIDOM)ManakaiDOMLatest" \ |
$(RMALL) *$(DAEM_SUFFIX) *$(DAFX_SUFFIX) |
|
--module-name=DOMHTML > $@ |
|
|
$(PERL_CHK) $@ |
|
109 |
|
|
110 |
DOMWebForms.pm: html.cdis $(CDIS2PM_PL) |
distclean: clean clean-db |
|
$(CDIS2PM) $< --for="$(NS_MANAKAIDOM)ManakaiDOMLatest" \ |
|
|
--module-name=DOMWebForms > $@ |
|
|
$(PERL_CHK) $@ |
|
|
|
|
|
clean: |
|
|
$(RM) $(GENERATED_FILES) .*.tmp |
|
111 |
|
|
112 |
|
## $Date$ |
113 |
|
## License: Public Domain. |