From fe7702f53405ba043990a4b995021add5b8d9949 Mon Sep 17 00:00:00 2001 From: Hugo Leblanc Date: Thu, 3 Jan 2019 17:22:08 -0500 Subject: [PATCH] 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 --- 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 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) -- 1.7.9.5