comp.lang.ada
 help / color / mirror / Atom feed
* [ot] making stuff
@ 2002-07-13 21:53 chris.danx
  2002-07-14 22:52 ` Jacob Sparre Andersen
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: chris.danx @ 2002-07-13 21:53 UTC (permalink / raw)


hi,

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?

I want to write makefiles for Aqua, but have only one set of makefiles for
both Unices and Windows but the issue with XML/Ada stuck in my mind.

is it something to do with naming differences in gnat?

Chris

p.s. there's no problem with Unicen vs Windows line terminators since Emacs
and ConTEXT support both.





^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ot] making stuff
  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
  2002-07-19  0:31 ` Robert A Duff
  2 siblings, 2 replies; 10+ messages in thread
From: Jacob Sparre Andersen @ 2002-07-14 22:52 UTC (permalink / raw)


Chris Danx wrote:

> is it possible to generate makefiles that will work on both unix/linux and
> windows?

I think it is.

 > 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?

The reason could be that there are different conventions for 
where files are stored in Unix and in MS Windows. Another 
possible reason is that the syntax of the command 
interpreters in Unix and in MS Windows is rather different.

It should be possible to solve these problems, and merge 
make files for different operating systems, using 
conditional statements in the make files.

Greetings,

Jacob
-- 
"Hungh. You see! More bear. Yellow snow is always dead 
give-away."




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ot] making stuff
  2002-07-14 22:52 ` Jacob Sparre Andersen
@ 2002-07-15  2:38   ` Larry Kilgallen
  2002-07-15 11:52   ` chris.danx
  1 sibling, 0 replies; 10+ messages in thread
From: Larry Kilgallen @ 2002-07-15  2:38 UTC (permalink / raw)


In article <3D320099.6000209@nbi.dk>, Jacob Sparre Andersen <sparre@nbi.dk> writes:

> It should be possible to solve these problems, and merge 
> make files for different operating systems, using 
> conditional statements in the make files.

Sometimes the complexity of that makes it preferable to just use separate
files.  I know of a programming language that was designed without support
for conditional compilation in order to discourage the nests of obscure
conditional sections found in some C programs.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ot] making stuff
  2002-07-14 22:52 ` Jacob Sparre Andersen
  2002-07-15  2:38   ` Larry Kilgallen
@ 2002-07-15 11:52   ` chris.danx
  1 sibling, 0 replies; 10+ messages in thread
From: chris.danx @ 2002-07-15 11:52 UTC (permalink / raw)



"Jacob Sparre Andersen" <sparre@nbi.dk> wrote in message
news:3D320099.6000209@nbi.dk...
> Chris Danx wrote:
>
> > is it possible to generate makefiles that will work on both unix/linux
and
> > windows?
>
> I think it is.

Here's hoping!

>  > 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?
>
> The reason could be that there are different conventions for
> where files are stored in Unix and in MS Windows.

Using an editor that supports both formats makes this no problem.  All you
need is hard tabs since make isn't very tolerant (imo that's bad-d!).

I have put aqua up at willowplan.tripod.com, I'm on holiday 'til Friday
(there's no iterator functionality in the list yet).

Additionally there is a problem forwarding a variable through make calls,
which I'm unable to resolve.  If someone could have a look at this while I'm
away, it'd be appreciated.

They haven't been tested on Linux yet only on Win2k, but should work ok if
emacs was using Unix style line terminators when they were coded (I don't
know how to change it yet, too busy)!


> Another
> possible reason is that the syntax of the command
> interpreters in Unix and in MS Windows is rather different.

the command interpreter calls are located in one file makefile.inc.  This
has caused a problem of either hardcoding paths or passing down a variable,
but passing down the variable isn't working (lack of knowlege on my part).
I don't have time to change it back now.

> It should be possible to solve these problems, and merge
> make files for different operating systems, using
> conditional statements in the make files.

eek!


Bye,
Chris (just running out the door!)





^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ot] making stuff
  2002-07-13 21:53 [ot] making stuff chris.danx
  2002-07-14 22:52 ` Jacob Sparre Andersen
@ 2002-07-16 13:30 ` Ted Dennison
  2002-07-19  0:31 ` Robert A Duff
  2 siblings, 0 replies; 10+ messages in thread
From: Ted Dennison @ 2002-07-16 13:30 UTC (permalink / raw)


"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



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ot] making stuff
  2002-07-13 21:53 [ot] making stuff chris.danx
  2002-07-14 22:52 ` Jacob Sparre Andersen
  2002-07-16 13:30 ` Ted Dennison
@ 2002-07-19  0:31 ` Robert A Duff
  2002-07-20 12:43   ` Robert Dewar
  2 siblings, 1 reply; 10+ messages in thread
From: Robert A Duff @ 2002-07-19  0:31 UTC (permalink / raw)


"chris.danx" <spamoff.danx@ntlworld.com> writes:

> is it possible to generate makefiles that will work on both unix/linux and
> windows?

For my own use, I installed the cygwin utilities on my Windows
machines.  This made it *much* easier to write portable make files.

Without cygwin, it was possible, but it was a huge pain (for various
reasons mentioned elsewhere in this thread).

Of course, if you're distributing code to miscellaneous folks who may or
may not have cygwin, you're stuck with the pain.  You end up with either
huge amounts of OS-conditional junk, or simply maintain two different
make files.

- Bob



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ot] making stuff
  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
  0 siblings, 2 replies; 10+ messages in thread
From: Robert Dewar @ 2002-07-20 12:43 UTC (permalink / raw)


Robert A Duff <bobduff@shell01.TheWorld.com> wrote in message news:<wcclm88lfr9.fsf@shell01.TheWorld.com>...
> "chris.danx" <spamoff.danx@ntlworld.com> writes:

> Of course, if you're distributing code to miscellaneous folks who may or
> may not have cygwin, you're stuck with the pain.  You end up with either
> huge amounts of OS-conditional junk, or simply maintain two different
> make files.

That's a bit incomprehensible. Cygwin is Free Software. You can either
provide
a copy of Cygwin, or, probably more sensibly, point to where people
can get it.
If you are in a non-hobbyist environment, where people need to use
supported
software, you can obtain supported versions of Cygwin from Redhat.
Requiring people to obtain cygwin is no different from requiring them
to acquire any
other software they may require. After all you are requiring your
recipients
to get Windows if you are providing a windows compatible version.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ot] making stuff
  2002-07-20 12:43   ` Robert Dewar
