mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 15:47:01 +02:00
CLEANUP: makefile: properly indent ifeq/ifneq conditional blocks
Some conditional blocks have become out of control over time and are totally unreadble. It took 15 minutes to figure what "endif" matched what "if" in the PCRE one for example, and DA and 51D use multiple levels as well that are not easy to sort out. Let's reindent the whole thing. Most places that were already indented used 2 spaces per level, so here we're keeping that principle. It was just not done on the two last ones that are used to define some rules because we don't want spaces before rule names. A few had the opening condition indicated on the endif line. It would be desirable that over time this more maintainable layout is preserved.
This commit is contained in:
parent
8ea58f5c76
commit
f6ceb0ec4e
14
Makefile
14
Makefile
@ -750,7 +750,7 @@ else
|
||||
OPTIONS_CFLAGS += $(if $(PCRE_INC),-I$(PCRE_INC))
|
||||
OPTIONS_LDFLAGS += $(if $(PCRE_LIB),-L$(PCRE_LIB)) -Wl,-Bstatic -lpcreposix -lpcre -Wl,-Bdynamic
|
||||
endif
|
||||
endif
|
||||
endif # USE_PCRE
|
||||
|
||||
ifneq ($(USE_PCRE2)$(USE_STATIC_PCRE2)$(USE_PCRE2_JIT),)
|
||||
# in case only USE_STATIC_PCRE2/USE_PCRE2_JIT were set
|
||||
@ -773,7 +773,6 @@ endif
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
PCRE2_LDFLAGS := $(shell $(PCRE2_CONFIG) --libs$(PCRE2_WIDTH) 2>/dev/null || echo -L/usr/local/lib -lpcre2-$(PCRE2_WIDTH))
|
||||
|
||||
ifeq ($(PCRE2_LDFLAGS),)
|
||||
@ -792,9 +791,8 @@ PCRE2_LDFLAGS := $(if $(PCRE2_LIB),-L$(PCRE2_LIB)) -Wl,-Bstatic -L$(PCRE2_LIB)
|
||||
else
|
||||
PCRE2_LDFLAGS := $(if $(PCRE2_LIB),-L$(PCRE2_LIB)) -L$(PCRE2_LIB) $(PCRE2_LDFLAGS)
|
||||
endif
|
||||
|
||||
endif
|
||||
endif
|
||||
endif # PCRE2DIR
|
||||
endif # USE_PCRE2
|
||||
|
||||
ifneq ($(USE_NS),)
|
||||
OPTIONS_OBJS += src/namespace.o
|
||||
@ -893,8 +891,8 @@ all:
|
||||
@exit 1
|
||||
else
|
||||
all: haproxy dev/flags/flags $(EXTRA)
|
||||
endif
|
||||
endif
|
||||
endif # obsolete targets
|
||||
endif # TARGET
|
||||
|
||||
OBJS =
|
||||
|
||||
@ -970,7 +968,7 @@ build_opts = $(shell rm -f .build_opts.new; echo \'$(TARGET) $(BUILD_OPTIONS) $(
|
||||
.build_opts: $(build_opts)
|
||||
else
|
||||
.build_opts:
|
||||
endif
|
||||
endif # reg-tests
|
||||
|
||||
haproxy: $(OPTIONS_OBJS) $(OBJS)
|
||||
$(cmd_LD) $(LDFLAGS) -o $@ $^ $(LDOPTS)
|
||||
|
Loading…
Reference in New Issue
Block a user