Skip to content

Commit

Permalink
kconfig: use long options in conf
Browse files Browse the repository at this point in the history
The list of options supported by conf is growing
and their abbreviation did not resemble anything usefull.

So drop the single letter options in favour of long options.

The long options are named equal to what we know from
the make target.
The internal implmentation was changed to match this,
resulting in much more readable code.

Support for short options is dropped - no one is supposed
to call this program direct anyway.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
  • Loading branch information
sravnborg authored and michal42 committed Aug 3, 2010
1 parent ac1ffde commit 4062f1a
Show file tree
Hide file tree
Showing 2 changed files with 105 additions and 126 deletions.
70 changes: 30 additions & 40 deletions scripts/kconfig/Makefile
Expand Up @@ -21,53 +21,47 @@ menuconfig: $(obj)/mconf
$< $(Kconfig)

config: $(obj)/conf
$< $(Kconfig)
$< --oldaskconfig $(Kconfig)

nconfig: $(obj)/nconf
$< $(Kconfig)

oldconfig: $(obj)/conf
$< -o $(Kconfig)
$< --$@ $(Kconfig)

silentoldconfig: $(obj)/conf
$(Q)mkdir -p include/generated
$< -s $(Kconfig)
$< --$@ $(Kconfig)

localmodconfig: $(obj)/streamline_config.pl $(obj)/conf
$(Q)perl $< $(srctree) $(Kconfig) > .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 -s $(Kconfig); \
mv -f .config.old.1 .config.old) \
else \
mv -f .tmp.config .config; \
$(obj)/conf -s $(Kconfig); \
$(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

localyesconfig: $(obj)/streamline_config.pl $(obj)/conf
$(Q)perl $< $(srctree) $(Kconfig) > .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 -s $(Kconfig); \
mv -f .config.old.1 .config.old) \
else \
mv -f .tmp.config .config; \
$(obj)/conf -s $(Kconfig); \
$(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

nonint_oldconfig: $(obj)/conf
$< -b $(Kconfig)

loose_nonint_oldconfig: $(obj)/conf
$< -B $(Kconfig)

# 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
Expand All @@ -91,30 +85,26 @@ update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h
$(Q)rm -f arch/um/Kconfig.arch
$(Q)rm -f $(obj)/config.pot

PHONY += randconfig allyesconfig allnoconfig allmodconfig defconfig

randconfig: $(obj)/conf
$< -r $(Kconfig)
PHONY += allnoconfig allyesconfig allmodconfig randconfig

allyesconfig: $(obj)/conf
$< -y $(Kconfig)
allnoconfig allyesconfig allmodconfig randconfig: $(obj)/conf
$< --$@ $(Kconfig)

allnoconfig: $(obj)/conf
$< -n $(Kconfig)
PHONY += nonint_oldconfig loose_nonint_oldconfig defconfig

allmodconfig: $(obj)/conf
$< -m $(Kconfig)
nonint_oldconfig loose_nonint_oldconfig: $(obj)/conf
$< --$@ $(Kconfig)

defconfig: $(obj)/conf
ifeq ($(KBUILD_DEFCONFIG),)
$< -d $(Kconfig)
$< --defconfig $(Kconfig)
else
@echo "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'"
$(Q)$< -D arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig)
$(Q)$< --defconfig=arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig)
endif

%_defconfig: $(obj)/conf
$(Q)$< -D arch/$(SRCARCH)/configs/$@ $(Kconfig)
$(Q)$< --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig)

# Help text used by make help
help:
Expand Down

0 comments on commit 4062f1a

Please sign in to comment.