/[svn]/cduce_mktop
ViewVC logotype

Diff of /cduce_mktop

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

revision 1508 by abate, Tue Jul 10 18:58:02 2007 UTC revision 1509 by abate, Tue Jul 10 18:58:14 2007 UTC
# Line 1  Line 1 
1  #!/bin/sh  #!/bin/sh
2    
3  FLAGS=  FLAGS=
4    LINK=
5    NATIVE=true
6    
7  while true; do  while true; do
8   case "$1" in   case "$1" in
# Line 11  Line 13 
13      ;;      ;;
14     -p)     -p)
15      FLAGS="$FLAGS -I `ocamlfind query $2`"      FLAGS="$FLAGS -I `ocamlfind query $2`"
16        LINK="$LINK -package $2"
17      shift      shift
18      shift      shift
19      ;;      ;;
20       -l)
21        LINK="$LINK $2"
22        shift
23        shift
24        ;;
25      -byte)
26        NATIVE=false
27        shift
28        ;;
29    *)    *)
30      break      break
31      ;;      ;;
32   esac   esac
33  done  done
34    
 echo $FLAGS  
   
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 [(-I path | -p package) ...] <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 $FLAGS" -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 "mlcduce_wrapper $FLAGS" $LINK -impl $PRIMS

Legend:
Removed from v.1508  
changed lines
  Added in v.1509

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