Re: [PATCH] kconfig: add support for K=file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sam Ravnborg @ Fri,  2 May 2008 22:49:14 +0200:

> From: Sam Ravnborg <sam@xxxxxxxxxxxxxxxxxxx>

> +defconfig: $(src)/aconf.sh $(obj)/aconf
> +	$(Q)K=arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) \
> +	$(CONFIG_SHELL) $< alldefconfig $(Kconfig)

> +# aconf:  Generate simple configurations (all*config, etc)

> +++ b/scripts/kconfig/aconf.sh

> +#!/bin/sh
> +set -e
> +aconf=scripts/kconfig/aconf
> +# Find input file
> +if [ ! -z $K ]; then
> +	config_file="-i $K";
> +fi
> +
> +case "$1" in
> +	"allnoconfig")
> +		$aconf -n $config_file $2
> +		;;
> +	"allyesconfig")
> +		$aconf -y $config_file $2
> +		;;
> +	"allmodconfig")
> +		$aconf -m $config_file $2
> +		;;
> +	"alldefconfig")
> +		$aconf -d $config_file $2
> +		;;
> +	"randconfig")
> +		$aconf -r $config_file $2
> +		;;
> +	*)
> +		echo "$0: unknow command $1"
> +		exit 1
> +	;;
> +esac
> +


#!/bin/sh
set -e

aconf="$src_tree/scripts/kconfig/aconf -"
case $1 in
	# and typing of "allbalblabla" is a bit easier: "allb"
	all[mynd]*)
		# add command char using multicores :), yes string
                # processing in shell kind of sucks
		aconf="${aconf}`echo $1 | sed 's ^all\(.\).* \1 '`"
		;;
	rand*)
		aconf="${aconf}r"
		;;
	*)      # fix typo and redirect to stderr
		echo "$0: unknown command \`$1'" >&2
		exit 1
	;;
esac

# Find input file
[ "$K" ] && aconf="$aconf -i $K"

# remove command from parameters
shift 1

# execute with all other parameters
$aconf "$@"
# end

What about something like that (not tested)? There are some fixes and i'm
not sure about if "$K" is empty what to do with "$config_file".
-- 
sed 'sed && sh + olecom = love' << ''
-o--=O`C
 #oo'L O
<___=E M
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux