From: Jean Privat Date: Mon, 10 Nov 2014 21:25:25 +0000 (-0500) Subject: compiler: escape the binary name in generated Makefile X-Git-Tag: v0.6.11~34^2~7 X-Git-Url: http://nitlanguage.org compiler: escape the binary name in generated Makefile Signed-off-by: Jean Privat --- diff --git a/src/compiler/abstract_compiler.nit b/src/compiler/abstract_compiler.nit index 16c0e4b..ee27f8a 100644 --- a/src/compiler/abstract_compiler.nit +++ b/src/compiler/abstract_compiler.nit @@ -315,7 +315,7 @@ class MakefileToolchain var outname = outfile(mainmodule) - var outpath = compile_dir.relpath(outname) + var outpath = compile_dir.relpath(outname).escape_to_mk var makename = makefile_name(mainmodule) var makepath = "{compile_dir}/{makename}" var makefile = new OFStream.open(makepath) @@ -413,7 +413,7 @@ endif if not pkgconfigs.is_empty then pkg = "`pkg-config --libs {pkgconfigs.join(" ")}`" end - makefile.write("{outpath}: {dep_rules.join(" ")}\n\t$(CC) $(LDFLAGS) -o {outpath} {ofiles.join(" ")} $(LDLIBS) {pkg}\n\n") + makefile.write("{outpath}: {dep_rules.join(" ")}\n\t$(CC) $(LDFLAGS) -o {outpath.escape_to_sh} {ofiles.join(" ")} $(LDLIBS) {pkg}\n\n") # Clean makefile.write("clean:\n\trm {ofiles.join(" ")} 2>/dev/null\n\n") makefile.close