blob: 0d1771a365e624b1035f64e1e5b40cacead59c79 [file] [log] [blame]
Denis Vlasenko7d219aa2006-10-05 10:17:08 +00001#!/bin/sh
2#
3# Copyright (C) 2002 Khalid Aziz <khalid_aziz at hp.com>
4# Copyright (C) 2002 Randy Dunlap <rddunlap at osdl.org>
5# Copyright (C) 2002 Al Stone <ahs3 at fc.hp.com>
6# Copyright (C) 2002 Hewlett-Packard Company
7#
8# This program is free software; you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by
10# the Free Software Foundation; either version 2 of the License, or
11# (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License
19# along with this program; if not, write to the Free Software
20# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21#
22# Busybox version by Matteo Croce <3297627799 at wind.it>
23#
Denis Vlasenko45854b52007-02-04 02:38:21 +000024# Rules to generate bbconfigopts.h from .config:
Denis Vlasenko7d219aa2006-10-05 10:17:08 +000025# - Retain lines that begin with "CONFIG_"
26# - Retain lines that begin with "# CONFIG_"
27# - lines that use double-quotes must \\-escape-quote them
28
Denis Vlasenko45854b52007-02-04 02:38:21 +000029config="$1"
Denis Vlasenko7d219aa2006-10-05 10:17:08 +000030if [ $# -lt 1 ]
31then
32 config=.config
Denis Vlasenko7d219aa2006-10-05 10:17:08 +000033fi
34
Denis Vlasenko45854b52007-02-04 02:38:21 +000035echo "\
36#ifndef _BBCONFIGOPTS_H
37#define _BBCONFIGOPTS_H
38/*
Denis Vlasenko7d219aa2006-10-05 10:17:08 +000039 * busybox configuration settings.
40 *
41 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
42 *
Denis Vlasenkoa5c5ae02007-02-03 12:50:41 +000043 * This file is generated automatically by scripts/mkconfigs.
Denis Vlasenko7d219aa2006-10-05 10:17:08 +000044 * Do not edit.
45 *
Denis Vlasenko45854b52007-02-04 02:38:21 +000046 */
Denis Vlasenko6ca409e2007-08-12 20:58:27 +000047static const char *const bbconfig_config ="
Denis Vlasenko7d219aa2006-10-05 10:17:08 +000048
Denis Vlasenko45854b52007-02-04 02:38:21 +000049sed 's/\"/\\\"/g' $config | grep "^#\? \?CONFIG_" | awk '{print "\"" $0 "\\n\"";}'
50
Denis Vlasenko7d219aa2006-10-05 10:17:08 +000051echo ";"
52echo "#endif /* _BBCONFIGOPTS_H */"