From 8286ac511144e4f17d34eac9affb97e50646344a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 23 Jul 2014 15:25:44 +0200 Subject: Imported Upstream version 4.0.0 --- build-0.3/meta/autoconf | 84 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100755 build-0.3/meta/autoconf (limited to 'build-0.3/meta/autoconf') diff --git a/build-0.3/meta/autoconf b/build-0.3/meta/autoconf new file mode 100755 index 0000000..2eb542f --- /dev/null +++ b/build-0.3/meta/autoconf @@ -0,0 +1,84 @@ +#! /usr/bin/env bash + +# file : build/meta/autoconf +# copyright : Copyright (c) 2009-2012 Code Synthesis Tools CC +# license : GNU GPL v2; see accompanying LICENSE file + +# Process autconf configure.ac templates. +# +# Options: +# +# -b +# -o +# +# Arguments: +# +# +# +trap 'exit 1' ERR + +function error () +{ + echo "$*" 1>&2 +} + +base= +output= + +while [ $# -gt 0 ]; do + case $1 in + -b) + base=$2 + shift 2 + ;; + -o) + output=$2 + shift 2 + ;; + *) + break + ;; + esac +done + +input=$1 + +if [ "$input" = "" ]; then + error "no input file" + exit 1 +fi + +if [ "$base" = "" ]; then + error "no base directory" + exit 1 +fi + +if [ "$output" = "" ]; then + error "no output file" + exit 1 +fi + +m4=m4 + +# Assume this script is never found via PATH. +# +meta=`dirname $0` + +build="$meta/.." +install=$build/install/install + +# Find all the configuration files. +# +files=`find $base -name 'Makefile.am' -o -name '*.in' -a ! -name '*.h.in' | \ +sed -e "s%^$base/%%" | \ +sed -e 's%\.\(am\|in\)$%%' | \ +sort -u` + +export config_files=$files + +# Make sure the output directory exist. +# +$install -d -m 755 `dirname $output` + +$m4 -P -D__meta_base__=$meta $meta/autoconf.m4 $input >$output +chmod 644 $output -- cgit v1.2.3