delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/17/12:35:34

Message-Id: <1.5.4.32.19970917163710.0069e6f4@dce03.ipt.br>
Mime-Version: 1.0
Date: Wed, 17 Sep 1997 13:37:10 -0300
To: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
From: Cesar Scarpini Rabak <csrabak AT dce03 DOT ipt DOT br>
Subject: Re: make 3.75 ported to DJGPP not handling correctly comments
Cc: djgpp AT delorie DOT com

At 18:09 17/09/97 +0200, Hans-Bernhard Broeker wrote:
>In article <1 DOT 5 DOT 4 DOT 32 DOT 19970917150341 DOT 00693d1c AT dce03 DOT ipt DOT br> you wrote:
>> The comment character is not being handled correctly when it appears in a
>> rule of a makefile.
>
>That's because it's not in the rule itself (i.e. the line saying
>"foo: foo.o"), but in the *command* lines associated with it:
>
>> foo: foo.o
>> 	$(CC) $(LDOPT) -o  $@ $^ # this comment breaks DJGPP make
>
>These commands are executed by "the command line interpreter of the
>operating system", i.e., by command.com in DOS, unless you tell make
>to use Bash.
>
>Sadly, one of command.com's many disadvantages is that it doesn't know
>a bit about '#' as a comment character.
>
>Summing it up, this is not a make bug, it's a misinterpretation about
>whose duty it is to interpret the '#' here. 

I understand your technical explanation of the reason of this behaviour,
accept that it can be circumvented by the use of bash as command
interpreter, but educately disagree that this is not a make (in the port to
DJGPP) bug:

       Other makefiles for MS-DOG operate correctly with this syntax, so the
_expected behaviour_ of a make for this OS would be that the comment
character be ignorated by the system;
       from your explanation, it seems that adapting the DJGPP port of make
to strip comments in the command lines would be bennign when other shells
that recognize '#' as comment (the remainder of the line would have been
already stripped out);
       will avoid people to have to edit makefiles coming from unixy
environments or install bash to be able to use them w/o modifications.

I'm afraid this may be a discussion similar Eli and Peter are having on the
obligation of requiring bash to use other software building tools...

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Cesar Scarpini Rabak                      E-mail: csrabak AT ipt DOT br
DME/ASC                                   Phone: 55-11-268-3522 Ext.350
IPT - Instituto de Pesquisas Tecnologicas Fax:   55-11-268-5996
Av. Prof. Almeida Prado, 532.  Sao Paulo - SP 05508-901 BRAZIL
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019