#! /bin/sh # Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test -z "${depmode}" || test -z "${source}" || test -z "${base}" then echo "idldep: Variables depmode, source and base must be set" 1>&2 exit 1 fi depfile=${depfile-`echo "${base}" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|$|.Pidl|'`} tmpdepfile=${tmpdepfile-`echo "${depfile}" | sed 's/\.P\([^.]*\)$/.Tp\1/'`} objects=`echo "${base}.hpp" "${base}Server.hpp" "${base}.cpp" "${base}Server.cpp"` rm -f "${tmpdepfile}" case "${depmode}" in gcc3) if "$@" -E -x c++ "${source}" -MT "${objects}" -MD -MP -MF "${tmpdepfile}" > /dev/null then rm -f "${depfile}" cat < "${tmpdepfile}" > "${depfile}" echo "${source}:" >> "${depfile}" fi ;; gcc | icc | dashmstdout | dashXmstdout) if test "x${depmode}" = "xdashXmstdout" then dashmflag="-xM" else dashmflag="-M" fi if test "x${depmode}" = "xgcc" || test "x${depmode}" = "xicc" then dashmflag="${dashmflag} -x c++" fi if "$@" -E ${dashmflag} "${source}" > "${tmpdepfile}" then rm -f "${depfile}" sed -e 's|^[^:]*:|'"${objects}"':|' -e 's|^ *[a-zA-Z]:[\\/][^:]*:|'"${objects}"':|' \ < "${tmpdepfile}" > "${depfile}" sed -e 's/^[^:]*://' -e 's|^ *[a-zA-Z]:[\\/][^:]*:||' < "${tmpdepfile}" | \ tr ' ' ' ' | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/:/' >> "${depfile}" fi ;; cpp) if "$@" -E "${source}" | sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "${tmpdepfile}" then rm -f "${depfile}" echo "${objects}: \\" > "${depfile}" cat < "${tmpdepfile}" >> "${depfile}" sed < "${tmpdepfile}" '/^$/d;s/^ //;s/ \\$//;s/$/:/' >> "${depfile}" fi ;; makedepend) shift # removes the compiler from the parameters touch "${tmpdepfile}" if "${MAKEDEPEND-makedepend}" -f"${tmpdepfile}" "$@" "${source}" then rm -f "${depfile}" echo "${objects}: ${source}" > "${depfile}" sed -e '/^$/d;/^#/d' -e 's|^[^:]*:|'"${objects}"':|' -e 's|^ *[a-zA-Z]:[\\/][^:]*:|'"${objects}"':|' \ < "${tmpdepfile}" >> "${depfile}" echo "${source}:" >> "${depfile}" sed -e '/^#/d' -e 's/^[^:]*://' -e 's|^ *[a-zA-Z]:[\\/][^:]*:||' < "${tmpdepfile}" | \ tr ' ' ' ' | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/:/' >> "${depfile}" fi ;; none) ;; *) echo "Unknown depmode ${depmode}" 1>&2 exit 1 ;; esac rm -f "${tmpdepfile}" exit 0