-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (23 loc) · 735 Bytes
/
Copy pathMakefile
File metadata and controls
30 lines (23 loc) · 735 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
REPOROOT?=$(shell git root)
ANTLRLIB:=$(REPOROOT)/antlrlib
ANTLRJAR:=antlr-3.3-complete.jar
ANTLRD:=antlrd
JAR:=jar
JAVAC:=javac
JAVAFLAGS:=-cp $(ANTLRLIB)/$(ANTLRD)
TARGET:=DTarget
TEMPLATEDIR:=$(ANTLRLIB)/$(ANTLRD)/org/antlr/codegen/templates
antlrd: $(ANTLRLIB)/$(ANTLRD) $(REPOROOT)/codegen/$(TARGET).class $(TEMPLATEDIR)/D
cd $(ANTLRLIB)/$(ANTLRD)/org/antlr/codegen/; ln -s $(REPOROOT)/codegen/$(TARGET).class .
$(ANTLRLIB)/$(ANTLRD): $(ANTLRLIB)/$(ANTLRJAR)
mkdir -p $(@)
cd $(@); $(JAR) -xvf $(ANTLRLIB)/$(ANTLRJAR)
$(TEMPLATEDIR)/D:
cd $(@D);rm -f D;ln -s $(REPOROOT)/templates/D .
%.class: %.java
$(JAVAC) $(JAVAFLAGS) $<
info:
echo $(ANTLRLIB)
clean:
cd $(ANTLRLIB); rm -fR $(ANTLRD)
cd codegen; rm -f *.class