Le 8 mai 2013 à 01:12, Stefano Lattarini <[email protected]> a écrit :

> +# Shell code that determines whether the current make instance is

No longer shell code.

> +# running with a given letter option (e.g., -k, -n) that takes
> +# no argument.  It is either 'true' or 'false', so that it can be
> +# easily used in shell code as well as in GNU make conditionals.
> +# Use $(MFLAGS), not $(MAKEFLAGS), since the former doesn't contain
> +# the command line variable definitions, and it always begins with
> +# a hyphen unless it is empty, assumptions that allow a simpler
> +# implementation.  It is worthwhile to note that, when expanded
> +# from the top-level make, $(MFLAGS) doesn't contain references to
> +# options that take an argument, either mandatory (e.g., '-I') or
> +# optional (e.g., '-O').  This *vastly* semplifies the implementation

simplifies

> +# of this macro.
> +am.make.is-running-with-option = \
> +  $(if $(find string $(strip $1),filter-out --%,$(MFLAGS)),true,false)



Reply via email to