From 5a70924251c257e9c7dbdb718421a2b68fa21a83 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Mon, 1 Apr 2013 20:12:57 -0700 Subject: [PATCH] gst-element-maker: create better element name when using --prefix --- tools/gst-element-maker | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tools/gst-element-maker b/tools/gst-element-maker index 8a9b29ef11..facb242ead 100755 --- a/tools/gst-element-maker +++ b/tools/gst-element-maker @@ -64,6 +64,11 @@ GstReplace=${Prefix}${Name} gst_replace=${prefix}_${name} gstreplace=${prefix}$(echo $name | sed -e 's/_//g') replace=$(echo $name | sed -e 's/_//g') +if [ "${prefix}" = gst ] ; then + prefixreplace=$replace +else + prefixreplace=$gstreplace +fi if [ "$REAL_NAME" = "" ] ; then REAL_NAME=FIXME @@ -169,7 +174,7 @@ cat <$gstreplace.c generate_header | sed \ @@ -371,6 +377,7 @@ generate_header | sed \ -e "s/GstReplace/$GstReplace/g" \ -e "s/gst_replace/$gst_replace/g" \ -e "s/gstreplace/$gstreplace/g" \ + -e "s/prefixreplace/$prefixreplace/g" \ -e "s/replace/$replace/g" >$gstreplace.h gst-indent $gstreplace.c -- 2.34.1