Merge branch 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[firefly-linux-kernel-4.4.55.git] / scripts / kconfig / Makefile
index 006c96f5fcb5d0b0a0e9a6ee8c2ab9166dea3b0d..186c46604d0669f8f1d4cfbcaf7ad0cdc6d658fa 100644 (file)
@@ -30,9 +30,17 @@ silentoldconfig: $(obj)/conf
        $(Q)mkdir -p include/generated
        $< -s $(Kconfig)
 
+# if no path is given, then use src directory to find file
+ifdef LSMOD
+LSMOD_F := $(LSMOD)
+ifeq ($(findstring /,$(LSMOD)),)
+  LSMOD_F := $(objtree)/$(LSMOD)
+endif
+endif
+
 localmodconfig: $(obj)/streamline_config.pl $(obj)/conf
        $(Q)mkdir -p include/generated
-       $(Q)perl $< $(srctree) $(Kconfig) > .tmp.config
+       $(Q)perl $< $(srctree) $(Kconfig) $(LSMOD_F) > .tmp.config
        $(Q)if [ -f .config ]; then                             \
                        cmp -s .tmp.config .config ||           \
                        (mv -f .config .config.old.1;           \
@@ -47,7 +55,7 @@ localmodconfig: $(obj)/streamline_config.pl $(obj)/conf
 
 localyesconfig: $(obj)/streamline_config.pl $(obj)/conf
        $(Q)mkdir -p include/generated
-       $(Q)perl $< $(srctree) $(Kconfig) > .tmp.config
+       $(Q)perl $< $(srctree) $(Kconfig) $(LSMOD_F) > .tmp.config
        $(Q)sed -i s/=m/=y/ .tmp.config
        $(Q)if [ -f .config ]; then                             \
                        cmp -s .tmp.config .config ||           \