From b4da02b8856ccc723c707618038f6a5c3bf223e2 Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Thu, 4 Apr 2013 12:05:27 +0200 Subject: [PATCH] Imported Upstream version 0.1 --- Makefile | 33 +++++++++++++++++++++++++++++++++ build | 15 --------------- extracted/Makefile | 15 +++++++++++++++ extracted/build | 8 -------- 4 files changed, 48 insertions(+), 23 deletions(-) create mode 100755 Makefile delete mode 100755 build create mode 100755 extracted/Makefile delete mode 100755 extracted/build 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 -- 2.39.2