diff options
author | Nicholas Clark <nick@ccl4.org> | 2013-07-08 17:00:35 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2013-07-09 07:54:34 +0200 |
commit | b49998889df0e37bdd1b5d4d49c8a1adcb0eedbb (patch) | |
tree | 8b7b4b4e36711620954aa8ee29b87e1f92b3d4b5 /Makefile.SH | |
parent | a06cd52b4e4376cb0c4375a8943888ed7c9f37d2 (diff) | |
download | perl-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 'Makefile.SH')
-rwxr-xr-x | Makefile.SH | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile.SH b/Makefile.SH index 9ef70bd5aa..ab0d48b0ed 100755 --- a/Makefile.SH +++ b/Makefile.SH @@ -685,7 +685,7 @@ generate_uudmap$(HOST_EXE_EXT): generate_uudmap$(OBJ_EXT) $(CC) -o generate_uudmap$(EXE_EXT) $(LDFLAGS) generate_uudmap$(OBJ_EXT) $(libs) perlmain.c: $(MINIPERL_EXE) ext/ExtUtils-Miniperl/pm_to_blib - $(MINIPERL) -Ilib -MExtUtils::Miniperl -e 'writemain(@ARGV)' DynaLoader $(static_ext) > perlmain.c + $(MINIPERL) -Ilib -MExtUtils::Miniperl -e 'writemain(\"perlmain.c", @ARGV)' DynaLoader $(static_ext) # The file ext.libs is a list of libraries that must be linked in # for static extensions, e.g. -lm -lgdbm, etc. The individual |