projects
/
tatoo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add a new option to choose tree model at runtime.
[tatoo.git]
/
Remakefile.in
diff --git
a/Remakefile.in
b/Remakefile.in
index
b3b1168
..
c1f2b25
100644
(file)
--- a/
Remakefile.in
+++ b/
Remakefile.in
@@
-37,7
+37,7
@@
clean:
for dir in src tools; do
find $dir -name '*.cm*' -o -name '*.o' -o -name '*.byte' -o \
-name '*.native' -o -name '*.mll' -o -name '*.mly' -o \
for dir in src tools; do
find $dir -name '*.cm*' -o -name '*.o' -o -name '*.byte' -o \
-name '*.native' -o -name '*.mll' -o -name '*.mly' -o \
- -name '*.class' -o -name '*.depo' -o -name '*.depx' | while read file; do
+ -name '*.class' -o -name '*.depo' -o -name '*.depx'
-o -name '*.ml.str'
| while read file; do
case "$file" in
*.mll)
rm -f "${file%.mll}.ml"
case "$file" in
*.mll)
rm -f "${file%.mll}.ml"
@@
-45,8
+45,11
@@
clean:
*.mly)
rm -f "${file%.mly}.ml" "${file%.mly}.mli"
;;
*.mly)
rm -f "${file%.mly}.ml" "${file%.mly}.mli"
;;
+ *.ml.str)
+ rm -f "${file%.ml.str}.ml"
+ ;;
*)
*)
- rm -f "$file"
+
rm -f "$file"
;;
esac
done
;;
esac
done
@@
-59,9
+62,12
@@
distclean: clean test_clean
javac $<
%.native$(EXE): %.cmx %.depx
javac $<
%.native$(EXE): %.cmx %.depx
+ if test -f $@".flags"; then
+ FLAGS=`cat $@".flags"`
+ fi
objects=`cat $*.depx | xargs | sed 's/[.]depx/.cmx/g'`
$(REMAKE) OCAMLNATIVE="-native" $objects #ensure all objects have been built
objects=`cat $*.depx | xargs | sed 's/[.]depx/.cmx/g'`
$(REMAKE) OCAMLNATIVE="-native" $objects #ensure all objects have been built
- $(OCAMLOPT) -o $@ $(OCAMLFLAGS) $(OCAMLOPTFLAGS) $(OCAMLFINDLINKFLAGS) $(OCAMLFINDFLAGS) $objects $<
+ $(OCAMLOPT) -o $@ $(OCAMLFLAGS) $(OCAMLOPTFLAGS) $(OCAMLFINDLINKFLAGS) $(OCAMLFINDFLAGS) $
FLAGS $
objects $<
%.byte$(EXE): %.cmo %.depo
objects=`cat $*.depo | xargs | sed 's/[.]depo/.cmo/g'`
%.byte$(EXE): %.cmo %.depo
objects=`cat $*.depo | xargs | sed 's/[.]depo/.cmo/g'`
@@
-75,6
+81,12
@@
distclean: clean test_clean
elif test -f $*.mll; then
$(REMAKE) $*.mll
$(OCAMLLEX) $*.mll
elif test -f $*.mll; then
$(REMAKE) $*.mll
$(OCAMLLEX) $*.mll
+ elif test -f $*.ml.str; then
+ $(REMAKE) $*.ml.str
+ echo -n 'let content = "' > $*.ml
+ sed -e 's/\(["\\]\)/\\\1/g' $*.ml.str | sed -e 's/^\(.*\)$/\1\\n\\/g' >> $*.ml
+ echo '' >> $*.ml
+ echo '"' >> $*.ml
fi
%.cmx %.depx:
fi
%.cmx %.depx:
@@
-85,7
+97,10
@@
distclean: clean test_clean
REMAKE="$(REMAKE) OCAMLNATIVE=$NATIVE"
OCAMLDEP="$(OCAMLDEP) $(OCAMLFINDFLAGS)"
SRC=$(SRC)
REMAKE="$(REMAKE) OCAMLNATIVE=$NATIVE"
OCAMLDEP="$(OCAMLDEP) $(OCAMLFINDFLAGS)"
SRC=$(SRC)
- COMPILE="$(OCAMLOPT) $(OCAMLFLAGS) $(OCAMLOPTFLAGS) $(OCAMLFINDFLAGS)"
+ if test -f "$base".flags; then
+ FLAGS=`cat "$base".flags`
+ fi
+ COMPILE="$(OCAMLOPT) $(OCAMLFLAGS) $(OCAMLOPTFLAGS) $(OCAMLFINDFLAGS) $FLAGS"
. tools/ocamldriver.sh
%.cmo %.depo:
. tools/ocamldriver.sh
%.cmo %.depo: