From 34b436970916940067b27de4aaa18d28d1bb0bfa Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Fri, 2 Apr 2021 13:43:49 +0200 Subject: [PATCH] CONTRIB: debug: split poll from flags Now poll is its own project and doesn't share the "flags" Makefile any more. One of the issues was that it was making references to the haproxy include path which is not needed here. --- .github/workflows/contrib.yml | 4 ++-- .gitignore | 1 + Makefile | 2 +- contrib/debug/Makefile | 5 +---- contrib/poll/Makefile | 11 +++++++++++ contrib/{debug => poll}/poll.c | 0 6 files changed, 16 insertions(+), 7 deletions(-) create mode 100644 contrib/poll/Makefile rename contrib/{debug => poll}/poll.c (100%) diff --git a/.github/workflows/contrib.yml b/.github/workflows/contrib.yml index 39556e123..4b88938e8 100644 --- a/.github/workflows/contrib.yml +++ b/.github/workflows/contrib.yml @@ -16,9 +16,9 @@ jobs: - name: Compile contrib/debug/flags run: | make contrib/debug/flags - - name: Compile contrib/debug/poll + - name: Compile contrib/poll/poll run: | - make contrib/debug/poll + make contrib/poll/poll - name: Compile contrib/hpack run: | make -C contrib/hpack diff --git a/.gitignore b/.gitignore index f77751a6d..fdbc66af9 100644 --- a/.gitignore +++ b/.gitignore @@ -44,6 +44,7 @@ /contrib/systemd/haproxy.service /contrib/spoa_example/spoa contrib/debug/flags +contrib/poll/poll contrib/mod_defender/defender contrib/modsecurity/modsecurity contrib/hpack/decode diff --git a/Makefile b/Makefile index 2ff6cd38b..fc62b133f 100644 --- a/Makefile +++ b/Makefile @@ -995,7 +995,7 @@ clean: $(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 + $(Q)rm -f contrib/halog/halog contrib/debug/flags contrib/poll/poll contrib/tcploop/tcploop tags: $(Q)find src include \( -name '*.c' -o -name '*.h' \) -print0 | \ diff --git a/contrib/debug/Makefile b/contrib/debug/Makefile index 74dd6ac71..9171eaf4c 100644 --- a/contrib/debug/Makefile +++ b/contrib/debug/Makefile @@ -3,15 +3,12 @@ INCLUDE = -I../../include CC = gcc OPTIMIZE = -O2 DEFINE = -OBJS = flags poll +OBJS = flags all: $(OBJS) flags: flags.c $(CC) $(OPTIMIZE) $(DEFINE) $(INCLUDE) -o $@ $^ -poll: poll.c - $(CC) $(OPTIMIZE) $(DEFINE) $(INCLUDE) -o $@ $^ - clean: rm -f $(OBJS) *.[oas] *~ diff --git a/contrib/poll/Makefile b/contrib/poll/Makefile new file mode 100644 index 000000000..fdee514c6 --- /dev/null +++ b/contrib/poll/Makefile @@ -0,0 +1,11 @@ +CC = cc +OPTIMIZE = -O2 -g +DEFINE = +INCLUDE = +OBJS = poll + +poll: poll.c + $(CC) $(OPTIMIZE) $(DEFINE) $(INCLUDE) -o $@ $^ + +clean: + rm -f $(OBJS) *.[oas] *~ diff --git a/contrib/debug/poll.c b/contrib/poll/poll.c similarity index 100% rename from contrib/debug/poll.c rename to contrib/poll/poll.c