Last change
on this file since 3 was
3,
checked in by valtob, 15 years ago
|
subversion source 1.6.2 as test
|
-
Property svn:executable set to
*
|
File size:
843 bytes
|
Line | |
---|
1 | #!/bin/sh |
---|
2 | |
---|
3 | varname=`basename $1 | tr "[a-z]" "[A-Z]" | tr "-" "_" | tr "." "_"` |
---|
4 | |
---|
5 | echo "/* This file is automatically generated from" |
---|
6 | echo " * $1" |
---|
7 | echo " * Do not edit it directly, but edit the source file and rerun 'make'" |
---|
8 | echo " */" |
---|
9 | echo |
---|
10 | echo "#define $varname \\" |
---|
11 | |
---|
12 | comment=false |
---|
13 | |
---|
14 | IFS=" |
---|
15 | " |
---|
16 | while read line; do |
---|
17 | line=`echo "$line" | sed -e 's/\/\*.*\*\///g' | sed -e 's/[ ]*$//g'` |
---|
18 | |
---|
19 | if [ -z "$line" ]; then |
---|
20 | continue |
---|
21 | fi |
---|
22 | |
---|
23 | if [ "$comment" = "false" ] && echo "$line" | fgrep '/*' >/dev/null; then |
---|
24 | comment=true |
---|
25 | fi |
---|
26 | |
---|
27 | if [ "$comment" = "true" ] && echo "$line" | fgrep '*/' >/dev/null; then |
---|
28 | comment=false |
---|
29 | continue |
---|
30 | fi |
---|
31 | |
---|
32 | if [ "$comment" = "true" ]; then |
---|
33 | continue |
---|
34 | fi |
---|
35 | |
---|
36 | line="`echo "$line" | sed -e 's/"/\\"/g'`" #' hi, emacs syntax coloring! |
---|
37 | if [ -n "$line" ]; then |
---|
38 | echo " \"$line \"\\" |
---|
39 | fi |
---|
40 | done |
---|
41 | |
---|
42 | echo ' ""' |
---|
Note: See
TracBrowser
for help on using the repository browser.