From: Enrico Tassi Date: Thu, 4 Apr 2013 10:05:27 +0000 (+0200) Subject: Imported Upstream version 0.1 X-Git-Tag: upstream/0.1^0 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=b4da02b8856ccc723c707618038f6a5c3bf223e2;p=pkg-cerco%2Facc-trusted.git Imported Upstream version 0.1 --- diff --git a/Makefile b/Makefile new file mode 100755 index 0000000..cbe432e --- /dev/null +++ b/Makefile @@ -0,0 +1,33 @@ +OCAMLC=ocamlc -I cparser +OCAMLOPT=ocamlopt -I cparser + +CMOS=extracted.cmo clightFromC.cmo clightParser.cmo IntelHex.cmo clightPrinter.cmo rTLabsPrinter.cmo ASMPrinter.cmo printer.cmo error.cmo optionsParsing.cmo options.cmo acc.cmo + +CMXS=$(CMOS:.cmo=.cmx) + +byte: + make -C cparser cparser.cma + make -C extracted byte + cp extracted/_build/extracted.cm[io] . + ${OCAMLC} -c -g *.mli + ${OCAMLC} -c -g error.ml + ${OCAMLC} -c -g optionsParsing.ml + ${OCAMLC} -c -g options.ml + ${OCAMLC} -c -g *.ml + ${OCAMLC} -custom -g cparser/cparser.cma ${CMOS} -o acc + +opt: + make -C cparser cparser.cmxa + make -C extracted opt + cp extracted/_build/extracted.cm[ix] extracted/_build/extracted.o . + ${OCAMLOPT} -c -g *.mli + ${OCAMLOPT} -c -g error.ml + ${OCAMLOPT} -c -g optionsParsing.ml + ${OCAMLOPT} -c -g options.ml + ${OCAMLOPT} -c -g *.ml + ${OCAMLOPT} -g cparser/cparser.cmxa ${CMXS} -o acc.opt + +clean: + make -C cparser clean + make -C extracted clean + rm -f *.cmi *.cmo *.cmx acc diff --git a/build b/build deleted file mode 100755 index 75fe30a..0000000 --- a/build +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -# A crappy build script that needs to be replaced by some proper structure. - -OCAMLC="ocamlc -I cparser" - -make -C cparser -(cd extracted; ./build) -cp extracted/_build/extracted.cm[io] . -$OCAMLC -c -g *.mli -$OCAMLC -c -g error.ml -$OCAMLC -c -g optionsParsing.ml -$OCAMLC -c -g options.ml -$OCAMLC -c -g *.ml -$OCAMLC -custom -g extracted.cmo cparser/cparser.cma clightFromC.cmo clightParser.cmo IntelHex.cmo clightPrinter.cmo rTLabsPrinter.cmo ASMPrinter.cmo printer.cmo error.cmo optionsParsing.cmo options.cmo acc.cmo -o acc diff --git a/extracted/Makefile b/extracted/Makefile new file mode 100755 index 0000000..3673895 --- /dev/null +++ b/extracted/Makefile @@ -0,0 +1,15 @@ +byte: pre + ocamlbuild -Is untrusted -tag debug extracted.cmo + +opt: pre + ocamlbuild -Is untrusted -tag debug extracted.cmx +pre: + # The untrusted ones replace the extracted ones + rm -f set_adt.ml set_adt.mli + # Uses a GNU sed extension + for i in `ls *.ml untrusted/*.ml`; do basename $$i | sed -e 's/\(.\)\(.*\)\.ml/\U\1\E\2/'; done > extracted.mlpack + for i in `ls *.ml untrusted/*.ml`; do echo "<"$${i%%.ml}".cmx>: for-pack(Extracted)"; done > _tags + + +clean: + ocamlbuild -clean diff --git a/extracted/build b/extracted/build deleted file mode 100755 index 228201f..0000000 --- a/extracted/build +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -# The untrusted ones replace the extracted ones -rm -f set_adt.ml set_adt.mli -# Uses a GNU sed extension -for i in `ls *.ml untrusted/*.ml`; do basename $i | sed -e 's/\(.\)\(.*\)\.ml/\U\1\E\2/'; done > extracted.mlpack -for i in `ls *.ml untrusted/*.ml`; do echo "<"${i%%.ml}".cmx>: for-pack(Extracted)"; done > _tags -ocamlbuild -Is untrusted -tag debug extracted.cmo extracted.cmx