summaryrefslogtreecommitdiff
path: root/vms
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2013-07-08 17:00:35 +0200
committerNicholas Clark <nick@ccl4.org>2013-07-09 07:54:34 +0200
commitb49998889df0e37bdd1b5d4d49c8a1adcb0eedbb (patch)
tree8b7b4b4e36711620954aa8ee29b87e1f92b3d4b5 /vms
parenta06cd52b4e4376cb0c4375a8943888ed7c9f37d2 (diff)
downloadperl-b49998889df0e37bdd1b5d4d49c8a1adcb0eedbb.tar.gz
Change the *nix and VMS Makefiles to to pass a filename to writemain().
Adding a first argument as a reference to the filename "perlmain.c" makes ExtUtils::Miniperl::writemain() open and close the file for us. This is safer than having the Makefile create the file using output redirection as that can create an empty file if compilation aborts. This change means that the file is only moved into place with the correct name if it has been written completely without error. If an error happens the file is not created, the make aborts, and any subsequent make will re-attempt to create the file, instead of continuing with an incorrect file, hiding the real cause of the problems.
Diffstat (limited to 'vms')
-rw-r--r--vms/descrip_mms.template2
1 files changed, 1 insertions, 1 deletions
diff --git a/vms/descrip_mms.template b/vms/descrip_mms.template
index 523daf6e23..0415b955d2 100644
--- a/vms/descrip_mms.template
+++ b/vms/descrip_mms.template
@@ -365,7 +365,7 @@ $(DBG)libperlmini$(OLB) : $(mini_obj)
Library/Object/Replace $(MMS$TARGET) $(MMS$SOURCE_LIST)
perlmain.c : miniperlmain.c $(MINIPERL_EXE) nonxsext
- $(MINIPERL) -"MExtUtils::Miniperl" -e "writemain(@ARGV)" "$(EXT)" > perlmain.c
+ $(MINIPERL) -"MExtUtils::Miniperl" -e "writemain(\'perlmain.c', @ARGV)" "$(EXT)"
.ifdef __DEBUG__
# Link an extra perl that doesn't invoke the debugger