The R Project SVN R

Rev

Rev 10633 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 10633 Rev 11258
Line 2... Line 2...
2
#
2
#
3
# ${R_HOME}/bin/COMPILE
3
# ${R_HOME}/bin/COMPILE
4
 
4
 
5
# @configure_input@
5
# @configure_input@
6
 
6
 
7
revision='$Revision: 1.8 $'
7
revision='$Revision: 1.9 $'
8
version=`set - ${revision}; echo ${2}`
8
version=`set - ${revision}; echo ${2}`
9
version="R compilation front end ${version}"
9
version="R compilation front end ${version}"
10
 
10
 
11
usage="Usage: R COMPILE [options] files
11
usage="Usage: R COMPILE [options] files
12
 
12
 
13
Compile the specified files for subsequent collection into a shared
13
Compile the specified files for subsequent collection into a shared
14
library using \`R SHLIB'.  Currently, only C and Fortran files (with
14
library using \`R SHLIB'.  Currently, C, C++, and Fortran files (with
15
extensions \`.c' and \`.f', respectively, are supported.
15
extensions \`.c', \`.cc' or \`.cpp' or \`.C', and \`.f', respectively,
-
 
16
are supported.
16
 
17
 
17
Options:
18
Options:
18
  -h, --help		print short help message and exit
19
  -h, --help		print short help message and exit
19
  -v, --version		print version info and exit
20
  -v, --version		print version info and exit
20
 
21
 
Line 37... Line 38...
37
  case ${1} in
38
  case ${1} in
38
    -h|--help)
39
    -h|--help)
39
      echo "${usage}"; exit 0 ;;
40
      echo "${usage}"; exit 0 ;;
40
    -v|--version)
41
    -v|--version)
41
      echo "${version}"; exit 0 ;;
42
      echo "${version}"; exit 0 ;;
42
    *.[cf]|*.cc)
43
    *.[cfC]|*.cc|*.cpp)
43
      objs="${objs} `echo ${1} | sed 's/\.[^\.][^\.]*$/.o/'`" ;;
44
      objs="${objs} `echo ${1} | sed 's/\.[^\.][^\.]*$/.o/'`" ;;
44
    -D*|*=*)
45
    -D*|*=*)
45
      MAKEFLAGS="${MAKEFLAGS} ${1}" ;;
46
      MAKEFLAGS="${MAKEFLAGS} ${1}" ;;
46
    *)
47
    *)
47
      echo "ERROR: don't know how to compile \`${1}'"
48
      echo "ERROR: don't know how to compile \`${1}'"