all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: William Xu <william.xwl@gmail.com>
Cc: bug-gnu-emacs@gnu.org
Subject: bug#8564: 24.0.50; bootstrap on windows 7: `gl-stamp' target failed
Date: Thu, 28 Apr 2011 00:53:09 -0400	[thread overview]
Message-ID: <E1QFJDx-0006Kw-VD@fencepost.gnu.org> (raw)
In-Reply-To: <21gld3k7nmed.fsf@gmail.com> (message from William Xu on Thu, 28 Apr 2011 10:24:26 +0800)

> From: William Xu <william.xwl@gmail.com>
> Date: Thu, 28 Apr 2011 10:24:26 +0800
> 
>    After you bootstrap, does the same command work for a normal (i.e.,
>    non-bootstrap) build, or does it fail in the same way?
> 
> Yes, if i revert my change.  I modified some c files, and run following
> command: 
> 
> ,----[ make gl-stamp ]
> | cmd /c "fc /b gl-tmp globals.h >nul 2>&1 || cp -f gl-tmp globals.h"
> | Microsoft Windows [Version 6.1.7600]
> | Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
> | 
> | L:\bin\emacs\src>mingw32-make: *** [gl-stamp] Error 66048
> `----

So it fails in non-bootstrap case as well.  Good, this makes things
simpler.

> I was compiling in on cmd.exe(i have some unix tools on %path%, though)
> The beginning: 
> 
> ,----
> | L:\bin\emacs\src>mingw32-make gl-stamp
> | [Please ignore a syntax error on the next line - it is intentional]
> | /bin/sh: -c: line 0: unexpected EOF while looking for matching `"'
> | /bin/sh: -c: line 1: syntax error: unexpected end of file
> | rm gl-tmp
> `----

Uh-oh!  Is this the MSYS port of Bash, by any chance?  Or maybe the
Cygwin Bash?  If so, can you remove sh.exe from PATH and try again?
At least the MSYS Bash has a nasty habit of munging the command-line
arguments if it "thinks" that those arguments are Unix-style /foo/bar
file names.  So my crystal ball says that it "thinks" "/c" in "cmd /c"
is such a file name and changes it to something like "cmd L:/c", which
of course totally confuses cmd.exe.

You will see that nt/INSTALL advises against the MSYS shell:

                           MSYS sh.exe also appears to cause various
  problems.  If you have MSYS installed, try "make SHELL=cmd.exe" to
  force the use of cmd.exe instead of sh.exe.

>    >   cp -f gl-tmp globals.h  # Wouldn't this be simpler & good enough? 
> 
>    No, it's not good enough.  `cp' updates the time stamp of globals.h
>    each time you build, and therefore all the C files will be recompiled,
>    because they all include globals.h, even though the contents of
>    globals.h rarely changes.  That kinda makes Make redundant, since its
>    main goal is to avoid unnecessary compilations...  The command that
>    invokes `fc' only updates globals.h if the new version has different
>    contents.  IOW, this is the Windows way of saying move-if-change.
> 
> How about using `diff' here? (considering commands like `cp' is already
> dependent? )
>   diff gl-tmp globals.h >nul 2>&1 || $(CP) gl-tmp globals.h

Using Diff means we ask the Windows users to have yet another
non-standard package installed as a prerequisite to building Emacs.  I
would like to avoid that if possible; `fc' is a standard program on
every Windows machine, and it does this particular job just fine.

It is also unsafe to use this command without going through "cmd /c",
because ported Unixy shells generally don't know about "NUL" being the
Windows null device, while cmd.exe doesn't know about "/dev/null".

Anyway, I think your problem is not with `fc', it's with "cmd /c".  So
using Diff won't solve it.





  reply	other threads:[~2011-04-28  4:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-27  5:20 bug#8564: 24.0.50; bootstrap on windows 7: `gl-stamp' target failed William Xu
2011-04-27 10:29 ` Eli Zaretskii
2011-04-28  2:24   ` William Xu
2011-04-28  4:53     ` Eli Zaretskii [this message]
2011-04-28  6:19       ` William Xu
2011-04-28 17:26         ` 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

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

  git send-email \
    --in-reply-to=E1QFJDx-0006Kw-VD@fencepost.gnu.org \
    --to=eliz@gnu.org \
    --cc=bug-gnu-emacs@gnu.org \
    --cc=william.xwl@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.