netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Andrea Claudi <aclaudi@redhat.com>, netdev@vger.kernel.org
Cc: stephen@networkplumber.org, bluca@debian.org
Subject: Re: [PATCH 1/2 iproute2] configure: support --param=value style
Date: Sun, 3 Oct 2021 19:28:30 -0600	[thread overview]
Message-ID: <42421564-cc08-3b76-d245-164d9c039ad2@gmail.com> (raw)
In-Reply-To: <754f3aaeae85cdc9aec0a7b609803a0281e1fabb.1633191885.git.aclaudi@redhat.com>

On 10/2/21 10:41 AM, Andrea Claudi wrote:
> diff --git a/configure b/configure
> index 7f4f3bd9..f0c81ee1 100755
> --- a/configure
> +++ b/configure
> @@ -504,15 +504,28 @@ else
>  			--include_dir)
>  				INCLUDE=$2
>  				shift 2 ;;
> +			--include_dir=*)
> +				INCLUDE="${1#*=}"
> +				shift ;;
>  			--libbpf_dir)
>  				LIBBPF_DIR="$2"
>  				shift 2 ;;
> +			--libbpf_dir=*)
> +				LIBBPF_DIR="${1#*=}"
> +				shift ;;

We should be able to consolidate these into 1 case like:

			--libbpf_dir|--libbpf_dir=)

and then handle the difference in argument style. e.g.,

			LIBBPF_FORCE="${1#*=}"
			if [ -z "${LIBBPF_FORCE}" ]; then
				LIBBPF_FORCE=$2
				shift
			fi

			....


>  			--libbpf_force)
>  				if [ "$2" != 'on' ] && [ "$2" != 'off' ]; then
>  					usage 1
>  				fi
>  				LIBBPF_FORCE=$2
>  				shift 2 ;;
> +			--libbpf_force=*)
> +				libbpf_f="${1#*=}"
> +				if [ "$libbpf_f" != 'on' ] && [ "$libbpf_f" != 'off' ]; then
> +					usage 1
> +				fi
> +				LIBBPF_FORCE="$libbpf_f"
> +				shift ;;
>  			-h | --help)
>  				usage 0 ;;
>  			"")
> 


  reply	other threads:[~2021-10-04  1:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-02 16:41 [PATCH 0/2 iproute2] configure: add support for libdir param Andrea Claudi
2021-10-02 16:41 ` [PATCH 1/2 iproute2] configure: support --param=value style Andrea Claudi
2021-10-04  1:28   ` David Ahern [this message]
2021-10-02 16:41 ` [PATCH 2/2 iproute2] configure: add the --libdir param Andrea Claudi
2021-10-04 11:52   ` Luca Boccassi
2021-10-04 12:45     ` Andrea Claudi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42421564-cc08-3b76-d245-164d9c039ad2@gmail.com \
    --to=dsahern@gmail.com \
    --cc=aclaudi@redhat.com \
    --cc=bluca@debian.org \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).