Erick has done major work refactoring the build system.
I've now done some changes too, which will probably break everything .. :)

The canonical build process now works as follows.

The build system consists of processes and packages.
All the processes get run against all the packages.

The processes are partitioned into phases.
These are currently build, host, target, run, doc, demo, speed,
performance, and some other 'slices' of the build.

The build system command line now works like:

./mk --phase=foo ... --pkg=bar ... proc1 ..


This means: run all the processes in the specified
phases PLUS the processes listed as arguments, 
against the listed packages. With this form no other
packages are processed and no other processes are executed
(except for those required for build system setup).

As an alternative or in addition to --phase specifications,
you can use --model specifications. For example:

./mk --model=win32 ...

When you do this, the build system assumes you're running on
a computer and environment with the specified architecture,
and runs all the phases which the configuration system 
has deemed can run on that architecture. So --model is just
a shorthand for specifying a set of phases. The idea is if
you're building with --host=cywgin --target=win32 configuration,
you can go into Cygwin environment and say ./mk --model=cygwin 
and it will build the Felix tools. Then you go into a CMD.EXE
command prompt with MSVC++ environment and use --model=win32 to 
build the target and run phases.

The current fbuild program hard codes:

* the default model is the one configured as the host
* that is used like --model= if no phases or models are 
  explicitly specified
* the model is then used to select which of build,host,target, and run
  phases can be executed 
* IF there are any ordinary command line arguments, they're 
  taken as processes and are run
* OTHERWISE: the processes of the selected phases are run

So if you give an argument, the build system just does that
and nothing else. Phased processes CANNOT be specified
this way, only utility processes.

If you use --phase or --pkg, you cannot specify utility processes.
It's one or the other.

Most processes have optimisations where they check if they need
doing -- this is generalised with (phased) pkg-stamps/* files
which generally allow a process/package combination to run 
exactly once, unless something it depends on changes.

The --force option should override this check, but is only
implemented for a few processes such as Ocaml and C++ compilation.

I'm sure this will be tweaked. I've done it because the overly
automatic building is making it too hard to trace why the tutorial
isn't being documented. 



-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to