unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Alexander Shukaev <haroogan@gmail.com>
Cc: 18955@debbugs.gnu.org
Subject: bug#18955: Makefile:382: recipe for target 'src' failed
Date: Sun, 09 Nov 2014 22:28:42 +0200	[thread overview]
Message-ID: <83r3xcnmo5.fsf@gnu.org> (raw)
In-Reply-To: <CAKu-7WyytzjkQ86nxE=DhbJxbcyMR2V9EUuqrQGdCko2Kw+PKQ@mail.gmail.com>

> Date: Sun, 9 Nov 2014 21:13:17 +0100
> From: Alexander Shukaev <haroogan@gmail.com>
> Cc: 18955@debbugs.gnu.org, Glenn Morris <rgm@gnu.org>
> 
>     To do this, we'd have to drag this support all the way down to the
>     lowest level where we pass file names to the OS APIs. And then we'd
>     have to disallow root directories of one letter, like C:/c, which are
>     entirely legitimate. All that just to handle the few commands during
>     the build process that need it. I find this solution even more ugly
>     than the unmsys--file-name gork.
> 
> I'm afraid I don't understand your point here. To reiterate, the current
> problem is that Emacs does not know how to treat "/C" in the beginning,
> therefore it assumes that the path given does not have a drive letter, so it
> add "c:" in front of the given path as a wild guess.

It's not a wild guess.  File names of the form "/foo/bar" are
legitimate on Windows, so Emacs just adds the current drive to them.

If we treat /c/foo as an alias of C:/foo, users will be unable to
use, say, d:/c/foo directories.  I think this is a limitation that is
better avoided.

> The only thing that I propose to change in that logic is to allow
> paths which contain a slash + a single letter in the beginning,
> e.g. "/C", so that when Emacs sees it, it simply converts that to
> "C:" and passes further to old logic of path manipulation.

There's no single place where the "Emacs sees it" part can happen.
Emacs communicates file names to the OS through quite a few separate
APIs, so all of these places will have to know about this magic.

> In other words, nothing has to be changed to the lowest level as
> you say. My change involves one `if' statement or so in the very beginning of
> the path processing.

There's no single place where "path processing" happens, although
expand-file-name comes close.  So it's not as simple as it sounds.  It
will be quite ugly and viral.

Moreover, when file names are passed to subprocesses, we will need to
convert them as well -- like MSYS does.

> Furthermore, I don't get it why you would have to disallow "C:/c"?
> If somebody passes "C:/c" then it's perfectly valid Windows path. If
> somebody passes "/C/c", then according my proposal it will be
> converted to "C:/c" and then processed further.

That disallows saying something like

  C-x C-f /C/c/foo RET

meaning "/C/c/foo" on the current drive, like we support now.  I don't
think this limitation is justified just to solve several build
problems for which a satisfactory solution already exists.





  reply	other threads:[~2014-11-09 20:28 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-05 15:52 bug#18955: Makefile:382: recipe for target 'src' failed Alexander Shukaev
2014-11-05 16:55 ` Glenn Morris
2014-11-05 17:03   ` Alexander Shukaev
2014-11-05 17:04     ` Glenn Morris
     [not found]       ` <CAKu-7WzwmwmqCswS+b32zdY6DLZb7G=uLu-8FZjCQgVUvBwNRQ@mail.gmail.com>
2014-11-05 17:33         ` bug#18955: Fwd: " Alexander Shukaev
2014-11-05 17:39           ` Alexander Shukaev
2014-11-05 18:31             ` Glenn Morris
2014-11-05 22:41               ` Alexander Shukaev
2014-11-06  3:48                 ` Eli Zaretskii
2014-11-06 13:17                   ` Alexander Shukaev
2014-11-06 16:30                     ` Eli Zaretskii
2014-11-06 18:48                       ` Alexander Shukaev
2014-11-06 19:21                         ` Eli Zaretskii
2014-11-06 20:56                           ` Alexander Shukaev
2014-11-07 15:02                             ` Alexander Shukaev
2014-11-07 15:21                               ` Eli Zaretskii
2014-11-07 15:34                                 ` Alexander Shukaev
2014-11-07 15:36                                   ` Alexander Shukaev
2014-11-07 15:50                                   ` Eli Zaretskii
2014-11-07 15:56                                     ` Alexander Shukaev
2014-11-07 15:57                                       ` Alexander Shukaev
2014-11-07 19:53                                         ` Eli Zaretskii
2014-11-07 19:52                                       ` Eli Zaretskii
2014-11-09 17:30                                       ` Eli Zaretskii
2014-11-09 17:42                                         ` Alexander Shukaev
2014-11-09 19:47                                           ` Eli Zaretskii
2014-11-09 20:10                                             ` Dani Moncayo
2014-11-09 20:15                                               ` Eli Zaretskii
2014-11-09 20:25                                                 ` Alexander Shukaev
2014-11-09 20:33                                                   ` Eli Zaretskii
2014-11-09 20:43                                                     ` Dani Moncayo
2014-11-09 20:46                                                     ` Eli Zaretskii
2014-11-09 20:13                                             ` Alexander Shukaev
2014-11-09 20:28                                               ` Eli Zaretskii [this message]
2014-11-09 20:38                                                 ` Alexander Shukaev
2014-11-09 20:43                                                   ` Alexander Shukaev
2014-11-09 20:49                                                     ` Eli Zaretskii
2014-11-09 22:43                                                       ` Glenn Morris
2014-11-10  7:17                                                         ` Glenn Morris
2014-11-09 20:47                                                   ` Eli Zaretskii
2014-11-05 19:00           ` bug#18955: Fwd: " Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83r3xcnmo5.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=18955@debbugs.gnu.org \
    --cc=haroogan@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).