Convert make_filter to sh. Add make_filter's id to the output

Original commit message from CVS:
Convert make_filter to sh.  Add make_filter's id to the output
This commit is contained in:
David Schleef 2004-01-07 21:07:12 +00:00
parent c0607998ec
commit f3961006ac
2 changed files with 28 additions and 27 deletions

View file

@ -19,8 +19,10 @@
*/ */
/* /*
* This file was (probably) generated from gstvideotemplate.c, * This file was (probably) generated from
* $Id$ * $Id$
* and
* MAKEFILTERVERSION
*/ */
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H

View file

@ -1,33 +1,32 @@
#!/usr/bin/perl #!/bin/sh
#
if(scalar(@ARGV) < 1){ Template=$1;
print "$0 Objectname\n"; srcfile=$2;
print " creates gstobjectname.{c,h} implementing GstObjectname,\n";
print " subclassing GstVideofilter.\n";
exit(0);
}
$Template = $ARGV[0]; if test x"$1" = x ; then
($TEMPLATE = $Template) =~ tr/a-z/A-Z/; echo "$0 Objectname [srcfile]\n";
($template = $Template) =~ tr/A-Z/a-z/; echo " creates gstobjectname.{c,h} implementing GstObjectname,\n";
echo " subclassing GstVideofilter.\n";
exit 1;
fi
open IN, "gstvideotemplate.c"; if test x"$2" = x ; then
open OUT, ">gst$template.c"; srcfile="gstvideotemplate.c"
fi
@lines = <IN>; id=$(echo '$Id$I[d]: \(.*\)\$/\1/g" )
map {
s/gstvideotemplate\.c/SOURCEFILE/g;
s/Videotemplate/$Template/g;
s/videotemplate/$template/g;
s/VIDEOTEMPLATE/$TEMPLATE/g;
# remember to break up the Id: in the line below
s/\$I[d]: (.*)\$/$1/g;
s/SOURCEFILE/gstvideotemplate\.c/g;
} @lines;
print OUT @lines; TEMPLATE=$(echo $Template | tr a-z A-Z)
template=$(echo $Template | tr A-Z a-z)
close IN; # remember to break up the Id: in the line below
close OUT; sed \
-e "s/gstvideotemplate\.c/SOURCEFILE/g" \
-e "s/Videotemplate/$Template/g" \
-e "s/videotemplate/$template/g" \
-e "s/VIDEOTEMPLATE/$TEMPLATE/g" \
-e "s/\$I[d]: \(.*\)\$/\1/g" \
-e "s/SOURCEFILE/gstvideotemplate\.c/g" \
-e "s/MAKEFILTERVERSION/$id/g" \
$srcfile >gst$template.c