Changeset 896

Show
Ignore:
Timestamp:
10/09/00 21:07:56 (8 years ago)
Author:
frodo
Message:

mkpatch loop solved for test9 kernels

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • lm-sensors/trunk/mkpatch/mkpatch.pl

    r867 r896  
    344344  my $pr1 = 0; 
    345345  my $pr2 = 0; 
     346  my $new_style = 0; 
    346347 
    347348  open INPUT,"$kernel_root/$kernel_file" 
     
    350351        or die "Can't open $package_root/$package_file"; 
    351352  MAIN: while(<INPUT>) { 
    352     if (m@^ALL_SUB_DIRS\s*:=@) { 
     353    if (m@^mod-subdirs\s*:=@) { 
     354      $new_style = 1; 
     355    } 
     356    if ((! $new_style and m@^ALL_SUB_DIRS\s*:=@) or m@^nid0subdirs\s*:=@) { 
    353357      $pr1 = 1; 
    354358      $sensors_present = 0; 
     
    364368      redo MAIN; 
    365369    }  
    366     if (m@CONFIG_SENSORS@) { 
     370    if (m@^ifeq.*CONFIG_SENSORS@) { 
    367371      $_ = <INPUT> while not m@^endif@; 
    368372      $_ = <INPUT>; 
     
    370374      redo MAIN; 
    371375    }  
     376    if (m@^subdir.*CONFIG_I2C@) { 
     377      $_ = <INPUT>; 
     378      redo MAIN; 
     379    } 
    372380    if (m@^include \$\(TOPDIR\)/Rules.make$@) { 
    373381      $pr2 = 1; 
     382      if ($new_style) { 
     383      print OUTPUT <<'EOF'; 
     384subdir-$(CONFIG_SENSORS)        += sensors 
     385EOF 
     386      } else { 
    374387      print OUTPUT <<'EOF'; 
    375388ifeq ($(CONFIG_SENSORS),y) 
     
    383396 
    384397EOF 
     398      } 
    385399    } 
    386400    print OUTPUT;