【发布时间】:2021-07-23 12:28:07
【问题描述】:
我当然又傻了。
谁能告诉我这是为什么?
$(shell compileJava.bat)
没有任何变量、特殊字符、不需要的空格、冒号等的表达式导致错误Makefile:70: *** multiple target patterns. Stop.。
我已经在整个互联网上搜索了答案。
我要做什么。
我正在制作一个涉及本地人的 Java 项目。我有这样的结构;
+ root (project)
-+ build
-+ natives (for the built native libraries like dlls)
-+ classes (for the built java classes)
-+ generated (gradles compileJava task automatically generates jni header files)
-+ src
-+ main
-+ java (all of the java source)
-+ resources
-+ c
-+ Makefile (will be called to compile and link the c(++) code)
-+ Makefile (the general makefile, error occurs in here at line 70)
-+ compileJava.bat (calls gradlew compileJava with a jdk argument, but since im using
windows and make doesnt support colons, like C:, i had to put it in a batch file)
根 Makefile 应该遵循这个过程;
[1] call "compileJava.bat" to compile the java code & gen the headers (error occurs here)
[2] call "make -C src/main/c" to run the native build makefile
[3] call "jar cf <name> <contents>" to package all java code (and the natives) into a jar
链接
我的整个根 Makefile:Pastebin
compileJava.bat:Pastebin
【问题讨论】: