mirror of
https://github.com/netwide-assembler/nasm.git
synced 2024-11-21 03:14:19 +08:00
Use a driver Perl script to run genps.pl, since Windows Make can't
handle `cat ...`
This commit is contained in:
parent
e0372c8c05
commit
7a29118879
@ -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
21
doc/genpsdriver.pl
Normal 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');
|
Loading…
Reference in New Issue
Block a user