Browse thread
Why does the order in the Makefile matter?
-
Mattias Waldau
-
Pierre Weis
- Stephan Houben
- kahl@h...
- Mattias Waldau
-
Pierre Weis
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2000-11-02 (17:53) |
From: | Stephan Houben <stephan@p...> |
Subject: | Re: Why does the order in the Makefile matter? |
On Sat, 28 Oct 2000, Pierre Weis wrote: > Hence, when the entire program is made of multiple implementation > files, those files must be linked in any order that is compatible with > the static binding rule: no definition can be linked if it refers to > an identifier that is defined after the definition at hand. In > addition, expressions to be computed must evidently appear in any > order compatible with the desired runtime behaviour. I completely understand this point, and I agree that there are legal Caml programs that have a different behavior depending on the order of the .cmo file linking. However, every program I write (and I suppose that's true for most of us) has an invariant behavior under all legal permutations of the .cmo files. Mostly because I only have 1 .ml file that actually does anything; the rest only contain side-effect-free definitions. So it would be nice if the compiler itself could put the .cmo files in an order compatible with the static binding rule. This would remove the tedium of putting the .cmo files in an appropriate order from the programmer. Would this be difficult to implement? Perhaps this could be made a compiler switch? Stephan -- ir. Stephan H.M.J. Houben tel. +31-40-2474358 / +31-40-2743497 e-mail: stephanh@win.tue.nl