Re: mlb path map variable TARGET_OS_FLAVOR
Matthew Fluet <[email protected]> Mon, 30 Jan 2012 22:23:44 -0500
| Newsgroups | gmane.comp.lang.ml.mlton.devel |
|---|---|
| Message-ID | <CAMrhFL6+s0=7bkTHgq+s2VdoyzhokaO62s7gdZB86+s7fz_vfw@mail.gmail.com> |
On Mon, Jan 30, 2012 at 12:07 AM, Christopher Cramer <[email protected]> wrote: > We have this MLB path map variable TARGET_OS which can be used for > conditional compilation. However, most of the time the differences > between different Unixes are not even visible from SML, so it would be > nice to just select between Windows and Unix. > > This is a patch which adds a new variable, TARGET_OS_FLAVOR, which can > be either "unix" or "windows". Cygwin sort of straddles both categories, > but I decided that it's better to choose the most efficient implementation > (e.g. spawn versus fork - fork works on Cygwin but it's much slower), > so I went with "windows" for Cygwin. While I understand the motivation, I'm not sure about adding to the pre-defined MLB path map variable set. Also, as you note, sometimes Cygwin is considered "windows" and sometimes "unix". And sometimes one might want further distinctions within "unix". I handled a similar situation in the MLNLFFI library by using a memory.unix.mlb file and then had a number of memory.$(TARGET_OS).mlb files that each simply loaded memory.unix.mlb. ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d