This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] Let gen-libm-test.pl find itself when run outside source directory
- From: Andreas Schwab <schwab at linux-m68k dot org>
- To: libc-alpha at sourceware dot org
- Date: Mon, 27 Jan 2014 20:16:58 +0100
- Subject: [PATCH] Let gen-libm-test.pl find itself when run outside source directory
- Authentication-results: sourceware.org; auth=none
This allows gen-libm-test.pl to be run from anywhere. Committed.
Andreas.
* math/gen-libm-test.pl ($srcdir): New variable.
($auto_input): Use it.
diff --git a/math/gen-libm-test.pl b/math/gen-libm-test.pl
index d5fb278..a1c528d 100755
--- a/math/gen-libm-test.pl
+++ b/math/gen-libm-test.pl
@@ -42,7 +42,7 @@ use strict;
use vars qw ($input $output $auto_input);
use vars qw (%results);
use vars qw (%beautify @all_floats);
-use vars qw ($output_dir $ulps_file);
+use vars qw ($output_dir $ulps_file $srcdir);
use vars qw (%auto_tests);
# all_floats is sorted and contains all recognised float types
@@ -75,6 +75,7 @@ getopts('u:o:nh');
$ulps_file = 'libm-test-ulps';
$output_dir = '';
+($srcdir = $0) =~ s{[^/]*$}{};
if ($opt_h) {
print "Usage: gen-libm-test.pl [OPTIONS]\n";
@@ -89,7 +90,7 @@ $ulps_file = $opt_u if ($opt_u);
$output_dir = $opt_o if ($opt_o);
$input = "libm-test.inc";
-$auto_input = "auto-libm-test-out";
+$auto_input = "${srcdir}auto-libm-test-out";
$output = "${output_dir}libm-test.c";
&parse_ulps ($ulps_file);
--
1.8.5.3
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."