Workshop o mikrokontrolérech na SKSP 2024.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
393 B

2 months ago
#!/usr/bin/perl
@ARGV == 2 or die "Usage: mergedeps <base> <update>";
foreach $a (@ARGV) {
open F, "$a" or next;
$t = "";
while (<F>) {
$t .= $_;
if (! /\\$/) {
($t =~ /^(.*):/) || die "Parse error at $t";
$rules{$1} = $t;
$t = "";
}
}
close F;
}
open(F,">" . $ARGV[0]) || die "Unable to write output file";
foreach $a (sort keys %rules) {
print F $rules{$a};
}
close F;