Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/9233/?format=api
http://patches.dpdk.org/api/patches/9233/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1449028676-19232-4-git-send-email-thomas.monjalon@6wind.com/", "project": { "id": 1, "url": "http://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<1449028676-19232-4-git-send-email-thomas.monjalon@6wind.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1449028676-19232-4-git-send-email-thomas.monjalon@6wind.com", "date": "2015-12-02T03:57:49", "name": "[dpdk-dev,03/10] mk: install a standard cutomizable tree", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "acc1c036a6ecc51c99828b2adb85c360a3c7509f", "submitter": { "id": 1, "url": "http://patches.dpdk.org/api/people/1/?format=api", "name": "Thomas Monjalon", "email": "thomas.monjalon@6wind.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dpdk/patch/1449028676-19232-4-git-send-email-thomas.monjalon@6wind.com/mbox/", "series": [], "comments": "http://patches.dpdk.org/api/patches/9233/comments/", "check": "pending", "checks": "http://patches.dpdk.org/api/patches/9233/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 4017B8E64;\n\tWed, 2 Dec 2015 04:59:23 +0100 (CET)", "from mail-wm0-f48.google.com (mail-wm0-f48.google.com\n\t[74.125.82.48]) by dpdk.org (Postfix) with ESMTP id BAA428E5B\n\tfor <dev@dpdk.org>; Wed, 2 Dec 2015 04:59:21 +0100 (CET)", "by wmuu63 with SMTP id u63so198571347wmu.0\n\tfor <dev@dpdk.org>; Tue, 01 Dec 2015 19:59:21 -0800 (PST)", "from XPS13.ibrowse.com ([93.158.52.3])\n\tby smtp.gmail.com with ESMTPSA id\n\th5sm783942wjz.21.2015.12.01.19.59.19\n\t(version=TLSv1/SSLv3 cipher=OTHER);\n\tTue, 01 Dec 2015 19:59:21 -0800 (PST)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=6wind-com.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=a2csLXJr4ZKlJcRjp7d6k4YIUIQUq4L+88I1m2uwxsc=;\n\tb=Z77O7IP1c8AB5HSilMuNt8+C+ypxj2jTzbGeqC/ESACbT5jweRvb5YOSJ7947UiQ5j\n\t8aAHJ0/TWbbXUp2xwK9t7FvOAGHqwyz2mrG9c16kmyYX9+wt1FCA8jhlq8MKbce1TRme\n\tmjQyCy9HjDQJVud3Mh9cv7G/YGA7bqqnPrIaelNWTkg3HRHlkSv3BAFci91vuxWme2yh\n\tj4TqW476869Uj2ZKqAsnNQ/yHAEJ1AzVRqchJIbzx30AsNGTDSyvFwVAnfd3/CnYo+Yc\n\tRdCVgywSkzdPI3zrYeMQbaHfpNzjKrnxrCXhCRSy35svdl50i+A091TFQJ8CXPzT+Fhx\n\tR4Qg==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=a2csLXJr4ZKlJcRjp7d6k4YIUIQUq4L+88I1m2uwxsc=;\n\tb=l1zssZN4FzxpYOnssAeOTpMYhRCYuz+bv2+JOZ9ngxaI4wphSjbH7XVfZwl22OzKtW\n\tIb7IdlKzQYgTkvJcv4zqBmP+OT5xAn4JYjjrUBydMR5Fd37N1aaQnUjH1ZoS09CGS/eL\n\tbwAvBmCQN3rlHUMZFgIdRWzbvz6FqV3Y1Hh2D1kvQEU0zaGLGzNbX23k8YKNJMMPnHUV\n\tXZ71y9EnKu4lese22/2NRlVi8W0+nWheG+PjHwnuaXGbueGNx6gjDoVaKoApLVBKC1CR\n\tnWH9w7cSlyOi9F3f/aMpAzEII3Y1g2s2uSQourt4wFnc/FXGzWvzDjXuGGg+eZztAgHi\n\tLRMg==", "X-Gm-Message-State": "ALoCoQkULwYBZC4caXbvAxHhSU4LvNkEzOOHw/Z7Cxa/GK7vrcOm+Q6Q7PXcBpSYtCX/7uExp6k8", "X-Received": "by 10.194.71.202 with SMTP id x10mr1635178wju.169.1449028761528; \n\tTue, 01 Dec 2015 19:59:21 -0800 (PST)", "From": "Thomas Monjalon <thomas.monjalon@6wind.com>", "To": "dev@dpdk.org", "Date": "Wed, 2 Dec 2015 04:57:49 +0100", "Message-Id": "<1449028676-19232-4-git-send-email-thomas.monjalon@6wind.com>", "X-Mailer": "git-send-email 2.5.2", "In-Reply-To": "<1449028676-19232-1-git-send-email-thomas.monjalon@6wind.com>", "References": "<1449028676-19232-1-git-send-email-thomas.monjalon@6wind.com>", "Subject": "[dpdk-dev] [PATCH 03/10] mk: install a standard cutomizable tree", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "patches and discussions about DPDK <dev.dpdk.org>", "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://dpdk.org/ml/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "The rule \"install\" follows these conventions:\nhttps://www.gnu.org/prep/standards/html_node/Directory-Variables.html\nhttps://www.gnu.org/prep/standards/html_node/DESTDIR.html\n\nThe variable sdkdir has been added to the more standards ones,\nto configure the directory used with RTE_SDK when using the DPDK makefiles\nto build an application.\n\nThe old installed tree was static and always had .config, includes and\nlibs in a RTE_TARGET subdirectory. There is no such directory anymore in\nan installed SDK. So the top directory is checked.\nBut RTE_TARGET can still be used, especially to build an app with a\ncompiled but not installed SDK.\nThat's why both cases are looked for RTE_SDK_BIN.\n\nThe default prefix /usr/local is empty in the T= case which is\nused only for a local install.\nIt is still possible to build DPDK with the \"install T=\" rule without\nspecifying any DESTDIR. In such case there is no install, as before.\n\nThe old usage of an installed SDK is:\n make -C examples/helloworld RTE_SDK=$(readlink -m $DESTDIR) \\\n RTE_TARGET=x86_64-native-linuxapp-gcc\nRTE_TARGET can be specified but is useless now with an installed SDK.\nThe RTE_SDK directory must now point to a different path depending of\nthe installation.\n\nSigned-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>\n---\n doc/build-sdk-quick.txt | 1 +\n mk/internal/rte.extvars.mk | 8 +++++++\n mk/rte.sdkinstall.mk | 59 ++++++++++++++++++++++++++++++++++++----------\n mk/rte.vars.mk | 7 ------\n 4 files changed, 55 insertions(+), 20 deletions(-)", "diff": "diff --git a/doc/build-sdk-quick.txt b/doc/build-sdk-quick.txt\nindex b5f752e..662ef63 100644\n--- a/doc/build-sdk-quick.txt\n+++ b/doc/build-sdk-quick.txt\n@@ -19,6 +19,7 @@ Build variables\n \tD debug dependencies\n \tO build directory (default: build/ - install default: ./)\n \tDESTDIR second-stage install directory\n+\tprefix root install directory\n \tT target template - used with config or install\n \t\t\tformat: <arch-machine-execenv-toolchain>\n \t\t\ttemplates in config/defconfig_*\ndiff --git a/mk/internal/rte.extvars.mk b/mk/internal/rte.extvars.mk\nindex e248d19..dfba2f2 100644\n--- a/mk/internal/rte.extvars.mk\n+++ b/mk/internal/rte.extvars.mk\n@@ -51,7 +51,15 @@ endif\n RTE_EXTMK ?= $(RTE_SRCDIR)/Makefile\n export RTE_EXTMK\n \n+# RTE_SDK_BIN must point to .config, include/ and lib/.\n RTE_SDK_BIN := $(RTE_SDK)/$(RTE_TARGET)\n+ifeq ($(wildcard $(RTE_SDK_BIN)/.config),)\n+# RTE_TARGET is empty when using a default SDK installation.\n+RTE_SDK_BIN := $(RTE_SDK)\n+ifeq ($(wildcard $(RTE_SDK_BIN)/.config),)\n+$(error Cannot find .config in $(RTE_SDK))\n+endif\n+endif\n \n #\n # Output files wil go in a separate directory: default output is\ndiff --git a/mk/rte.sdkinstall.mk b/mk/rte.sdkinstall.mk\nindex ed3ed86..91273be 100644\n--- a/mk/rte.sdkinstall.mk\n+++ b/mk/rte.sdkinstall.mk\n@@ -1,6 +1,7 @@\n # BSD LICENSE\n #\n # Copyright(c) 2010-2014 Intel Corporation. All rights reserved.\n+# Copyright 2015 6WIND S.A.\n # All rights reserved.\n #\n # Redistribution and use in source and binary forms, with or without\n@@ -32,10 +33,30 @@\n # Build directory is given with O=\n O ?= .\n \n+prefix ?= /usr/local\n+exec_prefix ?= $(prefix)\n+bindir ?= $(exec_prefix)/bin\n+libdir ?= $(exec_prefix)/lib\n+includedir ?= $(prefix)/include/dpdk\n+datarootdir ?= $(prefix)/share\n+datadir ?= $(datarootdir)/dpdk\n+sdkdir ?= $(datadir)\n+\n+# The install directories may be staged in DESTDIR\n+\n # Configuration, compilation and installation can be done at once\n # with make install T=<config>\n # The build directory is T and may be prepended with O\n BUILD_DIR := $O/$T\n+# Default usage of T= will install an almost flat staging tree\n+export prefix =\n+\n+# Create the directory $1 if not exists\n+rte_mkdir = test -d $1 || mkdir -p $1\n+\n+# Create the relative symbolic link $2 -> $1\n+# May be replaced with --relative option of ln from coreutils-8.16\n+rte_symlink = ln -snf $$($(RTE_SDK)/scripts/relpath.sh $1 $(dir $2)) $2\n \n .PHONY: pre_install\n pre_install:\n@@ -58,16 +79,28 @@ pre_install:\n \n .PHONY: install\n install: pre_install\n-\t@echo ================== Installing $(DESTDIR)\n-\t$(Q)mkdir -p $(DESTDIR)\n-\t$(Q)tar -C $(RTE_SDK) -cf - mk scripts/*.sh | tar -C $(DESTDIR) -x \\\n-\t --keep-newer-files --warning=no-ignore-newer -f -\n-\t$(Q)mkdir -p $(DESTDIR)/$T\n-\t$(Q)tar -C $(BUILD_DIR) -chf - \\\n-\t --exclude app --exclude hostapp --exclude build \\\n-\t --exclude Makefile --exclude .depdirs . | \\\n-\t tar -C $(DESTDIR)/$T -x --keep-newer-files \\\n-\t --warning=no-ignore-newer -f -\n-\t$(Q)install -D $(BUILD_DIR)/app/testpmd \\\n-\t $(DESTDIR)/$T/app/testpmd\n-\t@echo Installation in $(DESTDIR) complete\n+ifeq '$(DESTDIR)$(if $T,,+)' ''\n+\t@echo Installation cannot run with T defined and DESTDIR undefined\n+else\n+\t@echo ================== Installing $(DESTDIR)$(prefix)/\n+\t$(Q)$(call rte_mkdir, $(DESTDIR)$(libdir))\n+\t$(Q)cp -a $(BUILD_DIR)/lib/* $(DESTDIR)$(libdir)\n+\t$(Q)$(call rte_mkdir, $(DESTDIR)$(bindir))\n+\t$(Q)tar -cf - -C $(BUILD_DIR) app --exclude 'app/*.map' \\\n+\t\t--exclude 'app/cmdline*' --exclude app/test \\\n+\t\t--exclude app/testacl --exclude app/testpipeline | \\\n+\t tar -xf - -C $(DESTDIR)$(bindir) --strip-components=1 \\\n+\t\t--keep-newer-files --warning=no-ignore-newer\n+\t$(Q)$(call rte_mkdir, $(DESTDIR)$(datadir))\n+\t$(Q)cp -a $(RTE_SDK)/tools $(DESTDIR)$(datadir)\n+\t$(Q)$(call rte_mkdir, $(DESTDIR)$(includedir))\n+\t$(Q)tar -chf - -C $(BUILD_DIR) include | \\\n+\t tar -xf - -C $(DESTDIR)$(includedir) --strip-components=1 \\\n+\t\t--keep-newer-files --warning=no-ignore-newer\n+\t$(Q)$(call rte_mkdir, $(DESTDIR)$(sdkdir))\n+\t$(Q)cp -a $(BUILD_DIR)/.config $(DESTDIR)$(sdkdir)\n+\t$(Q)cp -a $(RTE_SDK)/{mk,scripts} $(DESTDIR)$(sdkdir)\n+\t$(Q)$(call rte_symlink, $(DESTDIR)$(includedir), $(DESTDIR)$(sdkdir)/include)\n+\t$(Q)$(call rte_symlink, $(DESTDIR)$(libdir), $(DESTDIR)$(sdkdir)/lib)\n+\t@echo Installation in $(DESTDIR)$(prefix)/ complete\n+endif\ndiff --git a/mk/rte.vars.mk b/mk/rte.vars.mk\nindex f87cf4b..e26d193 100644\n--- a/mk/rte.vars.mk\n+++ b/mk/rte.vars.mk\n@@ -67,13 +67,6 @@ endif\n \n RTE_LIBNAME := dpdk\n \n-# RTE_TARGET is deducted from config when we are building the SDK.\n-# Else, when building an external app, RTE_TARGET must be specified\n-# by the user.\n-ifeq ($(RTE_TARGET),)\n-$(error RTE_TARGET is not defined)\n-endif\n-\n ifeq ($(BUILDING_RTE_SDK),)\n # if we are building an external app/lib, include internal/rte.extvars.mk that will\n # define RTE_OUTPUT, RTE_SRCDIR, RTE_EXTMK, RTE_SDK_BIN, (etc ...)\n", "prefixes": [ "dpdk-dev", "03/10" ] }{ "id": 9233, "url": "