From 9cf86ef5df3776b462be578254378a7a2b4f341d Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Mon, 10 Nov 2014 16:25:25 -0500 Subject: [PATCH] compiler: escape the binary name in generated Makefile Signed-off-by: Jean Privat --- src/compiler/abstract_compiler.nit | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 1.7.9.5