diff options
author | Hans Petter <hansp@src.gnome.org> | 2003-09-12 06:04:44 +0800 |
---|---|---|
committer | Hans Petter <hansp@src.gnome.org> | 2003-09-12 06:04:44 +0800 |
commit | 697761cc337aa77a47140c8df50ed84bc25e23f6 (patch) | |
tree | b785830f72e9938cceaa016a419c7b6d9892bada /libical/scripts/mkinclude.sh | |
parent | 733d77e657516f9a59b5c1a7b62acb87b03ec86f (diff) | |
download | gsoc2013-evolution-697761cc337aa77a47140c8df50ed84bc25e23f6.tar gsoc2013-evolution-697761cc337aa77a47140c8df50ed84bc25e23f6.tar.gz gsoc2013-evolution-697761cc337aa77a47140c8df50ed84bc25e23f6.tar.bz2 gsoc2013-evolution-697761cc337aa77a47140c8df50ed84bc25e23f6.tar.lz gsoc2013-evolution-697761cc337aa77a47140c8df50ed84bc25e23f6.tar.xz gsoc2013-evolution-697761cc337aa77a47140c8df50ed84bc25e23f6.tar.zst gsoc2013-evolution-697761cc337aa77a47140c8df50ed84bc25e23f6.zip |
Import new libical from mainline HEAD and make appropriate changes to
Evolution.
svn path=/trunk/; revision=22538
Diffstat (limited to 'libical/scripts/mkinclude.sh')
-rw-r--r-- | libical/scripts/mkinclude.sh | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/libical/scripts/mkinclude.sh b/libical/scripts/mkinclude.sh new file mode 100644 index 0000000000..a77c8d74a8 --- /dev/null +++ b/libical/scripts/mkinclude.sh @@ -0,0 +1,39 @@ +#!/bin/sh + +# +# Given a list of headers, combine them into one, excluding certain lines +# +OUTFILE="/dev/stdout" +COMBINEDHEADERS="" +EXCLUDES="" + +while [ $# -gt 0 ] +do + case $1 in + -o) OUTFILE=$2; shift;; + -e) EXCLUDES="$EXCLUDES $2"; shift;; + *) COMBINEDHEADERS="$COMBINEDHEADERS $1"; + esac + shift +done + +echo '#ifdef __cplusplus' > $OUTFILE +echo 'extern "C" {' >> $OUTFILE +echo '#endif' >> $OUTFILE +echo '/*' >> $OUTFILE +echo " \$Id\$" >> $OUTFILE +echo '*/' >> $OUTFILE +cat $COMBINEDHEADERS >> file.temp1 +for exclude in $EXCLUDES +do + cp file.temp1 file.temp2 + egrep -v "$exclude" file.temp2 > file.temp1 +done +cat file.temp1 >> $OUTFILE +rm -f file.temp1 +rm -f file.temp2 +echo '#ifdef __cplusplus' >> $OUTFILE +echo '};' >> $OUTFILE +echo '#endif' >> $OUTFILE + + |