insns: Fixup MOV[APS|UPS] for xmmrm cases
[nasm.git] / doc / genpsdriver.pl
blob58e1f9a97ba0a10d6e6211f8269412fcc86dbf8a
1 #!/usr/bin/perl
2 ## --------------------------------------------------------------------------
3 ##
4 ## Copyright 1996-2009 The NASM Authors - All Rights Reserved
5 ## See the file AUTHORS included with the NASM distribution for
6 ## the specific copyright holders.
7 ##
8 ## Redistribution and use in source and binary forms, with or without
9 ## modification, are permitted provided that the following
10 ## conditions are met:
12 ## * Redistributions of source code must retain the above copyright
13 ## notice, this list of conditions and the following disclaimer.
14 ## * Redistributions in binary form must reproduce the above
15 ## copyright notice, this list of conditions and the following
16 ## disclaimer in the documentation and/or other materials provided
17 ## with the distribution.
18 ##
19 ## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
20 ## CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
21 ## INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
22 ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 ## DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24 ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26 ## NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27 ## LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 ## HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 ## CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
30 ## OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
31 ## EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 ## --------------------------------------------------------------------------
36 # Runs the equivalent of the following command line:
38 # $(PERL) $(srcdir)/genps.pl -subtitle "version `cat ../version`" \
39 # nasmdoc.dip
41 # This is implemented as a Perl script since `cat ...` doesn't
42 # necessarily work on non-Unix systems.
45 use File::Spec;
46 use Fcntl;
47 use Env;
49 $perl = $ENV{PERL} || 'perl';
50 $srcdir = $ENV{srcdir} || File::Spec->curdir();
52 $versionfile = File::Spec->catfile($srcdir, File::Spec->updir(), 'version');
53 $genps = File::Spec->catfile($srcdir, 'genps.pl');
55 sysopen(VERSION, $versionfile, O_RDONLY)
56 or die "$0: cannot open $versionfile\n";
57 $version = <VERSION>;
58 chomp $version;
59 close(VERSION);
61 # \240 = no-break space, see @NASMEncoding in genps.pl.
62 # If we use a normal space, it breaks on 'doze platforms...
63 system($perl, $genps, '-subtitle', "version\240".$version,
64 @ARGV, 'nasmdoc.dip');