* [B.A.T.M.A.N.] [PATCH maint v3] batman-adv: Install module in $INSTALL_MOD_DIR/updates/net/batman-adv
@ 2016-10-31 7:27 Sven Eckelmann
2016-10-31 13:04 ` Martin Weinelt
2016-11-01 7:31 ` [B.A.T.M.A.N.] [maint, " Sven Eckelmann
0 siblings, 2 replies; 3+ messages in thread
From: Sven Eckelmann @ 2016-10-31 7:27 UTC (permalink / raw)
To: 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 <jj.sarton@t-online.de>
Fixes: 66ac14a09445 ("batman-adv: Introduce compat-patches support")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
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 1d2e01c..e9c499f 100644
--- a/Makefile
+++ b/Makefile
@@ -54,6 +54,7 @@ PATCH_FLAGS = --batch --fuzz=0 --forward --strip=1 --unified --version-control=n
PATCH := patch $(PATCH_FLAGS) -i
SPATCH_FLAGS := --in-place --relax-include-path --use-coccigrep --very-quiet
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
@@ -63,25 +64,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) \
@@ -109,6 +110,7 @@ config:
$(SOURCE_STAMP): $(SOURCE) compat-patches/*
$(MKDIR) $(BUILD_DIR)/net/batman-adv/
+ @$(LN) ../Makefile $(BUILD_DIR)/Makefile
@$(RM) $(SOURCE_BUILD)
@$(CP) $(SOURCE) $(BUILD_DIR)/net/batman-adv/
@set -e; \
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCH maint v3] batman-adv: Install module in $INSTALL_MOD_DIR/updates/net/batman-adv
2016-10-31 7:27 [B.A.T.M.A.N.] [PATCH maint v3] batman-adv: Install module in $INSTALL_MOD_DIR/updates/net/batman-adv Sven Eckelmann
@ 2016-10-31 13:04 ` Martin Weinelt
2016-11-01 7:31 ` [B.A.T.M.A.N.] [maint, " Sven Eckelmann
1 sibling, 0 replies; 3+ messages in thread
From: Martin Weinelt @ 2016-10-31 13:04 UTC (permalink / raw)
To: b.a.t.m.a.n
Thank you, depmod again properly recognizes the module now.
Tested-by: Martin Weinelt <martin@darmstadt.freifunk.net>
On 31.10.2016 08:27, Sven Eckelmann wrote:
> 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 <jj.sarton@t-online.de>
> Fixes: 66ac14a09445 ("batman-adv: Introduce compat-patches support")
> Signed-off-by: Sven Eckelmann <sven@narfation.org>
> ---
> 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 1d2e01c..e9c499f 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -54,6 +54,7 @@ PATCH_FLAGS = --batch --fuzz=0 --forward --strip=1 --unified --version-control=n
> PATCH := patch $(PATCH_FLAGS) -i
> SPATCH_FLAGS := --in-place --relax-include-path --use-coccigrep --very-quiet
> 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
> @@ -63,25 +64,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) \
> @@ -109,6 +110,7 @@ config:
>
> $(SOURCE_STAMP): $(SOURCE) compat-patches/*
> $(MKDIR) $(BUILD_DIR)/net/batman-adv/
> + @$(LN) ../Makefile $(BUILD_DIR)/Makefile
> @$(RM) $(SOURCE_BUILD)
> @$(CP) $(SOURCE) $(BUILD_DIR)/net/batman-adv/
> @set -e; \
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [B.A.T.M.A.N.] [maint, v3] batman-adv: Install module in $INSTALL_MOD_DIR/updates/net/batman-adv
2016-10-31 7:27 [B.A.T.M.A.N.] [PATCH maint v3] batman-adv: Install module in $INSTALL_MOD_DIR/updates/net/batman-adv Sven Eckelmann
2016-10-31 13:04 ` Martin Weinelt
@ 2016-11-01 7:31 ` Sven Eckelmann
1 sibling, 0 replies; 3+ messages in thread
From: Sven Eckelmann @ 2016-11-01 7:31 UTC (permalink / raw)
To: b.a.t.m.a.n
[-- Attachment #1: Type: text/plain, Size: 968 bytes --]
On Montag, 31. Oktober 2016 08:27:19 CET Sven Eckelmann wrote:
> 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 <jj.sarton@t-online.de>
> Fixes: 66ac14a09445 ("batman-adv: Introduce compat-patches support")
> Signed-off-by: Sven Eckelmann <sven@narfation.org>
> Tested-by: Martin Weinelt <martin@darmstadt.freifunk.net>
> ---
> 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(-)
Applied in 22c08574065743dd31d1359fa82c83d0c74984d4 [1].
Kind regards,
Sven
[1] https://git.open-mesh.org/batman-adv.git/commit/22c08574065743dd31d1359fa82c83d0c74984d4
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-11-01 7:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-31 7:27 [B.A.T.M.A.N.] [PATCH maint v3] batman-adv: Install module in $INSTALL_MOD_DIR/updates/net/batman-adv Sven Eckelmann
2016-10-31 13:04 ` Martin Weinelt
2016-11-01 7:31 ` [B.A.T.M.A.N.] [maint, " Sven Eckelmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox