From patchwork Sun Oct 30 10:49:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 16784 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 1CB3B83167; Sun, 30 Oct 2016 11:49:38 +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=BBndy2lL; dkim-adsp=fail (unprotected policy); dkim-atps=neutral Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=79.140.41.39; 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 [79.140.41.39]) by open-mesh.org (Postfix) with ESMTPS id 25F058311F for ; Sun, 30 Oct 2016 11:49:36 +0100 (CET) Received: from sven-desktop.home.narfation.org (p200300C593D79AFDDE91F14F969694C9.dip0.t-ipconnect.de [IPv6:2003:c5:93d7:9afd:de91:f14f:9696:94c9]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id B029E11000C; Sun, 30 Oct 2016 11:49:35 +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=1477824575; bh=qkua071gcL7Lr15ruGeJCh5eF9FCjSECXfvxrAZImKo=; h=From:To:Cc:Subject:Date:From; b=BBndy2lLO8nLZuKhRFrOAdEfHNm3SP0Enx/zcbfInmb9ulacfiN6wdTep6tv4DqZZ pSo59xyGpUt0416QDy/4s0H9b3mUvjoJ1ddHx0m8LjS6JiboT0gYgRbVUl3VdU0/zJ gBVoysEWZruIMtMNtMJ0u1LzH/Mzx+U+vz+KxfLQ= From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Sun, 30 Oct 2016 11:49:32 +0100 Message-Id: <20161030104932.17878-1-sven@narfation.org> X-Mailer: git-send-email 2.10.1 Cc: jj.sarton@t-online.de Subject: [B.A.T.M.A.N.] [PATCH maint v2] 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 --- 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; \