Changeset 782 for lm-sensors/trunk/mkpatch
- Timestamp:
- 03/16/00 15:29:40 (9 years ago)
- Files:
-
- lm-sensors/trunk/mkpatch/mkpatch.pl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
lm-sensors/trunk/mkpatch/mkpatch.pl
r738 r782 279 279 my $kernel_file = "Makefile"; 280 280 my $package_file = $temp; 281 my $type = 0; 282 my $pr1 = 0; 281 283 282 284 open INPUT,"$kernel_root/$kernel_file" … … 285 287 or die "Can't open $package_root/$package_file"; 286 288 MAIN: while(<INPUT>) { 287 if (m@CONFIG_SENSORS@) { 289 $type = 1 if (m@^DRIVERS-\$@); 290 if (m@DRIVERS-\$\(CONFIG_SENSORS\)@) { 291 $_ = <INPUT>; 292 redo MAIN; 293 } elsif (m@CONFIG_SENSORS@) { 288 294 $_ = <INPUT> while not m@endif@; 289 295 $_ = <INPUT>; … … 291 297 redo MAIN; 292 298 } 293 if (m@include arch/\$\(ARCH\)/Makefile@) { 299 if ($type == 1 and m@^DRIVERS \+= \$\(DRIVERS-y\)@) { 300 print OUTPUT <<'EOF'; 301 DRIVERS-$(CONFIG_SENSORS) += drivers/sensors/sensors.a 302 EOF 303 $pr1 = 1; 304 } 305 if ($type == 0 and m@include arch/\$\(ARCH\)/Makefile@) { 294 306 print OUTPUT <<'EOF'; 295 307 ifeq ($(CONFIG_SENSORS),y) … … 298 310 299 311 EOF 312 $pr1 = 1; 300 313 } 301 314 print OUTPUT; … … 303 316 close INPUT; 304 317 close OUTPUT; 318 die "Automatic patch generation for `Makefile' failed.\n". 319 "Contact the authors please!" if $pr1 == 0; 305 320 print_diff $package_root,$kernel_root,$kernel_file,$package_file; 306 321 }
