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.
(cherry picked from commit da867d8d68f19f9034a47d42d16db78a84a12299)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit f25b487b1f4b9acb14010293f1e85cbb911caab7)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 345df01dbc4da0f320a7c6844156e9f277294d19)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 23e2064116a35ffa9464bd039f11301709b73e55)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
diff --git a/Makefile b/Makefile
index 115325e..7674469 100644
--- a/Makefile
+++ b/Makefile
@@ -900,6 +900,7 @@
$(Q)for dir in . src include/* doc ebtree; do rm -f $$dir/*~ $$dir/*.rej $$dir/core; done
$(Q)rm -f haproxy-$(VERSION).tar.gz haproxy-$(VERSION)$(SUBVERS).tar.gz
$(Q)rm -f haproxy-$(VERSION) haproxy-$(VERSION)$(SUBVERS) nohup.out gmon.out
+ $(Q)rm -f contrib/*/*.[oas] contrib/*/*/*.[oas] contrib/*/*/*/*.[oas]
tags:
$(Q)find src include \( -name '*.c' -o -name '*.h' \) -print0 | \