Rev 40010 | Blame | Last modification | View Log | Download | RSS feed
#!/bin/sh## ${R_HOME}/bin/COMPILE# @configure_input@revision='$Rev: 42192 $'version=`set - ${revision}; echo ${2}`version="R compilation front end ${version}Copyright (C) 2000-2006 The R Core Development Team.This is free software; see the GNU General Public License version 2 orlater for copying conditions. There is NO warranty."usage="Usage: R CMD COMPILE [options] filesCompile the specified files for subsequent collection into a sharedlibrary using 'R CMD SHLIB'. Currently, the following languages withassociated source file extensions are supported (provided that therespective compilers are available and R was configured to use these):C ('.c'), C++ ('.cc' or '.cpp' or '.C'), FORTRAN 77 ('.f'), FORTRAN 90('.f90'), FORTRAN 95 ('.f95'), Objective C ('.m'), and Objective C++('.M' or '.mm').Options:-h, --help print short help message and exit-v, --version print COMPILE version info and exitOther options of the form '-DMACRO' or 'VAR=VALUE' are passed on to thecompilation.Report bugs to <r-bugs@r-project.org>."makefiles="-f \"${R_HOME}/etc${R_ARCH}/Makeconf\""if test -r "${HOME}/.R/Makevars-${R_PLATFORM}"; thenmakefiles="${makefiles} -f \"${HOME}/.R/Makevars-${R_PLATFORM}\""elif test -r "${HOME}/.R/Makevars"; thenmakefiles="${makefiles} -f \"${HOME}/.R/Makevars\""fiif test -r Makevars; thenmakefiles="-f Makevars ${makefiles}"fiobjs=while test -n "${1}"; docase ${1} in-h|--help)echo "${usage}"; exit 0 ;;-v|--version)echo "${version}"; exit 0 ;;*.[cfmCM]|*.cc|*.cpp|*.f90|*.f95|*.mm)objs="${objs} `echo ${1} | sed 's/\.[^\.][^\.]*$/.o/'`" ;;-D*)MAKEFLAGS="${MAKEFLAGS} ${1}" ;;*=*)argn=`echo "${1}" | sed -e 's/=.*//'`argv=`echo "${1}" | \sed -e 's/[^=]*=//; s/^\\"//; s/\\"$//; s/\\"/\\\\"/g'`MAKEFLAGS="${MAKEFLAGS} ${argn}=\"${argv}\"";;*)echo "ERROR: don't know how to compile '${1}'"exit 1;;esacshiftdoneeval "${MAKE} ${makefiles} ${MAKEFLAGS} ${objs}"### Local Variables: ***### mode: sh ***### sh-indentation: 2 ***### End: ***