From: Hugo Leblanc Date: Thu, 3 Jan 2019 22:22:08 +0000 (-0500) Subject: compiler: fix make clean for makefile generation X-Git-Url: http://nitlanguage.org compiler: fix make clean for makefile generation Add -f option to rm so that the clean doesn't error if the files are absent Signed-off-by: Hugo Leblanc --- diff --git a/src/compiler/abstract_compiler.nit b/src/compiler/abstract_compiler.nit index 75e9cc5..32dd807 100644 --- a/src/compiler/abstract_compiler.nit +++ b/src/compiler/abstract_compiler.nit @@ -556,9 +556,9 @@ endif end 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") + makefile.write("clean:\n\trm -f {ofiles.join(" ")} 2>/dev/null\n") if outpath != real_outpath then - makefile.write("\trm -- {outpath.escape_to_sh} 2>/dev/null\n") + makefile.write("\trm -f -- {outpath.escape_to_sh} 2>/dev/null\n") end makefile.close self.toolcontext.info("Generated makefile: {makepath}", 2)