]> git.openfabrics.org - ~tnikolova/compat/.git/commitdiff
compat: move definition of COMPAT_CONFIG and COMPAT_AUTOCONF
authorLuis R. Rodriguez <mcgrof@frijolero.org>
Mon, 27 Feb 2012 21:34:57 +0000 (13:34 -0800)
committerLuis R. Rodriguez <mcgrof@frijolero.org>
Mon, 27 Feb 2012 21:34:57 +0000 (13:34 -0800)
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 <mcgrof@frijolero.org>
Makefile

index d11da17d354c545ca1901c3caf7944938ee64bf0..287f35f604b0e524720b2762cdcf7a2d1e5220c5 100644 (file)
--- 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)