diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2014-07-23 15:25:44 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2014-07-23 15:25:44 +0200 |
commit | 8286ac511144e4f17d34eac9affb97e50646344a (patch) | |
tree | f1af7320d7b6be6be059216d0ad08ac7b4f73fd0 /build-0.3/meta/vc9proj | |
parent | a15cf65c44d5c224169c32ef5495b68c758134b7 (diff) |
Imported Upstream version 4.0.0upstream/4.0.0
Diffstat (limited to 'build-0.3/meta/vc9proj')
-rwxr-xr-x | build-0.3/meta/vc9proj | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/build-0.3/meta/vc9proj b/build-0.3/meta/vc9proj new file mode 100755 index 0000000..03130b4 --- /dev/null +++ b/build-0.3/meta/vc9proj @@ -0,0 +1,75 @@ +#! /usr/bin/env bash + +# file : build/meta/vc9proj +# copyright : Copyright (c) 2009-2012 Code Synthesis Tools CC +# license : GNU GPL v2; see accompanying LICENSE file + +# Process VC++ 9 project file templates. +# +# Options: +# +# -o <output-file> +# +# Arguments: +# +# <template-file> +# +trap 'exit 1' ERR + +function error () +{ + echo "$*" 1>&2 +} + +output= + +while [ $# -gt 0 ]; do + case $1 in + -o) + output=$2 + shift 2 + ;; + *) + break + ;; + esac +done + +input=$1 + +if [ "$input" = "" ]; then + error "no input file" + exit 1 +fi + +if [ "$output" = "" ]; then + error "no output file" + exit 1 +fi + +m4=m4 +u2d=todos + +# Assume this script is never found via PATH. +# +meta=`dirname $0` + +build="$meta/.." +install=$build/install/install + + +# Determine available configurations. +# +conf=`sed -n -e \ +'/^[ ]*<Configuration$/{n;s/[ ]*Name="\([^"]*\)"$/"\1",/p};d' $input` +conf=`echo $conf | sed -e 's/,$//'` + +export configurations=$conf + +# Make sure the output directory exist. +# +$install -d -m 755 `dirname $output` + +$m4 -P -D__meta_base__=$meta $meta/vc9proj.m4 $input >$output +$u2d $output +chmod 644 $output |