]> mj.ucw.cz Git - leo.git/blob - build/mergedeps
Updated UCW::Configure to the version from current LibUCW
[leo.git] / build / mergedeps
1 #!/usr/bin/perl
2
3 @ARGV == 2 or die "Usage: mergedeps <base> <update>";
4 foreach $a (@ARGV) {
5         open F, "$a" or next;
6         $t = "";
7         while (<F>) {
8                 $t .= $_;
9                 if (! /\\$/) {
10                         ($t =~ /^(.*):/) || die "Parse error at $t";
11                         $rules{$1} = $t;
12                         $t = "";
13                 }
14         }
15         close F;
16 }
17 open(F,">" . $ARGV[0]) || die "Unable to write output file";
18 foreach $a (sort keys %rules) {
19         print F $rules{$a};
20 }
21 close F;