Groups | Search | Server Info | Keyboard shortcuts | Login | Register
Groups > comp.unix.programmer > #286
| From | Nobody <nobody@nowhere.com> |
|---|---|
| Subject | Re: Makefile portability |
| Date | 2011-05-02 03:44 +0100 |
| Message-Id | <pan.2011.05.02.02.44.13.31000@nowhere.com> |
| Newsgroups | comp.unix.programmer |
| References | <dd51ecd2-2a42-4338-bc3b-eb2adefe1924@r6g2000vbz.googlegroups.com> <4db9c0f9$0$11427$a729d347@news.telepac.pt> <pan.2011.04.30.17.03.22.860000@nowhere.com> <4dbd4520$0$11459$a729d347@news.telepac.pt> |
| Organization | Zen Internet |
On Sun, 01 May 2011 12:33:52 +0100, Rui Maciel wrote: >> Just because something is "standard", that doesn't mean that it's a good >> idea. > > ...unless what you are trying to achieve is ineroperability, which is the > case we are discussing. As the saying goes: "The great thing about standards is that there are so many to choose from." If you want interoperability you probably want a standard. That doesn't mean that any particular standard is the right one. E.g.: IEEE 1295 is a standard, but you wouldn't seriously consider using it for writing applications where Windows is considered an important target, would you? [To save you the trouble of looking it up, IEEE 1295 is the formal standard for the Motif GUI toolkit.] Using a POSIX shell when Windows is considered an important target is an equally bad idea. > Cygwin supports both Win32- and POSIX-style paths. s/supports/tries to support/ I have both Cygwin and MSys on my Windows system, and work on a number of packages which rely upon either for the Windows port. And it's a nightmare. The problem is that this "support" relies upon a bunch of heuristics which sort-of, kind-of work most of the time, but fail often enough for it to be a nuisance. They have to use this Unix-style pseudo-filesystem because native Windows filenames don't work well with Unix scripts (e.g. $PATH uses a colon as a separator while Windows puts it after the drive letter, backslashes cause problems with eval+backticks, etc). But Windows itself doesn't understand the Cygwin/MSys pseudo-filesystem, so they have to translate filenames which are passed between Cygwin/MSys and Windows. Or rather, they have to translate *strings* which: a) are believed to be filenames, and b) are believed to have originated from or are destined for Windows. Some cases are easier than others. A good example of a hard cases is when a filename is read from or written to a file. The shell only knows that it's reading or writing a string. It doesn't know for sure whether that string is a filename, or whether the program that wrote the file or will read the file will be a "Unix" program or a Windows program. > Do you have a problem with a standard tool which lets you build software > packages in multiple platforms that, according to you, only fails to be > easy to write code for specific corner cases that aren't needed beyond the > 2% of the time? That scenario sounds pretty good to me. On a large package, that few-percent adds up to a lot of actual work. It's enough work that, if something is likely to need non-trivial maintenance, I'll re-write the scripts in Python. >> Whichever shell you use, you run into the issue that even primitive >> operations rely upon external commands, each with their own quirks. > > That's why the standard approach to build sofware packages is to rely on a > set of scripts to perform tests on the current platform and, from there, > automaticallly generate a custom makefile for that particular platform and > for a particular set of options. autoconf does a reasonable job of dealing with the differences between different flavours of Unix. It does an abysmal job of dealing with the differences between Unix and other platforms. On Windows, not only do you need a fairly thorough Unix emulation, but you have to write a lot of special cases to deal with the fact that Windows isn't Unix. E.g. the fact that Windows pathnames usually contain spaces but Unix makefiles treat spaces as list separators and don't provide any quoting or escaping mechanism.
Back to comp.unix.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
Makefile portability tm <thomas.mertes@gmx.at> - 2011-04-25 04:54 -0700
Re: Makefile portability Leclerc <gordan.sikic.remove@this.inet.hr> - 2011-04-26 08:51 +0200
Re: Makefile portability tm <thomas.mertes@gmx.at> - 2011-04-26 04:25 -0700
Re: Makefile portability Nobody <nobody@nowhere.com> - 2011-04-26 16:18 +0100
Re: Makefile portability William Ahern <william@wilbur.25thandClement.com> - 2011-04-26 11:19 -0700
Re: Makefile portability Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups@NTLWorld.COM> - 2011-04-27 18:53 +0100
Re: Makefile portability "Charlie Gibbs" <cgibbs@kltpzyxm.invalid> - 2011-04-27 14:14 -0800
Re: Makefile portability tm <thomas.mertes@gmx.at> - 2011-04-30 01:07 -0700
Re: Makefile portability Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups@NTLWorld.COM> - 2011-04-30 13:45 +0100
Re: Makefile portability Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups@NTLWorld.COM> - 2011-04-30 13:14 +0100
Re: Makefile portability tm <thomas.mertes@gmx.at> - 2011-04-28 00:02 -0700
Re: Makefile portability Rui Maciel <rui.maciel@gmail.com> - 2011-04-28 20:43 +0100
Re: Makefile portability tm <thomas.mertes@gmx.at> - 2011-04-28 13:57 -0700
Re: Makefile portability Rui Maciel <rui.maciel@gmail.com> - 2011-04-29 11:18 +0100
Re: Makefile portability Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups@NTLWorld.COM> - 2011-04-29 20:43 +0100
Re: Makefile portability Rui Maciel <rui.maciel@gmail.com> - 2011-04-30 11:38 +0100
Re: Makefile portability and file utility programs Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups@NTLWorld.COM> - 2011-04-29 20:27 +0100
Re: Makefile portability tm <thomas.mertes@gmx.at> - 2011-04-29 15:26 -0700
Re: Makefile portability Rainer Weikusat <rweikusat@mssgmbh.com> - 2011-04-29 23:45 +0100
Re: Makefile portability Rui Maciel <rui.maciel@gmail.com> - 2011-04-30 11:26 +0100
Re: Makefile portability Leclerc <gordan.sikic.remove@this.inet.hr> - 2011-04-27 09:28 +0200
Re: Makefile portability Joshua Maurice <joshuamaurice@gmail.com> - 2011-04-26 11:28 -0700
Re: Makefile portability Nobody <nobody@nowhere.com> - 2011-04-26 21:41 +0100
Re: Makefile portability tm <thomas.mertes@gmx.at> - 2011-04-26 23:17 -0700
Re: Makefile portability Nobody <nobody@nowhere.com> - 2011-04-27 14:08 +0100
Re: Makefile portability Leo Havmøller <rtxleh@nospam.nospam> - 2011-04-27 13:15 +0200
Re: Makefile portability tm <thomas.mertes@gmx.at> - 2011-04-27 05:50 -0700
Re: Makefile portability Rui Maciel <rui.maciel@gmail.com> - 2011-04-28 20:36 +0100
Re: Makefile portability tm <thomas.mertes@gmx.at> - 2011-04-28 14:12 -0700
Re: Makefile portability Rui Maciel <rui.maciel@gmail.com> - 2011-04-29 11:03 +0100
Re: Makefile portability tm <thomas.mertes@gmx.at> - 2011-04-29 09:30 -0700
Re: Makefile portability Joshua Maurice <joshuamaurice@gmail.com> - 2011-04-27 15:08 -0700
Re: Makefile portability Joshua Maurice <joshuamaurice@gmail.com> - 2011-04-27 15:17 -0700
Re: Makefile dependency graphs gordonb.d36yw@burditt.org (Gordon Burditt) - 2011-04-30 02:02 -0500
Re: Makefile dependency graphs Joshua Maurice <joshuamaurice@gmail.com> - 2011-04-30 00:36 -0700
Re: Makefile dependency graphs Michael Press <rubrum@pacbell.net> - 2011-04-30 01:13 -0700
Re: Makefile dependency graphs William Ahern <william@wilbur.25thandClement.com> - 2011-04-30 11:30 -0700
Re: Makefile dependency graphs Joshua Maurice <joshuamaurice@gmail.com> - 2011-04-30 15:44 -0700
Re: Makefile dependency graphs Michael Press <rubrum@pacbell.net> - 2011-05-03 11:48 -0700
Re: Makefile dependency graphs Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups@NTLWorld.COM> - 2011-04-30 12:59 +0100
Re: Makefile dependency graphs Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups@NTLWorld.COM> - 2011-04-29 02:55 +0100
Re: Makefile dependency graphs William Ahern <william@wilbur.25thandClement.com> - 2011-04-28 19:52 -0700
Re: Makefile dependency graphs Joshua Maurice <joshuamaurice@gmail.com> - 2011-04-29 02:10 -0700
Re: Makefile dependency graphs Rainer Weikusat <rweikusat@mssgmbh.com> - 2011-04-29 20:59 +0100
Re: Makefile dependency graphs Joshua Maurice <joshuamaurice@gmail.com> - 2011-04-29 15:21 -0700
Re: Makefile dependency graphs Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups@NTLWorld.COM> - 2011-04-29 20:08 +0100
Re: Makefile dependency graphs Joshua Maurice <joshuamaurice@gmail.com> - 2011-04-29 15:08 -0700
Re: Makefile dependency graphs Joshua Maurice <joshuamaurice@gmail.com> - 2011-04-29 16:11 -0700
Re: Makefile dependency graphs William Ahern <william@wilbur.25thandClement.com> - 2011-04-29 16:03 -0700
Re: Makefile dependency graphs Joshua Maurice <joshuamaurice@gmail.com> - 2011-04-29 16:48 -0700
Re: Makefile dependency graphs Joshua Maurice <joshuamaurice@gmail.com> - 2011-04-29 16:54 -0700
Re: Makefile portability Rui Maciel <rui.maciel@gmail.com> - 2011-04-28 20:33 +0100
Re: Makefile portability tm <thomas.mertes@gmx.at> - 2011-04-28 14:20 -0700
Re: Makefile portability Nobody <nobody@nowhere.com> - 2011-04-30 18:03 +0100
Re: Makefile portability William Ahern <william@wilbur.25thandClement.com> - 2011-04-30 12:01 -0700
Re: Makefile portability Rui Maciel <rui.maciel@gmail.com> - 2011-05-01 12:33 +0100
Re: Makefile portability Nobody <nobody@nowhere.com> - 2011-05-02 03:44 +0100
Re: Makefile portability William Ahern <william@wilbur.25thandClement.com> - 2011-05-01 21:27 -0700
Re: Makefile portability tm <thomas.mertes@gmx.at> - 2011-05-02 00:11 -0700
Re: Makefile portability Rainer Weikusat <rweikusat@mssgmbh.com> - 2011-05-02 13:41 +0100
Re: Makefile portability Freedom on the Oceans <alex.buell@munted.org.uk> - 2011-05-02 14:36 +0100
Re: Makefile portability tm <thomas.mertes@gmx.at> - 2011-05-02 08:09 -0700
Re: Makefile portability Nobody <nobody@nowhere.com> - 2011-05-02 23:49 +0100
Re: Makefile portability Rainer Weikusat <rweikusat@mssgmbh.com> - 2011-05-03 10:41 +0100
Re: Makefile portability Nobody <nobody@nowhere.com> - 2011-05-05 08:30 +0100
csiph-web