]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: Makefile: add a "make opts" target to simply show the build options
authorWilly Tarreau <w@1wt.eu>
Wed, 3 Oct 2018 07:40:22 +0000 (09:40 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 3 Oct 2018 07:55:51 +0000 (09:55 +0200)
We're often missing an easy way to map input variables to output ones.
The "opts" build target will simply show the input variables and the ones
passed to the compiler and linker. This way it's easier to quickly see
what a given build script or package will use, or the detected warnings
supported by the compiler.

Makefile

index 5cf4ce0b66aa0d0749483049b6254c6443662c82..c4c1f6e799ff125547875b2d931d81291eadad34 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1018,6 +1018,23 @@ update-version:
        echo "$(SUBVERS)" > SUBVERS
        echo "$(VERDATE)" > VERDATE
 
+# just display the build options
+opts:
+       @echo -n 'Using: '
+       @echo -n 'TARGET="$(strip $(TARGET))" '
+       @echo -n 'ARCH="$(strip $(ARCH))" '
+       @echo -n 'CPU="$(strip $(CPU))" '
+       @echo -n 'CC="$(strip $(CC))" '
+       @echo -n 'ARCH_FLAGS="$(strip $(ARCH_FLAGS))" '
+       @echo -n 'CPU_CFLAGS="$(strip $(CPU_CFLAGS))" '
+       @echo -n 'DEBUG_CFLAGS="$(strip $(DEBUG_CFLAGS))" '
+       @echo "$(strip $(BUILD_OPTIONS))"
+       @echo 'COPTS="$(strip $(COPTS))"'
+       @echo 'LDFLAGS="$(strip $(LDFLAGS))"'
+       @echo 'LDOPTS="$(strip $(LDOPTS))"'
+       @echo 'OPTIONS_OBJS="$(strip $(OPTIONS_OBJS))"'
+       @echo 'OBJS="$(strip $(OBJS))"'
+
 # Target to run the regression testing script files.
 # LEVEL 1 scripts are dedicated to pure haproxy compliance tests (prefixed with 'h' letter).
 # LEVEL 2 scripts are slow scripts (prefixed with 's' letter).