netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Hangbin Liu <liuhangbin@gmail.com>, netdev@vger.kernel.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
	Hangbin Liu <haliu@redhat.com>
Subject: Re: [Draft iproute2-next PATCH] configure: add options ability
Date: Sat, 29 May 2021 11:48:43 -0600	[thread overview]
Message-ID: <014bc2cc-f47c-d269-dad9-f04e8e3d30ef@gmail.com> (raw)
In-Reply-To: <20210528123543.3836-1-liuhangbin@gmail.com>

On 5/28/21 6:35 AM, Hangbin Liu wrote:
> From: Hangbin Liu <haliu@redhat.com>
> 
> Hi David,
> 
> As we talked in my previous libbpf support patchset. You'd like to make
> configure with option settings. Here is a draft patch. Not sure if this
> is what you want.
> 
> There are also a lot variables that I not sure if we should add options
> for them. e.g. PKG_CONFIG, CC, IPTC, IPT_LIB_DIR, etc. Do you have any
> suggestions?

I think it is better to have command line options vs environment
variables. Command line options can be used with a usage / help function
to make it easier for users to learn or remember the config options.

That said, the environment variable approach should continue to work for
existing build scripts.

Your RFC looks fine to me. It would be easier to review if options are
converted with separate patches vs one big one.



> +while true; do
> +	case "$1" in
> +		--libbpf_force)
> +			if [ "$2" != 'on' ] && [ "$2" != 'off' ]; then
> +				usage 1
> +			fi
> +			LIBBPF_FORCE=$2
> +			shift 2 ;;
> +                --libbpf_dir)
> +			LIBBPF_DIR="$2"
> +                        shift 2 ;;
> +                --include_dir)
> +			# How to deal with the old INCLUDE usage?

if number of input arguments is just 1 and it does not start with '-',
then guess that it is old style INCLUDE.

Thanks for working on this.

      reply	other threads:[~2021-05-29 17:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-28 12:35 [Draft iproute2-next PATCH] configure: add options ability Hangbin Liu
2021-05-29 17:48 ` David Ahern [this message]

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=014bc2cc-f47c-d269-dad9-f04e8e3d30ef@gmail.com \
    --to=dsahern@gmail.com \
    --cc=haliu@redhat.com \
    --cc=liuhangbin@gmail.com \
    --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).