@@ -24,6 +24,7 @@ my @Prepend_parent;
24
24
my %Recognized_Att_Keys ;
25
25
our %macro_fsentity ; # whether a macro is a filesystem name
26
26
our %macro_dep ; # whether a macro is a dependency
27
+ my @children_skip ;
27
28
28
29
our $VERSION = ' 7.05_07' ;
29
30
$VERSION = eval $VERSION ; # # no critic [BuiltinFunctions::ProhibitStringyEval]
@@ -405,6 +406,11 @@ sub full_setup {
405
406
MAP_TARGET INST_MAN1DIR INST_MAN3DIR PERL_SRC
406
407
PERL FULLPERL
407
408
) ;
409
+
410
+ # in generate_makefile - EUMM's with a PARENT skip these sections
411
+ @children_skip = qw(
412
+ install dist dist_basics dist_core distdir dist_test dist_ci
413
+ ) ;
408
414
}
409
415
410
416
sub _has_cpan_meta_requirements {
488
494
);
489
495
490
496
$self -> makefile_preamble(\@ARGV , \%initial_att , \%configure_att );
491
-
492
- # turn the SKIP array into a SKIPHASH hash
493
- for my $skip (@{$self -> {SKIP } || []}) {
494
- $self -> {SKIPHASH }{$skip } = 1;
495
- }
496
- delete $self -> {SKIP }; # free memory
497
- if ($self -> {PARENT }) {
498
- for (qw/ install dist dist_basics dist_core distdir dist_test dist_ci/ ) {
499
- $self -> {SKIPHASH }{$_ } = 1;
500
- }
501
- }
502
-
503
- # We run all the subdirectories now. They don't have much to query
504
- # from the parent, but the parent has to query them: if they need linking!
505
- unless ($self -> {NORECURS }) {
506
- $self -> eval_in_subdirs if @{$self -> {DIR }};
507
- }
508
-
509
- foreach my $section ( @MM_Sections ) {
510
- # Support for new foo_target() methods.
511
- my $method = $section ;
512
- $method .= ' _target' unless $self -> can($method );
513
-
514
- print " Processing Makefile '$section ' section\n " if ($Verbose >= 2);
515
- my ($skipit ) = $self -> skipsection($section );
516
- if ($skipit ) {
517
- push @{$self -> {RESULT }}, " \n # --- MakeMaker $section section $skipit ." ;
518
- } else {
519
- my (%a ) = %{$self -> {$section } || {}};
520
- push @{$self -> {RESULT }}, " \n # --- MakeMaker $section section:" ;
521
- push @{$self -> {RESULT }}, " # " . join " , " , %a if $Verbose && %a ;
522
- push @{$self -> {RESULT }}, $self -> maketext_filter(
523
- $self -> $method ( %a )
524
- );
525
- }
526
- }
527
-
528
- push @{$self -> {RESULT }}, " \n # End." ;
497
+ $self -> generate_makefile;
529
498
530
499
$self ;
531
500
}
@@ -575,6 +544,34 @@ sub extract_ARGV {
575
544
}
576
545
}
577
546
547
+ sub generate_makefile {
548
+ my ($self ) = @_ ;
549
+ # turn the SKIP array into a SKIPHASH hash
550
+ $self -> {SKIPHASH }{$_ } = 1 for @{$self -> {SKIP } || []};
551
+ delete $self -> {SKIP }; # free memory
552
+ if ($self -> {PARENT }) { $self -> {SKIPHASH }{$_ } = 1 for @children_skip }
553
+ # We run all the subdirectories now. They don't have much to query
554
+ # from the parent, but the parent has to query them: if they need linking!
555
+ $self -> eval_in_subdirs if @{$self -> {DIR }} and not $self -> {NORECURS };
556
+ foreach my $section ( @MM_Sections ) {
557
+ print " Processing Makefile '$section ' section\n " if ($Verbose >= 2);
558
+ if ($self -> skipsection($section )){
559
+ push @{$self -> {RESULT }}, " \n # --- MakeMaker $section section skipped." ;
560
+ } else {
561
+ my (%a ) = %{$self -> {$section } || {}};
562
+ push @{$self -> {RESULT }}, " \n # --- MakeMaker $section section:" ;
563
+ push @{$self -> {RESULT }}, " # " . join " , " , %a if $Verbose && %a ;
564
+ # Support new foo_target() methods.
565
+ my $method = $section ;
566
+ $method .= ' _target' unless $self -> can($method );
567
+ push @{$self -> {RESULT }}, $self -> maketext_filter(
568
+ $self -> $method ( %a )
569
+ );
570
+ }
571
+ }
572
+ push @{$self -> {RESULT }}, " \n # End." ;
573
+ }
574
+
578
575
sub extract_PARENT {
579
576
my ($self ) = @_ ;
580
577
push @Parent , $self ;
0 commit comments