Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ocamldep does not handle spaces in names correctly #3370

Closed
vicuna opened this issue Dec 16, 2004 · 4 comments
Closed

ocamldep does not handle spaces in names correctly #3370

vicuna opened this issue Dec 16, 2004 · 4 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Dec 16, 2004

Original bug ID: 3370
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: Aleksey Nogin
Version: 3.02
OS: Red Hat Linux/Fedora Core
Submission from: wasco.cs.caltech.edu (131.215.44.173)

If a directory name contains spaces in it, ocamldep does not do the right thing.
For example,

mkdir a\ b

touch a\ b/foo.ml

echo 'open Foo' > bar.ml

ocamldep -I a\ b bar.ml

bar.cmo: a b/foo.cmo
bar.cmx: a b/foo.cmx

Ocamldep needs to prefix the spaces with a slash:

bar.cmo: a\ b/foo.cmo
bar.cmx: a\ b/foo.cmx

@vicuna
Copy link
Author

vicuna commented Jan 5, 2005

Comment author: administrator

On 05.01.2005 03:10, Damien Doligez wrote:

Full_Name: Aleksey Nogin
Version: 3.02
OS: Red Hat Linux/Fedora Core

If a directory name contains spaces in it, ocamldep does not do the right thing.

Unfortunately, there is no right thing to do.

Perhaps, but there is at least a choice between a "definitely hopeless"
and "could work out".

Ocamldep needs to prefix the spaces with a slash:

This is an undocumented feature of gnu make, and it doesn't exist in Berkeley
make.

This could be the case. But in both cases, using "\ " for " " does not
make things worse and could make things better.

I'm afraid the only way out is to avoid using spaces in your file names.

Even on Windows? Even when things are installed into the "Program Files"
directory?

P.S. One reason I care about this is because of our OMake Build Tool
(http://omake.metaprl.org/), which does understand the "\ " convention,
and is supposed to work consistently under both Unix and Windows.

--
Aleksey Nogin

Home Page: http://nogin.org/
E-Mail: nogin@cs.caltech.edu (office), aleksey@nogin.org (personal)
Office: Jorgensen 70, tel: (626) 395-2907

@vicuna
Copy link
Author

vicuna commented Jan 5, 2005

Comment author: administrator

Full_Name: Aleksey Nogin
Version: 3.02
OS: Red Hat Linux/Fedora Core

If a directory name contains spaces in it, ocamldep does not do the right
thing.

Unfortunately, there is no right thing to do.

Ocamldep needs to prefix the spaces with a slash:

This is an undocumented feature of gnu make, and it doesn't exist in Berkeley
make.
I'm afraid the only way out is to avoid using spaces in your file names.

-- Damien

@vicuna
Copy link
Author

vicuna commented Jan 5, 2005

Comment author: administrator

On Jan 5, 2005, at 12:40, nogin@cs.caltech.edu wrote:

Perhaps, but there is at least a choice between a "definitely hopeless"
and "could work out".

OK

This could be the case. But in both cases, using "\ " for " " does
not
make things worse and could make things better.

OK

I'm afraid the only way out is to avoid using spaces in your file
names.

Even on Windows? Even when things are installed into the "Program
Files"
directory?

On Windows it is totally hopeless, because \ is used as the directory
separator in path names, so you cannot use it to escape special
characters
(at least, that's what is written in the gnu make documentation).

P.S. One reason I care about this is because of our OMake Build Tool
(http://omake.metaprl.org/), which does understand the "\ " convention,
and is supposed to work consistently under both Unix and Windows.

I wish all these stupid make implementations would support shell-style
quoting, but OK we'll do it gnu-style, since it doesn't make things
any worse for the BSD case.

-- Damien

@vicuna
Copy link
Author

vicuna commented Jan 5, 2005

Comment author: administrator

fixed 2004-01-05 DD

@vicuna vicuna closed this as completed Jan 5, 2005
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant