From 7a2911887959d4426b96b313f733fd3100fea593 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Sat, 18 May 2002 22:17:28 +0000 Subject: [PATCH] Use a driver Perl script to run genps.pl, since Windows Make can't handle `cat ...` --- doc/Makefile.in | 5 ++--- doc/genpsdriver.pl | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 doc/genpsdriver.pl diff --git a/doc/Makefile.in b/doc/Makefile.in index da96237..a3279e4 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -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 diff --git a/doc/genpsdriver.pl b/doc/genpsdriver.pl new file mode 100644 index 0000000..f05544a --- /dev/null +++ b/doc/genpsdriver.pl @@ -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 = ; +chomp $version; +close(VERSION); + +system($perl, "${srcdir}/genps.pl", '-subtitle', + 'version '.$version, 'nasmdoc.dip'); -- 2.7.4