mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-08 14:23:19 +00:00
Merge branch 'master/kconfig-localmodconfig' of git://github.com/lacombar/linux-2.6 into kbuild/kconfig
This commit is contained in:
commit
db57630b7a
@ -33,17 +33,9 @@ silentoldconfig: $(obj)/conf
|
||||
$(Q)mkdir -p include/generated
|
||||
$< --$@ $(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
|
||||
localyesconfig localmodconfig: $(obj)/streamline_config.pl $(obj)/conf
|
||||
$(Q)mkdir -p include/generated
|
||||
$(Q)perl $< $(srctree) $(Kconfig) $(LSMOD_F) > .tmp.config
|
||||
$(Q)perl $< --$@ $(srctree) $(Kconfig) > .tmp.config
|
||||
$(Q)if [ -f .config ]; then \
|
||||
cmp -s .tmp.config .config || \
|
||||
(mv -f .config .config.old.1; \
|
||||
@ -56,22 +48,6 @@ localmodconfig: $(obj)/streamline_config.pl $(obj)/conf
|
||||
fi
|
||||
$(Q)rm -f .tmp.config
|
||||
|
||||
localyesconfig: $(obj)/streamline_config.pl $(obj)/conf
|
||||
$(Q)mkdir -p include/generated
|
||||
$(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 || \
|
||||
(mv -f .config .config.old.1; \
|
||||
mv -f .tmp.config .config; \
|
||||
$(obj)/conf --silentoldconfig $(Kconfig); \
|
||||
mv -f .config.old.1 .config.old) \
|
||||
else \
|
||||
mv -f .tmp.config .config; \
|
||||
$(obj)/conf --silentoldconfig $(Kconfig); \
|
||||
fi
|
||||
$(Q)rm -f .tmp.config
|
||||
|
||||
# Create new linux.pot file
|
||||
# Adjust charset to UTF-8 in .po file to accept UTF-8 in Kconfig files
|
||||
# The symlink is used to repair a deficiency in arch/um
|
||||
|
@ -43,6 +43,7 @@
|
||||
# make oldconfig
|
||||
#
|
||||
use strict;
|
||||
use Getopt::Long;
|
||||
|
||||
my $config = ".config";
|
||||
|
||||
@ -112,10 +113,17 @@ sub find_config {
|
||||
|
||||
find_config;
|
||||
|
||||
# Parse options
|
||||
my $localmodconfig = 0;
|
||||
my $localyesconfig = 0;
|
||||
|
||||
GetOptions("localmodconfig" => \$localmodconfig,
|
||||
"localyesconfig" => \$localyesconfig);
|
||||
|
||||
# Get the build source and top level Kconfig file (passed in)
|
||||
my $ksource = $ARGV[0];
|
||||
my $kconfig = $ARGV[1];
|
||||
my $lsmod_file = $ARGV[2];
|
||||
my $lsmod_file = $ENV{'LSMOD'};
|
||||
|
||||
my @makefiles = `find $ksource -name Makefile 2>/dev/null`;
|
||||
chomp @makefiles;
|
||||
@ -296,7 +304,11 @@ my %modules;
|
||||
|
||||
if (defined($lsmod_file)) {
|
||||
if ( ! -f $lsmod_file) {
|
||||
die "$lsmod_file not found";
|
||||
if ( -f $ENV{'objtree'}."/".$lsmod_file) {
|
||||
$lsmod_file = $ENV{'objtree'}."/".$lsmod_file;
|
||||
} else {
|
||||
die "$lsmod_file not found";
|
||||
}
|
||||
}
|
||||
if ( -x $lsmod_file) {
|
||||
# the file is executable, run it
|
||||
@ -421,7 +433,11 @@ while(<CIN>) {
|
||||
|
||||
if (/^(CONFIG.*)=(m|y)/) {
|
||||
if (defined($configs{$1})) {
|
||||
$setconfigs{$1} = $2;
|
||||
if ($localyesconfig) {
|
||||
$setconfigs{$1} = 'y';
|
||||
} else {
|
||||
$setconfigs{$1} = $2;
|
||||
}
|
||||
} elsif ($2 eq "m") {
|
||||
print "# $1 is not set\n";
|
||||
next;
|
||||
|
Loading…
Reference in New Issue
Block a user