allow defconfig to work
authorJohannes Berg <johannes@sipsolutions.net>
Tue, 2 Apr 2013 21:50:10 +0000 (23:50 +0200)
committerJohannes Berg <johannes@sipsolutions.net>
Tue, 2 Apr 2013 21:50:10 +0000 (23:50 +0200)
This allows shipping a 'defconfig' file in the output and
then just "make" works, taking the config from there and
setting everything else to the default.

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

index a2e1677a611becada207ff10172ef3890ffe2bf3..603861aec6cc52bd15ff903277995bf6176f6835 100644 (file)
@@ -21,18 +21,20 @@ alldefconfig randconfig:
        @$(MAKE) -C kconfig conf
        @./kconfig/conf --$@ Kconfig
 
+.PHONY: defconfig
 defconfig:
        @$(MAKE) -C kconfig conf
-       @./kconfig conf --defconfig defconfig
+       @./kconfig/conf --defconfig defconfig
 
 .config:
-       @echo "/--------------"
-       @echo "| Your backport package isn't configured, please configure it"
-       @echo "| using one of the following options:"
-       @echo "|     make menuconfig"
-       @echo "|     make allyesconfig"
-       @echo "\--"
-       @false
+       @test -f defconfig && (yes '' | $(MAKE) alldefconfig) || (      \
+       echo "/--------------"                                          ;\
+       echo "| Your backport package isn't configured, please configure it" ;\
+       echo "| using one of the following options:"                    ;\
+       echo "|     make menuconfig"                                    ;\
+       echo "|     make allyesconfig"                                  ;\
+       echo "\--"                                                      ;\
+       false )
 
 include/linux/compat_autoconf.h: .config
        @$(MAKE) oldconfig