projects
/
tatoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
be3f8ef
)
Further simplify Remakefile. Remove some inefficiency in module dependency checking...
author
Kim Nguyễn
<kn@lri.fr>
Mon, 3 Mar 2014 23:21:26 +0000
(
00:21
+0100)
committer
Kim Nguyễn
<kn@lri.fr>
Mon, 3 Mar 2014 23:21:26 +0000
(
00:21
+0100)
Remakefile.in
patch
|
blob
|
history
tools/ocamlmoduledep.sh
patch
|
blob
|
history
diff --git
a/Remakefile.in
b/Remakefile.in
index
97234fb
..
5c3fe42
100644
(file)
--- a/
Remakefile.in
+++ b/
Remakefile.in
@@
-22,7
+22,7
@@
OCAMLOPTFLAGS = @OCAMLOPTFLAGS@
OCAMLCFLAGS = @OCAMLCFLAGS@
MENHIR = @MENHIR@
OCAMLCFLAGS = @OCAMLCFLAGS@
MENHIR = @MENHIR@
-.PHONY:
clean distclean
+.PHONY:
clean real_test test_native test
all: $(BIN)
all: $(BIN)
@@
-68,9
+68,9
@@
distclean: clean test_clean
%.native$(EXE):
$(REMAKE) OCAMLNATIVE="-native" $*.cmx $*.depx
%.native$(EXE):
$(REMAKE) OCAMLNATIVE="-native" $*.cmx $*.depx
- objects=`cat $*.depx | xargs | sed 's/[.]depx/.cmx/g'`
+ objects=`cat $*.depx | xargs | sed 's/[.]depx/.cmx/g'`
$(REMAKE) OCAMLNATIVE="-native" $objects #ensure all objects have been built
$(REMAKE) OCAMLNATIVE="-native" $objects #ensure all objects have been built
- $(OCAMLOPT) -o $@ $(OCAMLFLAGS) $(OCAMLOPTFLAGS) $(OCAMLFINDLINKFLAGS) $(OCAMLFINDFLAGS) $objects $*.cmx
+ $(OCAMLOPT) -o $@ $(OCAMLFLAGS) $(OCAMLOPTFLAGS) $(OCAMLFINDLINKFLAGS) $(OCAMLFINDFLAGS) $objects $*.cmx
%.byte$(EXE):
%.byte$(EXE):
@@
-105,6
+105,7
@@
distclean: clean test_clean
COMPILE="$(OCAMLOPT) $(OCAMLFLAGS) $(OCAMLOPTFLAGS) $(OCAMLFINDFLAGS)"
. tools/ocamldriver.sh
COMPILE="$(OCAMLOPT) $(OCAMLFLAGS) $(OCAMLOPTFLAGS) $(OCAMLFINDFLAGS)"
. tools/ocamldriver.sh
+
%.cmo %.depo:
base=$*
target=$@
%.cmo %.depo:
base=$*
target=$@
@@
-134,15
+135,9
@@
distclean: clean test_clean
## Tests
## Tests
-test_byte: tools $(BYTE)
- $(REMAKE) TEST=$(BYTE) real_test
-
-test_native: tools $(BIN)
- $(REMAKE) TEST=$(BIN) real_test
-
-test: test_native
real_test:
real_test:
+ echo $(TEST)
for i in tests/*.xml
do
for j in 1 2 3
for i in tests/*.xml
do
for j in 1 2 3
@@
-151,10
+146,18
@@
real_test:
done
done
done
done
+test_byte:
+ $(REMAKE) TEST=$(BYTE) real_test
+test_native:
+ $(REMAKE) TEST=$(BIN) real_test
+
+test: test_native
+
test_clean:
rm -rf tests/*.summary tests/*.results/*_"$(PACKAGE)"_*.*
%.summary:
test_clean:
rm -rf tests/*.summary tests/*.results/*_"$(PACKAGE)"_*.*
%.summary:
+ $(REMAKE) tools $(TEST)
target=$@
base=$*
test=${base#*.xml.}
target=$@
base=$*
test=${base#*.xml.}
diff --git
a/tools/ocamlmoduledep.sh
b/tools/ocamlmoduledep.sh
index
8575312
..
2833671
100755
(executable)
--- a/
tools/ocamlmoduledep.sh
+++ b/
tools/ocamlmoduledep.sh
@@
-11,10
+11,11
@@
INCLUDES=""
MODULES=""
NATIVE=0
INTER=0
MODULES=""
NATIVE=0
INTER=0
+OCAMLWHERE=$(ocamlc -where)
while true; do
case $1 in
-I)
while true; do
case $1 in
-I)
- dir=`echo "$2" | sed "s:^+:$
(ocamlc -where)
/:"`
+ dir=`echo "$2" | sed "s:^+:$
{OCAMLWHERE}
/:"`
INCLUDES="$INCLUDES
$dir"
shift
INCLUDES="$INCLUDES
$dir"
shift
@@
-43,22
+44,23
@@
else
ext=cmo
fi
ext=cmo
fi
+
for MODULE in $MODULES; do
for MODULE in $MODULES; do
- module="$(echo $
MODULE | cut -b1 | tr A-Z a-z)$(echo $MODULE | cut -b2-
)"
+ module="$(echo $
{MODULE} | sed -e 's:\(.*\):\l\1:'
)"
echo "$INCLUDES" | while read include; do
if test -z "$include"; then continue; fi
echo "$INCLUDES" | while read include; do
if test -z "$include"; then continue; fi
- base="$
include/$module
"
+ base="$
{include}/${module}
"
if test \( "$INTER" = "1" \) -a \( -f "$base".mli \) ; then
## if we want to depend only on cmi of a module
if test \( "$INTER" = "1" \) -a \( -f "$base".mli \) ; then
## if we want to depend only on cmi of a module
-
/bin/echo -n "$base
"."cmi "
+
/bin/echo -n "${base}
"."cmi "
elif test -f "$base".ml -o -f "$base".mly -o -f "$base".mll -o -f "$base".pack -o -f "$base".ml.str; then
## else we depend on the implementation
elif test -f "$base".ml -o -f "$base".mly -o -f "$base".mll -o -f "$base".pack -o -f "$base".ml.str; then
## else we depend on the implementation
- /bin/echo -n "$
base"."$ext
"
+ /bin/echo -n "$
{base}"."${ext}
"
break
break
- elif test -f "$
base
".mli; then
+ elif test -f "$
{base}
".mli; then
## and fall back on depending on the cmi if the cmx is not available
## (which prevents cross-module inlining in the case of cmx)
## and fall back on depending on the cmi if the cmx is not available
## (which prevents cross-module inlining in the case of cmx)
- /bin/echo -n "$
base
"."cmi "
+ /bin/echo -n "$
{base}
"."cmi "
break
fi
done
break
fi
done