Changeset 551
- Timestamp:
- 09/10/99 20:54:12 (14 years ago)
- Location:
- lm-sensors/trunk
- Files:
-
- 2 modified
-
doc/mkpatch (modified) (1 diff)
-
mkpatch/mkpatch.pl (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/trunk/doc/mkpatch
r549 r551 59 59 find where the new code should be inserted. Each file has documented 60 60 what actually happens. 61 62 One special other thing is done for each of the files specified in FILES. 63 The include-file `compat.h' is removed from each source file, and explicit 64 compatibility statements are added. The files are scanned for that, to 65 see what compatibility statements are needed. In a future version, you 66 will be able to specify which of those you want. -
lm-sensors/trunk/mkpatch/mkpatch.pl
r550 r551 77 77 open OUTPUT,">$package_root/$package_file" 78 78 or die "Can't open $package_root/$package_file"; 79 while(<INPUT>) {80 while(m@I2C mainboard interfaces@ or79 MAIN: while(<INPUT>) { 80 if (m@I2C mainboard interfaces@ or 81 81 m@Acer Labs ALI 1533 and 1543C@ or 82 82 m@Apple Hydra Mac I/O@ or 83 m@Intel 82371AB PIIX4 (E)@ or83 m@Intel 82371AB PIIX4\(E\)@ or 84 84 m@VIA Technologies, Inc. VT82C586B@ or 85 m@Pseudo ISA adapter (for hardware sensors modules)@ or85 m@Pseudo ISA adapter \(for hardware sensors modules\)@ or 86 86 m@Analog Devices ADM1021 and compatibles@ or 87 87 m@Analog Devices ADM9240 and compatibles@ or … … 92 92 m@Silicon Integrated Systems Corp. SiS5595@ or 93 93 m@Winbond W83781D, W83782D and W83783S@ or 94 m@EEprom (DIMM) reader@ or94 m@EEprom \(DIMM\) reader@ or 95 95 m@Linear Technologies LTC1710@) { 96 96 $_ = <INPUT>; 97 97 $_ = <INPUT>; 98 98 $_ = <INPUT> while not m@^\S$@ and not eof(INPUT); 99 redo MAIN; 99 100 } 100 101 if (eof(INPUT)) { … … 190 191 open OUTPUT,">$package_root/$package_file" 191 192 or die "Can't open $package_root/$package_file"; 192 while(<INPUT>) {193 MAIN: while(<INPUT>) { 193 194 if (m@CONFIG_SENSORS@) { 194 195 $_ = <INPUT> while not m@endif@; 195 196 $_ = <INPUT>; 196 197 $_ = <INPUT> if m@^$@; 198 redo MAIN; 197 199 } 198 200 if (m@include arch/\$\(ARCH\)/Makefile@) { … … 229 231 open OUTPUT,">$package_root/$package_file" 230 232 or die "Can't open $package_root/$package_file"; 231 while(<INPUT>) {233 MAIN: while(<INPUT>) { 232 234 if (m@^ALL_SUB_DIRS\s*:=@) { 233 235 $sensors_present = 0; … … 239 241 $sensors_present = 1 if m@sensors@; 240 242 s@$@ sensors@ if (not $sensors_present); 243 redo MAIN; 241 244 } 242 245 if (m@CONFIG_SENSORS@) { … … 244 247 $_ = <INPUT>; 245 248 $_ = <INPUT> if m@^$@; 249 redo MAIN; 246 250 } 247 251 if (m@^include \$\(TOPDIR\)/Rules.make$@) { … … 283 287 open OUTPUT,">$package_root/$package_file" 284 288 or die "Can't open $package_root/$package_file"; 285 while(<INPUT>) {289 MAIN: while(<INPUT>) { 286 290 if (m@source drivers/i2c/Config.in@) { 287 291 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; 290 295 } 291 296 if (m@sensors@) { 292 297 $_ = <INPUT>; 293 $_ = <INPUT> if (m@^$@); 298 $_ = <INPUT> if m@^$@; 299 redo MAIN; 294 300 } 295 301 print OUTPUT; … … 321 327 open OUTPUT,">$package_root/$package_file" 322 328 or die "Can't open $package_root/$package_file"; 323 while(<INPUT>) {329 MAIN: while(<INPUT>) { 324 330 if ($atstart and m@#ifdef@) { 325 331 print OUTPUT << 'EOF'; … … 333 339 $_ = <INPUT> while not m@#endif@; 334 340 $_ = <INPUT>; 341 redo MAIN; 335 342 } 336 343 $right_place = 1 if (m@lp_init\(\);@); 337 344 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;@) { 344 352 print OUTPUT <<'EOF'; 345 353 #ifdef CONFIG_SENSORS
