Reorganize build system
[qemu/aliguori.git] / scripts / genconfig.sh
blob319d72dc221599ba30e1ebd3eab0d629312be8e9
1 #!/bin/sh
3 process() {
4 local basedir=`dirname $1`
5 cat "$1" | while read LINE; do
6 local first_word=`echo $LINE | cut -f1 -d' '`
7 if test "$first_word" = "config"; then
8 echo $LINE | sed -e 's:^config \(.*\):CONFIG_\1=y:g'
9 elif test "$first_word" = "source"; then
10 local rest=`echo $LINE | cut -f2- -d' '`
11 process "$basedir/$rest"
13 done
16 process "$1"