comp.lang.ada
 help / color / mirror / Atom feed
From: dennison@telepath.com (Ted Dennison)
Subject: Re: [ot] making stuff
Date: 16 Jul 2002 06:30:22 -0700
Date: 2002-07-16T13:30:23+00:00	[thread overview]
Message-ID: <4519e058.0207160530.622e02ba@posting.google.com> (raw)
In-Reply-To: gk1Y8.2423$5A5.184233@newsfep1-win.server.ntli.net

"chris.danx" <spamoff.danx@ntlworld.com> wrote in message news:<gk1Y8.2423$5A5.184233@newsfep1-win.server.ntli.net>...
> is it possible to generate makefiles that will work on both unix/linux and
> windows?  I wouldn't normally ask, but XML/Ada has to have separate files
> for building on windows and unices and this has confused me.  Why can't you
> just have 1 makefile file for both targets?  Is it some XML/Ada specific
> issue or is there some other reason?

It is quite possible. However, if you are doing anything complicated,
it can get quite difficult. For one thing, windows uses a different
character to separate directories in paths ('\' instead of '/').
Windows "make"s can generally do the translation, but if you need to
call a DOS program, it will need '\'. Make doesn't generally like that
much, since that is its escape character, so you will have to escape
it a number of times (possibly 0) depending on where it appears and
what version of windows make you are using.

If you want to do anything really complicated, you will end up needing
a shell. To make this portable, you either need a bunch of OS
conditional make code, or you will probably have to stick to "sh" for
external shells (which is generally the default on Unix, and not the
default on PC's).

In short, its possible for simple things, and a major pain in the
kiester for anything complicated.

That being said, I suspect the main reason you usually see multiple
makes is that the Unix people don't have a Windows box to test their
make's on, and the Windows people don't have a Unix box to test their
makes on.

-- 
T.E.D.
Home     -  mailto:dennison@telepath.com (Yahoo: Ted_Dennison)
Homepage -  http://www.telepath.com/~dennison/Ted/TED.html



  parent reply	other threads:[~2002-07-16 13:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-13 21:53 [ot] making stuff chris.danx
2002-07-14 22:52 ` Jacob Sparre Andersen
2002-07-15  2:38   ` Larry Kilgallen
2002-07-15 11:52   ` chris.danx
2002-07-16 13:30 ` Ted Dennison [this message]
2002-07-19  0:31 ` Robert A Duff
2002-07-20 12:43   ` Robert Dewar
2002-07-20 14:29     ` Pascal Obry
2002-07-20 17:57     ` Robert A Duff
2002-07-21 20:48       ` Ted Dennison
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox