SCM

SCM Repository

[matrix] View of /pkg/src/DEPS.mkf_make.sh
ViewVC logotype

View of /pkg/src/DEPS.mkf_make.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1917 - (download) (as text) (annotate)
Thu Jun 21 21:32:39 2007 UTC (11 years, 11 months ago) by maechler
File size: 724 byte(s)
update + comment
#!/bin/sh
#
R=${R:-R-patched}
if [ x$R_HOME = x ] ; then R_HOME=`$R RHOME`; fi
RINC=${R_HOME}/include
#
MatrixDir=`dirname $0`; cd $MatrixDir; MatrixDir=`pwd`
if [ ! -d $MatrixDir ]
then echo "no directory '$MatrixDir' .. exiting"; exit 3
fi
cd $MatrixDir
## CHOLMOD has one include for which gcc -MM fails below:
FIX=CHOLMOD/Include/cholmod.h
if [ -f $FIX ]
then
  sed '/^#include "UFconfig/s/\(.*\)/\/* \1 *\//' $FIX > ${FIX}_fixed
  mv $FIX ${FIX}_orig
  mv ${FIX}_fixed $FIX
fi
## __end fix__
out=DEPS.mkf_automade
gcc -I$RINC -MM *.c | perl -pe "s{$RINC/[^.]*.h( \\\\\\n)?}{}g" > $out
#           ^^^ ~~~
if [ -f ${FIX}_orig ] ; then mv ${FIX}_orig $FIX ; fi
echo ''; echo "$0 done.  Resulting file is $MatrixDir/$out"

root@r-forge.r-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business Powered By FusionForge