unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] src/makefile.w32-in
@ 2008-01-16 20:26 Bill Meier
  2008-01-17  9:40 ` Jason Rumney
  0 siblings, 1 reply; 7+ messages in thread
From: Bill Meier @ 2008-01-16 20:26 UTC (permalink / raw)
  To: bug-gnu-emacs

[-- 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-01-20 23:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-16 20:26 [PATCH] src/makefile.w32-in Bill Meier
2008-01-17  9:40 ` 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

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).