]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: Makefile: have "make clean" destroy .o/.a/.s in contrib subdirs as well
authorWilly Tarreau <w@1wt.eu>
Wed, 16 Dec 2020 13:14:38 +0000 (14:14 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 16 Dec 2020 13:19:44 +0000 (14:19 +0100)
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

index dd85e51a2068df1366e72c4231f72e3e9e9b2e6c..feb8010faca1198b36da3cf0dd0290f3095186c2 100644 (file)
--- 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: