1 |
LS = ls |
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 |
MAKE = make |
10 |
SED = sed |
RM = rm |
11 |
XARGS = xargs |
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 DOMLS.dis |
38 |
|
DOM_HTML_DIS_FILES = DOMHTML.dis DOMWebForms.dis |
39 |
|
DIS_FILES = $(DOM_CORE_DIS_FILES) $(DOM_HTML_DIS_FILES) |
40 |
|
|
41 |
|
_DIS_FILES = \ |
42 |
|
ManakaiDOMLS2003.dis \ |
43 |
|
DOMEvents.dis DOMViews.dis |
44 |
|
|
45 |
PERL = perl -I../../../../ |
GENERATED_FILES = \ |
46 |
PERL_CHK = $(PERL) -c |
core$(DAC_SUFFIX) DOMFeature$(PM_SUFFIX) DOMMain$(PM_SUFFIX) \ |
47 |
|
DOMCore$(PM_SUFFIX) DOMXML$(PM_SUFFIX) DOMLS$(PM_SUFFIX) \ |
48 |
|
html$(DAC_SUFFIX) DOMHTML$(PM_SUFFIX) DOMWebForms$(PM_SUFFIX) |
49 |
|
GENERATED_DAC_FILES = core$(DAC_SUFFIX) html$(DAC_SUFFIX) |
50 |
|
|
51 |
DIS2PM_PL = dis2pm.pl |
all: .core$(PM_SUFFIX) .html$(PM_SUFFIX) $(GENERATED_DAC_FILES) |
|
DIS2PM = $(PERL) $(DIS2PM_PL) |
|
52 |
|
|
53 |
all: dom-modules |
core$(DAC_SUFFIX): $(UTIL_CORE_DAC_FILE) $(DOM_CORE_DIS_FILES) $(DAC_PL) |
54 |
|
$(DAC)$@ --input-db-file-name="$<" DOMLS.dis |
55 |
|
|
56 |
dom-modules: |
html$(DAC_SUFFIX): core$(DAC_SUFFIX) $(DOM_HTML_DIS_FILES) $(DAC_PL) |
57 |
$(LS) *.dis | $(SED) s/\.dis/.pm/ | $(XARGS) $(MAKE) |
$(DAC)$@ --input-db-file-name="$<" DOMHTML.dis |
58 |
|
|
59 |
%.pm: %.dis $(DIS2PM_PL) |
$(DOM_CORE_DIS_FILES:.dis=$(PM_SUFFIX)): core$(DAC_SUFFIX) $(DAC2PM_PL) |
60 |
$(DIS2PM) $< > $@ |
$(DAC2PM) $< --module-uri="$(NS_MDOM)$(@:$(PM_SUFFIX)=)" \ |
61 |
|
--output-file-path="$@" |
62 |
$(PERL_CHK) $@ |
$(PERL_CHK) $@ |
63 |
|
|
64 |
|
.core$(PM_SUFFIX): core$(DAC_SUFFIX) $(DAC2PM_PL) |
65 |
|
$(DAC2PM) $< \ |
66 |
|
--create-perl-module="$(NS_MDOM)DOMFeature DOMFeature$(PM_SUFFIX)" \ |
67 |
|
--create-perl-module="$(NS_MDOM)DOMMain DOMMain$(PM_SUFFIX)" \ |
68 |
|
--create-perl-module="$(NS_MDOM)DOMCore DOMCore$(PM_SUFFIX)" \ |
69 |
|
--create-perl-module="$(NS_MDOM)DOMXML DOMXML$(PM_SUFFIX)" \ |
70 |
|
--create-perl-module="$(NS_MDOM)DOMLS DOMLS$(PM_SUFFIX)" |
71 |
|
$(PERL_CHK) DOMFeature$(PM_SUFFIX) |
72 |
|
$(PERL_CHK) DOMMain$(PM_SUFFIX) |
73 |
|
$(PERL_CHK) DOMCore$(PM_SUFFIX) |
74 |
|
$(PERL_CHK) DOMXML$(PM_SUFFIX) |
75 |
|
$(PERL_CHK) DOMLS$(PM_SUFFIX) |
76 |
|
$(TOUCH) $@ |
77 |
|
|
78 |
|
$(DOM_HTML_DIS_FILES:.dis=$(PM_SUFFIX)): html$(DAC_SUFFIX) $(DAC2PM_PL) |
79 |
|
$(DAC2PM) $< --module-uri="$(NS_MDOM)$(@:$(PM_SUFFIX)=)" > $@ |
80 |
|
$(PERL_CHK) $@ |
81 |
|
|
82 |
|
.html$(PM_SUFFIX): html$(DAC_SUFFIX) $(DAC2PM_PL) |
83 |
|
$(DAC2PM) $< \ |
84 |
|
--create-perl-module="$(NS_MDOM)DOMHTML DOMHTML$(PM_SUFFIX)" \ |
85 |
|
--create-perl-module="$(NS_MDOM)DOMWebForms DOMWebForms$(PM_SUFFIX)" |
86 |
|
$(PERL_CHK) DOMHTML$(PM_SUFFIX) |
87 |
|
$(PERL_CHK) DOMWebForms$(PM_SUFFIX) |
88 |
|
$(TOUCH) $@ |
89 |
|
|
90 |
|
# $(UTIL_CORE_DAC_FILE) |
91 |
|
$(MANAKAI_LIB_DIR)Message/Util/core$(DAC_SUFFIX): dummy |
92 |
|
$(CD) $(MANAKAI_LIB_DIR)Message/Util/ && $(MAKE) core$(DAC_SUFFIX) |
93 |
|
|
94 |
|
dummy: |
95 |
|
|
96 |
|
clean: |
97 |
|
$(RM) $(GENERATED_FILES) |
98 |
|
$(RM) .*.tmp *~ .*~ *.BAK .*.BAK .core$(PM_SUFFIX) .html$(PM_SUFFIX) |
99 |
|
|
100 |
|
## $Date$ |
101 |
|
## License: Public Domain. |