Kconfig.include 871 B

123456789101112131415161718192021222324252627282930
  1. # Kconfig helper macros
  2. # Convenient variables
  3. comma := ,
  4. quote := "
  5. squote := '
  6. empty :=
  7. space := $(empty) $(empty)
  8. dollar := $
  9. right_paren := )
  10. left_paren := (
  11. # $(if-success,<command>,<then>,<else>)
  12. # Return <then> if <command> exits with 0, <else> otherwise.
  13. if-success = $(shell,{ $(1); } >/dev/null 2>&1 && echo "$(2)" || echo "$(3)")
  14. # $(success,<command>)
  15. # Return y if <command> exits with 0, n otherwise
  16. success = $(if-success,$(1),y,n)
  17. # $(cc-option,<flag>)
  18. # Return y if the compiler supports <flag>, n otherwise
  19. cc-option = $(success,$(CC) -Werror $(1) -E -x c /dev/null -o /dev/null)
  20. # $(ld-option,<flag>)
  21. # Return y if the linker supports <flag>, n otherwise
  22. ld-option = $(success,$(LD) -v $(1))
  23. # gcc version including patch level
  24. gcc-version := $(shell,$(srctree)/scripts/gcc-version.sh -p $(CC) | sed 's/^0*//')