mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-22 20:32:12 +00:00
BUILD: makefile: properly pass CC to sub-projects
The "poll" and "tcploop" sub-projects have their own makefiles. But since the cmd_* commands were migrated from "echo" to $(info) with make 3.81, the command is confusingly displayed in the top-level makefile before entering the directory, even making one think that the build occurred. Let's instead propagate the verbosity level through the sub-projects and let them adapt their own cmd_CC. For now this peans a little bit of duplication for poll and tcploop.
This commit is contained in:
parent
59b50bd04a
commit
d575661d40
4
Makefile
4
Makefile
@ -1031,13 +1031,13 @@ dev/hpack/%: dev/hpack/%.o
|
||||
$(cmd_LD) $(LDFLAGS) -o $@ $^ $(LDOPTS)
|
||||
|
||||
dev/poll/poll:
|
||||
$(Q)$(MAKE) -C dev/poll poll CC='$(cmd_CC)' OPTIMIZE='$(COPTS)'
|
||||
$(Q)$(MAKE) -C dev/poll poll CC='$(CC)' OPTIMIZE='$(COPTS)' V='$(V)'
|
||||
|
||||
dev/qpack/decode: dev/qpack/decode.o
|
||||
$(cmd_LD) $(LDFLAGS) -o $@ $^ $(LDOPTS)
|
||||
|
||||
dev/tcploop/tcploop:
|
||||
$(Q)$(MAKE) -C dev/tcploop tcploop CC='$(cmd_CC)' OPTIMIZE='$(COPTS)'
|
||||
$(Q)$(MAKE) -C dev/tcploop tcploop CC='$(CC)' OPTIMIZE='$(COPTS)' V='$(V)'
|
||||
|
||||
dev/udp/udp-perturb: dev/udp/udp-perturb.o
|
||||
$(cmd_LD) $(LDFLAGS) -o $@ $^ $(LDOPTS)
|
||||
|
@ -4,8 +4,26 @@ DEFINE =
|
||||
INCLUDE =
|
||||
OBJS = poll
|
||||
|
||||
V = 0
|
||||
Q = @
|
||||
ifeq ($V,1)
|
||||
Q=
|
||||
endif
|
||||
|
||||
ifeq ($V,1)
|
||||
cmd_CC = $(CC)
|
||||
else
|
||||
ifeq (3.81,$(firstword $(sort $(MAKE_VERSION) 3.81)))
|
||||
# 3.81 or above
|
||||
cmd_CC = $(info $ CC $@) $(Q)$(CC)
|
||||
else
|
||||
# 3.80 or older
|
||||
cmd_CC = $(Q)echo " CC $@";$(CC)
|
||||
endif
|
||||
endif
|
||||
|
||||
poll: poll.c
|
||||
$(CC) $(OPTIMIZE) $(DEFINE) $(INCLUDE) -o $@ $^
|
||||
$(cmd_CC) $(OPTIMIZE) $(DEFINE) $(INCLUDE) -o $@ $^
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS) *.[oas] *~
|
||||
|
@ -4,8 +4,26 @@ DEFINE =
|
||||
INCLUDE =
|
||||
OBJS = tcploop
|
||||
|
||||
V = 0
|
||||
Q = @
|
||||
ifeq ($V,1)
|
||||
Q=
|
||||
endif
|
||||
|
||||
ifeq ($V,1)
|
||||
cmd_CC = $(CC)
|
||||
else
|
||||
ifeq (3.81,$(firstword $(sort $(MAKE_VERSION) 3.81)))
|
||||
# 3.81 or above
|
||||
cmd_CC = $(info $ CC $@) $(Q)$(CC)
|
||||
else
|
||||
# 3.80 or older
|
||||
cmd_CC = $(Q)echo " CC $@";$(CC)
|
||||
endif
|
||||
endif
|
||||
|
||||
tcploop: tcploop.c
|
||||
$(CC) $(OPTIMIZE) $(DEFINE) $(INCLUDE) -o $@ $^
|
||||
$(cmd_CC) $(OPTIMIZE) $(DEFINE) $(INCLUDE) -o $@ $^
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS) *.[oas] *~
|
||||
|
Loading…
Reference in New Issue
Block a user