@ 2002-07-20 14:29     ` Pascal Obry
  2002-07-20 17:57     ` Robert A Duff
  1 sibling, 0 replies; 10+ messages in thread
From: Pascal Obry @ 2002-07-20 14:29 UTC (permalink / raw)



dewar@gnat.com (Robert Dewar) writes:

> Requiring people to obtain cygwin is no different from requiring them
> to acquire any
> other software they may require. After all you are requiring your
> recipients
> to get Windows if you are providing a windows compatible version.

Ok, but yet it is not that trivial to install and setup a Cygwin environment
for non programers... It is better to just rely on makefile, this is possible
with GNAT since most of the jobs are:

- build the program

   build:
      gnatmake ...

- install the software

   ifeq (${OS}, Windows_NT)
   CP = copy
   else
   CP = cp
   endif

   install:
      $(CP) ... ...

- build a tarball for distribution

   distrib:
      tar ...

This works well in many cases. In AWS, for example, we use only makefiles. It
is not perfect but it works.

From experiences (and I have a lot here), using configure/autoconf/automake
is always troublesome on Windows.

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|         http://perso.wanadoo.fr/pascal.obry
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ot] making stuff
  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
  1 sibling, 1 reply; 10+ messages in thread
From: Robert A Duff @ 2002-07-20 17:57 UTC (permalink / raw)


dewar@gnat.com (Robert Dewar) writes:

> That's a bit incomprehensible. Cygwin is Free Software. You can either
> provide a copy of Cygwin, or, probably more sensibly, point to where
> people can get it.  If you are in a non-hobbyist environment, where
> people need to use supported software, you can obtain supported
> versions of Cygwin from Redhat.

True.  I recommend everybody install Cygwin.  (Or better yet, Linux.)

But I suspect that if you require people to install extra stuff in order
to use your program, some people will be less likely to bother.

On the other hand, perhaps we're talking only about programmers here
(since we're talking about distributing make files to them), and
programmers shouldn't have trouble installing cygwin.  So I guess you're
right -- the best bet is to distribute unix-ish make files, and require
users to have cygwin.

> Requiring people to obtain cygwin is no different from requiring them
> to acquire any other software they may require. After all you are
> requiring your recipients to get Windows if you are providing a
> windows compatible version.

I wish that were true.  I wish cygwin, and Emacs, and GNAT, and lots of
other good stuff came pre-installed on the PC I bought last month!  ;-)

- Bob



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ot] making stuff
  2002-07-20 17:57     ` Robert A Duff
@ 2002-07-21 20:48       ` Ted Dennison
  0 siblings, 0 replies; 10+ messages in thread
From: Ted Dennison @ 2002-07-21 20:48 UTC (permalink / raw)


Robert A Duff <bobduff@shell01.TheWorld.com> wrote in message news:<wcc3cuep9i0.fsf@shell01.TheWorld.com>...
> I wish that were true.  I wish cygwin, and Emacs, and GNAT, and lots of
> other good stuff came pre-installed on the PC I bought last month!  ;-)

That's precisely why I have links to the locations of the Windows
distributions of all that stuff on my homepage. I have to wipe
hard-drives and/or build systems quite often. This way, as soon as I
have my networking set up, I can get to all the stuff I need that
Microsoft thoughtlessly left off their install CD :-).

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



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2002-07-21 20:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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