[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Filenames with embedded spaces [Was: Query regarding make error]
From: |
Greg Chicares |
Subject: |
Filenames with embedded spaces [Was: Query regarding make error] |
Date: |
Tue, 27 Jan 2004 21:09:48 -0500 |
"J. Grant" wrote:
>
> I noticed that paths with escaped spaces work with windows32 make build,
> e.g.:
> d:/test\ path
>
> I have an idea for an extra patch, if there is a path such as:
> "d:/test path"
>
> in a makefile it might be possible to treat the quotes as indicating
> that the text is part of a single path. Then the spaces in the path
> could be upgraded to escaped spaces. Meaning the resulting path would be:
> "d:/test\ path"
>
> Which would solve the spaces in path problem. Although, perhaps this
> breaks compatibility? Any thoughts/corrections?
Do paths with escaped spaces always work as you want?
[makefile begins]
files = My\ Documents My\ Computer/Control\ Panel
.PHONY: all
all: $(files)
%:
@echo testing '$@'
@echo ' dir: $(dir $@)'
@echo ' notdir: $(notdir $@)'
@echo ' prefix&suffix: $(addsuffix -omega,$(addprefix alpha-,$@))'
[makefile ends]
I get output like
testing My Documents
dir: ./ ./
notdir: My Documents
prefix&suffix: alpha-My-omega alpha-Documents-omega
testing My Computer/Control Panel
dir: ./ Computer/ ./
notdir: My Control Panel
prefix&suffix: alpha-My-omega alpha-Computer/Control-omega alpha-Panel-omega