summaryrefslogtreecommitdiff
path: root/doc/genpsdriver.pl
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2002-05-21 04:10:57 +0000
committerH. Peter Anvin <hpa@zytor.com>2002-05-21 04:10:57 +0000
commit078d75ac6326b51977664e7cb6737cc1c381cc08 (patch)
treeb5dd459957c7d373be7d70cb2c0b20d5277170fe /doc/genpsdriver.pl
parent17799b40c049df74a5d563aae7667e618fb46953 (diff)
downloadnasm-078d75ac6326b51977664e7cb6737cc1c381cc08.tar.gz
nasm-078d75ac6326b51977664e7cb6737cc1c381cc08.tar.bz2
nasm-078d75ac6326b51977664e7cb6737cc1c381cc08.zip
Use File::Spec to try to be more system-independent...
Diffstat (limited to 'doc/genpsdriver.pl')
-rw-r--r--doc/genpsdriver.pl12
1 files changed, 9 insertions, 3 deletions
diff --git a/doc/genpsdriver.pl b/doc/genpsdriver.pl
index f05544a..eac4c98 100644
--- a/doc/genpsdriver.pl
+++ b/doc/genpsdriver.pl
@@ -9,13 +9,19 @@
# necessarily work on non-Unix systems.
#
+use File::Spec;
+use Fcntl;
+
$perl = $ENV{'PERL'} || 'perl';
$srcdir = $ENV{'srcdir'} || '.';
-open(VERSION, '< ../version') or die "$0: cannot open ../version\n";
+$versionfile = File::Spec->catfile(File::Spec->updir($srcdir), 'version');
+$genps = File::Spec->catfile($srcdir, 'genps.pl');
+
+sysopen(VERSION, $versionfile, O_RDONLY)
+ or die "$0: cannot open $versionfile\n";
$version = <VERSION>;
chomp $version;
close(VERSION);
-system($perl, "${srcdir}/genps.pl", '-subtitle',
- 'version '.$version, 'nasmdoc.dip');
+system($perl, $genps, '-subtitle', 'version '.$version, 'nasmdoc.dip');