X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=scripts%2Fmkconfigs;h=0d1771a365e624b1035f64e1e5b40cacead59c79;hb=15437e3e2a0cc9e4ba25066fd562b2862d38799b;hp=fda9de72f957aa5d2e9565b93a7c1b87d6d3791a;hpb=7d219aab70e6951ab82c27c202cac05016696723;p=oweals%2Fbusybox.git diff --git a/scripts/mkconfigs b/scripts/mkconfigs index fda9de72f..0d1771a36 100755 --- a/scripts/mkconfigs +++ b/scripts/mkconfigs @@ -21,31 +21,32 @@ # # Busybox version by Matteo Croce <3297627799 at wind.it> # -# Rules to generate bbconfig.h from .config: +# Rules to generate bbconfigopts.h from .config: # - Retain lines that begin with "CONFIG_" # - Retain lines that begin with "# CONFIG_" # - lines that use double-quotes must \\-escape-quote them +config="$1" if [ $# -lt 1 ] then config=.config -else config=$1 fi -echo "#ifndef _BBCONFIGOPTS_H" -echo "#define _BBCONFIGOPTS_H" -echo \ -"/* +echo "\ +#ifndef _BBCONFIGOPTS_H +#define _BBCONFIGOPTS_H +/* * busybox configuration settings. * * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. * - * This file is generated automatically by scripts/config/mkconfigs. + * This file is generated automatically by scripts/mkconfigs. * Do not edit. * - */" + */ +static const char *const bbconfig_config =" + +sed 's/\"/\\\"/g' $config | grep "^#\? \?CONFIG_" | awk '{print "\"" $0 "\\n\"";}' -echo "static const char * const bbconfig_config =" -echo "`sed 's/\"/\\\\\"/g' $config | grep "^#\? \?CONFIG_" | awk '{print "\\"" $0 "\\\\n\\"";}'`" echo ";" echo "#endif /* _BBCONFIGOPTS_H */"