[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Automake-NG] [FYI] make flags analysis: take advantage of GNU make
From: |
Akim Demaille |
Subject: |
Re: [Automake-NG] [FYI] make flags analysis: take advantage of GNU make features |
Date: |
Mon, 13 May 2013 10:42:05 +0200 |
Le 8 mai 2013 à 01:12, Stefano Lattarini <address@hidden> 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)