Makefiles: Stop using $(SUBDIRS)

This patch avoids that the following warning is reported when building
against kernel v4.21:

================= WARNING ================
'SUBDIRS' will be removed after Linux 5.3
Please use 'M=' or 'KBUILD_EXTMOD' instead
==========================================


A quote from an upstream kernel patch:

commit 07e5823127155b3a29003aca926f87c9843f6810
Author: Andrew Morton <akpm@osdl.org>
Date:   Mon Apr 12 01:05:40 2004 -0700

    [PATCH] kbuild: external module support
    
    From: Sam Ravnborg <sam@ravnborg.org>
    
    Based on initial patch from Andreas Gruenbacher there is now better support
    for building external modules with kbuild.
    
    The preferred syntax is now:
    make -C $KERNELSRC M=$PWD
    
    but the old syntax:
    make -C $KERNELSRC SUBDIRS=$PWD modules
    will remain supported.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7851 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2018-12-31 19:03:14 +00:00
parent 71c637eec1
commit d3e2f5ab99
14 changed files with 50 additions and 53 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ LINUXINCLUDE := $(PRE_CFLAGS) $(LINUXINCLUDE)
CPPFLAGS := $(PRE_CFLAGS) $(CPPFLAGS)
EXTRA_CFLAGS += -I$(SCST_INC_DIR)
-include $(SUBDIRS)/../build_mode
-include $(KBUILD_EXTMOD)/../build_mode
SRPTFLAGS = -DCONFIG_SCST_TRACING -DCONFIG_SCST_DEBUG \
-DCONFIG_SCST_EXTRACHECKS -fno-inline -fno-inline-functions