From da867d8d68f19f9034a47d42d16db78a84a12299 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Wed, 16 Dec 2020 14:14:38 +0100 Subject: [PATCH] BUILD: Makefile: have "make clean" destroy .o/.a/.s in contrib subdirs as well Now that we sometimes link some contrib subparts directly into the haproxy binary, it's becoming a real problem that they're not cleaned on make clean. Some of the tools there are useful as .so or pure binaries and we don't want to remove them, but anything intermediary susceptible to be linked into haproxy should be clenaed. This is what this patch does for 3 levels of subdirs into contrib/, without touching the rest. It should be sufficient for the vast majority of use cases. --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index dd85e51a20..feb8010fac 100644 --- a/Makefile +++ b/Makefile @@ -961,6 +961,7 @@ clean: $(Q)for dir in . src include/* doc; do rm -f $$dir/*~ $$dir/*.rej $$dir/core; done $(Q)rm -f haproxy-$(VERSION).tar.gz haproxy-$(VERSION)$(SUBVERS)$(EXTRAVERSION).tar.gz $(Q)rm -f haproxy-$(VERSION) haproxy-$(VERSION)$(SUBVERS)$(EXTRAVERSION) nohup.out gmon.out + $(Q)rm -f contrib/*/*.[oas] contrib/*/*/*.[oas] contrib/*/*/*/*.[oas] $(Q)rm -f contrib/halog/halog contrib/debug/flags contrib/debug/poll contrib/tcploop/tcploop tags: