From: skaller <skaller@ozemail.com.au>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Building large and portable projects
Date: 23 Nov 2003 03:48:39 +1100 [thread overview]
Message-ID: <1069519719.6703.127.camel@pelican> (raw)
In-Reply-To: <20031122170852.GA15144@davidb.org>
On Sun, 2003-11-23 at 04:08, David Brown wrote:
> On Sat, Nov 22, 2003 at 03:12:48AM +1100, skaller wrote:
>
> > For example .c -cc--> .o -link--> exe, we can
> > use the cached .o instead of running cc on the
> > .c provided the .c is older.
>
> Older is incorrect, as well. The program should run cc on the .c
> provided that the .c is different than the one used to produce the .o.
> Timestamps are useful as a cache, but a proper tool will need to use
> file hashes, or something to properly detect a file changing.
Yeah, that's a good point.
> An unrelated annoyance I've found is that ocamlc doesn't allow for the
> objects to be stored in a separate directory from this source. This
> makes things, such as multiple configurations, multiple targets
> difficult. Since ocamlopt doesn't currently support cross compilation,
> anyway, this is less of an issue.
It is still an issue if you have multiple Ocaml installations:
I actually ought to have 3 of them:
(a) the standard one my Linux came with
(b) the lastest release
(c) the CVS version
I need (a) to run system scripts (/usr)
I need (b) to check my code runs for clients (/usr/local),
and I need (c) cause I love playing with Ocaml :-)))
In addition I have to build my software at least in both
binary and bytecode form to check clients on
non-Linux platforms have some chance of using my product
if they can't get a native code compiler.
And then, there are versions of third party libraries ... ouch.
I have a starting concept here: I call it 'mount points'.
And another called 'mount stacks'.
A mount point is a root, specified as an OS native
directrory name. Files and directories down from
the mount point are always specified using Unix
convention (no matter what platform).
Then we have stacks. We start at the top mount
point of the stack and look for a file, going
down until we find it. However we always write
on the bottom. Here is a stack:
/usr/lib/ocaml
/usr/local/lib/ocaml
/home/skaller/ocaml
The idea is you had hide *some* files
with an updated file, but don't need to
hide them all with a completely new distribution.
[A variant would just use patch files]
Additionally, writes (of object files etc) are
always most local and so don't interfere with
administrator installed compiled versions.
Another key part of it is relative file lookups.
The relativity is to a directory stack NOT
a particular directory so eg C #include "foo.h"
inside the file "bar.h" will follow the same
stack search algorithm except it will look
in the mount point of the stack + the subdirectory
of the file "bar.h".
A path is a sequence of stacks of mount points.
[It is also worth studying Kpathsea here ..]
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
next prev parent reply other threads:[~2003-11-22 17:49 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-20 18:47 Martin Jambon
2003-11-20 19:56 ` sylvain.le-gall
2003-11-21 1:45 ` Nicolas Cannasse
2003-11-21 5:25 ` David Brown
2003-11-21 5:48 ` Nicolas Cannasse
2003-11-21 6:45 ` David Brown
2003-11-21 6:49 ` sylvain.le-gall
2003-11-21 16:12 ` skaller
2003-11-21 17:53 ` Eric Dahlman
2003-11-22 14:45 ` skaller
2003-11-21 19:04 ` sylvain.le-gall
2003-11-22 14:34 ` skaller
2003-11-22 18:50 ` sylvain.le-gall
2003-11-22 14:32 ` Martin Berger
2003-11-22 14:55 ` skaller
2003-11-22 17:08 ` David Brown
2003-11-22 16:48 ` skaller [this message]
2003-11-23 3:25 ` Nicolas Cannasse
2003-11-23 4:29 ` David Brown
2003-11-23 17:21 ` skaller
2003-11-22 17:13 ` David Brown
2003-11-24 18:02 ` Ken Rose
2003-11-24 19:04 ` Christian Lindig
2003-11-21 16:32 ` Martin Jambon
2003-11-21 18:57 ` sylvain.le-gall
2003-11-21 9:14 ` Christian Lindig
2003-11-21 9:28 ` Richard Jones
2003-11-21 15:35 ` skaller
2003-11-21 17:05 ` Jason Hickey
2003-11-21 18:55 ` sylvain.le-gall
2003-11-21 19:30 ` [Caml-list] Omake [Was: Building large and portable projects] Aleksey Nogin
2003-11-21 20:39 ` Damien
2003-11-22 3:30 ` Aleksey Nogin
2003-11-21 23:48 ` sylvain.le-gall
2003-11-22 1:32 ` Nicolas Cannasse
2003-11-22 3:51 ` Aleksey Nogin
2003-11-28 16:29 ` [Caml-list] Building large and portable projects David Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1069519719.6703.127.camel@pelican \
--to=skaller@ozemail.com.au \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox