Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2003-11-06 07:58:41 -0800 (Thu, 06 Nov 2003)
Revision: 248
Log message:
This should fix bug 105 and help with bug 90 somewhat:
- changed the .cmi rules to compile .mli when it exists and .ml when it does not.
- changed the OCamlLibraryCopy macro to only symlink those .mli that actually exist.
Changes | Path |
+7 -3 | omake/OMakeroot.src.in |
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2003-11-06 09:06:39 -0800 (Thu, 06 Nov 2003)
Revision: 249
Log message:
Bug 105:
Yes, NATIVE_ENABLED should be checked _inside_ the rule, not outside. Still,
this does not work - "$(file-exists %.mli)" ends up checking existence
of the _literal_ "%.mli" file, not foo.mli...
Changes | Path |
+2 -6 | omake/OMakeroot.src.in |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2003-11-06 10:01:08 -0800 (Thu, 06 Nov 2003)
Revision: 250
Log message:
The implicit rules are searched from last-to-first, so the correct
thing to do is to put the "%.cmi: %.mli" rule last. Then, if it
doesn't apply, the "%.cmi %.cmo: %.ml" rule is used.
This update fixes the main loop so that side-effects are computed properly
when a target matches multiple implicit rules.
Changes | Path |
Properties | omake |
+3 -0 | omake/.cvsignore |
+14 -6 | omake/OMakeroot.src.in |
+28 -4 | omake/src/build/omake_build.ml |
+1 -1 | omake/src/build/omake_build_type.ml |
+12 -11 | omake/src/main/omake_main.ml |
Changes by: ( at unknown.email)
Date: 2003-11-06 10:01:08 -0800 (Thu, 06 Nov 2003)
Revision: 251
Log message:
This commit was manufactured by cvs2svn to create branch 'cache_index'.
Changes | Path |
Copied | omake-branches/cache_index |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2003-11-08 09:57:47 -0800 (Sat, 08 Nov 2003)
Revision: 252
Log message:
Starting work on global caching.
This commit removes the "function" key into the cache.
The idea was that the cache memoizes results from several functions,
which are distinguished by a string key. This was so that scanner
results and rule results could be distinguished.
However, this isn't really necessary, because scanner targets
and rule targets are different.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2003-11-08 10:27:08 -0800 (Sat, 08 Nov 2003)
Revision: 253
Log message:
Added an index integer to each cache record.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2003-11-08 10:42:07 -0800 (Sat, 08 Nov 2003)
Revision: 254
Log message:
Added the cache index, but it isn't used yet.
Changes | Path |
+25 -9 | omake-branches/cache_index/src/ir/omake_cache.ml |
+12 -1 | omake-branches/cache_index/src/ir/omake_cache_type.ml |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2003-11-08 12:25:40 -0800 (Sat, 08 Nov 2003)
Revision: 255
Log message:
Implemented the new global cache index (bug #110): a target is considered
to be up-to-date if there is an up-to-date entry in the cache with the
same dependencies and the same command text from *any* rule that has
been run. The .cmi rules have been updated as Aleksey suggested in bug
#110, that is:
%.cmi: %.ml
$(if $(NATIVE_ENABLED),\
$(OCAMLOPT) $(OCAMLOPTFLAGS) $(OCAMLPPFLAGS) $(OCAMLINCLUDES) -c $<,\
$(OCAMLC) $(OCAMLCFLAGS) $(OCAMLPPFLAGS) $(OCAMLINCLUDES) -c $<)
%.cmi: %.mli
$(OCAMLC) $(OCAMLCFLAGS) $(OCAMLPPFLAGS) $(OCAMLINCLUDES) -c $<
The change to the implementation is to add a (deps+commands->memo) index
to the cache. The performance penalty looks to be around 1-2%, not very
much.
The critical assumption is this:
Commands are functional, deterministic, and idempotent. That is, if
a command is run once with a given set of dependencies, then it will
have no effect if it is run again on unchanged dependencies.
Note, the environment is ignored. So if the environment changes in a way
that affects the build process, you will have to use omake -U.
Bumped version to 0.7.5
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2003-11-08 12:35:54 -0800 (Sat, 08 Nov 2003)
Revision: 256
Log message:
Updated the comment on generating .cmi files.
Changes | Path |
+4 -2 | omake-branches/cache_index/OMakeroot.src.in |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2003-11-08 14:17:19 -0800 (Sat, 08 Nov 2003)
Revision: 257
Log message:
Multiple target rules require that all targets be examined during the
up-to-date check. This now imposes and-semantics on multiple targets.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2003-11-08 15:34:37 -0800 (Sat, 08 Nov 2003)
Revision: 258
Log message:
Added target-exists and filter-targets builtin functions.
These are like file-exists and filter-exists functions, but the predicate
is based on whether the target can be built, not whether it actually exists.
This corrects the problem with reaching a fixpoint in one run of omake.
The filter-exists in OCamlLibraryCopy is evaluated eagerly, and did not
catch .mli files that could be generated.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2003-11-08 15:50:58 -0800 (Sat, 08 Nov 2003)
Revision: 259
Log message:
Commited the cache_index branch to the trunk.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2003-11-08 16:48:56 -0800 (Sat, 08 Nov 2003)
Revision: 260
Log message:
Additional stats printed on termination.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2003-11-08 18:27:03 -0800 (Sat, 08 Nov 2003)
Revision: 261
Log message:
Save aborted commands in the cache. This addresses the issue in
bug #110, where -k would try to build failed targets multiple times.
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2003-11-11 11:35:48 -0800 (Tue, 11 Nov 2003)
Revision: 262
Log message:
Print stats on Ctrl-C (Jason, is this change reasonable?)
Changes | Path |
+25 -20 | omake/src/build/omake_build.ml |
+1 -0 | omake/src/ir/omake_state.ml |
+1 -0 | omake/src/ir/omake_state.mli |
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2003-11-11 20:16:43 -0800 (Tue, 11 Nov 2003)
Revision: 263
Log message:
This is a follow-up on my previous commit - we need to use Omake_exn_print
for printing exceptions.
Changes | Path |
+26 -20 | omake/Makefile.dep.nt |
+2 -1 | omake/src/build/omake_build.ml |
+3 -1 | omake/src/env/omake_exn_print.ml |
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2003-11-11 22:01:15 -0800 (Tue, 11 Nov 2003)
Revision: 264
Log message:
Added a -i option to cvs_realclean, allowing one to tell it to skip certain
files.
Changes | Path |
+19 -10 | omake/src/main/cvs_realclean.ml |
+1 -1 | omake/version.txt |
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2003-11-12 10:59:04 -0800 (Wed, 12 Nov 2003)
Revision: 265
Log message:
A few things depend on version.txt
Changes | Path |
+1 -1 | omake/Makefile.in |
+2 -2 | omake/OMakefile.in |
Changes by: ( at unknown.email)
Date: 2003-11-12 10:59:04 -0800 (Wed, 12 Nov 2003)
Revision: 266
Log message:
This commit was manufactured by cvs2svn to create branch
'jyh_2003_11_15'.
Changes | Path |
Copied | omake-branches/jyh_2003_11_15 |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2003-11-15 09:26:14 -0800 (Sat, 15 Nov 2003)
Revision: 267
Log message:
Added .SCANNER dependencies. If the commands are empty, then
the rule just aguments the dependencies, like this:
.SCANNER: .cmi: util/ocamldep
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2003-11-15 11:45:35 -0800 (Sat, 15 Nov 2003)
Revision: 268
Log message:
Fixed a problem with scanner dependencies.
Note, .SCANNER rules are now like other implicit rules: if the
dependencies can't be built, the rule is not used. For example,
this rule would never fire on most systems:
.SCANNER: %.o: %.c /garbage
...
This can be a little dangerous. Consider the following rule,
which will not be used if $(OCAMLDEP) can't be built.
.SCANNER: %.cmi: %.mli $(OCAMLDEP)
...
The correct way to state this is with a dependency:
.SCANNER: %.cmi: $(OCAMLDEP)
.SCANNER: %.cmi: %.mli
...
This will force the dependency on OCAMLDEP.
Changes | Path |
+37 -30 | omake-branches/jyh_2003_11_15/src/build/omake_build.ml |
+12 -13 | omake-branches/jyh_2003_11_15/src/env/omake_env.ml |
+1 -1 | omake-branches/jyh_2003_11_15/src/env/omake_env.mli |
Changes by: ( at unknown.email)
Date: 2003-11-15 11:45:35 -0800 (Sat, 15 Nov 2003)
Revision: 269
Log message:
This commit was manufactured by cvs2svn to create branch 'active_rules'.
Changes by: ( at unknown.email)
Date: 2003-11-15 11:45:35 -0800 (Sat, 15 Nov 2003)
Revision: 270
Log message:
This commit was manufactured by cvs2svn to create branch
'lazy_implicit_sources'.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2003-11-16 11:57:21 -0800 (Sun, 16 Nov 2003)
Revision: 273
Log message:
In this version, the source dependencies for implicit targets
are computed lazily. This means that rules like this make sense:
%.cmi: $(if $(target-exists %.mli, %.mli), %.ml)
...
However, I don't know if I like this method because the semantics
are confusing. Since the dependencies are lazy, the dependency
list is evaluated in the context where the rule is instantiated.
For example, this top-level rule does not have the desired effect:
%.cmi %.cmiz: $(MPINSTALL) $(PRLC)
If this rule is instantiated in, say, theories/itt, then
$(MPINSTALL) is bound to theories/itt/mp.install, not the top-level
mp.install as you get with eager evaluation. There is a solution,
which is to force evaluation:
%.cmi %.cmiz: $,(target $(MPINSTALL) $(PRLC))
The $, forces eager evaluation, and the target function fetches
the .PHONY node in the root context.
This seems too complicated--the uniform eager semantics earlier
was easier.
Here is my new proposed solution. First, allow for multiple
kinds of source dependencies.
d ::= exp (* dependencies, eager evaluation *)
| d :lazy: exp (* dependencies, lazy evaluation *)
| d :optional: exp (* optional dependencies, eager *)
| d :exists: exp (* existential dependencies, eager *)
Second, allow computed rules, where the rule body is a function
that computes the actual rule. Evaluation of the rule body is lazy.
%.cmi: %.ml :compute:
if $(NATIVE_ENABLED)
%.cmi %.cmx %$(EXT_OBJ): %.ml
$(OCAMLOPT) ...
else
%.cmi %.cmo: %.ml
$(OCAMLC) ...
For now, I'll leave this branch idle and explore the new option.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2003-11-16 17:21:59 -0800 (Sun, 16 Nov 2003)
Revision: 274
Log message:
Starting work on active rules, as in my last commit.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2003-11-16 18:26:10 -0800 (Sun, 16 Nov 2003)
Revision: 275
Log message:
Working on the environment. This doesn't compile yet, I'm just moving
to my laptop so I can take it with me.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2003-11-19 12:25:15 -0800 (Wed, 19 Nov 2003)
Revision: 276
Log message:
A few changes I made on the plane.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2003-11-20 14:01:21 -0800 (Thu, 20 Nov 2003)
Revision: 279
Log message:
This finishes the active_rules branch.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2003-11-20 15:33:36 -0800 (Thu, 20 Nov 2003)
Revision: 280
Log message:
Merged active_rules onto its parent branch.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2003-11-20 16:52:05 -0800 (Thu, 20 Nov 2003)
Revision: 281
Log message:
File relocation should be case-insensitive on Windows.
Changes | Path |
+16 -13 | omake-branches/jyh_2003_11_15/src/ir/omake_node.ml |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2003-11-22 10:06:54 -0800 (Sat, 22 Nov 2003)
Revision: 283
Log message:
Detect symlinks that break translation to relative pathnames.
This fixes bug #109.
Changes | Path |
+251 -119 | omake-branches/jyh_2003_11_15/src/ir/omake_node.ml |
+2 -5 | omake-branches/jyh_2003_11_15/src/ir/omake_node_type.ml |
+2 -1 | omake-branches/jyh_2003_11_15/src/util/omake_marshal.ml |
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2003-11-23 10:25:31 -0800 (Sun, 23 Nov 2003)
Revision: 284
Log message:
Added :effects: modifier. This fixes the problem with .ppo/.prlb fixpoint.
%.ppo %.cmoz: %.ml $(CAMLP4N) :optional: %.prla :effects: %.prlb
$(CAMLP4NC) $(CAMLP4NFLAGS) -o $*.ppo $<
The :effects: files are considered as side-effects of the rule, but
they are not targets. A rule is considered out-of-date if the targets,
effects, or sources are out-of-date, or the command text changes.
Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2003-11-25 09:20:58 -0800 (Tue, 25 Nov 2003)
Revision: 286
Log message:
Merged the jyh branch onto the trunk. Main changes:
1. .SCANNER dependencies
2. Computed rules
3. :optional: and :exists: and :effects: arguments to rules.
This bumps the version to 0.7.7.
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2003-11-25 15:14:29 -0800 (Tue, 25 Nov 2003)
Revision: 287
Log message:
Now that there are both Red Hat releases and Fedora releases, the release num
can not just always include "rh".
Changes | Path |
+1 -1 | omake/omake.spec |
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2003-11-25 15:26:38 -0800 (Tue, 25 Nov 2003)
Revision: 288
Log message:
Explicitly use fully-qualified Omake_util.bool_of_string to avoid
confusion with the Pervasives.bool_of_string (before this change I
was getting Invalid_argument("bool_of_string") when trying to compile
MetaPRL).
Changes | Path |
+1 -1 | omake/src/eval/omake_eval.ml |
+1 -1 | omake/src/eval/omake_value.ml |
Changes by: emre (emre at unknown.email)
Date: 2003-11-26 11:19:52 -0800 (Wed, 26 Nov 2003)
Revision: 289
Log message:
Change the install target so that it no longer uses the -D flag to
"install" as it seems that this flag is not necessarily supported
on all platforms, e.g., Mac OS X.
Changes | Path |
+7 -4 | omake/Makefile.in |
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2003-11-27 00:57:05 -0800 (Thu, 27 Nov 2003)
Revision: 290
Log message:
Fixing an obvious typo.
Changes | Path |
+1 -1 | omake/OMakeroot.src.in |
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2003-11-27 01:39:10 -0800 (Thu, 27 Nov 2003)
Revision: 291
Log message:
Adding some extra debugging code.
Changes | Path |
+7 -5 | omake/src/env/omake_env.ml |
+6 -6 | omake/src/eval/omake_rule.ml |
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2003-11-30 13:33:00 -0800 (Sun, 30 Nov 2003)
Revision: 292
Log message:
Fixing a minor typo.
Changes | Path |
+1 -1 | omake/src/eval/omake_eval.ml |
Changes by: Aleksey Nogin (nogin at cs.caltech.edu)
Date: 2003-11-30 13:39:22 -0800 (Sun, 30 Nov 2003)
Revision: 293
Log message:
Show a bit more debigging information on -debug-active-rules
Changes | Path |
+1 -1 | omake/src/eval/omake_rule.ml |