1 |
MANAKAI_ROOT_DIR = ../ |
MANAKAI_ROOT_DIR = ../ |
2 |
MANAKAI_LIB_DIR = $(MANAKAI_ROOT_DIR)lib/ |
MANAKAI_LIB_DIR = $(MANAKAI_ROOT_DIR)lib/ |
3 |
MANAKAI_BIN_DIR = $(MANAKAI_ROOT_DIR)bin/ |
MANAKAI_BIN_DIR = $(MANAKAI_ROOT_DIR)bin/ |
|
TEMP_LIB_DIR = $(MANAKAI_LIB_DIR).phase1.tmp/ |
|
|
TEMP_LIB2_DIR = $(MANAKAI_LIB_DIR).phase2.tmp/ |
|
|
|
|
|
NS_MDOM = http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom\#ManakaiDOM. |
|
|
NS_MARKUP = http://suika.fam.cx/~wakaba/archive/2005/manakai/Markup\# |
|
|
NS_UTIL = http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/ |
|
|
NS_UTIL_ERR = http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/Error/ |
|
4 |
|
|
5 |
MKDIR = mkdir |
MKDIR = mkdir |
6 |
RM = rm |
RM = rm |
7 |
MAKE = make |
MAKE = make |
8 |
CD = cd |
CD = cd |
9 |
|
CP = cp |
10 |
|
ECHO = -echo |
11 |
|
|
12 |
PERL = perl |
all: |
13 |
PERL1 = $(PERL) -I$(MANAKAI_LIB_DIR) |
$(CD) $(MANAKAI_LIB_DIR)manakai/ && $(MAKE) all |
14 |
PERL1_CHK = $(PERL) -I$(TEMP_LIB_DIR) -I$(MANAKAI_LIB_DIR) -c -w |
$(CD) $(MANAKAI_LIB_DIR)Message/ && $(MAKE) all |
|
PERL2 = $(PERL) -I$(TEMP_LIB_DIR) -I$(MANAKAI_LIB_DIR) |
|
|
PERL2_CHK = $(PERL) -I$(TEMP_LIB2_DIR) -I$(TEMP_LIB_DIR) -I$(MANAKAI_LIB_DIR) |
|
|
|
|
|
DISC_PL = $(MANAKAI_BIN_DIR)disc.pl |
|
|
DISC = $(PERL1) $(DISC_PL) \ |
|
|
-I=$(MANAKAI_LIB_DIR)manakai/ \ |
|
|
-I=$(MANAKAI_LIB_DIR)Message/Util/ \ |
|
|
-I=$(MANAKAI_LIB_DIR)Message/Util/Error/ \ |
|
|
-I=$(MANAKAI_LIB_DIR)Message/Markup/ \ |
|
|
-I=$(MANAKAI_LIB_DIR)Message/DOM/ |
|
|
CDIS2PM_OPTIONS = |
|
|
CDIS2PM_PL = $(MANAKAI_BIN_DIR)cdis2pm.pl |
|
|
CDIS2PM = $(PERL1) $(CDIS2PM_PL) $(CDIS2PM_OPTIONS) |
|
|
|
|
|
DAC_PL = $(MANAKAI_BIN_DIR)dac.pl |
|
|
DAC = $(PERL2) \ |
|
|
-MMessage::Util::Error::DOMException \ |
|
|
$(DAC_PL) \ |
|
|
--search-path-catalog-file-name="$(MANAKAI_LIB_DIR)manakai/dis-catalog" \ |
|
|
--db-base-directory-path="$(MANAKAI_ROOT_DIR)" \ |
|
|
--implementation-registry-package \ |
|
|
"Message::DOM::DOMMetaImpl::ManakaiDOMImplementationRegistryCompat" \ |
|
|
--output-file-name= |
|
|
|
|
|
DAC2PM_OPTIONS = |
|
|
DAC2PM_PL = $(MANAKAI_BIN_DIR)dac2pm.pl |
|
|
DAC2PM = $(PERL2) \ |
|
|
-MMessage::Util::Error::DOMException \ |
|
|
$(DAC2PM_PL) \ |
|
|
--implementation-registry-package \ |
|
|
"Message::DOM::DOMMetaImpl::ManakaiDOMImplementationRegistryCompat" \ |
|
|
$(DAC2PM_OPTIONS) |
|
|
|
|
|
PHASE3_PERL_OPTIONS = |
|
|
|
|
|
DIS_FILES_FOR_DOMMETAIMPL = \ |
|
|
$(MANAKAI_LIB_DIR)Message/DOM/DOMBoot.dis \ |
|
|
$(MANAKAI_LIB_DIR)Message/DOM/DOMMetaImpl.dis \ |
|
|
$(MANAKAI_LIB_DIR)Message/Util/ManakaiNode.dis \ |
|
|
$(MANAKAI_LIB_DIR)manakai/DISCore.dis \ |
|
|
$(MANAKAI_LIB_DIR)manakai/DISRDF.dis \ |
|
|
$(MANAKAI_LIB_DIR)manakai/DISLang.dis \ |
|
|
$(MANAKAI_LIB_DIR)manakai/DISIDL.dis \ |
|
|
$(MANAKAI_LIB_DIR)manakai/DISPerl.dis \ |
|
|
$(MANAKAI_LIB_DIR)manakai/XML.dis |
|
|
## NOTE: DOMBoot.dis must be first |
|
|
|
|
|
DIS_FILES_FOR_DIS = \ |
|
|
$(MANAKAI_LIB_DIR)Message/Util/DIS.dis \ |
|
|
$(MANAKAI_LIB_DIR)Message/Markup/SuikaWikiConfig21.dis \ |
|
|
$(MANAKAI_LIB_DIR)Message/Util/Error/DOMException.dis \ |
|
|
$(MANAKAI_LIB_DIR)Message/Util/PerlCode.dis |
|
|
## NOTE: DIS.dis must be first |
|
|
|
|
|
PHASE1_PM_FILES = \ |
|
|
$(TEMP_LIB_DIR)Message/Util/ManakaiNode.pm \ |
|
|
$(TEMP_LIB_DIR)Message/DOM/DOMMetaImpl.pm \ |
|
|
$(TEMP_LIB_DIR)Message/Markup/SuikaWikiConfig21.pm \ |
|
|
$(TEMP_LIB_DIR)Message/Util/Error/DOMException.pm \ |
|
|
$(TEMP_LIB_DIR)Message/Util/PerlCode.pm \ |
|
|
$(TEMP_LIB_DIR)Message/Util/DIS.pm |
|
|
|
|
|
PHASE2_PM_FILES = \ |
|
|
$(TEMP_LIB2_DIR)Message/Util/ManakaiNode.pm \ |
|
|
$(TEMP_LIB2_DIR)Message/DOM/DOMMetaImpl.pm \ |
|
|
$(TEMP_LIB2_DIR)Message/Markup/SuikaWikiConfig21.pm \ |
|
|
$(TEMP_LIB2_DIR)Message/Util/Error/DOMException.pm \ |
|
|
$(TEMP_LIB2_DIR)Message/Util/PerlCode.pm \ |
|
|
$(TEMP_LIB2_DIR)Message/Util/DIS.pm |
|
|
|
|
|
GENERATED_FILES = $(TEMP_LIB_DIR) $(PHASE1_PM_FILES) \ |
|
|
\ |
|
|
$(TEMP_LIB2_DIR) $(PHASE2_PM_FILES) |
|
|
|
|
|
all: $(GENERATED_FILES) phase3 |
|
|
|
|
|
## Phase 1 - Making Perl modules by old disc and cdis2pm tools |
|
|
|
|
|
$(TEMP_LIB_DIR): |
|
|
$(MKDIR) -p $(TEMP_LIB_DIR)Message/Util/Error |
|
|
$(MKDIR) -p $(TEMP_LIB_DIR)Message/DOM |
|
|
$(MKDIR) -p $(TEMP_LIB_DIR)Message/Markup |
|
|
|
|
|
$(TEMP_LIB_DIR)dom.cdis: $(DIS_FILES_FOR_DOMMETAIMPL) $(DISC_PL) |
|
|
$(DISC) $< --output-file-name="$@" |
|
|
|
|
|
$(TEMP_LIB_DIR)dis.cdis: $(DIS_FILES_FOR_DIS) \ |
|
|
$(TEMP_LIB_DIR)dom.cdis $(DISC_PL) |
|
|
$(DISC) $< --input-cdis-file-name="$(TEMP_LIB_DIR)dom.cdis" \ |
|
|
--output-file-name="$@" |
|
|
|
|
|
$(TEMP_LIB_DIR)Message/DOM/DOMMetaImpl.pm: $(TEMP_LIB_DIR)dom.cdis $(CDIS2PM_PL) |
|
|
$(CDIS2PM) $< --module-name=DOMMetaImpl > $@ |
|
|
$(PERL1_CHK) $@ |
|
|
|
|
|
$(TEMP_LIB_DIR)Message/Util/ManakaiNode.pm: $(TEMP_LIB_DIR)dom.cdis $(CDIS2PM_PL) |
|
|
$(CDIS2PM) $< --module-name=ManakaiNode > $@ |
|
|
$(PERL1_CHK) $@ |
|
|
|
|
|
$(TEMP_LIB_DIR)Message/Util/DIS.pm: $(TEMP_LIB_DIR)dis.cdis $(CDIS2PM_PL) |
|
|
$(CDIS2PM) $< --module-name=DIS > $@ |
|
|
$(PERL1_CHK) $@ |
|
|
|
|
|
$(TEMP_LIB_DIR)Message/Util/PerlCode.pm: $(TEMP_LIB_DIR)dis.cdis $(CDIS2PM_PL) |
|
|
$(CDIS2PM) $< --module-name=PerlCode > $@ |
|
|
$(PERL1_CHK) $@ |
|
|
|
|
|
$(TEMP_LIB_DIR)Message/Util/Error/DOMException.pm: $(TEMP_LIB_DIR)dis.cdis \ |
|
|
$(CDIS2PM_PL) |
|
|
$(CDIS2PM) $< --module-name=DOMException > $@ |
|
|
$(PERL1_CHK) $@ |
|
|
|
|
|
$(TEMP_LIB_DIR)Message/Markup/SuikaWikiConfig21.pm: $(TEMP_LIB_DIR)dis.cdis \ |
|
|
$(CDIS2PM_PL) |
|
|
$(CDIS2PM) $< --module-name=SuikaWikiConfig21 > $@ |
|
|
$(PERL1_CHK) $@ |
|
|
|
|
|
## Phase 2 - Making Perl modules by dac tools generated |
|
|
## by old disc and cdis2pm tools |
|
|
|
|
|
$(TEMP_LIB2_DIR): |
|
|
$(MKDIR) -p $(TEMP_LIB2_DIR)Message/Util/Error |
|
|
$(MKDIR) -p $(TEMP_LIB2_DIR)Message/DOM |
|
|
$(MKDIR) -p $(TEMP_LIB2_DIR)Message/Markup |
|
|
|
|
|
$(TEMP_LIB2_DIR)dom.dac: $(DIS_FILES_FOR_DOMMETAIMPL) \ |
|
|
$(DAC_PL) $(PHASE1_PM_FILES) |
|
|
$(DAC)$@ $< |
|
|
|
|
|
$(TEMP_LIB2_DIR)dis.dac: $(DIS_FILES_FOR_DIS) $(TEMP_LIB2_DIR)dom.dac $(DAC_PL) |
|
|
$(DAC)$@ --input-db-file-name="$(TEMP_LIB2_DIR)dom.dac" $< |
|
|
|
|
|
$(TEMP_LIB2_DIR)Message/DOM/DOMMetaImpl.pm: \ |
|
|
$(TEMP_LIB2_DIR)dom.dac $(DAC2PM_PL) |
|
|
$(DAC2PM) $< --module-uri="$(NS_MDOM)DOMMetaImpl" > $@ |
|
|
$(PERL2_CHK) $@ |
|
|
|
|
|
$(TEMP_LIB2_DIR)Message/Markup/SuikaWikiConfig21.pm: \ |
|
|
$(TEMP_LIB2_DIR)dis.dac $(DAC2PM_PL) |
|
|
$(DAC2PM) $< --module-uri="$(NS_MARKUP)SuikaWikiConfig21" > $@ |
|
|
$(PERL2_CHK) $@ |
|
|
|
|
|
$(TEMP_LIB2_DIR)Message/Util/ManakaiNode.pm: \ |
|
|
$(TEMP_LIB2_DIR)dom.dac $(DAC2PM_PL) |
|
|
$(DAC2PM) $< --module-uri="$(NS_UTIL)ManakaiNode" > $@ |
|
|
$(PERL2_CHK) $@ |
|
|
|
|
|
$(TEMP_LIB2_DIR)Message/Util/DIS.pm: \ |
|
|
$(TEMP_LIB2_DIR)dis.dac $(DAC2PM_PL) |
|
|
$(DAC2PM) $< --module-uri="$(NS_UTIL)DIS" > $@ |
|
|
$(PERL2_CHK) $@ |
|
|
|
|
|
$(TEMP_LIB2_DIR)Message/Util/PerlCode.pm: \ |
|
|
$(TEMP_LIB2_DIR)dis.dac $(DAC2PM_PL) |
|
|
$(DAC2PM) $< --module-uri="$(NS_UTIL)PerlCode" > $@ |
|
|
$(PERL2_CHK) $@ |
|
|
|
|
|
$(TEMP_LIB2_DIR)Message/Util/Error/DOMException.pm: \ |
|
|
$(TEMP_LIB2_DIR)dis.dac $(DAC2PM_PL) |
|
|
$(DAC2PM) $< --module-uri="$(NS_UTIL_ERR)DOMException" > $@ |
|
|
$(PERL2_CHK) $@ |
|
|
|
|
|
## Phase 3 - Making Perl modules by dac tools generated by dac tools |
|
|
|
|
|
phase3: $(PHASE2_PM_FILES) |
|
|
$(CD) $(MANAKAI_LIB_DIR)Message/Util && \ |
|
|
$(MAKE) all \ |
|
|
PERL_OPTIONS="-I../../$(TEMP_LIB2_DIR) -I../../$(MANAKAI_LIB_DIR) \ |
|
|
$(PHASE3_PERL_OPTIONS)" \ |
|
|
PERLC_OPTIONS="-I../../$(MANAKAI_LIB_DIR) $(PHASE3_PERL_OPTIONS)" |
|
|
|
|
|
|
|
|
## Misc. |
|
15 |
|
|
16 |
clean: |
clean: |
|
$(RM) -frv $(TEMP_LIB_DIR) |
|
17 |
$(RM) -fv *~ .*~ *.BAK .*.BAK |
$(RM) -fv *~ .*~ *.BAK .*.BAK |
18 |
$(CD) $(MANAKAI_LIB_DIR)Message/Util && $(MAKE) clean |
$(CD) $(MANAKAI_LIB_DIR)manakai/ && $(MAKE) clean |
19 |
|
$(CD) $(MANAKAI_LIB_DIR)Message/ && $(MAKE) clean |
20 |
|
|
21 |
|
## $Date$ |
22 |
|
## License: Public Domain. |