diff --git a/Makefile b/Makefile index 450622edb..934c85bdf 100644 --- a/Makefile +++ b/Makefile @@ -947,7 +947,7 @@ OBJS = src/proto_http.o src/cfgparse-listen.o src/proto_htx.o src/stream.o \ src/http.o src/hpack-dec.o src/action.o src/proto_udp.o src/http_acl.o \ src/xxhash.o src/hpack-enc.o src/h2.o src/freq_ctr.o src/lru.o \ src/protocol.o src/arg.o src/hpack-huff.o src/hdr_idx.o src/base64.o \ - src/hash.o src/mailers.o src/activity.o src/http_msg.o + src/hash.o src/mailers.o src/activity.o src/http_msg.o src/version.o EBTREE_OBJS = $(EBTREE_DIR)/ebtree.o $(EBTREE_DIR)/eb32sctree.o \ $(EBTREE_DIR)/eb32tree.o $(EBTREE_DIR)/eb64tree.o \ @@ -984,6 +984,9 @@ objsize: haproxy %.o: %.c $(DEP) $(cmd_CC) $(COPTS) -c -o $@ $< +# rebuild it every time +.PHONY: src/version.c + src/trace.o: src/trace.c $(DEP) $(cmd_CC) $(TRACE_COPTS) -c -o $@ $< diff --git a/include/common/version.h b/include/common/version.h index 61f95a30d..305087db1 100644 --- a/include/common/version.h +++ b/include/common/version.h @@ -66,5 +66,9 @@ #error "Must define CONFIG_HAPROXY_DATE" #endif +extern const char *haproxy_version; +extern const char *haproxy_date; +extern const char *stats_version_string; + #endif /* _COMMON_VERSION_H */ diff --git a/src/haproxy.c b/src/haproxy.c index 0b99a1325..d47dff3e3 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -370,7 +370,7 @@ void hap_register_per_thread_deinit(void (*fct)()) static void display_version() { - printf("HA-Proxy version " HAPROXY_VERSION " " HAPROXY_DATE" - https://haproxy.org/\n"); + printf("HA-Proxy version %s %s - https://haproxy.org/\n", haproxy_version, haproxy_date); } static void display_build_opts() diff --git a/src/stats.c b/src/stats.c index bb6fa47f0..5e54dd5b2 100644 --- a/src/stats.c +++ b/src/stats.c @@ -2386,7 +2386,7 @@ static void stats_dump_html_info(struct stream_interface *si, struct uri_auth *u "