comp.lang.c
[Top] [All Lists]

Re: OT: LCC bug fix poilicy

Subject: Re: OT: LCC bug fix poilicy
From: Keith Thompson
Date: Thu, 27 Mar 2008 09:42:55 -0700
Newsgroups: comp.lang.c

Richard Heathfield <rjh@xxxxxxxxxxxxxxx> writes:
> CBFalconer said:
>> Richard Heathfield wrote:
>>> CBFalconer said:
>>> 
>>> <snip>
>>> 
>>>> On the makefile, for
>>>> DJGPP .exe files are needed.  Detailed suggestions are welcome.
>>> 
>>> Why not just add the suffix in runtests? dotest.exe 1 1 and so on.

A reasonable question.

>> If I understand you correctly, that would offend my sense of
>> correctness, in that it would not leave suitably named files for
>> the system.

A perfectly good answer to the question.

> What offends your sense of correctness *more* - a solution that
> violates an unwritten and unenforced style rule, or a solution that
> *doesn't work*?

Those aren't the only choices.

Clearly the current situation is incorrect, since it doesn't work.

Unconditionally adding the ".exe" suffix in runtests would fix that
problem, but it would be an ugly solution, since Unix doesn't require
a ".exe" suffix on executables (and adding one is, in my opinion and
apparently in Chuck's, poor style).  I understand that in the djgpp
environment, the ".exe" suffix is required but needn't be specified
when executing a command; Cygwin works the same way, as does plain
Windows.

A better solution would use the ".exe" suffix where it's required, and
not use it where it isn't.

<OT>Probably the best way to do that would be to define a variable in
the makefile whose value is either ".exe" or "" depending on the
system.  The method for doing this, particularly for determining which
system you're on, is left as an exercise.  A simpler brute-force
solution would be to provide two (or more) makefiles.</OT>

-- 
Keith Thompson (The_Other_Keith) <kst-u@xxxxxxx>
Nokia
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"

<Prev in Thread] Current Thread [Next in Thread>
Privacy Policy