7904d180ee54ddee3f2763c01d63c0a08a00d519
[openwrt-packages.git] /
1 commit 0820ab24974cd2bad84c8ec5a90f7ce0e1681cf0
2 Author: Willy Tarreau <w@1wt.eu>
3 Date:   Wed Oct 3 09:40:22 2018 +0200
4
5     BUILD: Makefile: add a "make opts" target to simply show the build options
6     
7     We're often missing an easy way to map input variables to output ones.
8     The "opts" build target will simply show the input variables and the ones
9     passed to the compiler and linker. This way it's easier to quickly see
10     what a given build script or package will use, or the detected warnings
11     supported by the compiler.
12     
13     (cherry picked from commit a8b12c6bb73b924f6429c3ae4d20b96992e92c2e)
14     [wt: this is not needed but significantly helps for packaging]
15     Signed-off-by: Willy Tarreau <w@1wt.eu>
16
17 diff --git a/Makefile b/Makefile
18 index 5d170041..d3615060 100644
19 --- a/Makefile
20 +++ b/Makefile
21 @@ -996,3 +996,20 @@ update-version:
22         echo "$(VERSION)" > VERSION
23         echo "$(SUBVERS)" > SUBVERS
24         echo "$(VERDATE)" > VERDATE
25 +
26 +# just display the build options
27 +opts:
28 +       @echo -n 'Using: '
29 +       @echo -n 'TARGET="$(strip $(TARGET))" '
30 +       @echo -n 'ARCH="$(strip $(ARCH))" '
31 +       @echo -n 'CPU="$(strip $(CPU))" '
32 +       @echo -n 'CC="$(strip $(CC))" '
33 +       @echo -n 'ARCH_FLAGS="$(strip $(ARCH_FLAGS))" '
34 +       @echo -n 'CPU_CFLAGS="$(strip $(CPU_CFLAGS))" '
35 +       @echo -n 'DEBUG_CFLAGS="$(strip $(DEBUG_CFLAGS))" '
36 +       @echo "$(strip $(BUILD_OPTIONS))"
37 +       @echo 'COPTS="$(strip $(COPTS))"'
38 +       @echo 'LDFLAGS="$(strip $(LDFLAGS))"'
39 +       @echo 'LDOPTS="$(strip $(LDOPTS))"'
40 +       @echo 'OPTIONS_OBJS="$(strip $(OPTIONS_OBJS))"'
41 +       @echo 'OBJS="$(strip $(OBJS))"'
git clone https://git.99rst.org/PROJECT