New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 10134 – NEMO

Changeset 10134


Ignore:
Timestamp:
2018-09-17T15:05:46+02:00 (6 years ago)
Author:
dguibert
Message:

fcm: fix fortran interface generation with perl 5.12+

this patch applies both patches from:

Location:
vendors/FCM/lib/Fcm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • vendors/FCM/lib/Fcm/BuildSrc.pm

    r2281 r10134  
    141141        # Reference to an empty array 
    142142        $self->{$name} = []; 
    143          
     143 
    144144      } elsif ($name =~ /^(?:is_cur|pkgname|ppsrc|src)$/) { 
    145145        # Empty string 
    146146        $self->{$name} = ''; 
    147          
     147 
    148148      } elsif ($name eq 'mtime') { 
    149149        # Modification time 
    150150        $self->{$name} = (stat $self->src)[9] if $self->src; 
    151          
     151 
    152152      } elsif ($name eq 'ppmtime') { 
    153153        # Modification time 
    154154        $self->{$name} = (stat $self->ppsrc)[9] if $self->ppsrc; 
    155          
     155 
    156156      } elsif ($name eq 'type') { 
    157157        # Attempt to get the type if src is set 
     
    395395  my $self = shift(); 
    396396  if ( 
    397         uc($self->get_setting(qw/TOOL GENINTERFACE/)) ne 'NONE' 
     397        defined($self->get_setting(qw/TOOL GENINTERFACE/)) 
     398    &&  uc($self->get_setting(qw/TOOL GENINTERFACE/)) ne 'NONE' 
    398399    &&  $self->progname() 
    399400    &&  $self->is_type_all(qw/SOURCE/) 
     
    944945      }; 
    945946    } 
    946      
     947 
    947948    if ($self->interfacebase) { 
    948949      # Interface target 
     
    12171218sub is_in_package { 
    12181219  my ($self, $name) = @_; 
    1219    
     1220 
    12201221  my $return = 0; 
    12211222  for (@{ $self->pkgnames }) { 
     
    14101411 
    14111412    $mk .= $target . ':'; 
    1412      
     1413 
    14131414    if ($rule->{ACTION} eq 'AR') { 
    14141415      $mk .= ' ' . $self->rule_obj_var (1); 
  • vendors/FCM/lib/Fcm/CfgFile.pm

    r2281 r10134  
    232232    } 
    233233 
    234     if (exists $exp_inc{uc ($self->type)} and 
    235         uc ($start ? $start->label : $label) eq $self->cfglabel ('INC') and 
    236         not defined $cont) { 
     234    if (    defined($self->type()) 
     235        &&  exists($exp_inc{uc($self->type())}) 
     236        &&  uc($start ? $start->label() : $label) eq $self->cfglabel('INC') 
     237        &&  !defined($cont) 
     238    ) { 
    237239      # Current configuration file requires expansion of INC declarations 
    238240      # The start/current line is an INC declaration 
Note: See TracChangeset for help on using the changeset viewer.