Use a driver Perl script to run genps.pl, since Windows Make can't

handle `cat ...`
This commit is contained in:
H. Peter Anvin 2002-05-18 22:17:28 +00:00
parent e0372c8c05
commit 7a29118879
2 changed files with 23 additions and 3 deletions

View File

@ -37,10 +37,9 @@ nasmdoc.dip: nasmdoc.src rdsrc.pl
nasmdoc.texi: nasmdoc.dip
: Generated by side effect
nasmdoc.ps: nasmdoc.dip nasmlogo.eps ../version \
nasmdoc.ps: nasmdoc.dip nasmlogo.eps ../version genpsdriver.pl \
genps.pl psfonts.ph pswidth.ph head.ps
$(PERL) $(srcdir)/genps.pl -subtitle "version `cat ../version`" \
nasmdoc.dip > nasmdoc.ps
$(PERL) $(srcdir)/genpsdriver.pl > nasmdoc.ps
nasmdoc.pdf: nasmdoc.ps
$(PS2PDF) nasmdoc.ps nasmdoc.pdf

21
doc/genpsdriver.pl Normal file
View File

@ -0,0 +1,21 @@
#!/usr/bin/perl
#
# Runs the equivalent of the following command line:
#
# $(PERL) $(srcdir)/genps.pl -subtitle "version `cat ../version`" \
# nasmdoc.dip
#
# This is implemented as a Perl script since `cat ...` doesn't
# necessarily work on non-Unix systems.
#
$perl = $ENV{'PERL'} || 'perl';
$srcdir = $ENV{'srcdir'} || '.';
open(VERSION, '< ../version') or die "$0: cannot open ../version\n";
$version = <VERSION>;
chomp $version;
close(VERSION);
system($perl, "${srcdir}/genps.pl", '-subtitle',
'version '.$version, 'nasmdoc.dip');