John's Ideal std_env example (could be addon)
This is very BridgelessVesta-y
My goal with the below is that your average unix programmer, after reading and playing w/ the example below, in 1 hour, could achieve a productivity in vesta nearly equal to what he has outside of vesta.
This example assumes that a vesta support person has already set everything up.
I have a similar example coming if i have time about adding my own component.
My problem is that from the very beginning, this is the spec i've had in my head. I haven't learned anything that suggests that the example below is undoable. And i've never been able to get the std_env nor addon system to match this. I find it difficult to let go of my simplistic view of the ideal, and so i always get tripped up on reality.
my_simple_model.ves
files srcs = srcs; from /vesta/vestasys.org/where/ever import std_env/9; // or it could be called 'addons' something { // these should all be names that match what most unix users would guess components = <"perl", "grep", "csh", "gcc", "gcc.3.4.2">; // gcc is whatever is default in std_env/9 // gcc.3.4.2 is specific, assuming available in std_env/9 // or maybe even: components = ./std_env/typical; // or even components = ./std_env/all; // with the first version being like 'custom' // it's not a coincidence that these terms look like an install screen // in fact, perhaps that's the right metaphor here . ++= std_env/env_build(components,pkg_ovs); . ++= [ proj/foo/people/jvkumpf/vesta_tmp = srcs ]; // srcs contains foo.c compil.csh = "grep replace_me foo.c;\n" + "set grep_stat = $status;\n" + "if $grep_stat then\n" + " echo fixing replace_me\n" + " mv foo.c{,.orig}\n" + " fix.pl < foo.c.orig > foo.c\n" + "endif\n" + "gcc foo.c\n" ; . ++= [ proj/foo/people/jvkumpf/vesta_tmp = compil.csh ]; fix.pl = "#!/usr/bin/perl -lwp\n" + "s/replace_me/fixed_string/\n" ; . ++= [ proj/foo/people/jvkumpf/vesta_tmp = fix.pl ]; root_changes = _run_tool(./target_platform, <"csh", "-c", "compil.csh", > // ... ); foo.o = root_changes/proj/foo/people/jvkumpf/vesta_tmp/foo.o; return foo.o; }