nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Java FFI: Makefile adds the compilation dir to the Java CLASSPATH
[nit.git]
/
src
/
compiler
/
abstract_compiler.nit
diff --git
a/src/compiler/abstract_compiler.nit
b/src/compiler/abstract_compiler.nit
index
32dd807
..
e786374
100644
(file)
--- a/
src/compiler/abstract_compiler.nit
+++ b/
src/compiler/abstract_compiler.nit
@@
-465,6
+465,13
@@
ifneq ($(findstring MINGW64,$(uname_S)),)
CFLAGS += -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast
endif
CFLAGS += -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast
endif
+# Add the compilation dir to the Java CLASSPATH
+ifeq ($(CLASSPATH),)
+ CLASSPATH := .
+else
+ CLASSPATH := $(CLASSPATH):.
+endif
+
"""
makefile.write("all: {outpath}\n")
"""
makefile.write("all: {outpath}\n")
@@
-528,8
+535,7
@@
endif
var java_files = new Array[ExternFile]
for f in compiler.extern_bodies do
var o = f.makefile_rule_name
var java_files = new Array[ExternFile]
for f in compiler.extern_bodies do
var o = f.makefile_rule_name
- var ff = f.filename.basename
- makefile.write("{o}: {ff}\n")
+ makefile.write("{o}: {f.filename}\n")
makefile.write("\t{f.makefile_rule_content}\n\n")
dep_rules.add(f.makefile_rule_name)
makefile.write("\t{f.makefile_rule_content}\n\n")
dep_rules.add(f.makefile_rule_name)
@@
-712,7
+718,7
@@
abstract class AbstractCompiler
stream.write("const char* get_nit_name(register const char* procname, register unsigned int len);\n")
stream.close
stream.write("const char* get_nit_name(register const char* procname, register unsigned int len);\n")
stream.close
- extern_bodies.add(new ExternCFile("{compile_dir}/c_functions_hash.c", ""))
+ extern_bodies.add(new ExternCFile("c_functions_hash.c", ""))
end
# Compile C headers
end
# Compile C headers