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

 
 

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

Submitted by:  None
Submitted on:  Fri 24 Nov 2006 10:42:41 PM UTC  
 
Severity: 3 - NormalItem Group: Bug
Status: DuplicatePrivacy: Public
Assigned to: NoneOpen/Closed: Closed
Component Version: 3.81Operating System: POSIX-Based
Fixed Release: NoneTriage Status: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project 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 File(s):
   
   
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

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 4 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Thu 14 Dec 2006 12:14:50 PM UTClebertCarbon-Copy-=>Added -unavailable-
Sat 25 Nov 2006 10:09:15 PM UTCpsmithStatusNone=>Duplicate
  Open/ClosedOpen=>Closed
Fri 24 Nov 2006 10:42:41 PM UTCNoneAttached File-=>Added make.out, #11348

Back to the top


Powered by Savane 3.1-cleanup1