Changeset 551

Show
Ignore:
Timestamp:
09/10/99 20:54:12 (14 years ago)
Author:
frodo
Message:

Update in the mkpatch documentation

Location:
lm-sensors/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/doc/mkpatch

    r549 r551  
    5959find where the new code should be inserted. Each file has documented 
    6060what actually happens. 
     61 
     62One special other thing is done for each of the files specified in FILES. 
     63The include-file `compat.h' is removed from each source file, and explicit 
     64compatibility statements are added. The files are scanned for that, to 
     65see what compatibility statements are needed. In a future version, you 
     66will be able to specify which of those you want. 
  • lm-sensors/trunk/mkpatch/mkpatch.pl

    r550 r551  
    7777  open OUTPUT,">$package_root/$package_file" 
    7878        or die "Can't open $package_root/$package_file"; 
    79   while(<INPUT>) { 
    80     while (m@I2C mainboard interfaces@ or  
     79  MAIN: while(<INPUT>) { 
     80    if (m@I2C mainboard interfaces@ or  
    8181           m@Acer Labs ALI 1533 and 1543C@ or 
    8282           m@Apple Hydra Mac I/O@ or 
    83            m@Intel 82371AB PIIX4(E)@ or 
     83           m@Intel 82371AB PIIX4\(E\)@ or 
    8484           m@VIA Technologies, Inc. VT82C586B@ or 
    85            m@Pseudo ISA adapter (for hardware sensors modules)@ or 
     85           m@Pseudo ISA adapter \(for hardware sensors modules\)@ or 
    8686           m@Analog Devices ADM1021 and compatibles@ or 
    8787           m@Analog Devices ADM9240 and compatibles@ or 
     
    9292           m@Silicon Integrated Systems Corp. SiS5595@ or 
    9393           m@Winbond W83781D, W83782D and W83783S@ or 
    94            m@EEprom (DIMM) reader@ or 
     94           m@EEprom \(DIMM\) reader@ or 
    9595           m@Linear Technologies LTC1710@) { 
    9696      $_ = <INPUT>; 
    9797      $_ = <INPUT>; 
    9898      $_ = <INPUT> while not m@^\S$@ and not eof(INPUT); 
     99      redo MAIN; 
    99100    } 
    100101    if (eof(INPUT)) { 
     
    190191  open OUTPUT,">$package_root/$package_file" 
    191192        or die "Can't open $package_root/$package_file"; 
    192   while(<INPUT>) { 
     193  MAIN: while(<INPUT>) { 
    193194    if (m@CONFIG_SENSORS@) { 
    194195      $_ = <INPUT> while not m@endif@; 
    195196      $_ = <INPUT>; 
    196197      $_ = <INPUT> if m@^$@; 
     198      redo MAIN; 
    197199    } 
    198200    if (m@include arch/\$\(ARCH\)/Makefile@) { 
     
    229231  open OUTPUT,">$package_root/$package_file" 
    230232        or die "Can't open $package_root/$package_file"; 
    231   while(<INPUT>) { 
     233  MAIN: while(<INPUT>) { 
    232234    if (m@^ALL_SUB_DIRS\s*:=@) { 
    233235      $sensors_present = 0; 
     
    239241      $sensors_present = 1 if m@sensors@; 
    240242      s@$@ sensors@ if (not $sensors_present); 
     243      redo MAIN; 
    241244    }  
    242245    if (m@CONFIG_SENSORS@) { 
     
    244247      $_ = <INPUT>; 
    245248      $_ = <INPUT> if m@^$@; 
     249      redo MAIN; 
    246250    }  
    247251    if (m@^include \$\(TOPDIR\)/Rules.make$@) { 
     
    283287  open OUTPUT,">$package_root/$package_file" 
    284288        or die "Can't open $package_root/$package_file"; 
    285   while(<INPUT>) { 
     289  MAIN: while(<INPUT>) { 
    286290    if (m@source drivers/i2c/Config.in@) { 
    287291      print OUTPUT; 
    288       print OUTPUT "source drivers/sensors/Config.in\n"; 
    289       $_ = <INPUT>; 
     292      print OUTPUT "\nsource drivers/sensors/Config.in\n"; 
     293      $_ = <INPUT>; 
     294      redo MAIN; 
    290295    } 
    291296    if (m@sensors@) { 
    292297      $_ = <INPUT>; 
    293       $_ = <INPUT> if (m@^$@); 
     298      $_ = <INPUT> if m@^$@; 
     299      redo MAIN; 
    294300    } 
    295301    print OUTPUT; 
     
    321327  open OUTPUT,">$package_root/$package_file" 
    322328        or die "Can't open $package_root/$package_file"; 
    323   while(<INPUT>) { 
     329  MAIN: while(<INPUT>) { 
    324330    if ($atstart and m@#ifdef@) { 
    325331      print OUTPUT << 'EOF'; 
     
    333339      $_ = <INPUT> while not m@#endif@; 
    334340      $_ = <INPUT>; 
     341      redo MAIN; 
    335342    } 
    336343    $right_place = 1 if (m@lp_init\(\);@); 
    337344    if ($right_place and not $done and 
    338         (m@CONFIG_SENSORS@ or m@return 0;@)) { 
    339       if (not m@return 0;@) { 
    340         $_ = <INPUT> while not m@#endif@; 
    341         $_ = <INPUT>; 
    342         $_ = <INPUT> if m@^$@; 
    343       } 
     345        m@CONFIG_SENSORS@) { 
     346      $_ = <INPUT> while not m@#endif@; 
     347      $_ = <INPUT>; 
     348      $_ = <INPUT> if m@^$@; 
     349      redo MAIN; 
     350    } 
     351    if ($right_place and not $done and m@return 0;@) { 
    344352      print OUTPUT <<'EOF'; 
    345353#ifdef CONFIG_SENSORS