sub process {
my $file = shift;
+ my $FILE;
# normalize it
$file =~ s,//,/,g;
$name =~ s/libfreeradius-//;
$name =~ s/\.mk//;
- open(my $FILE, "<", $file) or die "Failed to open $file: $!\n";
+ #
+ # Prefer ".in" files, so that we edit the ones in source control.
+ #
+ if (open($FILE, "<$file.in")) {
+ $file .= ".in";
+
+ } else {
+ open($FILE, "<", $file) or die "Failed to open $file: $!\n";
+ }
my $line = 0;
my $log_id;
last;
}
- print "\tLOG_ID_LIB $log_id $id2name{$log_id} has $section with ID $id\n" if ($debug > 0);
+ print "\t$section=$id\n" if ($debug > 0);
#
# Define a hierarchical namespace.
}
foreach my $file (@ARGV) {
+ next if $file !~ /\.mk/;
+
process($file);
}