diff options
| author | Andrew Morton <akpm@osdl.org> | 2004-06-23 19:23:15 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-06-23 19:23:15 -0700 |
| commit | 0995a8253db5716b35b0eb8c718fe1054ed2c68f (patch) | |
| tree | 751887ea08fe08cabdf7a9f1f7ab3a795fcb4db2 /scripts | |
| parent | b2129c4f9a6323cc329ebd4bc7171526ab54bf2d (diff) | |
[PATCH] update ikconfig generator script
From: "Randy.Dunlap" <rddunlap@osdl.org>
http://bugme.osdl.org/show_bug.cgi?id=2701
Current script has problems with some shells and utilities. Remove use of
'echo' in the script.
From: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Randy Dunlap <rddunlap@osdl.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/mkconfigs | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/scripts/mkconfigs b/scripts/mkconfigs index a3166274ebc3..abf711d367ae 100755 --- a/scripts/mkconfigs +++ b/scripts/mkconfigs @@ -34,10 +34,10 @@ fi config=$1 makefile=$2 -echo "#ifndef _IKCONFIG_H" -echo "#define _IKCONFIG_H" -echo \ -"/* +cat << EOF +#ifndef _IKCONFIG_H +#define _IKCONFIG_H +/* * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -58,10 +58,10 @@ echo \ * * This file is generated automatically by scripts/mkconfigs. Do not edit. * - */" - -echo "static char const ikconfig_config[] __attribute__((unused)) = " -echo "\"CONFIG_BEGIN=n\\n\\" -echo "`cat $config | sed 's/\"/\\\\\"/g' | grep "^#\? \?CONFIG_" | awk '{ print $0 "\\\\n\\\\" }' `" -echo "CONFIG_END=n\\n\";" -echo "#endif /* _IKCONFIG_H */" + */ +static char const ikconfig_config[] __attribute__((unused)) = +"CONFIG_BEGIN=n\\n\\ +$(sed < $config -n 's/"/\\"/g;/^#\? \?CONFIG_/s/.*/&\\n\\/p') +CONFIG_END=n\\n"; +#endif /* _IKCONFIG_H */ +EOF |
