Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Problems with 6.4.1 make backslash-newline: "./\: is a directory": (6 Items)
   
Problems with 6.4.1 make backslash-newline: "./\: is a directory"  
The version of make included with the 6.4.1 release seems to have problems interpreting backslash-newline command 
separators. Take the attached simple makefile as an example. Under the 641 environment, typing "make" outputs:

$ make
C:/Temp/make1508-1.sh: ./\: is a directory
1
C:/Temp/make1508-1.sh: ./\: is a directory
C:/Temp/make1508-1.sh: ./\: is a directory
2
C:/Temp/make1508-1.sh: ./\: is a directory
C:/Temp/make1508-1.sh: ./\: is a directory
3
C:/Temp/make1508-1.sh: ./\: is a directory
make: *** [all] Error 127

But under 640, it works properly:
$ make
1
2
3

Is there something I should be doing to my makefiles to make them make-3.81 compliant? Or should I revert back to using 
the make (3.80) from the 640 release?
Attachment: Text makefile 56 bytes
Re: Problems with 6.4.1 make backslash-newline: "./\: is a directory"  
On Wed, 2009-08-19 at 11:06 -0400, Josh Radel wrote:
> The version of make included with the 6.4.1 release seems to have problems interpreting backslash-newline command 
separators. Take the attached simple makefile as an example. Under the 641 environment, typing "make" outputs:

Yes, you've run afoul of a backward incompatibility between 3.80 and
3.81.  From the 3.81 NEWS file (which I've also attached in full):

* WARNING: Backward-incompatibility!
  In order to comply with POSIX, the way in which GNU make processes
  backslash-newline sequences in command strings has changed.  If your
  makefiles use backslash-newline sequences inside of single-quoted
  strings in command scripts you will be impacted by this change.  See
  the GNU make manual subsection "Splitting Command Lines" (node
  "Splitting Lines"), in section "Command Syntax", chapter "Writing the
  Commands in Rules", for details.

Regards,
Neil

Attachment: Text NEWS 42.86 KB
Re: Problems with 6.4.1 make backslash-newline: "./\: is a directory"  
Hmmm... while make has changed its handling of backslash-newline characters, my reading of the "Splitting Command Lines"
 description in the make manual suggests that my simple makefile example should still work (no single quotes; and while 
the backslash and newline are now passed to the shell whereas they weren't in make 3.80, the shell should be able to 
handle the backslashes appropriately).

Is it some kind of weird combination with the 3.81 version of make and the bash shell included with QNX?
Re: Problems with 6.4.1 make backslash-newline: "./\: is a directory"  
Sorry, I didn't notice the attachment in your original message: I just saw the "backslash-newline" and fired off my 
response without looking into it any further.

Since the example works on Neutrino and Linux, I suspect that the problem is the perennial CR-LF issue....
Re: Problems with 6.4.1 make backslash-newline: "./\: is a directory"  
Yeah, you're probably right... changing the end-of-line for the makefile itself didn't help, but it might be a line 
ending interaction issue between make and the shell.

Anyhow, I'm using the workaround of assigning my backslash-separated commands to a make variable, and then using that 
make variable for my target's commands. A little kludgey, but it works (and is backwards-compatibile with make 3.80)
Re: Problems with 6.4.1 make backslash-newline: "./\: is a directory"  
I have exactly the same issue with a makefile which was well working on QNX6.3.2. I am interested in any informations.

Thanks.