From 35495dd48fb1d2c529b712ab01d47a8ee8989af8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sun, 14 Apr 2013 15:17:12 +0100 Subject: update-autogen: new tool to generate module autogen.sh files from a common template Maybe one day an autogen.sh consisting of just 'autoreconf' will be enough. Until then, let's try to at least use consistent autogen.sh in the different modules. This tool will hopefully help with that. The autogen.sh.in template is currently based on the autogen.sh from core. There are changes in other modules which should probably be merged into that. One bug has already been fixed: touch gstreamer-1.0.pot not -0.10.pot --- update-autogen | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100755 update-autogen (limited to 'update-autogen') diff --git a/update-autogen b/update-autogen new file mode 100755 index 0000000..d267556 --- /dev/null +++ b/update-autogen @@ -0,0 +1,48 @@ +#!/bin/bash + +if [ ! -f "common/update-autogen" ]; then + echo "Run ./common/update-autogen from the top-level source directory of a GStreamer module"; + exit 1; +fi + +if ! ls -1 *.doap 2>/dev/null >/dev/null; then + echo "Could not find *.doap file"; + exit 1; +fi + +PACKAGE=`ls -1 *.doap | head -n1 | sed -e 's/.doap$//'` + +#echo "Package: $PACKAGE" + +DIR=`mktemp -d` +if [[ $? != 0 ]]; then + echo "Could not create temp dir"; + exit 1; +fi + +TEMP_AUTOGEN_SH="$DIR/autogen.sh" +echo "\ +#!/bin/sh +# +# $PACKAGE autogen.sh +# +# Run this to generate all the initial makefiles, etc. +# +# This file has been generated from common/autogen.sh.in via common/update-autogen + +" > $TEMP_AUTOGEN_SH + +sed \ + -e "s/@API_VERSION@/1.0/g" \ + -e "s/@PACKAGE@/$PACKAGE/g" \ + -e "s/@SRCFILE@/$PACKAGE.doap/g" < common/autogen.sh.in >> $TEMP_AUTOGEN_SH + +chmod +x $TEMP_AUTOGEN_SH + +mv $TEMP_AUTOGEN_SH autogen.sh || { + echo "Failed to update autogen.sh" + exit 1; +} +rmdir $DIR + +echo "Updated $PACKAGE autogen.sh" -- cgit v1.2.1