all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Bill Meier <wmeier@newsguy.com>
To: bug-gnu-emacs@gnu.org
Subject: [PATCH] src/makefile.w32-in
Date: Wed, 16 Jan 2008 15:26:30 -0500 (EST)	[thread overview]
Message-ID: <200801162026.m0GKQUaa000801@member.newsguy.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 985 bytes --]

After doing a build of emacs on Windows with MinGW (configure, make bootstrap,
.., make install) I found that then doing a make clean, make failed.

Specifically: there was an "access denied" message for temacs.exe during the
make step. (I'm new to building emacs on Windows but presumably a make clean,
make after the original build should work).

After a little poking around I discovered that the problem is that during the
build a dummy temacs.exe file is being created with only rw permissions (see
lib-src/makefile).

Later in the build, when temacs.exe is created from temacs.bin by using
addsection, apparently the permissions (rw) from the existing temacs.exe file
are kept thus resulting in a temacs.exe file without executable permission.

So: the simple fix I've done is to delete any existing temacs.exe file just
before using addsection to create the file.

The attachment with a fix is a diff -u against the current HEAD
src/makefile.w32-in (revision 1.56).

Bill Meier

[-- Attachment #2: src-makefile-w32-in-patch.diff --]
[-- Type: application/octet-stream, Size: 996 bytes --]

--- src/makefile.w32-in-orig	2008-01-16 14:38:56.575606400 -0500
+++ src/makefile.w32-in	2008-01-16 14:44:56.763531200 -0500
@@ -168,11 +168,16 @@
 # Note the extra post-link step to insert a static preload heap section.
 # If preload runs out of memory, increase the last argument to addsection
 # (it is the preload heap size in MB).
+# Note that a (possibly dummy) temacs.exe is deleted before the post-link step.
+#  This is required so that the permissions for the new temacs.exe are not inherited
+#  from an existing one (which might not have 'executable' permission). 
+#  (See lib-src makefile).
 #
 temacs:         stamp_BLD $(TEMACS)
 $(TEMACS):      $(TLIB0) $(TLIB1) $(TLIBW32) $(TLASTLIB) $(TOBJ) $(TRES) \
 		  ../nt/$(BLD)/addsection.exe
 	$(LINK) $(LINK_OUT)$(TEMACS_TMP) $(FULL_LINK_FLAGS) $(TOBJ) $(TRES) $(LIBS)
+	- $(DEL) "$(TEMACS)"
 	"../nt/$(BLD)/addsection" "$(TEMACS_TMP)" "$(TEMACS)" EMHEAP 16
 	echo $(OBJ0) > $(BLD)/buildobj.lst
 	echo $(OBJ1) >> $(BLD)/buildobj.lst

             reply	other threads:[~2008-01-16 20:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-16 20:26 Bill Meier [this message]
2008-01-17  9:40 ` [PATCH] src/makefile.w32-in Jason Rumney
2008-01-20 16:30   ` Bill Meier
2008-01-20 21:50     ` Jason Rumney
2008-01-20 22:46       ` Bill Meier
2008-01-20 23:20         ` Jason Rumney
2008-01-20 23:39           ` Bill Meier

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=200801162026.m0GKQUaa000801@member.newsguy.com \
    --to=wmeier@newsguy.com \
    --cc=bug-gnu-emacs@gnu.org \
    /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.