Changeset 3381

Show
Ignore:
Timestamp:
09/23/99 00:01:40 (14 years ago)
Author:
frodo
Message:

Extra safety measures for mkpatch

It now dies with an error message if it fails to generate the correct diffs,
instead of continuing silently.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • i2c/trunk/mkpatch/mkpatch.pl

    r3374 r3381  
    258258  close INPUT; 
    259259  close OUTPUT; 
     260  die "Automatic patch generation for `drivers/Makefile' failed.\n". 
     261      "Contact the authors please!" if $printed == 0; 
    260262  print_diff $package_root,$kernel_root,$kernel_file,$package_file; 
    261263} 
     
    275277  my $i2c_present; 
    276278  my $printed = 0; 
     279  my $added = 0; 
    277280 
    278281  open INPUT,"$kernel_root/$kernel_file" 
     
    282285  MAIN: while(<INPUT>) { 
    283286    if (m@^ALL_SUB_DIRS\s*:=@) { 
     287      $added = 1; 
    284288      $i2c_present = 0; 
    285289      while (m@\\$@) { 
     
    320324  close INPUT; 
    321325  close OUTPUT; 
     326  die "Automatic patch generation for `Makefile' failed.\n". 
     327      "Contact the authors please!" if $printed == 0 or $added == 0; 
    322328  print_diff $package_root,$kernel_root,$kernel_file,$package_file; 
    323329} 
     
    383389  close INPUT; 
    384390  close OUTPUT; 
     391  die "Automatic patch generation for `drivers/char/Config.in' failed.\n". 
     392      "Contact the authors please!" if $printed == 0; 
    385393  print_diff $package_root,$kernel_root,$kernel_file,$package_file; 
    386394} 
     
    403411  my $done = 0; 
    404412  my $atstart = 1; 
     413  my $pr1 = 0; 
     414  my $pr2 = 0; 
    405415 
    406416  open INPUT,"$kernel_root/$kernel_file" 
     
    423433EOF 
    424434      $atstart = 0; 
     435      $pr1 = 1; 
    425436    } 
    426437    while (not $right_place and (m@CONFIG_I2C@ or m@CONFIG_VIDEO_BT848@)) { 
     
    445456EOF 
    446457      $done = 1; 
     458      $pr2 = 1; 
    447459    } 
    448460    print OUTPUT; 
     
    450462  close INPUT; 
    451463  close OUTPUT; 
     464  die "Automatic patch generation for `drivers/char/mem.c' failed.\n". 
     465      "Contact the authors please!" if $pr1 == 0 or $pr2 == 0; 
    452466  print_diff $package_root,$kernel_root,$kernel_file,$package_file; 
    453467}