bugmake - Bugs: bug #18369, pattern rules don't work with...

 
 

bug #18369: pattern rules don't work with spaces in filenames

Submitter:  None
Submitted:  Fri 24 Nov 2006 10:42:41 PM UTC
   
 
Severity:  3 - Normal Item Group:  Bug
Status:  Duplicate Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Component Version:  3.81 Operating System:  POSIX-Based
Fixed Release:  None Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 26 Nov 2006 01:28:53 AM UTC, comment #2: 

Hmm, short question, why does it work with make 3.80:

$ make380 -v
GNU Make 3.80
Copyright (C) 2002  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

$ mkdir test
$ cd test
$ touch 'test with spaces.c'
$ make380 'test with spaces.o'
cc    -c -o test with spaces.o test with spaces.c
cc: cannot specify -o with -c or -S and multiple compilations
make380: * [test with spaces.o] Error 1
$

at least the pattern matching works, and with the following Makefile it even compiles:

.SUFFIXES:
.SUFFIXES: .o

%.o: %.c
$(CC) -o "$@" $(CFLAGS) -c "$<"

$ make380 'test with spaces.o'
cc -o "test with spaces.o"  -c "test with spaces.c"
$


Anonymous
Sat 25 Nov 2006 10:09:15 PM UTC, comment #1: 

The short answer is, GNU make doesn't handle filenames with spaces in them.  Make is really not a filename manipulator, it's a string parser.  And it uses whitespace to delimit strings in all aspects of its implementation and behavior.

Anyway, this is a duplicate of bug #712

Paul D. Smith <psmith>
Group administrator
Fri 24 Nov 2006 10:42:41 PM UTC, original submission:  

try this:

$ make -v
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for x86_64-unknown-linux-gnu
$ mkdir test
$ cd test
$ touch test.c
$ make test.o
cc    -c -o test.o test.c
$ touch 'test with spaces.c'
$ make 'test with spaces.o'
make: * No rule to make target `test with spaces.o'.  Stop.
$

full output from "make -d 'test with spaces.o'" is appended

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #11348:  make.out added by None (57KiB - application/octet-stream - output from "make -d 'test with spaces.o'")

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

Follow 4 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2006-12-14 lebert Carbon-Copy- Added -email is unavailable-
2006-11-25 psmith StatusNone Duplicate
    Open/ClosedOpen Closed
2006-11-24 None Attached File- Added make.out, #11348

Back to the top

Powered by Savane 3.13-4448.
Corresponding source code