Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2006-06-22 21:19:33 -0700 (Thu, 22 Jun 2006)
Revision: 9373
Log message:

      Resolved the "strage" bug (see the discussion).
      
      http://lists.metaprl.org/pipermail/omake-devel/2006-June/000261.html
      
      Here were the issues:
         1. target-exists and friends should not be called until the
            build phase (after all OMakefiles are evaluated).  This
            was not the source of the error.
      
         2. When testing whether a target exists, we must switch to
            the environment (the directory) for the target.
      
      For #2, suppose we want to build a/a.boo, and
      a/OMakefile contains a rule
      
         # a/OMakefile
         %.boo: ../b/%.boo
      
      and b/OMakefile has
      
         # b/OMakefile
         %.boo: %.moo
            ...
      
      Basically, we must use the appropriate OMakefile when determining
      whether a target can be built so a/a.boo <- b/b.boo <- b/b.moo
      (assuming b.moo can be built).
      
      As usual for implicit rules, if the dependencies are cyclic,
      omake will loop.  Say, b/OMakefile instead contains
      
         %.boo: ../a/%.boo
             ...
      
      The implicit dep computation is Turing complete, so a complete
      check for termination is undecidable.
      

Changes  Path
+4 -4 omake-branches/0.9.8.x/mk/make_gen
+2 -2 omake-branches/0.9.8.x/src/Makefile
+2 -2 omake-branches/0.9.8.x/src/Makefile.nt
+1 -1 omake-branches/0.9.8.x/src/build/OMakefile
+2 -2 omake-branches/0.9.8.x/src/build/omake_build.ml
+2 -1 omake-branches/0.9.8.x/src/build/omake_builtin_util.ml
+1 -0 omake-branches/0.9.8.x/src/build/omake_builtin_util.mli
+16 -12 omake-branches/0.9.8.x/src/build/omake_target.ml
+3 -3 omake-branches/0.9.8.x/src/build/omake_target.mli
+9 -9 omake-branches/0.9.8.x/src/builtin/omake_builtin_file.ml
+1 -1 omake-branches/0.9.8.x/src/env/OMakefile
+18 -8 omake-branches/0.9.8.x/src/env/omake_env.ml