]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: makefile: add entries to build common debugging tools
authorWilly Tarreau <w@1wt.eu>
Thu, 22 Oct 2020 03:12:57 +0000 (05:12 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 22 Oct 2020 03:17:08 +0000 (05:17 +0200)
A few tools in contrib/ such as halog, flags, poll and tcploop are
occasionally useful at least to developers, and some of them such as
halog or flags can occasionally break due to some changes in the include
files. As reported in issue #907, their inability to inherit the global
build options also causes some warnings related to some specificities
of the main include files. Let's just add entries in the main makefile
to build them.

Makefile

index 2fb05c7198b4fc4fe5cec029906dc925865c164f..85ca45e43ff39ce370ae74b546dc3c149214d84c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -888,6 +888,18 @@ objsize: haproxy
 %.o:   %.c $(DEP)
        $(cmd_CC) $(COPTS) -c -o $@ $<
 
+contrib/halog/halog:
+       $(Q)$(MAKE) -C contrib/halog halog CC='$(cmd_CC)' OPTIMIZE='$(COPTS)'
+
+contrib/debug/flags:
+       $(Q)$(MAKE) -C contrib/debug flags CC='$(cmd_CC)' OPTIMIZE='$(COPTS)'
+
+contrib/debug/poll:
+       $(Q)$(MAKE) -C contrib/debug poll CC='$(cmd_CC)' OPTIMIZE='$(COPTS)'
+
+contrib/tcploop/tcploop:
+       $(Q)$(MAKE) -C contrib/tcploop tcploop CC='$(cmd_CC)' OPTIMIZE='$(COPTS)'
+
 # rebuild it every time
 .PHONY: src/version.c
 
@@ -943,6 +955,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/halog/halog contrib/debug/flags contrib/debug/poll contrib/tcploop/tcploop
 
 tags:
        $(Q)find src include \( -name '*.c' -o -name '*.h' \) -print0 | \