gconf/Makefile.am: Fix for non-GNU make
[platform/upstream/gst-plugins-good.git] / gst / videofilter / make_filter
1 #!/bin/sh
2
3 LANG=C
4 export LANG
5 LC_COLLATE=C
6 export LC_COLLATE
7
8 Template=$1;
9 srcfile=$2;
10
11 if test x"$1" = x ; then
12         echo "$0 Objectname [srcfile]\n";
13         echo "  creates gstobjectname.{c,h} implementing GstObjectname,\n";
14         echo "  subclassing GstVideofilter.\n";
15         exit 1;
16 fi
17
18 if test x"$2" = x ; then
19         srcfile="gstvideotemplate.c"
20 fi
21
22 id=`echo '$Id$' | sed \
23         -e 's/\$I[d]: \([^$]*\)\$/\1/g'`
24 echo $id
25
26 TEMPLATE=`echo $Template | tr [:lower:] [:upper:]`
27 template=`echo $Template | tr [:upper:] [:lower:]`
28
29 # remember to break up the Id: in the line below
30 sed \
31         -e 's/gstvideotemplate\.c/SOURCEFILE/g' \
32         -e "s/Videotemplate/$Template/g" \
33         -e "s/videotemplate/$template/g" \
34         -e "s/VIDEOTEMPLATE/$TEMPLATE/g" \
35         -e 's/\$I[d]: \([^$]*\)\$/\1/g' \
36         -e 's/SOURCEFILE/gstvideotemplate\.c/g' \
37         -e "s%MAKEFILTERVERSION%$id%g" \
38         $srcfile >gst$template.c.tmp && mv gst$template.c.tmp gst$template.c
39