summaryrefslogtreecommitdiff
path: root/autogen.sh
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-05-17 10:24:00 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-05-17 10:24:00 +0200
commit4ecfc231b858e370cf62f7c5a0d5fb3073d25a9f (patch)
tree2591fd1539650ac55c3faa5c18f75d4776a40913 /autogen.sh
parent273da4e3d1d2a9fb10807d9300d5bac47e1e2584 (diff)
Show all available distro configs
Change-Id: Ibecd89bb12b3e488a4cf25766bd6ffe5a097f135
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh24
1 files changed, 18 insertions, 6 deletions
diff --git a/autogen.sh b/autogen.sh
index b021ccc05f29..bff17cd5b2b5 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -102,20 +102,32 @@ sub read_args($)
return @lst;
}
-sub invalid_distro($$)
+sub show_distro_configs($$)
{
- my ($config, $distro) = @_;
- print STDERR "Can't find distro option set: $config\nThis is not necessarily a problem.\n";
- print STDERR "Distros with distro option sets are:\n";
+ my ($prefix, $path) = @_;
my $dirh;
- opendir ($dirh, "$src_path/distro-configs");
+ opendir ($dirh, "$path");
while (($_ = readdir ($dirh))) {
+ if (-d "$path/$_") {
+ show_distro_configs(
+ $prefix eq "" ? "$_/" : "$prefix/$_/", "$path/$_")
+ unless $_ eq '.' || $_ eq '..';
+ next;
+ }
/(.*)\.conf$/ || next;
- print STDERR "\t$1\n";
+ print STDERR "\t$prefix$1\n";
}
closedir ($dirh);
}
+sub invalid_distro($$)
+{
+ my ($config, $distro) = @_;
+ print STDERR "Can't find distro option set: $config\nThis is not necessarily a problem.\n";
+ print STDERR "Distros with distro option sets are:\n";
+ show_distro_configs("", "$src_path/distro-configs");
+}
+
# Avoid confusing "aclocal: error: non-option arguments are not accepted: '.../m4'." error message.
die "\$src_path must not contain spaces, but it is '$src_path'." if ($src_path =~ / /);