aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/Makefile.in3
-rwxr-xr-xdoc/genps.pl14
2 files changed, 12 insertions, 5 deletions
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 4f957da7..2ddfd1ee 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -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
diff --git a/doc/genps.pl b/doc/genps.pl
index e3b799b5..88e57388 100755
--- a/doc/genps.pl
+++ b/doc/genps.pl
@@ -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;