Results 1 to 10 of 13
need help about building make file that has spaces in path name
like Documents and setings, my folder........
problem arise in comands like
make -c ../linux ................M='current position'
and it ...
- 08-28-2007 #1Just Joined!
- Join Date
- Aug 2007
- Posts
- 8
makefile with spaces in path
need help about building make file that has spaces in path name
like Documents and setings, my folder........
problem arise in comands like
make -c ../linux ................M='current position'
and it makes makefile error536 no such file or directory cause it splits path in two parts
before space in name and after the space.
something like
entering directory 'c:/documents' no such.....
entering directory 'setings/something/somenthig...' no such .........
problem is that -c calls $$(pwd) somewhere and than aply it to M to find ../linux
so how to make that path looks okay
i can put " " on other $$(pwd) in other make files and that works okay but this make -C????
any ideas how to solve this?
please don't answer like don't put spaces in names of folders. it supposed to work in situations like that!
- 08-28-2007 #2
Try using a \ before each space character. For instance:
Code:C:\Documents\ and\ Settings\
- 08-28-2007 #3
Kieren, is correct. Use the dir command to see exactly what's going on.
I do not respond to private messages asking for Linux help, Please keep it on the forums only.
All new users please read this.** Forum FAQS. ** Adopt an unanswered post.
- 08-28-2007 #4Just Joined!
- Join Date
- Aug 2007
- Posts
- 8
I know that but problem is that i dont know what path is it going to be
i am using in code relative paths to the file position like
../../linux2.6.10 ../build and so on
so when building project command make -c in makefile calls $$(pwd) aply to it ../../linux2.6.10 and do make all in linux2.6.10/Makefile.
so i dont type anywhere apsolyte paths only using $$(pwd) on few places
command that makes error is
$(MAKE) -C .../../linux-2.6.10/ [options] M=$(FILEDIR)
filedir = path to the file where this command is, it is found by '$$(pwd)'
anything else
- 08-28-2007 #5
As found in http://tldp.org/LDP/abs/html/string-manipulation.html
So you would use something like:Code:stringZ=abcABC123ABCabc echo ${stringZ/abc/xyz} # xyzABC123ABCabc # Replaces first match of 'abc' with 'xyz'. echo ${stringZ//abc/xyz} # xyzABC123ABCxyz # Replaces all matches of 'abc' with # 'xyz'.
?Code:${$(FILEDIR)// /\}
- 08-28-2007 #6Just Joined!
- Join Date
- Aug 2007
- Posts
- 8
could work I will try
should it look maybe like this
${$(FILEDIR)// /\ }
with one space at end cause I am replacing ' ' with '\ ' ?
thanks alot
sorry how to put that code field in msg?
- 08-28-2007 #7
Yes, you need the space at the end, I missed it out.
To format your code wrap it in:
[code]Some code[code]
- 08-28-2007 #8Just Joined!
- Join Date
- Aug 2007
- Posts
- 8
thanks

- 08-28-2007 #9Just Joined!
- Join Date
- Aug 2007
- Posts
- 8
it 's not working
cause it transforms something like "/usr/local/......................" to " "
it seems like it doesn't work in makefiles
i try it more tommorow.
- 08-28-2007 #10
Hmm, what about something like:
?Code:${$(FILEDIR)//\ /\\\ }


Reply With Quote