Fix miniperl.exe.manifest problem on Windows
authorSteve Hay <steve.m.hay@googlemail.com>
Wed, 14 Aug 2013 13:18:49 +0000 (14:18 +0100)
committerSteve Hay <steve.m.hay@googlemail.com>
Wed, 14 Aug 2013 13:18:49 +0000 (14:18 +0100)
Commit cb251201d6 inadvertently broke the embedding of the manifest file
in miniperl.exe by changing the target which builds miniperl.exe and hence
the value of $@, which is used in the EMBED_EXE_MANI macro.

It isn't hugely important since the .exe works fine with the .manifest left
alongside it anyway (and miniperl.exe isn't even an installed file either),
but fixing it saves having to .gitignore the .manifest file which was being
left behind rather than embedded and deleted.

We can do this nicely in dmake-speak; unfortunately nmake's version of the
same isn't as nice since it can't handle macros in macro substitutions.

win32/Makefile
win32/makefile.mk

index 0583c81..965c6ca 100644 (file)
@@ -955,7 +955,7 @@ $(MINIPERL) : ..\lib\buildcustomize.pl
        $(LINK32) -subsystem:console -out:$(MINIPERL) @<<
        $(LINK_FLAGS) $(DELAYLOAD) $(LIBFILES) $(MINI_OBJ)
 <<
-       $(EMBED_EXE_MANI)
+       $(EMBED_EXE_MANI:..\lib\buildcustomize.pl=..\miniperl.exe)
        $(MINIPERL) -I..\lib -f ..\write_buildcustomize.pl ..
 
 $(MINIDIR) :
index ce0a655..735e0da 100644 (file)
@@ -1083,7 +1083,7 @@ $(MINIPERL) : ..\lib\buildcustomize.pl
 .ELSE
        $(LINK32) -subsystem:console -out:$(MINIPERL) $(BLINK_FLAGS) \
            @$(mktmp $(DELAYLOAD) $(LIBFILES) $(MINI_OBJ))
-       $(EMBED_EXE_MANI)
+       $(EMBED_EXE_MANI:s/$@/$(MINIPERL)/)
 .ENDIF
        $(MINIPERL) -I..\lib -f ..\write_buildcustomize.pl ..