b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: [B.A.T.M.A.N.] [PATCH next v2] batman-adv: Fix build against recent Debian stretch kernels
Date: Fri, 20 May 2016 14:06:24 +0200	[thread overview]
Message-ID: <1463745984-16129-1-git-send-email-sven@narfation.org> (raw)

The kernels for Debian stretch require some special CFLAGS settings
which are only correctly defined when NOSTDINC_FLAGS is set during the
execution of the Makefile via kbuild. But batman-adv sets it currently
outside to insert compatibility include headers and compat-sources.

This can be avoided by making the top Makefile kbuild compatible and
redefining the NOSTDINC_FLAGS when kbuild includes this Makefile. The
actual build of the batman-adv module is then done by adding the
subdirectory to obj-y.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
v2:
 - Fixed noise from other patches in context (should now apply cleanly on next)

 Makefile | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 5d2c058..fe574de 100644
--- a/Makefile
+++ b/Makefile
@@ -43,7 +43,7 @@ RM ?= rm -f
 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)
-export NOSTDINC_FLAGS := \
+NOSTDINC_FLAGS := \
 	-I$(PWD)/compat-include/ \
 	-include $(PWD)/compat.h \
 	$(CFLAGS)
@@ -52,8 +52,12 @@ ifneq ($(REVISION),)
 NOSTDINC_FLAGS += -DBATADV_SOURCE_VERSION=\"$(REVISION)\"
 endif
 
+obj-y += net/batman-adv/
+
 BUILD_FLAGS := \
-	M=$(PWD)/net/batman-adv \
+	M=$(PWD) \
+	PWD=$(PWD) \
+	REVISION=$(REVISION) \
 	CONFIG_BATMAN_ADV=m \
 	CONFIG_BATMAN_ADV_DEBUG=$(CONFIG_BATMAN_ADV_DEBUG) \
 	CONFIG_BATMAN_ADV_BLA=$(CONFIG_BATMAN_ADV_BLA) \
@@ -61,7 +65,7 @@ BUILD_FLAGS := \
 	CONFIG_BATMAN_ADV_NC=$(CONFIG_BATMAN_ADV_NC) \
 	CONFIG_BATMAN_ADV_MCAST=$(CONFIG_BATMAN_ADV_MCAST) \
 	CONFIG_BATMAN_ADV_BATMAN_V=$(CONFIG_BATMAN_ADV_BATMAN_V) \
-	INSTALL_MOD_DIR=updates/net/batman-adv/
+	INSTALL_MOD_DIR=updates/
 
 all: config
 	$(MAKE) -C $(KERNELPATH) $(BUILD_FLAGS)	modules
-- 
2.8.1


                 reply	other threads:[~2016-05-20 12:06 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=1463745984-16129-1-git-send-email-sven@narfation.org \
    --to=sven@narfation.org \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    /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).