msvc: finally make it possible to build the full Windows package
[nasm.git] / doc / pspdf.pl
blob6d59142ac6d36ab4bdf3e9b957b1c1b8a55f78e8
1 #!/usr/bin/perl
3 # Wrapper around a variety of programs that can do PS -> PDF conversion
6 use strict;
8 my ($in, $out) = @ARGV;
10 if (!defined($out)) {
11 die "Usage: $0 infile outfile\n";
14 # Remove output file
15 unlink($out);
17 # 1. Acrobat distiller
18 my $r = system('acrodist', '-n', '-q', '--nosecurity', '-o', $out, $in);
19 exit 0 if ( !$r && -f $out );
21 # 2. ps2pdf (from Ghostscript)
22 my $r = system('ps2pdf', $in, $out);
23 exit 0 if ( !$r && -f $out );
25 # 3. pstopdf (BSD/MacOS X utility)
26 my $r = system('pstopdf', $in, '-o', $out);
27 exit 0 if ( !$r && -f $out );
29 # Otherwise, fail
30 unlink($out);
31 exit 1;