Lines Matching refs:if
14 # $(if-success,<command>,<then>,<else>)
15 # Return <then> if <command> exits with 0, <else> otherwise.
16 if-success = $(shell,{ $(1); } >/dev/null 2>&1 && echo "$(2)" || echo "$(3)")
19 # Return y if <command> exits with 0, n otherwise
20 success = $(if-success,$(1),y,n)
23 # Return n if <command> exits with 0, y otherwise
24 failure = $(if-success,$(1),n,y)
27 # Return y if the compiler supports <flag>, n otherwise
31 # Return y if the linker supports <flag>, n otherwise
35 # Return y if the assembler supports <instr>, n otherwise
39 # check if $(CC) and $(LD) exist
40 $(error-if,$(failure,command -v $(CC)),C compiler '$(CC)' not found)
41 $(error-if,$(failure,command -v $(LD)),linker '$(LD)' not found)
43 # Get the C compiler name, version, and error out if it is not supported.
45 $(error-if,$(success,test -z "$(cc-info)"),Sorry$(comma) this C compiler is not supported.)
49 # Get the assembler name, version, and error out if it is not supported.
51 $(error-if,$(success,test -z "$(as-info)"),Sorry$(comma) this assembler is not supported.)
55 # Get the linker name, version, and error out if it is not supported.
57 $(error-if,$(success,test -z "$(ld-info)"),Sorry$(comma) this linker is not supported.)
62 # $(m32-flag): -m32 if the compiler supports it, or an empty string otherwise.
63 # $(m64-flag): -m64 if the compiler supports it, or an empty string otherwise.
64 cc-option-bit = $(if-success,$(CC) -Werror $(1) -E -x c /dev/null -o /dev/null,$(1))
75 # Return y if the Rust compiler supports <flag>, n otherwise