From: Luis R. Rodriguez Date: Mon, 27 Feb 2012 21:34:57 +0000 (-0800) Subject: compat: move definition of COMPAT_CONFIG and COMPAT_AUTOCONF X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=407a6a023f7cb135f491ece44a63496029b8301a;p=openwrt%2Fstaging%2Fblogic.git compat: move definition of COMPAT_CONFIG and COMPAT_AUTOCONF The Makefile for external modules are read twice, once during the initial make command, and then later to build the modules target *by the kernel*. This ensures that we define the variables COMPAT_CONFIG and COMPAT_AUTOCONF are only defined once. Signed-off-by: Luis R. Rodriguez --- diff --git a/Makefile b/Makefile index d11da17d354c..287f35f604b0 100644 --- a/Makefile +++ b/Makefile @@ -19,6 +19,11 @@ export COMPAT_BASE_TREE := "linux-next.git" export COMPAT_BASE_TREE_VERSION := "next-20100517" export COMPAT_VERSION := $(shell git describe) +# to check config and compat autoconf +export COMPAT_CONFIG=.config +export COMPAT_AUTOCONF=include/linux/compat_autoconf.h +export MAKE + else # By stuffing this hear we avoid using # this hackery on modpost, the 2nd section of module building. @@ -36,11 +41,6 @@ NOSTDINC_FLAGS := -I$(M)/include/ \ endif -# to check config and compat autoconf -export COMPAT_CONFIG=.config -export COMPAT_AUTOCONF=include/linux/compat_autoconf.h -export MAKE - # Recursion lets us ensure we get this file included. # Trick is to run make -C $(PWD) modules later. -include $(PWD)/$(COMPAT_CONFIG)