Building latest Unix VM - how?
Lex Spoon
lex at cc.gatech.edu
Sat Jan 19 18:52:51 UTC 2002
> --
> build/foo.c : src/platform/unix/foo.c
> cp -f $< $@
> build/foo.o : build/foo.c
> gcc ${CFLAGS} -o $@ -c $<
> --
Yes. VMMaker as a whole needs to work in places that don't have make,
but this is good for platforms that do.
>
>
> > writers of such scripts can cope with more complex situations, so maybe
> > it is possible to avoid this file copying altogether.
>
> I don't know autoconf/automake, but I do know GNU make fairly well.
By the way, if you just want to hack in the Squeak system, you can start
at the "mkMake" script and ignore the autoconf stuff. The mkMake script
generates the bulk of the Makefile, and it's a good place to insert
copying rules like your examples.
Nevertheless:
> Have a directories:
> generated
> plugin/foo
> plugin/bar
> build
>
> And use make rules like the above to copy from... wherever... to wherever. :)
>
Consider that once you have enough information to write this rule:
../src/foo.c : ../platforms/unix/foo.c
cp $< $>
foo.o : ../src/foo.c
$(COMPILE) blah blah
you also know enough to just skip the copy:
foo.o : ../platforms/unix/foo.c
$(COMPILE) blah blah
The copying part seems mainly oriented towards supporting non-Unix
platforms which have less flexible tools for dealing with piles of C
code. I'm thinking that leaving the source files alone would work
slightly better for Unix, even if it's difficult for other platfoms.
-Lex
More information about the Squeak-dev
mailing list
|