delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/05/20/14:50:04

Date: Wed, 20 May 1998 12:27:46 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: cjobmann <cjobmann AT innovawireless DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: MAKE with BASH and not GCC
In-Reply-To: <01bd8343$bcec6b60$b777b6cc@eng-2>
Message-ID: <Pine.SUN.3.91.980520122716.24974P-100000@is>
MIME-Version: 1.0

On 19 May 1998, cjobmann wrote:

> I'm trying to use make with  a   compiler other than gcc(microtec)
> I have installed BASH as my shell, but it still acts like it DOS, since
> it doesn't recognized long command lines.

Get ready for a disappointment: it might be that it won't work at
all.

DJGPP passes long command lines in a way that is mostly private to
DJGPP programs.  So a compiler that wasn't compiled with DJGPP won't
see the full line, only its first 126 characters.

Your best bet would be to try using the response files, if that
compiler supports them (many do).  Bash should automatically call a
non-DJGPP program via a response file when the command line exceeds
126-char limit.  However, Make doesn't call Bash unless the command
uses some shell features, like redirection, pipes, quoted arguments,
etc.

If your Makefile cannot be rewritten to force Bash to be called, you
can create a response file and invoke the compiler on it, like this:

    foo:
	echo arg1 arg2 arg3 arg4 > rf
	compile @rf
	del rf

Here "echo" will call the DJGPP echo.exe, which supports long command
lines, and then the compiler will use rf as the response file.  It's
ugly, but it should work.

If the compiler does NOT support response files, then you are out of
luck.

- Raw text -


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