[英]Java makefile under windows chokes on accent marks
First off, I'm sorry if this is trivial, I have no experience with make files, I only develop on Windows and I'm used to IDEs. 首先,对不起,我很抱歉,我没有make文件的经验,只在Windows上开发,并且习惯于IDE。
I need to compile an external java library. 我需要编译一个外部Java库。 It comes with a makefile.
它带有一个makefile。 Unfortunately I'm having a lot of trouble getting it to run.
不幸的是,我很难运行它。
I installed make and grep from the GnuWin32 toolset and added it to my path variable. 我从GnuWin32工具集中安装了make和grep,并将其添加到我的path变量中。 When I try to run the makefile it chokes on:
当我尝试运行makefile时,它会阻塞:
"javac: invalid flag: `find"
Usage: javac <options> <source files>
It seems like it has problems interpreting the accent mark. 口音标记的解释似乎有问题。 Is that supposed to be a quotation mark killed by text encoding?
那应该是被文本编码杀死的引号吗? I did a quick google search but I'm not finding anything relevant.
我做了一个快速的谷歌搜索,但没有找到任何相关的信息。
Here is the full make file I'm trying to get to run: 这是我要运行的完整make文件:
# UNIX:
#JAVAC=javac -encoding utf8 -target 1.6 -source 1.6 -Xlint:deprecation -Xlint:unchecked -cp "../lib/asm-4.1.jar:../lib/asm-analysis-4.1.jar:../lib/asm-commons-4.1.jar:../lib/asm-tree-4.1.jar:../lib/asm-util-4.1.jar:../lib/asm-xml-4.1.jar:../lib/junit-4.0.jar"
# Win32:
JAVAC=javac -encoding utf8 -target 1.6 -source 1.6 -Xlint:deprecation -Xlint:unchecked -cp "../lib/asm-4.1.jar;../lib/asm-analysis-4.1.jar;../lib/asm-commons-4.1.jar;../lib/asm-tree-4.1.jar;../lib/asm-util-4.1.jar;../lib/asm-xml-4.1.jar;../lib/junit-4.0.jar"
JAVA=java
SOURCES=`find . -name "*.java" | grep -v \\\#`
JAR=pqlib.jar
.PHONY = all default clean test benchmark jar
default: all
all:
${JAVAC} `find . -name "*.java" | grep -v \\\#`
clean:
rm -f `find . -name "*.class"`
test: all
${JAVA} org.junit.runner.JUnitCore `find edu -name "*Test.java" | grep -v \\\# | sed 's/^\.\///' | sed 's/\.java//' | tr '/' '.'`
benchmark: all bench/MiniBench.class
${JAVA} bench.MiniBench
jar: all
rm -f ${JAR}
jar cf ${JAR} `find edu -name "*.class" | grep -v Test`
Any help is greatly appreciated. 任何帮助是极大的赞赏。
It looks like you need to install Cygwin32 and add its bin directory to your path. 看来您需要安装Cygwin32并将其bin目录添加到您的路径中。
The commands find
, grep
etc. are all part of it. find
, grep
等命令都是其中的一部分。 OR you can install them one by one as you did with grep
. 或者,您可以像使用
grep
一样逐一安装它们。
Is there an README or INSTALL file that comes with your library? 库中是否有自述文件或安装文件? This things are usually explained in those files.
这些东西通常在这些文件中说明。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.