From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
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
Date: Sun, 30 Oct 2016 11:49:32 +0100 [thread overview]
Message-ID: <20161030104932.17878-1-sven@narfation.org> (raw)
depmod may skip the batman-adv.ko module in the $INSTALL_MOD_DIR/update/
folder when it is also available in $INSTALL_MOD_DIR/kernel/ but in an
higher position in the subtree.
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 <jj.sarton@t-online.de>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
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; \
--
2.10.1
reply other threads:[~2016-10-30 10:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161030104932.17878-1-sven@narfation.org \
--to=sven@narfation.org \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
--cc=jj.sarton@t-online.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).