From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id EA4AF5682 for ; Tue, 27 Oct 2015 15:25:11 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 27 Oct 2015 07:25:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,205,1444719600"; d="scan'208";a="804368832" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga001.jf.intel.com with ESMTP; 27 Oct 2015 07:25:10 -0700 Received: from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com [10.237.217.45]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id t9REP82a032739; Tue, 27 Oct 2015 14:25:08 GMT Received: from sivswdev01.ir.intel.com (localhost [127.0.0.1]) by sivswdev01.ir.intel.com with ESMTP id t9REP8WV008553; Tue, 27 Oct 2015 14:25:08 GMT Received: (from bricha3@localhost) by sivswdev01.ir.intel.com with id t9REP8Jq008549; Tue, 27 Oct 2015 14:25:08 GMT From: Bruce Richardson To: mario.alfredo.c.arevalo@intel.com, dev@dpdk.org Date: Tue, 27 Oct 2015 14:25:06 +0000 Message-Id: <1445955906-8505-3-git-send-email-bruce.richardson@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1445955906-8505-1-git-send-email-bruce.richardson@intel.com> References: <6594B51DBE477C48AAE23675314E6C460F1B8B6E@fmsmsx107.amr.corp.intel.com> <1445955906-8505-1-git-send-email-bruce.richardson@intel.com> Subject: [dpdk-dev] [RFC-PATCH 2/2] add example configure script X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2015 14:25:12 -0000 To demonstrate the idea of using a configure-make-make install type operation for installing DPDK, add in a simple configure script in python which runs "make config T=" to do most of the work and then tweaks the .config file afterwards. Signed-off-by: Bruce Richardson --- configure | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100755 configure diff --git a/configure b/configure new file mode 100755 index 0000000..e820bdd --- /dev/null +++ b/configure @@ -0,0 +1,59 @@ +#! /usr/bin/env python + +# BSD LICENSE +# +# Copyright(c) 2015 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +config_append="" + +from getopt import getopt +import sys, os + +optlist, args = getopt(sys.argv[1:], '', ['prefix=','machine=','config=']) + +for option, arg in optlist: + if option == "--prefix": + os.environ['RTE_PREFIX'] = arg + elif option == "--machine": + config_append += "CONFIG_RTE_MACHINE=\"%s\"\n" % arg + elif option == "--config": + if not arg.startswith("CONFIG_"): + config_append += "CONFIG_%s\n" % arg + else: + config_append += "%s\n" % arg + +if "RTE_TARGET" in os.environ: + os.system("make config T=$RTE_TARGET") +else: + os.system("make config T=x86_64-native-linuxapp-gcc") +f = open("build/.config", "a") +f.write(config_append) +f.close() + -- 2.4.3