From a15cf65c44d5c224169c32ef5495b68c758134b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 18 May 2014 16:08:14 +0200 Subject: Imported Upstream version 3.3.0.2 --- build-0.3/c/intel/dep | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100755 build-0.3/c/intel/dep (limited to 'build-0.3/c/intel/dep') diff --git a/build-0.3/c/intel/dep b/build-0.3/c/intel/dep new file mode 100755 index 0000000..70f3b79 --- /dev/null +++ b/build-0.3/c/intel/dep @@ -0,0 +1,58 @@ +#! /usr/bin/env bash + +# file : build/c/intel/dep +# author : Boris Kolpackov +# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC +# license : GNU GPL v2; see accompanying LICENSE file + +# Post-process generated dependency information. +# +# $1 current project's $(out_base) +# $2 - $N optional .cpp-options files + +out_base=$1 +shift + +files=$* + +#echo $out_base +#echo $files + +script= + +function gen_script () +{ + while [ "$1" ]; do + prefix=$1 + shift + + path=$1 + shift + + # Besides unresolved paths also replace default installation + # targets (/usr/include and /usr/local/include). + # + script="$script"\ +"s \\ $prefix \\ $path$prefix g;"\ +"s \\ /usr/include/$prefix \\ $path$prefix g;"\ +"s \\ /usr/local/include/$prefix \\ $path$prefix g;"\ +"s ^$prefix $path$prefix ;"\ +"s ^/usr/include/$prefix $path$prefix ;"\ +"s ^/usr/local/include/$prefix $path$prefix ;" + done +} + +if [ "$files" ]; then + prefixes=`sed -e 's%^prefix: \(.*\)$%\1%' -e t -e d $files` + gen_script $prefixes +fi + +# The last part of the script translates all file names that don't start +# with / or . (that is, local generated files) to files in $out_base. Note +# that it is assumed that such files are never installed and therefore there +# is no way to get around the situation where this file is picket up from +# some other place (e.g., /usr/include). +# +epilogue="s% \([^/. \\\\]\)% $out_base/\1%g;s%^\([^/. ].*:\)%$out_base/\1%" + +exec sed -e "$script$epilogue" -- cgit v1.2.3