You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.5 KiB

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