1 |
MANAKAI_ROOT_DIR = ../../../ |
2 |
MANAKAI_BIN_DIR = $(MANAKAI_ROOT_DIR)bin/ |
3 |
MANAKAI_LIB_DIR = $(MANAKAI_ROOT_DIR)lib/ |
4 |
MANAKAI_LIB_MANAKAI_DIR = $(MANAKAI_LIB_DIR)manakai/ |
5 |
|
6 |
RM = rm |
7 |
PERL = perl -I$(MANAKAI_LIB_DIR) |
8 |
PERL_CHK = $(PERL) -c -w |
9 |
|
10 |
DISC_PL = $(MANAKAI_BIN_DIR)disc.pl |
11 |
DISC = $(PERL) $(DISC_PL) \ |
12 |
-I=$(MANAKAI_LIB_MANAKAI_DIR) \ |
13 |
-I=$(MANAKAI_LIB_DIR)Message/Util/Error/ \ |
14 |
-I=$(MANAKAI_LIB_DIR)Message/DOM/ |
15 |
CDIS2PM_OPTIONS = --enable-assert |
16 |
## TODO: Official release should remove this option. |
17 |
CDIS2PM_PL = ../../../bin/cdis2pm.pl |
18 |
CDIS2PM = $(PERL) $(CDIS2PM_PL) $(CDIS2PM_OPTIONS) |
19 |
|
20 |
DIS_FILES = ManakaiNode.dis |
21 |
GENERATED_FILES = mnode.cdis ManakaiNode.pm |
22 |
|
23 |
NS_MANAKAIDOM = http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom\# |
24 |
|
25 |
all: $(GENERATED_FILES) |
26 |
|
27 |
mnode.cdis: ManakaiNode.dis $(DISC_PL) |
28 |
$(DISC) $< --output-file-name=$@ |
29 |
|
30 |
ManakaiNode.pm: mnode.cdis $(CDIS2PM_PL) |
31 |
$(CDIS2PM) $< --for="$(NS_MANAKAIDOM)Perl" \ |
32 |
--module-name=ManakaiNode > $@ |
33 |
$(PERL_CHK) $@ |
34 |
|
35 |
clean: |
36 |
$(RM) $(GENERATED_FILES) .*.tmp |