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-Tag: compat-2012-07-02~1^2~68 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=407a6a023f7cb135f491ece44a63496029b8301a;p=~tnikolova%2Fcompat%2F.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 d11da17..287f35f 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)