How do I tell automake to use a file with whitespaces in its name? This doesn't seem to work.
bin_PROGRAMS = prog
prog_SOURCES = "a file.c" "another file.c"
Don't start or end your filename with a space, period, hyphen, or underline. Keep your filenames to a reasonable length and be sure they are under 31 characters. Most operating systems are case sensitive; always use lowercase. Avoid using spaces and underscores; use a hyphen instead.
Avoid spaces Spaces are not supported by all operating systems or by command line applications. A space in a filename can cause errors when loading a file or when transferring files between computers. Common replacements for spaces in a filenames are dashes (-) or underscores (_).
Java per se handles spaces in filenames just fine with no escaping or anything. You may be trying to access a file the user running the jvm don't have access to.
Length. A file system may limit the length a file can have. This was even more serious during the days when MS-DOS was limited to 8.3 filenames. So, leaving out spaces enabled you to put more meaningful characters into the name.
You can't. (Surprisingly, this is the only extremely serious fault in Automake in my opinion, but people hardly ever complain about it.)
I once worked around installing data files with spaces in their names, by renaming the files in the source tree so that they didn't have spaces, then renaming them to their spaceful names in install-data-hook
. (link)
That, however, has no bearing on your problem, to which my answer is still: you can't. As far as I know, prog_SOURCES
is just a shell variable. A specially-named one, sure, but once Automake finds it, it simply separates it on spaces. Spaces are spaces, whether they're escaped, quoted, or plain. They should have designed it so that you could escape spaces, but I'm sure they won't change it now because it would cause widespread Automake breakage.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With