The R Project SVN R

Rev

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

Rev 38758 Rev 40010
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='$Rev: 38758 $'
7
revision='$Rev: 40010 $'
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
Copyright (C) 2000-2005 The R Core Development Team.
11
Copyright (C) 2000-2006 The R Core Development Team.
12
This is free software; see the GNU General Public Licence version 2 or
12
This is free software; see the GNU General Public Licence version 2 or
13
later for copying conditions.  There is NO warranty."
13
later for copying conditions.  There is NO warranty."
14
 
14
 
15
usage="Usage: R CMD COMPILE [options] files
15
usage="Usage: R CMD COMPILE [options] files
16
 
16
 
17
Compile the specified files for subsequent collection into a shared
17
Compile the specified files for subsequent collection into a shared
18
library using 'R CMD SHLIB'.  Currently, C, C++, and FORTRAN files
18
library using 'R CMD SHLIB'.  Currently, the following languages with
-
 
19
associated source file extensions are supported (provided that the
-
 
20
respective compilers are available and R was configured to use these):
19
(with extensions '.c', '.cc' or '.cpp' or '.C', and '.f', respectively),
21
C ('.c'), C++ ('.cc' or '.cpp' or '.C'), FORTRAN 77 ('.f'), FORTRAN 90
-
 
22
('.f90'), FORTRAN 95 ('.f95'), Objective C ('.m'), and Objective C++
20
are supported.
23
('.M' or '.mm').
21
 
24
 
22
Options:
25
Options:
23
  -h, --help		print short help message and exit
26
  -h, --help		print short help message and exit
24
  -v, --version		print COMPILE version info and exit
27
  -v, --version		print COMPILE version info and exit
25
 
28
 
Line 43... Line 46...
43
  case ${1} in
46
  case ${1} in
44
    -h|--help)
47
    -h|--help)
45
      echo "${usage}"; exit 0 ;;
48
      echo "${usage}"; exit 0 ;;
46
    -v|--version)
49
    -v|--version)
47
      echo "${version}"; exit 0 ;;
50
      echo "${version}"; exit 0 ;;
48
    *.[cfC]|*.cc|*.cpp)
51
    *.[cfmCM]|*.cc|*.cpp|*.f90|*.f95|*.mm)
49
      objs="${objs} `echo ${1} | sed 's/\.[^\.][^\.]*$/.o/'`" ;;
52
      objs="${objs} `echo ${1} | sed 's/\.[^\.][^\.]*$/.o/'`" ;;
50
    -D*)
53
    -D*)
51
      MAKEFLAGS="${MAKEFLAGS} ${1}" ;;
54
      MAKEFLAGS="${MAKEFLAGS} ${1}" ;;
52
    *=*)
55
    *=*)
53
      argn=`echo "${1}" | sed -e 's/=.*//'`
56
      argn=`echo "${1}" | sed -e 's/=.*//'`