public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: Oleg Verych <olecom@flower.upol.cz>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: kbuild list <linux-kbuild@vger.kernel.org>
Subject: Re: [PATCH] kconfig: add support for K=file
Date: Sat, 10 May 2008 23:25:49 +0200	[thread overview]
Message-ID: <E1JuwZh-0004Yv-CP@flower> (raw)
In-Reply-To: <1209761358-6579-1-git-send-email-sam@ravnborg.org>

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

> From: Sam Ravnborg <sam@uranus.ravnborg.org>

> +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

  parent reply	other threads:[~2008-05-10 21:04 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-02 20:47 kconfig frontend updates Sam Ravnborg
2008-05-02 20:49 ` [PATCH] kconfig: add support for K=file sam
2008-05-02 20:49   ` [PATCH] kconfig: drop all*config support in conf.c sam
2008-05-02 20:49     ` [PATCH] kconfig: conf is less chatty sam
2008-05-02 20:49       ` [PATCH] kconfig: .gitignore aconf sam
2008-05-02 20:49         ` [PATCH] kconfig: kill the warning "trying to assign nonexistent symbol" sam
2008-05-10 21:25   ` Oleg Verych [this message]
2008-05-10 21:10     ` [PATCH] kconfig: add support for K=file Sam Ravnborg
2008-05-10 21:50       ` Oleg Verych
2008-05-02 21:01 ` kconfig frontend updates Sam Ravnborg
2008-05-04 18:57 ` Sam Ravnborg
2008-05-04 18:59   ` [PATCH 1/2] kconfig: introduce K= support Sam Ravnborg
2008-05-06  2:55     ` Roman Zippel
2008-05-06  4:34       ` Sam Ravnborg
2008-05-04 18:59   ` [PATCH 2/2] kconfig: make oldconfig less chatty and clean up conf.c Sam Ravnborg
2008-05-06  3:08     ` Roman Zippel
2008-05-06  4:37       ` Sam Ravnborg
2008-05-06  9:03       ` Jan Engelhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1JuwZh-0004Yv-CP@flower \
    --to=olecom@flower.upol.cz \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=sam@ravnborg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox