Mercurial > hg > toybox
comparison scripts/genconfig.sh @ 233:d4176f3f3835
Zap toys/Config.in and instead create generated/Config.in from contents of
toys/*.c. Move relevant info into comment at the top of each toys/*.c. Also
convert more of Makefile into a thin wrapper around shell scripts that actually
do the work. (Makefile is only still there for the user interface.)
author | Rob Landley <rob@landley.net> |
---|---|
date | Sat, 19 Jan 2008 17:08:39 -0600 |
parents | |
children | 4f1ca01db000 |
comparison
equal
deleted
inserted
replaced
232:cd4d5630c978 | 233:d4176f3f3835 |
---|---|
1 #!/bin/bash | |
2 | |
3 mkdir -p generated | |
4 | |
5 function genconfig() | |
6 { | |
7 for i in $(echo toys/*.c | sort) | |
8 do | |
9 # Grab the config block for Config.in | |
10 echo "# $i" | |
11 sed -n '/^\*\//q;/^config [A-Z]/,$p' $i || exit 1 | |
12 echo | |
13 done | |
14 } | |
15 | |
16 genconfig > generated/Config.in |