From patchwork Mon Oct 31 07:27:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 16785 X-Patchwork-Delegate: sw@simonwunderlich.de Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from open-mesh.org (localhost [IPv6:::1]) by open-mesh.org (Postfix) with ESMTP id 839ED82676; Mon, 31 Oct 2016 08:27:35 +0100 (CET) Authentication-Results: open-mesh.org; dmarc=none header.from=narfation.org Authentication-Results: open-mesh.org; dkim=fail reason="verification failed; unprotected key" header.d=narfation.org header.i=@narfation.org header.b=GAKAIbCZ; dkim-adsp=fail (unprotected policy); dkim-atps=neutral Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2001:4d88:2000:7::2; helo=v3-1039.vlinux.de; envelope-from=sven@narfation.org; receiver=b.a.t.m.a.n@lists.open-mesh.org Authentication-Results: open-mesh.org; dmarc=pass header.from=narfation.org Received: from v3-1039.vlinux.de (narfation.org [IPv6:2001:4d88:2000:7::2]) by open-mesh.org (Postfix) with ESMTPS id 42B6280C6B for ; Mon, 31 Oct 2016 08:27:33 +0100 (CET) Received: from sven-desktop.home.narfation.org (p200300C593C2C3F9E217CA8766CEE734.dip0.t-ipconnect.de [IPv6:2003:c5:93c2:c3f9:e217:ca87:66ce:e734]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id 305261100A9; Mon, 31 Oct 2016 08:27:32 +0100 (CET) Authentication-Results: v3-1039.vlinux.de; dmarc=none header.from=narfation.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=narfation.org; s=20121; t=1477898852; bh=BzA62gLRRvhT0hPNpohywXrh3dc/dguaxpBIYT2i2vw=; h=From:To:Cc:Subject:Date:From; b=GAKAIbCZBM7ZAhlyJJ4dRjOksAuzpykImDFgvUK6TjvyUGfpoq5FkaqEAvukaMUw5 MJ5UEbidI8nZkBlovF/Nqf+v0lxe6IFLnGTKQFsdIenjFQ5kzHUOkcVFpHDtuHQ0DS UfLz59WYDhqGhdmHBp/dYh5XgJ4FtlnPMdZQt888= From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Mon, 31 Oct 2016 08:27:19 +0100 Message-Id: <20161031072719.26286-1-sven@narfation.org> X-Mailer: git-send-email 2.10.1 Subject: [B.A.T.M.A.N.] [PATCH maint v3] batman-adv: Install module in $INSTALL_MOD_DIR/updates/net/batman-adv X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking Errors-To: b.a.t.m.a.n-bounces@lists.open-mesh.org Sender: "B.A.T.M.A.N" depmod may skip the batman-adv.ko module in the $INSTALL_MOD_DIR/update/ folder when it contains the word "build" as directory name. Avoid this extra directory "build" in the installation path by making the obj-y dir relative to build/ in the source directory. Reported-by: Jean-Jacques Sarton Fixes: 66ac14a09445 ("batman-adv: Introduce compat-patches support") Signed-off-by: Sven Eckelmann Tested-by: Martin Weinelt --- v3: - adjust commit message v2: - Remove clean target change which was accidentally added to this patch Makefile | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 7ef2569..b852a17 100644 --- a/Makefile +++ b/Makefile @@ -46,6 +46,7 @@ MKDIR := mkdir -p PATCH_FLAGS = --batch --fuzz=0 --forward --strip=1 --unified --version-control=never -g0 --remove-empty-files --no-backup-if-mismatch --reject-file=- PATCH := patch $(PATCH_FLAGS) -i CP := cp -fpR +LN := ln -sf SOURCE = $(wildcard net/batman-adv/*.[ch]) net/batman-adv/Makefile SOURCE_BUILD = $(wildcard $(BUILD_DIR)/net/batman-adv/*.[ch]) $(BUILD_DIR)/net/batman-adv/Makefile @@ -55,25 +56,25 @@ REVISION= $(shell if [ -d "$(PWD)/.git" ]; then \ echo $$(git --git-dir="$(PWD)/.git" describe --always --dirty --match "v*" |sed 's/^v//' 2> /dev/null || echo "[unknown]"); \ fi) NOSTDINC_FLAGS += \ - -I$(PWD)/compat-include/ \ - -I$(PWD)/include/ \ - -include $(PWD)/compat.h \ + -I$(PWD)/../compat-include/ \ + -I$(PWD)/../include/ \ + -include $(PWD)/../compat.h \ $(CFLAGS) ifneq ($(REVISION),) NOSTDINC_FLAGS += -DBATADV_SOURCE_VERSION=\"$(REVISION)\" endif -include $(PWD)/compat-sources/Makefile +-include $(PWD)/../compat-sources/Makefile -obj-y += build/net/batman-adv/ +obj-y += net/batman-adv/ export batman-adv-y BUILD_FLAGS := \ - M=$(PWD) \ - PWD=$(PWD) \ + M=$(BUILD_DIR) \ + PWD=$(BUILD_DIR) \ REVISION=$(REVISION) \ CONFIG_BATMAN_ADV=m \ CONFIG_BATMAN_ADV_DEBUG=$(CONFIG_BATMAN_ADV_DEBUG) \ @@ -101,6 +102,7 @@ config: $(SOURCE_STAMP): $(SOURCE) compat-patches/* compat-patches/replacements.sh $(MKDIR) $(BUILD_DIR)/net/batman-adv/ + @$(LN) ../Makefile $(BUILD_DIR)/Makefile @$(RM) $(SOURCE_BUILD) @$(CP) $(SOURCE) $(BUILD_DIR)/net/batman-adv/ @set -e; \