/[svn]/cduce_mktop
ViewVC logotype

Diff of /cduce_mktop

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1497 by abate, Tue Jul 10 18:56:42 2007 UTC revision 1771 by abate, Tue Jul 10 19:21:45 2007 UTC
# Line 1  Line 1 
1  #!/bin/sh  #!/bin/sh
2    
3    FLAGS=
4    LINK=
5    NATIVE=true
6    
7    while true; do
8     case "$1" in
9       -I)
10        FLAGS="$FLAGS -I $2"
11        shift
12        shift
13        ;;
14       -p)
15        FLAGS="$FLAGS -I `ocamlfind query $2`"
16        LINK="$LINK -package $2"
17        shift
18        shift
19        ;;
20       -l)
21        LINK="$LINK $2"
22        shift
23        shift
24        ;;
25      -byte)
26        NATIVE=false
27        shift
28        ;;
29      *)
30        break
31        ;;
32     esac
33    done
34    
35  TARG=$1  TARG=$1
36  PRIMS=$2  PRIMS=$2
37    
38  if [ "${TARG}" = "" ] || [ "${PRIMS}" = "" ]; then  if [ "${TARG}" = "" ] || [ "${PRIMS}" = "" ]; then
39    echo "Usage: cduce_mktop <target> <primitive file>"    echo "Usage: cduce_mktop [(-I path | -p package | -l unit.cmo/cma/cmx/cmxa) ...] <target> <primitive file>"
40    exit 2    exit 2
41  fi  fi
42    
43  exec ocamlfind ocamlc -package cduce -o $TARG -linkpkg -pp mlcduce_wrapper -impl $PRIMS  
44    if [ ${NATIVE} = "true" ]; then
45     CAML=ocamlopt
46    else
47     CAML=ocamlc
48    fi
49    
50    echo "Effective flags for CDuce: $FLAGS"
51    echo "Effective flags for OCaml: $LINK"
52    
53    exec ocamlfind $CAML -package cduce -o $TARG $FLAGS -linkpkg -pp "cduce --topstub $FLAGS" $LINK -impl $PRIMS

Legend:
Removed from v.1497  
changed lines
  Added in v.1771

CVS Admin">CVS Admin
ViewVC Help
Powered by ViewVC 1.1.5