On Sun, Nov 28, 2010 at 06:34:14PM +0100, Nicholas Clark wrote:
> In perl.git, the branch blead has been updated
> 
> <http://perl5.git.perl.org/perl.git/commitdiff/fbcaf61123069fe46010699dd41ca5f60f448361?hp=603928ea21886dfb891e73164afc6b81c2793547>
> 
> - Log -----------------------------------------------------------------
> commit fbcaf61123069fe46010699dd41ca5f60f448361
> Author: Nicholas Clark <n...@ccl4.org>
> Date:   Sun Nov 28 17:15:58 2010 +0000
> 
>     Generate perlmain.c using ExtUtils::Miniperl, instead of writemain.SH.
>     
>     This allows writemain.SH to be removed. This also has the side effect of 
> testing
>     that ExtUtils::Miniperl actually works. :-)
> -----------------------------------------------------------------------
> 
> Summary of changes:
>  MANIFEST             |    1 -
>  Makefile.SH          |    8 ++--
>  Porting/exec-bit.txt |    1 -
>  pod/perlhack.pod     |    2 +-

> diff --git a/Makefile.SH b/Makefile.SH
> index 557f4f8..5315793 100755
> --- a/Makefile.SH
> +++ b/Makefile.SH

The important bit:

> -perlmain.c: miniperlmain.c config.sh $(FIRSTMAKEFILE)
> -     sh writemain $(DYNALOADER) $(static_ext) > perlmain.c
> +perlmain.c: $(MINIPERL_EXE) lib/ExtUtils/Miniperl.pm
> +     $(MINIPERL) -Ilib -MExtUtils::Miniperl -e 'writemain(@ARGV)' DynaLoader 
> $(static_ext) > perlmain.c
>  
>  perlmain$(OBJ_EXT): perlmain.c
>       $(CCCMD) $(PLDLFLAGS) $*.c

Previously *nix was using a shell script writemain to generate perlmain.c
from miniperlmain.c and the list of extensions. However, that functionality
is duplicated in lib/ExtUtils/Miniperl.pm, generated by minimod.pl

vms/writemain.pl also duplicates this functionality. The comment in it about
"create a linker options file" seems to be spurious - as best I can tell it
never did. (The comment was added in 5.001, but not the functionality)

Can vms/writemain.pl go the way of writemain.SH, and be replaced with a call
to ExtUtils::Miniperl ?

(This would mean that VMS is using more of the same code as everyone else,
which makes maintenance easier)

Nicholas Clark

Reply via email to