diff options
author | pboutill <pboutill@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2012-10-15 14:01:35 +0000 |
---|---|---|
committer | pboutill <pboutill@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2012-10-15 14:01:35 +0000 |
commit | 5c621142ba5f48c168e69b5a1b871f3f55fec2b7 (patch) | |
tree | 0df182236c6f94d72b12cacacaf505686df6269a /tools | |
parent | 466b18682f85e79e698cfad47f43088b8c56f439 (diff) |
Coq_makefile: easier compilation with timings info (from r15850)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@15888 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'tools')
-rw-r--r-- | tools/coq_makefile.ml | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/coq_makefile.ml b/tools/coq_makefile.ml index a608f59bc..9547eab75 100644 --- a/tools/coq_makefile.ml +++ b/tools/coq_makefile.ml @@ -395,7 +395,7 @@ let variables is_install opt (args,defs) = print "COQFLAGS?=-q $(OPT) $(COQLIBS) $(OTHERFLAGS) $(COQ_XML)\n"; print "COQCHKFLAGS?=-silent -o\n"; print "COQDOCFLAGS?=-interpolate -utf8\n"; - print "COQC?=$(COQBIN)coqc\n"; + print "COQC?=$(TIMER) $(COQBIN)coqc\n"; print "GALLINA?=$(COQBIN)gallina\n"; print "COQDOC?=$(COQBIN)coqdoc\n"; print "COQCHK?=$(COQBIN)coqchk\n\n"; @@ -451,12 +451,16 @@ let parameters () = print ".DEFAULT_GOAL := all\n\n# \n"; print "# This Makefile may take arguments passed as environment variables:\n"; print "# COQBIN to specify the directory where Coq binaries resides;\n"; + print "# TIMECMD set a command to log .v compilation time;\n"; + print "# TIMED if non empty, use the default time command as TIMECMD;\n"; print "# ZDEBUG/COQDEBUG to specify debug flags for ocamlc&ocamlopt/coqc;\n"; print "# DSTROOT to specify a prefix to install path.\n\n"; print "# Here is a hack to make $(eval $(shell works:\n"; print "define donewline\n\n\nendef\n"; print "includecmdwithout@ = $(eval $(subst @,$(donewline),$(shell { $(1) | tr -d '\\r' | tr '\\n' '@'; })))\n"; - print "$(call includecmdwithout@,$(COQBIN)coqtop -config)\n\n" + print "$(call includecmdwithout@,$(COQBIN)coqtop -config)\n\n"; + print "TIMED=\nTIMECMD=\nSTDTIME?=/usr/bin/time -f \"$* (user: %U mem: %M ko)\"\n"; + print "TIMER=$(if $(TIMED), $(STDTIME), $(TIMECMD))\n\n" let include_dirs (inc_i,inc_r) = let parse_includes l = List.map (fun (x,_) -> "-I " ^ x) l in |