ref: 590cc101215a2493384d22ca4dd6f6e02958bac8
parent: fbe5607a97aadbcd97103d6c7937a2e5a13ed4c3
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Thu Oct 7 20:42:20 EDT 2021
qbe: Add specific clean rule in top Makefile As qbe is a submodule it does not have a Makefile until git submodule init is executed, and it means that it does not have a Makefile, so make clean will fail. For this reason we force to have a repository ready before going to clean the directory.
--- a/src/cmd/Makefile
+++ b/src/cmd/Makefile
@@ -57,4 +57,7 @@
$(BINDIR)/ar: ar.o $(DRIVER).o
$(CC) $(PROJ_LDFLAGS) ar.o $(DRIVER).o -o $@
+clean: qbe/.git
+ git submodule deinit qbe
+
include deps.mk