help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Filenames with spaces in Makefiles


From: bhaskar . g
Subject: Re: Filenames with spaces in Makefiles
Date: Thu, 30 Jan 2003 14:41:54 +0000

Hi Brad,

One way is to set your variable ROOTDIR in 8.3 dos format .

eg:

ROOTDIR=c;/docume~1/brad

regards
bhaskar


                                                                                
                                                                                
                   
                                                                                
                                                                                
                   
                                                                      To:   
address@hidden                                                                  
                    
                                                                      cc:   
(bcc: Bhaskar G/BTC/SC/PHILIPS)                                                 
                       
                                                                      Subject:  
  Filenames with spaces in Makefiles                                            
                   
                                                                                
                                                                                
                   
               Bradford Chamberlain                                   
Classification:                                                                 
                             
               <address@hidden>                                                 
                                                                                
           
                                                                                
                                                                                
                   
               Sent by:                                                         
                                                                                
                   
               address@hidden                                                   
                                                                      
               .org                                                             
                                                                                
                   
                                                                                
                                                                                
                   
               01/30/2003 09:03 AM                                              
                                                                                
                   
                                                                                
                                                                                
                   
                                                                                
                                                                                
                   





I am porting some code tonight from linux to windows.  Some of the rules
in my Makefiles depend on a user-supplied path via an environment
variable.  For example:

foo.o: $(ROOTDIR)/foo.c
             ...

I am finding that when the ROOTDIR path has spaces in it, I cannot coerce
make into treating it as a single unit rather than breaking it up at each
space.  For example, if ROOTDIR="/cygdrive/c/Documents and Settings/brad"
I get:

make: *** No rule to make target `/cygdrive/c/Documents', needed by `foo.o`.

Normal tricks to quote the filename (as I would in a shell script) don't
seem to work.

I'm curious if anyone has any suggestions for this problem.  If it helps,
the Makefile is being called from a shell script that can massage the
pathname before sending it in (though handling it within the Makefile
would be preferable, if possible, for simplicity).

I'm doing this work using cygwin and am using version 3.79.1 of make.

Thanks for any help,
-Brad




_______________________________________________
Help-make mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/help-make








reply via email to

[Prev in Thread] Current Thread [Next in Thread]