build: read KLIB variable
authorJohannes Berg <johannes@sipsolutions.net>
Wed, 3 Apr 2013 22:01:49 +0000 (00:01 +0200)
committerJohannes Berg <johannes@sipsolutions.net>
Wed, 3 Apr 2013 22:01:55 +0000 (00:01 +0200)
Some scripts may rely on setting KLIB rather than
KLIB_BUILD, particularly for an install target,
so read that variable.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
backport/Makefile

index 05e8ab1ccec0c57ec9acce27b314cd0a5ed37d30..079e2d96235cc8af90e149b629d1dd8df1da06a7 100644 (file)
@@ -8,7 +8,8 @@ MAKEFLAGS += --no-print-directory
 SHELL := /bin/bash
 BACKPORT_PWD := $(shell pwd)
 
-KLIB_BUILD ?= /lib/modules/$(shell uname -r)/build/
+KLIB ?= /lib/modules/$(shell uname -r)/
+KLIB_BUILD ?= $(KLIB)/build/
 KERNEL_CONFIG := $(KLIB_BUILD)/.config
 KERNEL_MAKEFILE := $(KLIB_BUILD)/Makefile
 CONFIG_MD5 := $(shell md5sum $(KERNEL_CONFIG) | sed 's/\s.*//')