From patchwork Mon May 31 09:47:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hangbin Liu X-Patchwork-Id: 12289075 X-Patchwork-Delegate: dsahern@gmail.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 060B1C47082 for ; Mon, 31 May 2021 09:48:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C8BB361248 for ; Mon, 31 May 2021 09:48:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231208AbhEaJtq (ORCPT ); Mon, 31 May 2021 05:49:46 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:49415 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230514AbhEaJtd (ORCPT ); Mon, 31 May 2021 05:49:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622454473; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=R/Fr/fjoSkN6hA+ssp85aSJjwM3coRWpNGcJjIhPJ5Q=; b=dBSpUO+i/4I2JXGgqpsJPAxpY4k7evvEJRMLt3bUdAryeijD2MG3EbTiFqVqBeIeXVMFyg UG5p7kM3klUtQyGY3KHASA+SwFQGrQ9TG31m7N2e4mub43NhqPogcqjb0/9w9Q/239+64a WAJul+NCNenhffvgem4SuW8t+aLcYbw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-553-4AyC4tPTMOG1GomIp4sl3A-1; Mon, 31 May 2021 05:47:52 -0400 X-MC-Unique: 4AyC4tPTMOG1GomIp4sl3A-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 03DC21007CA7; Mon, 31 May 2021 09:47:51 +0000 (UTC) Received: from Leo-laptop-t470s.redhat.com (ovpn-12-207.pek2.redhat.com [10.72.12.207]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 611515E274; Mon, 31 May 2021 09:47:49 +0000 (UTC) From: Hangbin Liu To: David Ahern Cc: Stephen Hemminger , netdev@vger.kernel.org, Hangbin Liu Subject: [PATCH iproute2-next 1/2] configure: add options ability Date: Mon, 31 May 2021 17:47:39 +0800 Message-Id: <20210531094740.2483122-2-haliu@redhat.com> In-Reply-To: <20210531094740.2483122-1-haliu@redhat.com> References: <20210531094740.2483122-1-haliu@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: dsahern@gmail.com There are more and more global environment variables that land everywhere in configure, which is making user hard to know which one does what. Using command-line options would make it easier for users to learn or remember the config options. This patch converts the INCLUDE variable to command option first. Check if the first variable has '-' to compile with the old INCLUDE path setting method. Signed-off-by: Hangbin Liu --- configure | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 179eae08..c58419c2 100755 --- a/configure +++ b/configure @@ -7,7 +7,7 @@ # off: disable libbpf probing # LIBBPF_DIR Path to libbpf DESTDIR to use -INCLUDE=${1:-"$PWD/include"} +INCLUDE="$PWD/include" # Output file which is input to Makefile CONFIG=config.mk @@ -486,6 +486,35 @@ endif EOF } +usage() +{ + cat <$CONFIG quiet_config >> $CONFIG