File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
graalpython/com.oracle.graal.python.parser.antlr Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -48,21 +48,22 @@ TARGETS=${PARSER_PATH}/Python3BaseVisitor.java \
48
48
${PARSER_PATH}/Python3Lexer.java
49
49
50
50
SOURCE =${PARSER_PATH}/Python3.g4
51
+ STAMP =${SOURCE}.stamp
51
52
52
53
.PHONY : default clean
53
54
default : ${TARGETS}
54
55
55
- # postprocessing to make source compile without warnings
56
- define postprocess_file
57
- python ${POSTPROCESSOR} $(1 )
58
- endef
59
-
60
- ${PARSER_PATH}/% .java : ${SOURCE} ${POSTPROCESSOR}
56
+ ${STAMP} : ${SOURCE} ${POSTPROCESSOR}
57
+ $(QUIETLY ) touch $@
61
58
$(QUIETLY ) ${JAVA_HOME} /bin/java -cp ${ANTLR_JAR} org.antlr.v4.Tool -visitor -package ${PARSER_PKG} -o ${PARSER_PATH} ${SOURCE}
62
- $(QUIETLY ) $(call postprocess_file,$@ )
59
+
60
+ # postprocessing to make source compile without warnings
61
+ ${PARSER_PATH}/% .java : ${STAMP}
62
+ $(QUIETLY ) python ${POSTPROCESSOR} $@
63
63
64
64
clean :
65
65
ifeq ($(wildcard ${SOURCE}) ,)
66
66
$(error ${SOURCE} is not in the location I expected it to be, not cleaning antlr parser)
67
67
endif
68
68
$(QUIETLY) rm -f ${TARGETS}
69
+ $(QUIETLY) rm -f ${STAMP}
You can’t perform that action at this time.
0 commit comments