21 |
# |
# |
22 |
# Busybox version by Matteo Croce <3297627799 at wind.it> |
# Busybox version by Matteo Croce <3297627799 at wind.it> |
23 |
# |
# |
24 |
# Rules to generate bbconfig.h from .config: |
# Rules to generate bbconfigopts.h from .config: |
25 |
# - Retain lines that begin with "CONFIG_" |
# - Retain lines that begin with "CONFIG_" |
26 |
# - Retain lines that begin with "# CONFIG_" |
# - Retain lines that begin with "# CONFIG_" |
27 |
# - lines that use double-quotes must \\-escape-quote them |
# - lines that use double-quotes must \\-escape-quote them |
28 |
|
|
29 |
|
config="$1" |
30 |
if [ $# -lt 1 ] |
if [ $# -lt 1 ] |
31 |
then |
then |
32 |
config=.config |
config=.config |
|
else config=$1 |
|
33 |
fi |
fi |
34 |
|
|
35 |
echo "#ifndef _BBCONFIGOPTS_H" |
echo "\ |
36 |
echo "#define _BBCONFIGOPTS_H" |
#ifndef _BBCONFIGOPTS_H |
37 |
echo \ |
#define _BBCONFIGOPTS_H |
38 |
"/* |
/* |
39 |
* busybox configuration settings. |
* busybox configuration settings. |
40 |
* |
* |
41 |
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details. |
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details. |
42 |
* |
* |
43 |
* This file is generated automatically by scripts/config/mkconfigs. |
* This file is generated automatically by scripts/mkconfigs. |
44 |
* Do not edit. |
* Do not edit. |
45 |
* |
* |
46 |
*/" |
*/ |
47 |
|
static const char *const bbconfig_config =" |
48 |
|
|
49 |
|
sed 's/\"/\\\"/g' $config | grep "^#\? \?CONFIG_" | awk '{print "\"" $0 "\\n\"";}' |
50 |
|
|
|
echo "static const char * const bbconfig_config =" |
|
|
echo "`sed 's/\"/\\\\\"/g' $config | grep "^#\? \?CONFIG_" | awk '{print "\\"" $0 "\\\\n\\"";}'`" |
|
51 |
echo ";" |
echo ";" |
52 |
echo "#endif /* _BBCONFIGOPTS_H */" |
echo "#endif /* _BBCONFIGOPTS_H */" |