blob: 3cb7bb17549d89545d572dbaebdf6895773806a4 [file] [log] [blame]
Paul Fox79c142d2005-08-01 16:04:40 +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#
24# Rules to generate bbconfig.h from .config:
25# - Retain lines that begin with "CONFIG_"
26# - Retain lines that begin with "# CONFIG_"
27# - lines that use double-quotes must \\-escape-quote them
28
29if [ $# -lt 1 ]
30then
31 config=.config
32else config=$1
33fi
34
35echo "#ifndef _BBCONFIG_H"
36echo "#define _BBCONFIG_H"
37echo \
38"/*
Rob Landleybfd94c42005-09-15 18:33:30 +000039 * busybox configuration options.
40 *
Paul Fox79c142d2005-08-01 16:04:40 +000041 * This program is free software; you can redistribute it and/or modify
42 * it under the terms of the GNU General Public License as published by
43 * the Free Software Foundation; either version 2 of the License, or (at
44 * your option) any later version.
45 *
46 * This program is distributed in the hope that it will be useful, but
47 * WITHOUT ANY WARRANTY; without even the implied warranty of
48 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
49 * NON INFRINGEMENT. See the GNU General Public License for more
50 * details.
51 *
52 * You should have received a copy of the GNU General Public License
53 * along with this program; if not, write to the Free Software
54 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
55 *
56 *
Rob Landleybfd94c42005-09-15 18:33:30 +000057 *
58 * This file is generated automatically by scripts/config/mkconfigs.
59 * Do not edit.
Paul Fox79c142d2005-08-01 16:04:40 +000060 *
61 */"
62
Rob Landleybfd94c42005-09-15 18:33:30 +000063echo "static char const bbconfig_config[] ="
Paul Fox79c142d2005-08-01 16:04:40 +000064echo "\"CONFIG_BEGIN=n\\n\\"
Rob Landleybfd94c42005-09-15 18:33:30 +000065echo "`sed 's/\"/\\\\\"/g' $config | grep "^#\? \?CONFIG_" | awk '{ print $0 "\\\\n\\\\" }' `"
Paul Fox79c142d2005-08-01 16:04:40 +000066echo "CONFIG_END=n\\n\";"
67echo "#endif /* _BBCONFIG_H */"