Skip to content

Commit a8b12c6

Browse files
committed
BUILD: Makefile: add a "make opts" target to simply show the build options
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.
1 parent 491cec2 commit a8b12c6

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Makefile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,6 +1018,23 @@ update-version:
10181018
echo "$(SUBVERS)" > SUBVERS
10191019
echo "$(VERDATE)" > VERDATE
10201020
1021+
# just display the build options
1022+
opts:
1023+
@echo -n 'Using: '
1024+
@echo -n 'TARGET="$(strip $(TARGET))" '
1025+
@echo -n 'ARCH="$(strip $(ARCH))" '
1026+
@echo -n 'CPU="$(strip $(CPU))" '
1027+
@echo -n 'CC="$(strip $(CC))" '
1028+
@echo -n 'ARCH_FLAGS="$(strip $(ARCH_FLAGS))" '
1029+
@echo -n 'CPU_CFLAGS="$(strip $(CPU_CFLAGS))" '
1030+
@echo -n 'DEBUG_CFLAGS="$(strip $(DEBUG_CFLAGS))" '
1031+
@echo "$(strip $(BUILD_OPTIONS))"
1032+
@echo 'COPTS="$(strip $(COPTS))"'
1033+
@echo 'LDFLAGS="$(strip $(LDFLAGS))"'
1034+
@echo 'LDOPTS="$(strip $(LDOPTS))"'
1035+
@echo 'OPTIONS_OBJS="$(strip $(OPTIONS_OBJS))"'
1036+
@echo 'OBJS="$(strip $(OBJS))"'
1037+
10211038
# Target to run the regression testing script files.
10221039
# LEVEL 1 scripts are dedicated to pure haproxy compliance tests (prefixed with 'h' letter).
10231040
# LEVEL 2 scripts are slow scripts (prefixed with 's' letter).

0 commit comments

Comments
 (0)