@@ -410,7 +410,7 @@ Prints out macros for lots of constants.
410410=cut
411411
412412sub constants {
413- my ($self ) = @_ ;
413+ my ($self ) = @_ ;
414414 my @m = ();
415415
416416 $self -> {DFSEP } = ' $(DIRFILESEP)' ; # alias for internal use
@@ -433,17 +433,17 @@ sub constants {
433433 } $self -> installvars),
434434 qw(
435435 PERL_LIB
436- PERL_ARCHLIB PERL_ARCHLIBDEP
436+ PERL_ARCHLIB
437437 LIBPERL_A MYEXTLIB
438438 FIRST_MAKEFILE MAKEFILE_OLD MAKE_APERL_FILE
439- PERLMAINCC PERL_SRC PERL_INC PERL_INCDEP
439+ PERLMAINCC PERL_SRC PERL_INC
440440 PERL FULLPERL ABSPERL
441441 PERLRUN FULLPERLRUN ABSPERLRUN
442442 PERLRUNINST FULLPERLRUNINST ABSPERLRUNINST
443443 PERL_CORE
444444 PERM_DIR PERM_RW PERM_RWX
445445
446- ) )
446+ ) )
447447 {
448448 next unless defined $self -> {$macro };
449449
@@ -493,16 +493,6 @@ SDKROOT := $(shell xcrun --show-sdk-path)
493493PERL_SYSROOT = $(SDKROOT)
494494} if $Is {ApplCor } && $self -> {' PERL_INC' } =~ m ! ^/System/Library/Perl/! ;
495495
496- push @m , q{
497- # Where is the Config information that we are using/depend on
498- CONFIGDEP = $(PERL_ARCHLIBDEP)$(DFSEP)Config.pm $(PERL_SYSROOT)$(PERL_INCDEP)$(DFSEP)config.h
499- } if $Is {ApplCor };
500-
501- push @m , q{
502- # Where is the Config information that we are using/depend on
503- CONFIGDEP = $(PERL_ARCHLIBDEP)$(DFSEP)Config.pm $(PERL_INCDEP)$(DFSEP)config.h
504- } if -e $self -> catfile( $self -> {PERL_INC }, ' config.h' ) && !$Is {ApplCor };
505-
506496 push @m , qq{
507497# Where to build things
508498INST_LIBDIR = $self ->{INST_LIBDIR}
@@ -520,17 +510,53 @@ INST_BOOT = $self->{INST_BOOT}
520510# Extra linker info
521511EXPORT_LIST = $self ->{EXPORT_LIST}
522512PERL_ARCHIVE = $self ->{PERL_ARCHIVE}
523- PERL_ARCHIVEDEP = $self ->{PERL_ARCHIVEDEP}
524513PERL_ARCHIVE_AFTER = $self ->{PERL_ARCHIVE_AFTER}
525514} ;
526515
527516 push @m , "
528517
529518TO_INST_PM = " .$self -> wraplist(map $self -> quote_dep($_ ), sort keys %{$self -> {PM }})." \n " ;
530519
531- join (' ' ,@m );
520+ join (' ' , @m ) . $self -> dep_constants ;
532521}
533522
523+ =item dep_constants (o)
524+
525+ my $make_frag = $mm->dep_constants;
526+
527+ Prints out macros for dependency constants.
528+
529+ =cut
530+
531+ sub dep_constants {
532+ my ($self ) = @_ ;
533+ my @m = ();
534+ for my $macro (qw( PERL_ARCHLIBDEP PERL_INCDEP) ) {
535+ next unless defined $self -> {$macro };
536+ # pathnames can have sharp signs in them; escape them so
537+ # make doesn't think it is a comment-start character.
538+ $self -> {$macro } =~ s / #/ \\ #/ g ;
539+ $self -> {$macro } = $self -> quote_dep($self -> {$macro })
540+ if $ExtUtils::MakeMaker::macro_dep {$macro };
541+ push @m , " $macro = $self ->{$macro }\n " ;
542+ }
543+
544+ push @m , qq{
545+ \n # Dependencies info
546+ PERL_ARCHIVEDEP = $self ->{PERL_ARCHIVEDEP}
547+ } ;
548+
549+ push @m , q{
550+ # Where is the Config information that we are using/depend on
551+ CONFIGDEP = $(PERL_ARCHLIBDEP)$(DFSEP)Config.pm $(PERL_SYSROOT)$(PERL_INCDEP)$(DFSEP)config.h
552+ } if $Is {ApplCor };
553+ push @m , q{
554+ # Where is the Config information that we are using/depend on
555+ CONFIGDEP = $(PERL_ARCHLIBDEP)$(DFSEP)Config.pm $(PERL_INCDEP)$(DFSEP)config.h
556+ } if -e $self -> catfile( $self -> {PERL_INC }, ' config.h' ) && !$Is {ApplCor };
557+
558+ join ' ' , @m ;
559+ }
534560
535561=item depend (o)
536562
@@ -3946,21 +3972,24 @@ sub tool_xsubpp {
39463972
39473973
39483974 $self -> {XSPROTOARG } = " " unless defined $self -> {XSPROTOARG };
3975+ $self -> tool_xsubpp_emit($xsdir , \@tmdeps , \@tmargs );
3976+ }
3977+
3978+ sub tool_xsubpp_emit {
3979+ my ($self , $xsdir , $tmdeps , $tmargs ) = @_ ;
39493980 my $xsdirdep = $self -> quote_dep($xsdir );
39503981 # -dep for use when dependency not command
3951-
39523982 return qq{
39533983XSUBPPDIR = $xsdir
39543984XSUBPP = "\$ (XSUBPPDIR)\$ (DFSEP)xsubpp"
39553985XSUBPPRUN = \$ (PERLRUN) \$ (XSUBPP)
39563986XSPROTOARG = $self ->{XSPROTOARG}
3957- XSUBPPDEPS = @tmdeps $xsdirdep \$ (DFSEP)xsubpp
3958- XSUBPPARGS = @tmargs
3987+ XSUBPPDEPS = @$ tmdeps $xsdirdep \$ (DFSEP)xsubpp
3988+ XSUBPPARGS = @$ tmargs
39593989XSUBPP_EXTRA_ARGS =
39603990} ;
39613991}
39623992
3963-
39643993=item all_target
39653994
39663995Build man pages, too
0 commit comments