-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add missing cup runtime dependency, refactor parser makefiles.
- Loading branch information
1 parent
bd8cbb7
commit 18a1d27
Showing
4 changed files
with
71 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
PARSER_LIBDIR = $(CCPARSER_BASEDIR)/lib | ||
|
||
CUP_JAR = $(PARSER_LIBDIR)/java-cup-11b.jar | ||
CUP_RUNTIME_JAR = $(PARSER_LIBDIR)/java-cup-runtime-11b.jar | ||
JFLEX_PLUGIN_JAR = $(PARSER_LIBDIR)/jflex-1.9.1.jar | ||
|
||
.PHONY: download-jars | ||
download-jars: $(CUP_JAR) $(CUP_RUNTIME_JAR) $(JFLEX_PLUGIN_JAR) | ||
|
||
$(PARSER_LIBDIR): | ||
@mkdir -p $@ | ||
|
||
$(CUP_JAR): | $(PARSER_LIBDIR) | ||
@echo "Looking for CUP JAR at $(CUP_JAR)..." | ||
@if [ ! -f $(CUP_JAR) ]; then \ | ||
echo "CUP JAR not found, downloading..."; \ | ||
mvn org.apache.maven.plugins:maven-dependency-plugin:2.10:get \ | ||
-DremoteRepositories=https://repo.maven.apache.org/maven2/ \ | ||
-Dartifact=com.github.vbmacher:java-cup:11b-20160615-2 \ | ||
-Dtransitive=false \ | ||
-Ddest=$(CUP_JAR); \ | ||
else \ | ||
echo "CUP JAR found, skipping download."; \ | ||
fi | ||
|
||
$(CUP_RUNTIME_JAR): | $(PARSER_LIBDIR) | ||
@echo "Looking for CUP Runtime JAR at $(CUP_RUNTIME_JAR)..." | ||
@if [ ! -f $(CUP_RUNTIME_JAR) ]; then \ | ||
echo "CUP Runtime JAR not found, downloading..."; \ | ||
mvn org.apache.maven.plugins:maven-dependency-plugin:2.10:get \ | ||
-DremoteRepositories=https://repo.maven.apache.org/maven2/ \ | ||
-Dartifact=com.github.vbmacher:java-cup-runtime:11b-20160615-2 \ | ||
-Dtransitive=false \ | ||
-Ddest=$(CUP_RUNTIME_JAR); \ | ||
else \ | ||
echo "CUP Runtime JAR found, skipping download."; \ | ||
fi | ||
|
||
$(JFLEX_PLUGIN_JAR): | $(PARSER_LIBDIR) | ||
@echo "Looking for JFlex plugin JAR at $(JFLEX_PLUGIN_JAR)..." | ||
@if [ ! -f $(JFLEX_PLUGIN_JAR) ]; then \ | ||
echo "JFlex plugin JAR not found, downloading..."; \ | ||
mvn org.apache.maven.plugins:maven-dependency-plugin:2.10:get \ | ||
-DremoteRepositories=https://repo.maven.apache.org/maven2/ \ | ||
-Dartifact=de.jflex:jflex:1.9.1 \ | ||
-Dtransitive=false \ | ||
-Ddest=$(JFLEX_PLUGIN_JAR); \ | ||
else \ | ||
echo "JFlex plugin JAR found, skipping download."; \ | ||
fi |