diff options
author | Paul Fox <pgf@brightstareng.com> | 2005-08-01 16:04:40 +0000 |
---|---|---|
committer | Paul Fox <pgf@brightstareng.com> | 2005-08-01 16:04:40 +0000 |
commit | 79c142d93847c168b825858f4e372e10c7e32906 (patch) | |
tree | 0080e21973368e7f3b2c510d29c411b50fee0488 /scripts/config/mkconfigs | |
parent | a39bba33c8649a6be42d5a511a4ac909a8998f90 (diff) | |
download | busybox-79c142d93847c168b825858f4e372e10c7e32906.tar.gz |
new config display applet, from bug 46. i've changed the name
of the applet from "config" to "bbconfig", and renamed the
source filenames and symbols to match appropriately.
Diffstat (limited to 'scripts/config/mkconfigs')
-rwxr-xr-x | scripts/config/mkconfigs | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/scripts/config/mkconfigs b/scripts/config/mkconfigs new file mode 100755 index 000000000..f09c04ccd --- /dev/null +++ b/scripts/config/mkconfigs @@ -0,0 +1,65 @@ +#!/bin/sh +# +# Copyright (C) 2002 Khalid Aziz <khalid_aziz at hp.com> +# Copyright (C) 2002 Randy Dunlap <rddunlap at osdl.org> +# Copyright (C) 2002 Al Stone <ahs3 at fc.hp.com> +# Copyright (C) 2002 Hewlett-Packard Company +# +# 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 +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# +# Busybox version by Matteo Croce <3297627799 at wind.it> +# +# Rules to generate bbconfig.h from .config: +# - Retain lines that begin with "CONFIG_" +# - Retain lines that begin with "# CONFIG_" +# - lines that use double-quotes must \\-escape-quote them + +if [ $# -lt 1 ] +then + config=.config +else config=$1 +fi + +echo "#ifndef _BBCONFIG_H" +echo "#define _BBCONFIG_H" +echo \ +"/* + * + * 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 + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or + * NON INFRINGEMENT. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * + * + * This file is generated automatically by scripts/config/mkconfigs. Do not edit. + * + */" + +echo "static char const bbconfig_config[] = " +echo "\"CONFIG_BEGIN=n\\n\\" +echo "`cat $config | sed 's/\"/\\\\\"/g' | grep "^#\? \?CONFIG_" | awk '{ print $0 "\\\\n\\\\" }' `" +echo "CONFIG_END=n\\n\";" +echo "#endif /* _BBCONFIG_H */" |