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.
This commit is contained in:
Willy Tarreau 2021-04-02 13:43:49 +02:00
parent 6a54d74662
commit 34b4369709
6 changed files with 16 additions and 7 deletions

View File

@ -16,9 +16,9 @@ jobs:
- name: Compile contrib/debug/flags - name: Compile contrib/debug/flags
run: | run: |
make contrib/debug/flags make contrib/debug/flags
- name: Compile contrib/debug/poll - name: Compile contrib/poll/poll
run: | run: |
make contrib/debug/poll make contrib/poll/poll
- name: Compile contrib/hpack - name: Compile contrib/hpack
run: | run: |
make -C contrib/hpack make -C contrib/hpack

1
.gitignore vendored
View File

@ -44,6 +44,7 @@
/contrib/systemd/haproxy.service /contrib/systemd/haproxy.service
/contrib/spoa_example/spoa /contrib/spoa_example/spoa
contrib/debug/flags contrib/debug/flags
contrib/poll/poll
contrib/mod_defender/defender contrib/mod_defender/defender
contrib/modsecurity/modsecurity contrib/modsecurity/modsecurity
contrib/hpack/decode contrib/hpack/decode

View File

@ -995,7 +995,7 @@ clean:
$(Q)rm -f haproxy-$(VERSION).tar.gz haproxy-$(VERSION)$(SUBVERS)$(EXTRAVERSION).tar.gz $(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 haproxy-$(VERSION) haproxy-$(VERSION)$(SUBVERS)$(EXTRAVERSION) nohup.out gmon.out
$(Q)rm -f contrib/*/*.[oas] contrib/*/*/*.[oas] contrib/*/*/*/*.[oas] $(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: tags:
$(Q)find src include \( -name '*.c' -o -name '*.h' \) -print0 | \ $(Q)find src include \( -name '*.c' -o -name '*.h' \) -print0 | \

View File

@ -3,15 +3,12 @@ INCLUDE = -I../../include
CC = gcc CC = gcc
OPTIMIZE = -O2 OPTIMIZE = -O2
DEFINE = DEFINE =
OBJS = flags poll OBJS = flags
all: $(OBJS) all: $(OBJS)
flags: flags.c flags: flags.c
$(CC) $(OPTIMIZE) $(DEFINE) $(INCLUDE) -o $@ $^ $(CC) $(OPTIMIZE) $(DEFINE) $(INCLUDE) -o $@ $^
poll: poll.c
$(CC) $(OPTIMIZE) $(DEFINE) $(INCLUDE) -o $@ $^
clean: clean:
rm -f $(OBJS) *.[oas] *~ rm -f $(OBJS) *.[oas] *~

11
contrib/poll/Makefile Normal file
View File

@ -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] *~