doc/genps: make sure we pick up nasmlogo.eps when building cross-dir

When building in a different directory, we still want to make sure we
pick up nasmlogo.eps.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
H. Peter Anvin 2017-04-17 01:38:41 -07:00
parent d31a74e301
commit 984c6011ba
2 changed files with 12 additions and 5 deletions

View File

@ -63,7 +63,8 @@ version.src: $(top_srcdir)/version.pl $(top_srcdir)/version
nasmdoc.ps: nasmdoc.dip genps.pl afmmetrics.ph ttfmetrics.ph \
pswidth.ph nasmlogo.eps psfonts.ph head.ps
$(PERL) $(srcdir)/genps.pl -headps $(srcdir)/head.ps nasmdoc.dip \
$(PERL) $(srcdir)/genps.pl -epsdir "$(srcdir)" \
-headps $(srcdir)/head.ps nasmdoc.dip \
> nasmdoc.ps
nasmdoc.pdf: nasmdoc.ps pspdf.pl

View File

@ -92,6 +92,10 @@ require 'findfont.ph'; # Find fonts in the system
# Canned header file
$headps = 'head.ps';
# Directories
$fontsdir = 'fonts';
$epsdir = File::Spec->curdir();
#
# Parse the command line
#
@ -107,11 +111,13 @@ while ( $arg = shift(@ARGV) ) {
$psbool{$parm} = $true;
} elsif ( $true && defined($psconf{$parm}) ) {
$psconf{$parm} = shift(@ARGV);
} elsif ( $parm =~ /^(title|subtitle|year|author|license)$/ ) {
} elsif ( $true && $parm =~ /^(title|subtitle|year|author|license)$/ ) {
$metadata{$parm} = shift(@ARGV);
} elsif ( $parm =~ /^fontsdir$/ ) {
} elsif ( $true && $parm eq 'fontsdir' ) {
$fontsdir = shift(@ARGV);
} elsif ( $parm eq 'headps' ) {
} elsif ( $true && $parm eq 'epsdir' ) {
$epsdir = shift(@ARGV);
} elsif ( $true && $parm eq 'headps' ) {
$headps = shift(@ARGV);
} else {
die "$0: Unknown option: $arg\n";
@ -1161,7 +1167,7 @@ print "sti show\n";
# and DocumentFonts in the header of the EPSF and add those to the
# global header.
if ( defined($metadata{epslogo}) &&
open(EPS, '<', $metadata{epslogo}) ) {
open(EPS, '<', File::Spec->catfile($epsdir, $metadata{epslogo})) ) {
my @eps = ();
my ($bbllx,$bblly,$bburx,$bbury) = (undef,undef,undef,undef);
my $line;