aboutsummaryrefslogtreecommitdiff
path: root/dumpsetups
blob: 53cca0bd9ef69ebf93f5fa3ad1b8e7e4b221fd22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh
# LATER make this into a regular awk script
DIR=`pwd`
LIB=`basename $DIR`
echo '// Do not edit this file, run "make" instead.

/* Copyright (c) 2002-2004 krzYszcz and others.
 * For information on usage and redistribution, and for a DISCLAIMER OF ALL
 * WARRANTIES, see the file, "LICENSE.txt," in this distribution.  */
'
awk '/void .*_setup\(void\)$/&&!/'$LIB'/{print $0";"}' *.c
echo ""
echo 'void all'$LIB's_setup(void)'
echo '{'
awk -F '[ (]' '/void .*_setup\(void\)$/&&!/'$LIB'/{print "    "$2"();"}' *.c
echo '}'