1 |
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 |
7 |
RM = rm |
8 |
PERL = perl |
9 |
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 |
UTIL_CORE_DAC_FILE = $(MANAKAI_LIB_DIR)Message/Util/core.dac |
32 |
|
33 |
DOM_CORE_DIS_FILES = DOMFeature.dis DOMMain.dis DOMCore.dis DOMXML.dis DOMLS.dis |
34 |
DOM_HTML_DIS_FILES = DOMHTML.dis DOMWebForms.dis |
35 |
DIS_FILES = $(DOM_CORE_DIS_FILES) $(DOM_HTML_DIS_FILES) |
36 |
|
37 |
_DIS_FILES = \ |
38 |
ManakaiDOMLS2003.dis \ |
39 |
DOMEvents.dis DOMViews.dis |
40 |
|
41 |
GENERATED_FILES = \ |
42 |
core.dac DOMFeature.pm DOMMain.pm DOMCore.pm DOMXML.pm DOMLS.pm \ |
43 |
html.dac DOMHTML.pm DOMWebForms.pm |
44 |
|
45 |
all: $(GENERATED_FILES) |
46 |
|
47 |
core.dac: $(UTIL_CORE_DAC_FILE) $(DOM_CORE_DIS_FILES) $(DAC_PL) |
48 |
$(DAC)$@ --input-db-file-name="$<" DOMLS.dis |
49 |
|
50 |
html.dac: core.dac $(DOM_HTML_DIS_FILES) $(DAC_PL) |
51 |
$(DAC)$@ --input-db-file-name="$<" DOMHTML.dis |
52 |
|
53 |
$(DOM_CORE_DIS_FILES:.dis=.pm): core.dac $(DAC2PM_PL) |
54 |
$(DAC2PM) $< --module-uri="$(NS_MDOM)$(@:.pm=)" --output-file-path="$@" |
55 |
$(PERL_CHK) $@ |
56 |
|
57 |
$(DOM_HTML_DIS_FILES:.dis=.pm): html.dac $(DAC2PM_PL) |
58 |
$(DAC2PM) $< --module-uri="$(NS_MDOM)$(@:.pm=)" > $@ |
59 |
$(PERL_CHK) $@ |
60 |
|
61 |
# $(UTIL_CORE_DAC_FILE) |
62 |
$(MANAKAI_LIB_DIR)Message/Util/core.dac: dummy |
63 |
$(CD) $(MANAKAI_LIB_DIR)Message/Util/ && $(MAKE) core.dac |
64 |
|
65 |
dummy: |
66 |
|
67 |
clean: |
68 |
$(RM) $(GENERATED_FILES) .*.tmp *~ .*~ *.BAK .*.BAK |
69 |
|