mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-06 12:10:28 +02:00
Cleanup on preparation for lightning rework.
2012-12-01 Paulo Andrade <pcpa@gnu.org> * opcode/Makefile.am, opcode/Makefile.in, opcode/ansidecl.h, opcode/bfd.h, opcode/dis-asm.h, opcode/dis-buf.c, opcode/disass.c, opcode/i386-dis.c, opcode/i386.h, opcode/ppc-dis.c, opcode/ppc-opc.c, opcode/ppc.h, opcode/sparc-dis.c, opcode/sparc-opc.c, opcode/sparc.h, opcode/sysdep.h: Removed. Do not bundle GNU binutils files. * aclocal.m4, configure, Makefile.in, config.h.in, doc/Makefile.in, lightning/Makefile.in, tests/Makefile.in: Removed. Do not maintain autogenerated files that also generate too much diff noise when regenerated in git. * build-aux/help2man, build-aux/texinfo.tex, build-aux/texi2dvi: Removed. Buildenvironment must have an up to date version from upstream installed. * build-aux/config.guess, build-aux/config.sub, build-aux/depcomp, build-aux/install-sh build-aux/mdate-sh build-aux/missing: Removed. Do not maintain a copy of automake files in git. Release tarballs must use an up to date version. * lightningize.in, doc/lightningize.1: Removed. Do not encourage bundling lightning in other packages. It should use a system package or a proper thirdy part subdirectory. * INSTALL: Removed. Autoreconf removes it and creates a symlink when regenerating files, so, avoid conflicts in git and let automake create the symlink. * .gitignore: Add INSTALL and autogenerated files. * configure.ac, Makefile.am: Update for removal of opcode subdir, auto generated files and lightningize. * tests/Makefile.am, tests/3to2.c, tests/add.c, tests/bp.c, tests/fib.c, tests/fibdelay.c, tests/fibit.c, tests/funcfp.c, tests/incr.c, tests/printf.c, tests/rpn.c, tests/rpnfp.c, tests/sete.c, tests/testfp.c: Update for removal of opcode subdir. * doc/Makefile.am: Update for removal of lightningize. * configure.ac, lightning/ppc/funcs.h, lightning/sparc/funcs.h, lightning/i386/fp.h, lightning/i386/core.h, lightning/i386/asm.h, tests/3to2.c, tests/add.c, tests/bp.c, tests/fib.c, tests/fibdelay.c, tests/fibit.c, tests/funcfp.c, tests/incr.c, tests/printf.c, tests/rpn.c, tests/rpnfp.c, tests/sete.c, tests/testfp.c: Remove LIGHTNING_CROSS, it is half supported and incomplete. * tests/3to2.c, tests/funcfp.c, tests/rpnfp.c: Remove preprocessor check on JIT_FPR. If no hardware registers are available, the backend must provide an alternative for software float. * lightning/ppc/core.h, lightning/sparc/core.h, tests/Makefile.am: Remove JIT_NEED_PUSH_POP. It is absolutely not trivial to implement properly on some backends due to stack alignment constraints, and whenever it is required, using jit_allocai and using a properly aligned stack vector, or a heap buffer, is better. * tests/push-pop.c, tests/push-pop.ok: Removed due to JIT_NEED_PUSH_POP no longer available.
This commit is contained in:
parent
0469f165c2
commit
7d3321d696
63 changed files with 89 additions and 32671 deletions
15
.gitignore
vendored
15
.gitignore
vendored
|
@ -1,2 +1,17 @@
|
|||
+*
|
||||
autom4te.cache
|
||||
aclocal.m4
|
||||
INSTALL
|
||||
Makefile.in
|
||||
config.h.in
|
||||
configure
|
||||
build-aux/config.guess
|
||||
build-aux/config.sub
|
||||
build-aux/depcomp
|
||||
build-aux/install-sh
|
||||
build-aux/mdate-sh
|
||||
build-aux/missing
|
||||
build-aux/texinfo.tex
|
||||
doc/Makefile.in
|
||||
lightning/Makefile.in
|
||||
tests/Makefile.in
|
||||
|
|
62
ChangeLog
62
ChangeLog
|
@ -1,3 +1,65 @@
|
|||
2012-12-01 Paulo Andrade <pcpa@gnu.org>
|
||||
|
||||
* opcode/Makefile.am, opcode/Makefile.in, opcode/ansidecl.h,
|
||||
opcode/bfd.h, opcode/dis-asm.h, opcode/dis-buf.c, opcode/disass.c,
|
||||
opcode/i386-dis.c, opcode/i386.h, opcode/ppc-dis.c, opcode/ppc-opc.c,
|
||||
opcode/ppc.h, opcode/sparc-dis.c, opcode/sparc-opc.c, opcode/sparc.h,
|
||||
opcode/sysdep.h: Removed. Do not bundle GNU binutils files.
|
||||
|
||||
* aclocal.m4, configure, Makefile.in, config.h.in, doc/Makefile.in,
|
||||
lightning/Makefile.in, tests/Makefile.in: Removed. Do not maintain
|
||||
autogenerated files that also generate too much diff noise when
|
||||
regenerated in git.
|
||||
|
||||
* build-aux/help2man, build-aux/texinfo.tex, build-aux/texi2dvi:
|
||||
Removed. Buildenvironment must have an up to date version from
|
||||
upstream installed.
|
||||
|
||||
* build-aux/config.guess, build-aux/config.sub, build-aux/depcomp,
|
||||
build-aux/install-sh build-aux/mdate-sh build-aux/missing: Removed.
|
||||
Do not maintain a copy of automake files in git. Release tarballs
|
||||
must use an up to date version.
|
||||
|
||||
* lightningize.in, doc/lightningize.1: Removed. Do not encourage
|
||||
bundling lightning in other packages. It should use a system package
|
||||
or a proper thirdy part subdirectory.
|
||||
|
||||
* INSTALL: Removed. Autoreconf removes it and creates a symlink
|
||||
when regenerating files, so, avoid conflicts in git and let
|
||||
automake create the symlink.
|
||||
|
||||
* .gitignore: Add INSTALL and autogenerated files.
|
||||
|
||||
* configure.ac, Makefile.am: Update for removal of opcode subdir,
|
||||
auto generated files and lightningize.
|
||||
|
||||
* tests/Makefile.am, tests/3to2.c, tests/add.c, tests/bp.c,
|
||||
tests/fib.c, tests/fibdelay.c, tests/fibit.c, tests/funcfp.c,
|
||||
tests/incr.c, tests/printf.c, tests/rpn.c, tests/rpnfp.c,
|
||||
tests/sete.c, tests/testfp.c: Update for removal of opcode subdir.
|
||||
|
||||
* doc/Makefile.am: Update for removal of lightningize.
|
||||
|
||||
* configure.ac, lightning/ppc/funcs.h, lightning/sparc/funcs.h,
|
||||
lightning/i386/fp.h, lightning/i386/core.h, lightning/i386/asm.h,
|
||||
tests/3to2.c, tests/add.c, tests/bp.c, tests/fib.c, tests/fibdelay.c,
|
||||
tests/fibit.c, tests/funcfp.c, tests/incr.c, tests/printf.c,
|
||||
tests/rpn.c, tests/rpnfp.c, tests/sete.c, tests/testfp.c:
|
||||
Remove LIGHTNING_CROSS, it is half supported and incomplete.
|
||||
|
||||
* tests/3to2.c, tests/funcfp.c, tests/rpnfp.c: Remove preprocessor
|
||||
check on JIT_FPR. If no hardware registers are available, the backend
|
||||
must provide an alternative for software float.
|
||||
|
||||
* lightning/ppc/core.h, lightning/sparc/core.h, tests/Makefile.am:
|
||||
Remove JIT_NEED_PUSH_POP. It is absolutely not trivial to implement
|
||||
properly on some backends due to stack alignment constraints, and
|
||||
whenever it is required, using jit_allocai and using a properly
|
||||
aligned stack vector, or a heap buffer, is better.
|
||||
|
||||
* tests/push-pop.c, tests/push-pop.ok: Removed due to
|
||||
JIT_NEED_PUSH_POP no longer available.
|
||||
|
||||
2011-02-28 Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
* lightning/i386/core-64.h: Add jit_add{c,x}{i,r}_l, jit_mulr_{l,ul}_,
|
||||
|
|
229
INSTALL
229
INSTALL
|
@ -1,229 +0,0 @@
|
|||
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
|
||||
Foundation, Inc.
|
||||
|
||||
This file is free documentation; the Free Software Foundation gives
|
||||
unlimited permission to copy, distribute and modify it.
|
||||
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
These are generic installation instructions.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, and a
|
||||
file `config.log' containing compiler output (useful mainly for
|
||||
debugging `configure').
|
||||
|
||||
It can also use an optional file (typically called `config.cache'
|
||||
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||
the results of its tests to speed up reconfiguring. (Caching is
|
||||
disabled by default to prevent problems with accidental use of stale
|
||||
cache files.)
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If you are using the cache, and at
|
||||
some point `config.cache' contains results you don't want to keep, you
|
||||
may remove or edit it.
|
||||
|
||||
The file `configure.ac' (or `configure.in') is used to create
|
||||
`configure' by a program called `autoconf'. You only need
|
||||
`configure.ac' if you want to change it or regenerate `configure' using
|
||||
a newer version of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system. If you're
|
||||
using `csh' on an old version of System V, you might need to type
|
||||
`sh ./configure' instead to prevent `csh' from trying to execute
|
||||
`configure' itself.
|
||||
|
||||
Running `configure' takes awhile. While running, it prints some
|
||||
messages telling which features it is checking for.
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Optionally, type `make check' to run any self-tests that come with
|
||||
the package.
|
||||
|
||||
4. Type `make install' to install the programs and any data files and
|
||||
documentation.
|
||||
|
||||
5. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'. To also remove the
|
||||
files that `configure' created (so you can compile the package for
|
||||
a different kind of computer), type `make distclean'. There is
|
||||
also a `make maintainer-clean' target, but that is intended mainly
|
||||
for the package's developers. If you use it, you may have to get
|
||||
all sorts of other programs in order to regenerate files that came
|
||||
with the distribution.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that
|
||||
the `configure' script does not know about. Run `./configure --help'
|
||||
for details on some of the pertinent environment variables.
|
||||
|
||||
You can give `configure' initial values for configuration parameters
|
||||
by setting variables in the command line or in the environment. Here
|
||||
is an example:
|
||||
|
||||
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
|
||||
|
||||
*Note Defining Variables::, for more details.
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. To do this, you must use a version of `make' that
|
||||
supports the `VPATH' variable, such as GNU `make'. `cd' to the
|
||||
directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'.
|
||||
|
||||
If you have to use a `make' that does not support the `VPATH'
|
||||
variable, you have to compile the package for one architecture at a
|
||||
time in the source code directory. After you have installed the
|
||||
package for one architecture, use `make distclean' before reconfiguring
|
||||
for another architecture.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' will install the package's files in
|
||||
`/usr/local/bin', `/usr/local/man', etc. You can specify an
|
||||
installation prefix other than `/usr/local' by giving `configure' the
|
||||
option `--prefix=PATH'.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
give `configure' the option `--exec-prefix=PATH', the package will use
|
||||
PATH as the prefix for installing programs and libraries.
|
||||
Documentation and other data files will still use the regular prefix.
|
||||
|
||||
In addition, if you use an unusual directory layout you can give
|
||||
options like `--bindir=PATH' to specify different values for particular
|
||||
kinds of files. Run `configure --help' for a list of the directories
|
||||
you can set and what kinds of files go in them.
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
Some packages pay attention to `--enable-FEATURE' options to
|
||||
`configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
is something like `gnu-as' or `x' (for the X Window System). The
|
||||
`README' should mention any `--enable-' and `--with-' options that the
|
||||
package recognizes.
|
||||
|
||||
For packages that use the X Window System, `configure' can usually
|
||||
find the X include and library files automatically, but if it doesn't,
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' cannot figure out
|
||||
automatically, but needs to determine by the type of machine the package
|
||||
will run on. Usually, assuming the package is built to be run on the
|
||||
_same_ architectures, `configure' can figure that out, but if it prints
|
||||
a message saying it cannot guess the machine type, give it the
|
||||
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name which has the form:
|
||||
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
where SYSTEM can have one of these forms:
|
||||
|
||||
OS KERNEL-OS
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the machine type.
|
||||
|
||||
If you are _building_ compiler tools for cross-compiling, you should
|
||||
use the `--target=TYPE' option to select the type of system they will
|
||||
produce code for.
|
||||
|
||||
If you want to _use_ a cross compiler, that generates code for a
|
||||
platform different from the build platform, you should specify the
|
||||
"host" platform (i.e., that on which the generated programs will
|
||||
eventually be run) with `--host=TYPE'.
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share,
|
||||
you can create a site shell script called `config.site' that gives
|
||||
default values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Defining Variables
|
||||
==================
|
||||
|
||||
Variables not defined in a site shell script can be set in the
|
||||
environment passed to `configure'. However, some packages may run
|
||||
configure again during the build, and the customized values of these
|
||||
variables may be lost. In order to avoid this problem, you should set
|
||||
them in the `configure' command line, using `VAR=value'. For example:
|
||||
|
||||
./configure CC=/usr/local2/bin/gcc
|
||||
|
||||
will cause the specified gcc to be used as the C compiler (unless it is
|
||||
overridden in the site shell script).
|
||||
|
||||
`configure' Invocation
|
||||
======================
|
||||
|
||||
`configure' recognizes the following options to control how it
|
||||
operates.
|
||||
|
||||
`--help'
|
||||
`-h'
|
||||
Print a summary of the options to `configure', and exit.
|
||||
|
||||
`--version'
|
||||
`-V'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Enable the cache: use and save the results of the tests in FILE,
|
||||
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||
disable caching.
|
||||
|
||||
`--config-cache'
|
||||
`-C'
|
||||
Alias for `--cache-file=config.cache'.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made. To
|
||||
suppress all normal output, redirect it to `/dev/null' (any error
|
||||
messages will still be shown).
|
||||
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options. Run
|
||||
`configure --help' for more details.
|
||||
|
|
@ -2,11 +2,9 @@
|
|||
AUTOMAKE_OPTIONS = 1.8 gnu
|
||||
ACLOCAL_AMFLAGS = -I build-aux
|
||||
|
||||
SUBDIRS = . doc lightning opcode tests
|
||||
EXTRA_DIST = build-aux/texi2dvi build-aux/help2man
|
||||
SUBDIRS = . doc lightning tests
|
||||
|
||||
include_HEADERS = lightning.h
|
||||
|
||||
aclocaldir = $(datadir)/aclocal
|
||||
dist_aclocal_DATA = build-aux/lightning.m4
|
||||
bin_SCRIPTS = lightningize
|
||||
|
|
820
Makefile.in
820
Makefile.in
|
@ -1,820 +0,0 @@
|
|||
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
|
||||
# Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
|
||||
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
subdir = .
|
||||
DIST_COMMON = README $(am__configure_deps) $(dist_aclocal_DATA) \
|
||||
$(include_HEADERS) $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
|
||||
$(srcdir)/config.h.in $(srcdir)/lightningize.in \
|
||||
$(top_srcdir)/configure AUTHORS COPYING COPYING.DOC \
|
||||
COPYING.LESSER ChangeLog INSTALL NEWS THANKS \
|
||||
build-aux/config.guess build-aux/config.sub build-aux/depcomp \
|
||||
build-aux/install-sh build-aux/mdate-sh build-aux/missing \
|
||||
build-aux/texinfo.tex
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/build-aux/lightning.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
configure.lineno config.status.lineno
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = config.h
|
||||
CONFIG_CLEAN_FILES = lightningize
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(aclocaldir)" \
|
||||
"$(DESTDIR)$(includedir)"
|
||||
SCRIPTS = $(bin_SCRIPTS)
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-dvi-recursive install-exec-recursive \
|
||||
install-html-recursive install-info-recursive \
|
||||
install-pdf-recursive install-ps-recursive install-recursive \
|
||||
installcheck-recursive installdirs-recursive pdf-recursive \
|
||||
ps-recursive uninstall-recursive
|
||||
DATA = $(dist_aclocal_DATA)
|
||||
HEADERS = $(include_HEADERS)
|
||||
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||
distclean-recursive maintainer-clean-recursive
|
||||
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
|
||||
$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
|
||||
distdir dist dist-all distcheck
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
am__remove_distdir = \
|
||||
{ test ! -d "$(distdir)" \
|
||||
|| { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -fr "$(distdir)"; }; }
|
||||
am__relativize = \
|
||||
dir0=`pwd`; \
|
||||
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
|
||||
sed_rest='s,^[^/]*/*,,'; \
|
||||
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
|
||||
sed_butlast='s,/*[^/]*$$,,'; \
|
||||
while test -n "$$dir1"; do \
|
||||
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
|
||||
if test "$$first" != "."; then \
|
||||
if test "$$first" = ".."; then \
|
||||
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
|
||||
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
|
||||
else \
|
||||
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
|
||||
if test "$$first2" = "$$first"; then \
|
||||
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
|
||||
else \
|
||||
dir2="../$$dir2"; \
|
||||
fi; \
|
||||
dir0="$$dir0"/"$$first"; \
|
||||
fi; \
|
||||
fi; \
|
||||
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
|
||||
done; \
|
||||
reldir="$$dir2"
|
||||
DIST_ARCHIVES = $(distdir).tar.gz
|
||||
GZIP_ENV = --best
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BACKENDS = @BACKENDS@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EXEEXT = @EXEEXT@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_INFO = @INSTALL_INFO@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBDISASS = @LIBDISASS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
cpu = @cpu@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
# Automake requirements:
|
||||
AUTOMAKE_OPTIONS = 1.8 gnu
|
||||
ACLOCAL_AMFLAGS = -I build-aux
|
||||
SUBDIRS = . doc lightning opcode tests
|
||||
EXTRA_DIST = build-aux/texi2dvi build-aux/help2man
|
||||
include_HEADERS = lightning.h
|
||||
aclocaldir = $(datadir)/aclocal
|
||||
dist_aclocal_DATA = build-aux/lightning.m4
|
||||
bin_SCRIPTS = lightningize
|
||||
all: config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
am--refresh:
|
||||
@:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
|
||||
$(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
echo ' $(SHELL) ./config.status'; \
|
||||
$(SHELL) ./config.status;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
$(am__cd) $(srcdir) && $(AUTOCONF)
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
config.h: stamp-h1
|
||||
@if test ! -f $@; then \
|
||||
rm -f stamp-h1; \
|
||||
$(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
|
||||
else :; fi
|
||||
|
||||
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
|
||||
@rm -f stamp-h1
|
||||
cd $(top_builddir) && $(SHELL) ./config.status config.h
|
||||
$(srcdir)/config.h.in: $(am__configure_deps)
|
||||
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
|
||||
rm -f stamp-h1
|
||||
touch $@
|
||||
|
||||
distclean-hdr:
|
||||
-rm -f config.h stamp-h1
|
||||
lightningize: $(top_builddir)/config.status $(srcdir)/lightningize.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||
install-binSCRIPTS: $(bin_SCRIPTS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
|
||||
@list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
|
||||
done | \
|
||||
sed -e 'p;s,.*/,,;n' \
|
||||
-e 'h;s|.*|.|' \
|
||||
-e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
|
||||
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
|
||||
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
|
||||
if ($$2 == $$4) { files[d] = files[d] " " $$1; \
|
||||
if (++n[d] == $(am__install_max)) { \
|
||||
print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
|
||||
else { print "f", d "/" $$4, $$1 } } \
|
||||
END { for (d in files) print "f", d, files[d] }' | \
|
||||
while read type dir files; do \
|
||||
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
|
||||
test -z "$$files" || { \
|
||||
echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
|
||||
$(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
|
||||
} \
|
||||
; done
|
||||
|
||||
uninstall-binSCRIPTS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
|
||||
files=`for p in $$list; do echo "$$p"; done | \
|
||||
sed -e 's,.*/,,;$(transform)'`; \
|
||||
test -n "$$list" || exit 0; \
|
||||
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(bindir)" && rm -f $$files
|
||||
install-dist_aclocalDATA: $(dist_aclocal_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(aclocaldir)" || $(MKDIR_P) "$(DESTDIR)$(aclocaldir)"
|
||||
@list='$(dist_aclocal_DATA)'; test -n "$(aclocaldir)" || list=; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; \
|
||||
done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(aclocaldir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(aclocaldir)" || exit $$?; \
|
||||
done
|
||||
|
||||
uninstall-dist_aclocalDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(dist_aclocal_DATA)'; test -n "$(aclocaldir)" || list=; \
|
||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||
test -n "$$files" || exit 0; \
|
||||
echo " ( cd '$(DESTDIR)$(aclocaldir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(aclocaldir)" && rm -f $$files
|
||||
install-includeHEADERS: $(include_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
|
||||
@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; \
|
||||
done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
|
||||
$(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
|
||||
done
|
||||
|
||||
uninstall-includeHEADERS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
|
||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||
test -n "$$files" || exit 0; \
|
||||
echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(includedir)" && rm -f $$files
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@fail= failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
$(RECURSIVE_CLEAN_TARGETS):
|
||||
@fail= failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
$(am__remove_distdir)
|
||||
test -d "$(distdir)" || mkdir "$(distdir)"
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
|
||||
$(am__relativize); \
|
||||
new_distdir=$$reldir; \
|
||||
dir1=$$subdir; dir2="$(top_distdir)"; \
|
||||
$(am__relativize); \
|
||||
new_top_distdir=$$reldir; \
|
||||
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
|
||||
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
|
||||
($(am__cd) $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$new_top_distdir" \
|
||||
distdir="$$new_distdir" \
|
||||
am__remove_distdir=: \
|
||||
am__skip_length_check=: \
|
||||
am__skip_mode_fix=: \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
-test -n "$(am__skip_mode_fix)" \
|
||||
|| find "$(distdir)" -type d ! -perm -755 \
|
||||
-exec chmod u+rwx,go+rx {} \; -o \
|
||||
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|
||||
|| chmod -R a+r "$(distdir)"
|
||||
dist-gzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-bzip2: distdir
|
||||
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-lzma: distdir
|
||||
tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-xz: distdir
|
||||
tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-tarZ: distdir
|
||||
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-shar: distdir
|
||||
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-zip: distdir
|
||||
-rm -f $(distdir).zip
|
||||
zip -rq $(distdir).zip $(distdir)
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist dist-all: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
case '$(DIST_ARCHIVES)' in \
|
||||
*.tar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
|
||||
*.tar.bz2*) \
|
||||
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||
*.tar.lzma*) \
|
||||
lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
|
||||
*.tar.xz*) \
|
||||
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
|
||||
*.tar.Z*) \
|
||||
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||
*.shar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
|
||||
*.zip*) \
|
||||
unzip $(distdir).zip ;;\
|
||||
esac
|
||||
chmod -R a-w $(distdir); chmod a+w $(distdir)
|
||||
mkdir $(distdir)/_build
|
||||
mkdir $(distdir)/_inst
|
||||
chmod a-w $(distdir)
|
||||
test -d $(distdir)/_build || exit 0; \
|
||||
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||
&& am__cwd=`pwd` \
|
||||
&& $(am__cd) $(distdir)/_build \
|
||||
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
|
||||
distuninstallcheck \
|
||||
&& chmod -R a-w "$$dc_install_base" \
|
||||
&& ({ \
|
||||
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
|
||||
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
|
||||
} || { rm -rf "$$dc_destdir"; exit 1; }) \
|
||||
&& rm -rf "$$dc_destdir" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
||||
&& rm -rf $(DIST_ARCHIVES) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
|
||||
&& cd "$$am__cwd" \
|
||||
|| exit 1
|
||||
$(am__remove_distdir)
|
||||
@(echo "$(distdir) archives ready for distribution: "; \
|
||||
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
||||
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
|
||||
distuninstallcheck:
|
||||
@$(am__cd) '$(distuninstallcheck_dir)' \
|
||||
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|
||||
|| { echo "ERROR: files left after uninstall:" ; \
|
||||
if test -n "$(DESTDIR)"; then \
|
||||
echo " (check DESTDIR support)"; \
|
||||
fi ; \
|
||||
$(distuninstallcheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
distcleancheck: distclean
|
||||
@if test '$(srcdir)' = . ; then \
|
||||
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
|
||||
exit 1 ; \
|
||||
fi
|
||||
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left in build directory after distclean:" ; \
|
||||
$(distcleancheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile $(SCRIPTS) $(DATA) $(HEADERS) config.h
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(aclocaldir)" "$(DESTDIR)$(includedir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-hdr distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-dist_aclocalDATA install-includeHEADERS
|
||||
|
||||
install-dvi: install-dvi-recursive
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am: install-binSCRIPTS
|
||||
|
||||
install-html: install-html-recursive
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-recursive
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-recursive
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf $(top_srcdir)/autom4te.cache
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-binSCRIPTS uninstall-dist_aclocalDATA \
|
||||
uninstall-includeHEADERS
|
||||
|
||||
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \
|
||||
ctags-recursive install-am install-strip tags-recursive
|
||||
|
||||
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
|
||||
all all-am am--refresh check check-am clean clean-generic \
|
||||
ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
|
||||
dist-lzma dist-shar dist-tarZ dist-xz dist-zip distcheck \
|
||||
distclean distclean-generic distclean-hdr distclean-tags \
|
||||
distcleancheck distdir distuninstallcheck dvi dvi-am html \
|
||||
html-am info info-am install install-am install-binSCRIPTS \
|
||||
install-data install-data-am install-dist_aclocalDATA \
|
||||
install-dvi install-dvi-am install-exec install-exec-am \
|
||||
install-html install-html-am install-includeHEADERS \
|
||||
install-info install-info-am install-man install-pdf \
|
||||
install-pdf-am install-ps install-ps-am install-strip \
|
||||
installcheck installcheck-am installdirs installdirs-am \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-generic pdf pdf-am ps ps-am tags tags-recursive \
|
||||
uninstall uninstall-am uninstall-binSCRIPTS \
|
||||
uninstall-dist_aclocalDATA uninstall-includeHEADERS
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
952
aclocal.m4
vendored
952
aclocal.m4
vendored
|
@ -1,952 +0,0 @@
|
|||
# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||
# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
m4_ifndef([AC_AUTOCONF_VERSION],
|
||||
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
||||
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.64],,
|
||||
[m4_warning([this file was generated for autoconf 2.64.
|
||||
You have another version of autoconf. It may work, but is not guaranteed to.
|
||||
If you have problems, you may need to regenerate the build system entirely.
|
||||
To do so, use the procedure documented by the package, typically `autoreconf'.])])
|
||||
|
||||
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_AUTOMAKE_VERSION(VERSION)
|
||||
# ----------------------------
|
||||
# Automake X.Y traces this macro to ensure aclocal.m4 has been
|
||||
# generated from the m4 files accompanying Automake X.Y.
|
||||
# (This private macro should not be called outside this file.)
|
||||
AC_DEFUN([AM_AUTOMAKE_VERSION],
|
||||
[am__api_version='1.11'
|
||||
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
|
||||
dnl require some minimum version. Point them to the right macro.
|
||||
m4_if([$1], [1.11.1], [],
|
||||
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
|
||||
])
|
||||
|
||||
# _AM_AUTOCONF_VERSION(VERSION)
|
||||
# -----------------------------
|
||||
# aclocal traces this macro to find the Autoconf version.
|
||||
# This is a private macro too. Using m4_define simplifies
|
||||
# the logic in aclocal, which can simply ignore this definition.
|
||||
m4_define([_AM_AUTOCONF_VERSION], [])
|
||||
|
||||
# AM_SET_CURRENT_AUTOMAKE_VERSION
|
||||
# -------------------------------
|
||||
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
|
||||
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
|
||||
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
|
||||
[AM_AUTOMAKE_VERSION([1.11.1])dnl
|
||||
m4_ifndef([AC_AUTOCONF_VERSION],
|
||||
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
||||
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
|
||||
|
||||
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
|
||||
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
|
||||
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
|
||||
#
|
||||
# Of course, Automake must honor this variable whenever it calls a
|
||||
# tool from the auxiliary directory. The problem is that $srcdir (and
|
||||
# therefore $ac_aux_dir as well) can be either absolute or relative,
|
||||
# depending on how configure is run. This is pretty annoying, since
|
||||
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
|
||||
# source directory, any form will work fine, but in subdirectories a
|
||||
# relative path needs to be adjusted first.
|
||||
#
|
||||
# $ac_aux_dir/missing
|
||||
# fails when called from a subdirectory if $ac_aux_dir is relative
|
||||
# $top_srcdir/$ac_aux_dir/missing
|
||||
# fails if $ac_aux_dir is absolute,
|
||||
# fails when called from a subdirectory in a VPATH build with
|
||||
# a relative $ac_aux_dir
|
||||
#
|
||||
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
|
||||
# are both prefixed by $srcdir. In an in-source build this is usually
|
||||
# harmless because $srcdir is `.', but things will broke when you
|
||||
# start a VPATH build or use an absolute $srcdir.
|
||||
#
|
||||
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
|
||||
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
|
||||
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
|
||||
# and then we would define $MISSING as
|
||||
# MISSING="\${SHELL} $am_aux_dir/missing"
|
||||
# This will work as long as MISSING is not called from configure, because
|
||||
# unfortunately $(top_srcdir) has no meaning in configure.
|
||||
# However there are other variables, like CC, which are often used in
|
||||
# configure, and could therefore not use this "fixed" $ac_aux_dir.
|
||||
#
|
||||
# Another solution, used here, is to always expand $ac_aux_dir to an
|
||||
# absolute PATH. The drawback is that using absolute paths prevent a
|
||||
# configured tree to be moved without reconfiguration.
|
||||
|
||||
AC_DEFUN([AM_AUX_DIR_EXPAND],
|
||||
[dnl Rely on autoconf to set up CDPATH properly.
|
||||
AC_PREREQ([2.50])dnl
|
||||
# expand $ac_aux_dir to an absolute path
|
||||
am_aux_dir=`cd $ac_aux_dir && pwd`
|
||||
])
|
||||
|
||||
# AM_CONDITIONAL -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 9
|
||||
|
||||
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
|
||||
# -------------------------------------
|
||||
# Define a conditional.
|
||||
AC_DEFUN([AM_CONDITIONAL],
|
||||
[AC_PREREQ(2.52)dnl
|
||||
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
|
||||
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
|
||||
AC_SUBST([$1_TRUE])dnl
|
||||
AC_SUBST([$1_FALSE])dnl
|
||||
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
|
||||
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
|
||||
m4_define([_AM_COND_VALUE_$1], [$2])dnl
|
||||
if $2; then
|
||||
$1_TRUE=
|
||||
$1_FALSE='#'
|
||||
else
|
||||
$1_TRUE='#'
|
||||
$1_FALSE=
|
||||
fi
|
||||
AC_CONFIG_COMMANDS_PRE(
|
||||
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
|
||||
AC_MSG_ERROR([[conditional "$1" was never defined.
|
||||
Usually this means the macro was only invoked conditionally.]])
|
||||
fi])])
|
||||
|
||||
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 10
|
||||
|
||||
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
|
||||
# written in clear, in which case automake, when reading aclocal.m4,
|
||||
# will think it sees a *use*, and therefore will trigger all it's
|
||||
# C support machinery. Also note that it means that autoscan, seeing
|
||||
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
|
||||
|
||||
|
||||
# _AM_DEPENDENCIES(NAME)
|
||||
# ----------------------
|
||||
# See how the compiler implements dependency checking.
|
||||
# NAME is "CC", "CXX", "GCJ", or "OBJC".
|
||||
# We try a few techniques and use that to set a single cache variable.
|
||||
#
|
||||
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
|
||||
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
|
||||
# dependency, and given that the user is not expected to run this macro,
|
||||
# just rely on AC_PROG_CC.
|
||||
AC_DEFUN([_AM_DEPENDENCIES],
|
||||
[AC_REQUIRE([AM_SET_DEPDIR])dnl
|
||||
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
|
||||
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
|
||||
AC_REQUIRE([AM_DEP_TRACK])dnl
|
||||
|
||||
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
|
||||
[$1], CXX, [depcc="$CXX" am_compiler_list=],
|
||||
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
|
||||
[$1], UPC, [depcc="$UPC" am_compiler_list=],
|
||||
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
|
||||
[depcc="$$1" am_compiler_list=])
|
||||
|
||||
AC_CACHE_CHECK([dependency style of $depcc],
|
||||
[am_cv_$1_dependencies_compiler_type],
|
||||
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
|
||||
# We make a subdir and do the tests there. Otherwise we can end up
|
||||
# making bogus files that we don't know about and never remove. For
|
||||
# instance it was reported that on HP-UX the gcc test will end up
|
||||
# making a dummy file named `D' -- because `-MD' means `put the output
|
||||
# in D'.
|
||||
mkdir conftest.dir
|
||||
# Copy depcomp to subdir because otherwise we won't find it if we're
|
||||
# using a relative directory.
|
||||
cp "$am_depcomp" conftest.dir
|
||||
cd conftest.dir
|
||||
# We will build objects and dependencies in a subdirectory because
|
||||
# it helps to detect inapplicable dependency modes. For instance
|
||||
# both Tru64's cc and ICC support -MD to output dependencies as a
|
||||
# side effect of compilation, but ICC will put the dependencies in
|
||||
# the current directory while Tru64 will put them in the object
|
||||
# directory.
|
||||
mkdir sub
|
||||
|
||||
am_cv_$1_dependencies_compiler_type=none
|
||||
if test "$am_compiler_list" = ""; then
|
||||
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
|
||||
fi
|
||||
am__universal=false
|
||||
m4_case([$1], [CC],
|
||||
[case " $depcc " in #(
|
||||
*\ -arch\ *\ -arch\ *) am__universal=true ;;
|
||||
esac],
|
||||
[CXX],
|
||||
[case " $depcc " in #(
|
||||
*\ -arch\ *\ -arch\ *) am__universal=true ;;
|
||||
esac])
|
||||
|
||||
for depmode in $am_compiler_list; do
|
||||
# Setup a source with many dependencies, because some compilers
|
||||
# like to wrap large dependency lists on column 80 (with \), and
|
||||
# we should not choose a depcomp mode which is confused by this.
|
||||
#
|
||||
# We need to recreate these files for each test, as the compiler may
|
||||
# overwrite some of them when testing with obscure command lines.
|
||||
# This happens at least with the AIX C compiler.
|
||||
: > sub/conftest.c
|
||||
for i in 1 2 3 4 5 6; do
|
||||
echo '#include "conftst'$i'.h"' >> sub/conftest.c
|
||||
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
|
||||
# Solaris 8's {/usr,}/bin/sh.
|
||||
touch sub/conftst$i.h
|
||||
done
|
||||
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
|
||||
|
||||
# We check with `-c' and `-o' for the sake of the "dashmstdout"
|
||||
# mode. It turns out that the SunPro C++ compiler does not properly
|
||||
# handle `-M -o', and we need to detect this. Also, some Intel
|
||||
# versions had trouble with output in subdirs
|
||||
am__obj=sub/conftest.${OBJEXT-o}
|
||||
am__minus_obj="-o $am__obj"
|
||||
case $depmode in
|
||||
gcc)
|
||||
# This depmode causes a compiler race in universal mode.
|
||||
test "$am__universal" = false || continue
|
||||
;;
|
||||
nosideeffect)
|
||||
# after this tag, mechanisms are not by side-effect, so they'll
|
||||
# only be used when explicitly requested
|
||||
if test "x$enable_dependency_tracking" = xyes; then
|
||||
continue
|
||||
else
|
||||
break
|
||||
fi
|
||||
;;
|
||||
msvisualcpp | msvcmsys)
|
||||
# This compiler won't grok `-c -o', but also, the minuso test has
|
||||
# not run yet. These depmodes are late enough in the game, and
|
||||
# so weak that their functioning should not be impacted.
|
||||
am__obj=conftest.${OBJEXT-o}
|
||||
am__minus_obj=
|
||||
;;
|
||||
none) break ;;
|
||||
esac
|
||||
if depmode=$depmode \
|
||||
source=sub/conftest.c object=$am__obj \
|
||||
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
|
||||
$SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
|
||||
>/dev/null 2>conftest.err &&
|
||||
grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
|
||||
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
|
||||
grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
|
||||
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
|
||||
# icc doesn't choke on unknown options, it will just issue warnings
|
||||
# or remarks (even with -Werror). So we grep stderr for any message
|
||||
# that says an option was ignored or not supported.
|
||||
# When given -MP, icc 7.0 and 7.1 complain thusly:
|
||||
# icc: Command line warning: ignoring option '-M'; no argument required
|
||||
# The diagnosis changed in icc 8.0:
|
||||
# icc: Command line remark: option '-MP' not supported
|
||||
if (grep 'ignoring option' conftest.err ||
|
||||
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
|
||||
am_cv_$1_dependencies_compiler_type=$depmode
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
cd ..
|
||||
rm -rf conftest.dir
|
||||
else
|
||||
am_cv_$1_dependencies_compiler_type=none
|
||||
fi
|
||||
])
|
||||
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
|
||||
AM_CONDITIONAL([am__fastdep$1], [
|
||||
test "x$enable_dependency_tracking" != xno \
|
||||
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
|
||||
])
|
||||
|
||||
|
||||
# AM_SET_DEPDIR
|
||||
# -------------
|
||||
# Choose a directory name for dependency files.
|
||||
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
|
||||
AC_DEFUN([AM_SET_DEPDIR],
|
||||
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
||||
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
|
||||
])
|
||||
|
||||
|
||||
# AM_DEP_TRACK
|
||||
# ------------
|
||||
AC_DEFUN([AM_DEP_TRACK],
|
||||
[AC_ARG_ENABLE(dependency-tracking,
|
||||
[ --disable-dependency-tracking speeds up one-time build
|
||||
--enable-dependency-tracking do not reject slow dependency extractors])
|
||||
if test "x$enable_dependency_tracking" != xno; then
|
||||
am_depcomp="$ac_aux_dir/depcomp"
|
||||
AMDEPBACKSLASH='\'
|
||||
fi
|
||||
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
|
||||
AC_SUBST([AMDEPBACKSLASH])dnl
|
||||
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
|
||||
])
|
||||
|
||||
# Generate code to set up dependency tracking. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
#serial 5
|
||||
|
||||
# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||
# ------------------------------
|
||||
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||
[{
|
||||
# Autoconf 2.62 quotes --file arguments for eval, but not when files
|
||||
# are listed without --file. Let's play safe and only enable the eval
|
||||
# if we detect the quoting.
|
||||
case $CONFIG_FILES in
|
||||
*\'*) eval set x "$CONFIG_FILES" ;;
|
||||
*) set x $CONFIG_FILES ;;
|
||||
esac
|
||||
shift
|
||||
for mf
|
||||
do
|
||||
# Strip MF so we end up with the name of the file.
|
||||
mf=`echo "$mf" | sed -e 's/:.*$//'`
|
||||
# Check whether this is an Automake generated Makefile or not.
|
||||
# We used to match only the files named `Makefile.in', but
|
||||
# some people rename them; so instead we look at the file content.
|
||||
# Grep'ing the first line is not enough: some people post-process
|
||||
# each Makefile.in and add a new line on top of each file to say so.
|
||||
# Grep'ing the whole file is not good either: AIX grep has a line
|
||||
# limit of 2048, but all sed's we know have understand at least 4000.
|
||||
if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
|
||||
dirpart=`AS_DIRNAME("$mf")`
|
||||
else
|
||||
continue
|
||||
fi
|
||||
# Extract the definition of DEPDIR, am__include, and am__quote
|
||||
# from the Makefile without running `make'.
|
||||
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
|
||||
test -z "$DEPDIR" && continue
|
||||
am__include=`sed -n 's/^am__include = //p' < "$mf"`
|
||||
test -z "am__include" && continue
|
||||
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
|
||||
# When using ansi2knr, U may be empty or an underscore; expand it
|
||||
U=`sed -n 's/^U = //p' < "$mf"`
|
||||
# Find all dependency output files, they are included files with
|
||||
# $(DEPDIR) in their names. We invoke sed twice because it is the
|
||||
# simplest approach to changing $(DEPDIR) to its actual value in the
|
||||
# expansion.
|
||||
for file in `sed -n "
|
||||
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
|
||||
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
|
||||
# Make sure the directory exists.
|
||||
test -f "$dirpart/$file" && continue
|
||||
fdir=`AS_DIRNAME(["$file"])`
|
||||
AS_MKDIR_P([$dirpart/$fdir])
|
||||
# echo "creating $dirpart/$file"
|
||||
echo '# dummy' > "$dirpart/$file"
|
||||
done
|
||||
done
|
||||
}
|
||||
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||
|
||||
|
||||
# AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||
# -----------------------------
|
||||
# This macro should only be invoked once -- use via AC_REQUIRE.
|
||||
#
|
||||
# This code is only required when automatic dependency tracking
|
||||
# is enabled. FIXME. This creates each `.P' file that we will
|
||||
# need in order to bootstrap the dependency handling code.
|
||||
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||
[AC_CONFIG_COMMANDS([depfiles],
|
||||
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
|
||||
])
|
||||
|
||||
# Do all the work for Automake. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||
# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 16
|
||||
|
||||
# This macro actually does too much. Some checks are only needed if
|
||||
# your package does certain things. But this isn't really a big deal.
|
||||
|
||||
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
|
||||
# AM_INIT_AUTOMAKE([OPTIONS])
|
||||
# -----------------------------------------------
|
||||
# The call with PACKAGE and VERSION arguments is the old style
|
||||
# call (pre autoconf-2.50), which is being phased out. PACKAGE
|
||||
# and VERSION should now be passed to AC_INIT and removed from
|
||||
# the call to AM_INIT_AUTOMAKE.
|
||||
# We support both call styles for the transition. After
|
||||
# the next Automake release, Autoconf can make the AC_INIT
|
||||
# arguments mandatory, and then we can depend on a new Autoconf
|
||||
# release and drop the old call support.
|
||||
AC_DEFUN([AM_INIT_AUTOMAKE],
|
||||
[AC_PREREQ([2.62])dnl
|
||||
dnl Autoconf wants to disallow AM_ names. We explicitly allow
|
||||
dnl the ones we care about.
|
||||
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
|
||||
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
|
||||
AC_REQUIRE([AC_PROG_INSTALL])dnl
|
||||
if test "`cd $srcdir && pwd`" != "`pwd`"; then
|
||||
# Use -I$(srcdir) only when $(srcdir) != ., so that make's output
|
||||
# is not polluted with repeated "-I."
|
||||
AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
|
||||
# test to see if srcdir already configured
|
||||
if test -f $srcdir/config.status; then
|
||||
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
|
||||
fi
|
||||
fi
|
||||
|
||||
# test whether we have cygpath
|
||||
if test -z "$CYGPATH_W"; then
|
||||
if (cygpath --version) >/dev/null 2>/dev/null; then
|
||||
CYGPATH_W='cygpath -w'
|
||||
else
|
||||
CYGPATH_W=echo
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([CYGPATH_W])
|
||||
|
||||
# Define the identity of the package.
|
||||
dnl Distinguish between old-style and new-style calls.
|
||||
m4_ifval([$2],
|
||||
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
|
||||
AC_SUBST([PACKAGE], [$1])dnl
|
||||
AC_SUBST([VERSION], [$2])],
|
||||
[_AM_SET_OPTIONS([$1])dnl
|
||||
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
|
||||
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
|
||||
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
|
||||
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
|
||||
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
|
||||
|
||||
_AM_IF_OPTION([no-define],,
|
||||
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
|
||||
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
|
||||
|
||||
# Some tools Automake needs.
|
||||
AC_REQUIRE([AM_SANITY_CHECK])dnl
|
||||
AC_REQUIRE([AC_ARG_PROGRAM])dnl
|
||||
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
|
||||
AM_MISSING_PROG(AUTOCONF, autoconf)
|
||||
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
|
||||
AM_MISSING_PROG(AUTOHEADER, autoheader)
|
||||
AM_MISSING_PROG(MAKEINFO, makeinfo)
|
||||
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
|
||||
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
|
||||
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
|
||||
# We need awk for the "check" target. The system "awk" is bad on
|
||||
# some platforms.
|
||||
AC_REQUIRE([AC_PROG_AWK])dnl
|
||||
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
||||
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
||||
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
|
||||
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
|
||||
[_AM_PROG_TAR([v7])])])
|
||||
_AM_IF_OPTION([no-dependencies],,
|
||||
[AC_PROVIDE_IFELSE([AC_PROG_CC],
|
||||
[_AM_DEPENDENCIES(CC)],
|
||||
[define([AC_PROG_CC],
|
||||
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
|
||||
AC_PROVIDE_IFELSE([AC_PROG_CXX],
|
||||
[_AM_DEPENDENCIES(CXX)],
|
||||
[define([AC_PROG_CXX],
|
||||
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
|
||||
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
|
||||
[_AM_DEPENDENCIES(OBJC)],
|
||||
[define([AC_PROG_OBJC],
|
||||
defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
|
||||
])
|
||||
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
|
||||
dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
|
||||
dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
|
||||
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
|
||||
AC_CONFIG_COMMANDS_PRE(dnl
|
||||
[m4_provide_if([_AM_COMPILER_EXEEXT],
|
||||
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
|
||||
])
|
||||
|
||||
dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
|
||||
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
|
||||
dnl mangled by Autoconf and run in a shell conditional statement.
|
||||
m4_define([_AC_COMPILER_EXEEXT],
|
||||
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
|
||||
|
||||
|
||||
# When config.status generates a header, we must update the stamp-h file.
|
||||
# This file resides in the same directory as the config header
|
||||
# that is generated. The stamp files are numbered to have different names.
|
||||
|
||||
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
|
||||
# loop where config.status creates the headers, so we can generate
|
||||
# our stamp files there.
|
||||
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
|
||||
[# Compute $1's index in $config_headers.
|
||||
_am_arg=$1
|
||||
_am_stamp_count=1
|
||||
for _am_header in $config_headers :; do
|
||||
case $_am_header in
|
||||
$_am_arg | $_am_arg:* )
|
||||
break ;;
|
||||
* )
|
||||
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
|
||||
esac
|
||||
done
|
||||
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
|
||||
|
||||
# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_PROG_INSTALL_SH
|
||||
# ------------------
|
||||
# Define $install_sh.
|
||||
AC_DEFUN([AM_PROG_INSTALL_SH],
|
||||
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||
if test x"${install_sh}" != xset; then
|
||||
case $am_aux_dir in
|
||||
*\ * | *\ *)
|
||||
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
|
||||
*)
|
||||
install_sh="\${SHELL} $am_aux_dir/install-sh"
|
||||
esac
|
||||
fi
|
||||
AC_SUBST(install_sh)])
|
||||
|
||||
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 2
|
||||
|
||||
# Check whether the underlying file-system supports filenames
|
||||
# with a leading dot. For instance MS-DOS doesn't.
|
||||
AC_DEFUN([AM_SET_LEADING_DOT],
|
||||
[rm -rf .tst 2>/dev/null
|
||||
mkdir .tst 2>/dev/null
|
||||
if test -d .tst; then
|
||||
am__leading_dot=.
|
||||
else
|
||||
am__leading_dot=_
|
||||
fi
|
||||
rmdir .tst 2>/dev/null
|
||||
AC_SUBST([am__leading_dot])])
|
||||
|
||||
# Check to see how 'make' treats includes. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 4
|
||||
|
||||
# AM_MAKE_INCLUDE()
|
||||
# -----------------
|
||||
# Check to see how make treats includes.
|
||||
AC_DEFUN([AM_MAKE_INCLUDE],
|
||||
[am_make=${MAKE-make}
|
||||
cat > confinc << 'END'
|
||||
am__doit:
|
||||
@echo this is the am__doit target
|
||||
.PHONY: am__doit
|
||||
END
|
||||
# If we don't find an include directive, just comment out the code.
|
||||
AC_MSG_CHECKING([for style of include used by $am_make])
|
||||
am__include="#"
|
||||
am__quote=
|
||||
_am_result=none
|
||||
# First try GNU make style include.
|
||||
echo "include confinc" > confmf
|
||||
# Ignore all kinds of additional output from `make'.
|
||||
case `$am_make -s -f confmf 2> /dev/null` in #(
|
||||
*the\ am__doit\ target*)
|
||||
am__include=include
|
||||
am__quote=
|
||||
_am_result=GNU
|
||||
;;
|
||||
esac
|
||||
# Now try BSD make style include.
|
||||
if test "$am__include" = "#"; then
|
||||
echo '.include "confinc"' > confmf
|
||||
case `$am_make -s -f confmf 2> /dev/null` in #(
|
||||
*the\ am__doit\ target*)
|
||||
am__include=.include
|
||||
am__quote="\""
|
||||
_am_result=BSD
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
AC_SUBST([am__include])
|
||||
AC_SUBST([am__quote])
|
||||
AC_MSG_RESULT([$_am_result])
|
||||
rm -f confinc confmf
|
||||
])
|
||||
|
||||
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 6
|
||||
|
||||
# AM_MISSING_PROG(NAME, PROGRAM)
|
||||
# ------------------------------
|
||||
AC_DEFUN([AM_MISSING_PROG],
|
||||
[AC_REQUIRE([AM_MISSING_HAS_RUN])
|
||||
$1=${$1-"${am_missing_run}$2"}
|
||||
AC_SUBST($1)])
|
||||
|
||||
|
||||
# AM_MISSING_HAS_RUN
|
||||
# ------------------
|
||||
# Define MISSING if not defined so far and test if it supports --run.
|
||||
# If it does, set am_missing_run to use it, otherwise, to nothing.
|
||||
AC_DEFUN([AM_MISSING_HAS_RUN],
|
||||
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||
AC_REQUIRE_AUX_FILE([missing])dnl
|
||||
if test x"${MISSING+set}" != xset; then
|
||||
case $am_aux_dir in
|
||||
*\ * | *\ *)
|
||||
MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
|
||||
*)
|
||||
MISSING="\${SHELL} $am_aux_dir/missing" ;;
|
||||
esac
|
||||
fi
|
||||
# Use eval to expand $SHELL
|
||||
if eval "$MISSING --run true"; then
|
||||
am_missing_run="$MISSING --run "
|
||||
else
|
||||
am_missing_run=
|
||||
AC_MSG_WARN([`missing' script is too old or missing])
|
||||
fi
|
||||
])
|
||||
|
||||
# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_PROG_MKDIR_P
|
||||
# ---------------
|
||||
# Check for `mkdir -p'.
|
||||
AC_DEFUN([AM_PROG_MKDIR_P],
|
||||
[AC_PREREQ([2.60])dnl
|
||||
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
|
||||
dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
|
||||
dnl while keeping a definition of mkdir_p for backward compatibility.
|
||||
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
|
||||
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
|
||||
dnl Makefile.ins that do not define MKDIR_P, so we do our own
|
||||
dnl adjustment using top_builddir (which is defined more often than
|
||||
dnl MKDIR_P).
|
||||
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
|
||||
case $mkdir_p in
|
||||
[[\\/$]]* | ?:[[\\/]]*) ;;
|
||||
*/*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
|
||||
esac
|
||||
])
|
||||
|
||||
# Helper functions for option handling. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 4
|
||||
|
||||
# _AM_MANGLE_OPTION(NAME)
|
||||
# -----------------------
|
||||
AC_DEFUN([_AM_MANGLE_OPTION],
|
||||
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
|
||||
|
||||
# _AM_SET_OPTION(NAME)
|
||||
# ------------------------------
|
||||
# Set option NAME. Presently that only means defining a flag for this option.
|
||||
AC_DEFUN([_AM_SET_OPTION],
|
||||
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
|
||||
|
||||
# _AM_SET_OPTIONS(OPTIONS)
|
||||
# ----------------------------------
|
||||
# OPTIONS is a space-separated list of Automake options.
|
||||
AC_DEFUN([_AM_SET_OPTIONS],
|
||||
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
|
||||
|
||||
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
|
||||
# -------------------------------------------
|
||||
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
|
||||
AC_DEFUN([_AM_IF_OPTION],
|
||||
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
|
||||
|
||||
# Check to make sure that the build environment is sane. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 5
|
||||
|
||||
# AM_SANITY_CHECK
|
||||
# ---------------
|
||||
AC_DEFUN([AM_SANITY_CHECK],
|
||||
[AC_MSG_CHECKING([whether build environment is sane])
|
||||
# Just in case
|
||||
sleep 1
|
||||
echo timestamp > conftest.file
|
||||
# Reject unsafe characters in $srcdir or the absolute working directory
|
||||
# name. Accept space and tab only in the latter.
|
||||
am_lf='
|
||||
'
|
||||
case `pwd` in
|
||||
*[[\\\"\#\$\&\'\`$am_lf]]*)
|
||||
AC_MSG_ERROR([unsafe absolute working directory name]);;
|
||||
esac
|
||||
case $srcdir in
|
||||
*[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
|
||||
AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
|
||||
esac
|
||||
|
||||
# Do `set' in a subshell so we don't clobber the current shell's
|
||||
# arguments. Must try -L first in case configure is actually a
|
||||
# symlink; some systems play weird games with the mod time of symlinks
|
||||
# (eg FreeBSD returns the mod time of the symlink's containing
|
||||
# directory).
|
||||
if (
|
||||
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
|
||||
if test "$[*]" = "X"; then
|
||||
# -L didn't work.
|
||||
set X `ls -t "$srcdir/configure" conftest.file`
|
||||
fi
|
||||
rm -f conftest.file
|
||||
if test "$[*]" != "X $srcdir/configure conftest.file" \
|
||||
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
|
||||
|
||||
# If neither matched, then we have a broken ls. This can happen
|
||||
# if, for instance, CONFIG_SHELL is bash and it inherits a
|
||||
# broken ls alias from the environment. This has actually
|
||||
# happened. Such a system could not be considered "sane".
|
||||
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
|
||||
alias in your environment])
|
||||
fi
|
||||
|
||||
test "$[2]" = conftest.file
|
||||
)
|
||||
then
|
||||
# Ok.
|
||||
:
|
||||
else
|
||||
AC_MSG_ERROR([newly created file is older than distributed files!
|
||||
Check your system clock])
|
||||
fi
|
||||
AC_MSG_RESULT(yes)])
|
||||
|
||||
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_PROG_INSTALL_STRIP
|
||||
# ---------------------
|
||||
# One issue with vendor `install' (even GNU) is that you can't
|
||||
# specify the program used to strip binaries. This is especially
|
||||
# annoying in cross-compiling environments, where the build's strip
|
||||
# is unlikely to handle the host's binaries.
|
||||
# Fortunately install-sh will honor a STRIPPROG variable, so we
|
||||
# always use install-sh in `make install-strip', and initialize
|
||||
# STRIPPROG with the value of the STRIP variable (set by the user).
|
||||
AC_DEFUN([AM_PROG_INSTALL_STRIP],
|
||||
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
|
||||
# Installed binaries are usually stripped using `strip' when the user
|
||||
# run `make install-strip'. However `strip' might not be the right
|
||||
# tool to use in cross-compilation environments, therefore Automake
|
||||
# will honor the `STRIP' environment variable to overrule this program.
|
||||
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
|
||||
if test "$cross_compiling" != no; then
|
||||
AC_CHECK_TOOL([STRIP], [strip], :)
|
||||
fi
|
||||
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
|
||||
AC_SUBST([INSTALL_STRIP_PROGRAM])])
|
||||
|
||||
# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 2
|
||||
|
||||
# _AM_SUBST_NOTMAKE(VARIABLE)
|
||||
# ---------------------------
|
||||
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
|
||||
# This macro is traced by Automake.
|
||||
AC_DEFUN([_AM_SUBST_NOTMAKE])
|
||||
|
||||
# AM_SUBST_NOTMAKE(VARIABLE)
|
||||
# ---------------------------
|
||||
# Public sister of _AM_SUBST_NOTMAKE.
|
||||
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
|
||||
|
||||
# Check how to create a tarball. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 2
|
||||
|
||||
# _AM_PROG_TAR(FORMAT)
|
||||
# --------------------
|
||||
# Check how to create a tarball in format FORMAT.
|
||||
# FORMAT should be one of `v7', `ustar', or `pax'.
|
||||
#
|
||||
# Substitute a variable $(am__tar) that is a command
|
||||
# writing to stdout a FORMAT-tarball containing the directory
|
||||
# $tardir.
|
||||
# tardir=directory && $(am__tar) > result.tar
|
||||
#
|
||||
# Substitute a variable $(am__untar) that extract such
|
||||
# a tarball read from stdin.
|
||||
# $(am__untar) < result.tar
|
||||
AC_DEFUN([_AM_PROG_TAR],
|
||||
[# Always define AMTAR for backward compatibility.
|
||||
AM_MISSING_PROG([AMTAR], [tar])
|
||||
m4_if([$1], [v7],
|
||||
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
|
||||
[m4_case([$1], [ustar],, [pax],,
|
||||
[m4_fatal([Unknown tar format])])
|
||||
AC_MSG_CHECKING([how to create a $1 tar archive])
|
||||
# Loop over all known methods to create a tar archive until one works.
|
||||
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
|
||||
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
|
||||
# Do not fold the above two line into one, because Tru64 sh and
|
||||
# Solaris sh will not grok spaces in the rhs of `-'.
|
||||
for _am_tool in $_am_tools
|
||||
do
|
||||
case $_am_tool in
|
||||
gnutar)
|
||||
for _am_tar in tar gnutar gtar;
|
||||
do
|
||||
AM_RUN_LOG([$_am_tar --version]) && break
|
||||
done
|
||||
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
|
||||
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
|
||||
am__untar="$_am_tar -xf -"
|
||||
;;
|
||||
plaintar)
|
||||
# Must skip GNU tar: if it does not support --format= it doesn't create
|
||||
# ustar tarball either.
|
||||
(tar --version) >/dev/null 2>&1 && continue
|
||||
am__tar='tar chf - "$$tardir"'
|
||||
am__tar_='tar chf - "$tardir"'
|
||||
am__untar='tar xf -'
|
||||
;;
|
||||
pax)
|
||||
am__tar='pax -L -x $1 -w "$$tardir"'
|
||||
am__tar_='pax -L -x $1 -w "$tardir"'
|
||||
am__untar='pax -r'
|
||||
;;
|
||||
cpio)
|
||||
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
|
||||
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
|
||||
am__untar='cpio -i -H $1 -d'
|
||||
;;
|
||||
none)
|
||||
am__tar=false
|
||||
am__tar_=false
|
||||
am__untar=false
|
||||
;;
|
||||
esac
|
||||
|
||||
# If the value was cached, stop now. We just wanted to have am__tar
|
||||
# and am__untar set.
|
||||
test -n "${am_cv_prog_tar_$1}" && break
|
||||
|
||||
# tar/untar a dummy directory, and stop if the command works
|
||||
rm -rf conftest.dir
|
||||
mkdir conftest.dir
|
||||
echo GrepMe > conftest.dir/file
|
||||
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
|
||||
rm -rf conftest.dir
|
||||
if test -s conftest.tar; then
|
||||
AM_RUN_LOG([$am__untar <conftest.tar])
|
||||
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
|
||||
fi
|
||||
done
|
||||
rm -rf conftest.dir
|
||||
|
||||
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
|
||||
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
|
||||
AC_SUBST([am__tar])
|
||||
AC_SUBST([am__untar])
|
||||
]) # _AM_PROG_TAR
|
||||
|
||||
m4_include([build-aux/lightning.m4])
|
1450
build-aux/config.guess
vendored
1450
build-aux/config.guess
vendored
File diff suppressed because it is too large
Load diff
1552
build-aux/config.sub
vendored
1552
build-aux/config.sub
vendored
File diff suppressed because it is too large
Load diff
|
@ -1,522 +0,0 @@
|
|||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2004-05-31.23
|
||||
|
||||
# Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Run PROGRAMS ARGS to compile a file, generating dependencies
|
||||
as side-effects.
|
||||
|
||||
Environment variables:
|
||||
depmode Dependency tracking mode.
|
||||
source Source file read by `PROGRAMS ARGS'.
|
||||
object Object file output by `PROGRAMS ARGS'.
|
||||
DEPDIR directory where to store dependencies.
|
||||
depfile Dependency file to output.
|
||||
tmpdepfile Temporary file to use when outputing dependencies.
|
||||
libtool Whether libtool is used (yes/no).
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit 0
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "depcomp $scriptversion"
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
|
||||
depfile=${depfile-`echo "$object" |
|
||||
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
# here, because this file can only contain one case statement.
|
||||
if test "$depmode" = hp; then
|
||||
# HP compiler uses -M and no extra arg.
|
||||
gccflag=-M
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say).
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
gccflag=-MD,
|
||||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
||||
## The second -e expression handles DOS-style file names with drive letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the `deleted header file' problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" |
|
||||
## Some versions of gcc put a space before the `:'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
sgi)
|
||||
if test "$libtool" = yes; then
|
||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||
else
|
||||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like `#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
||||
tr '
|
||||
' ' ' >> $depfile
|
||||
echo >> $depfile
|
||||
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> $depfile
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. In older versions, this file always lives in the
|
||||
# current directory. Also, the AIX compiler puts `$object:' at the
|
||||
# start of each line; $object doesn't have directory information.
|
||||
# Version 6 uses the directory in both cases.
|
||||
stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
|
||||
tmpdepfile="$stripped.u"
|
||||
if test "$libtool" = yes; then
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
"$@" -M
|
||||
fi
|
||||
stat=$?
|
||||
|
||||
if test -f "$tmpdepfile"; then :
|
||||
else
|
||||
stripped=`echo "$stripped" | sed 's,^.*/,,'`
|
||||
tmpdepfile="$stripped.u"
|
||||
fi
|
||||
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
if test -f "$tmpdepfile"; then
|
||||
outname="$stripped.o"
|
||||
# Each line is of the form `foo.o: dependent.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
icc)
|
||||
# Intel's C compiler understands `-MD -MF file'. However on
|
||||
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
|
||||
# ICC 7.0 will fill foo.d with something like
|
||||
# foo.o: sub/foo.c
|
||||
# foo.o: sub/foo.h
|
||||
# which is wrong. We want:
|
||||
# sub/foo.o: sub/foo.c
|
||||
# sub/foo.o: sub/foo.h
|
||||
# sub/foo.c:
|
||||
# sub/foo.h:
|
||||
# ICC 7.1 will output
|
||||
# foo.o: sub/foo.c sub/foo.h
|
||||
# and will wrap long lines using \ :
|
||||
# foo.o: sub/foo.c ... \
|
||||
# sub/foo.h ... \
|
||||
# ...
|
||||
|
||||
"$@" -MD -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each line is of the form `foo.o: dependent.h',
|
||||
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
|
||||
sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in `foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
# Dependencies are output in .lo.d with libtool 1.4.
|
||||
# With libtool 1.5 they are output both in $dir.libs/$base.o.d
|
||||
# and in $dir.libs/$base.o.d and $dir$base.o.d. We process the
|
||||
# latter, because the former will be cleaned when $dir.libs is
|
||||
# erased.
|
||||
tmpdepfile1="$dir.libs/$base.lo.d"
|
||||
tmpdepfile2="$dir$base.o.d"
|
||||
tmpdepfile3="$dir.libs/$base.d"
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1="$dir$base.o.d"
|
||||
tmpdepfile2="$dir$base.d"
|
||||
tmpdepfile3="$dir$base.d"
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
if test -f "$tmpdepfile1"; then
|
||||
tmpdepfile="$tmpdepfile1"
|
||||
elif test -f "$tmpdepfile2"; then
|
||||
tmpdepfile="$tmpdepfile2"
|
||||
else
|
||||
tmpdepfile="$tmpdepfile3"
|
||||
fi
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a tab and a space in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
|
||||
dashmstdout)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
# Require at least two characters before searching for `:'
|
||||
# in the target name. This is to cope with DOS-style filenames:
|
||||
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
|
||||
"$@" $dashmflag |
|
||||
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
dashXmstdout)
|
||||
# This case only exists to satisfy depend.m4. It is never actually
|
||||
# run, as this mode is specially recognized in the preamble.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
makedepend)
|
||||
"$@" || exit $?
|
||||
# Remove any Libtool call
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
# X makedepend
|
||||
shift
|
||||
cleared=no
|
||||
for arg in "$@"; do
|
||||
case $cleared in
|
||||
no)
|
||||
set ""; shift
|
||||
cleared=yes ;;
|
||||
esac
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
# Strip any option that makedepend may not understand. Remove
|
||||
# the object too, otherwise makedepend will parse it as a source file.
|
||||
-*|$object)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
esac
|
||||
done
|
||||
obj_suffix="`echo $object | sed 's/^.*\././'`"
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
sed '1,2d' "$tmpdepfile" | tr ' ' '
|
||||
' | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
cpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
"$@" -E |
|
||||
sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
||||
sed '$ s: \\$::' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o,
|
||||
# because we must use -o when running libtool.
|
||||
"$@" || exit $?
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
||||
echo " " >> "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown depmode $depmode" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
|
@ -1,559 +0,0 @@
|
|||
#!/usr/bin/env perl
|
||||
|
||||
# Generate a short man page from --help and --version output.
|
||||
# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software
|
||||
# Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
# Written by Brendan O'Dea <bod@debian.org>
|
||||
# Available from ftp://ftp.gnu.org/gnu/help2man/
|
||||
|
||||
use 5.005;
|
||||
use strict;
|
||||
use Getopt::Long;
|
||||
use Text::Tabs qw(expand);
|
||||
use POSIX qw(strftime setlocale LC_TIME);
|
||||
|
||||
my $this_program = 'help2man';
|
||||
my $this_version = '1.28';
|
||||
my $version_info = <<EOT;
|
||||
GNU $this_program $this_version
|
||||
|
||||
Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
Written by Brendan O'Dea <bod\@debian.org>
|
||||
EOT
|
||||
|
||||
my $help_info = <<EOT;
|
||||
`$this_program' generates a man page out of `--help' and `--version' output.
|
||||
|
||||
Usage: $this_program [OPTION]... EXECUTABLE
|
||||
|
||||
-n, --name=STRING description for the NAME paragraph
|
||||
-s, --section=SECTION section number for manual page (1, 6, 8)
|
||||
-m, --manual=TEXT name of manual (User Commands, ...)
|
||||
-S, --source=TEXT source of program (FSF, Debian, ...)
|
||||
-i, --include=FILE include material from `FILE'
|
||||
-I, --opt-include=FILE include material from `FILE' if it exists
|
||||
-o, --output=FILE send output to `FILE'
|
||||
-p, --info-page=TEXT name of Texinfo manual
|
||||
-N, --no-info suppress pointer to Texinfo manual
|
||||
--help print this help, then exit
|
||||
--version print version number, then exit
|
||||
|
||||
EXECUTABLE should accept `--help' and `--version' options although
|
||||
alternatives may be specified using:
|
||||
|
||||
-h, --help-option=STRING help option string
|
||||
-v, --version-option=STRING version option string
|
||||
|
||||
Report bugs to <bug-help2man\@gnu.org>.
|
||||
EOT
|
||||
|
||||
my $section = 1;
|
||||
my $manual = '';
|
||||
my $source = '';
|
||||
my $help_option = '--help';
|
||||
my $version_option = '--version';
|
||||
my ($opt_name, @opt_include, $opt_output, $opt_info, $opt_no_info);
|
||||
|
||||
my %opt_def = (
|
||||
'n|name=s' => \$opt_name,
|
||||
's|section=s' => \$section,
|
||||
'm|manual=s' => \$manual,
|
||||
'S|source=s' => \$source,
|
||||
'i|include=s' => sub { push @opt_include, [ pop, 1 ] },
|
||||
'I|opt-include=s' => sub { push @opt_include, [ pop, 0 ] },
|
||||
'o|output=s' => \$opt_output,
|
||||
'p|info-page=s' => \$opt_info,
|
||||
'N|no-info' => \$opt_no_info,
|
||||
'h|help-option=s' => \$help_option,
|
||||
'v|version-option=s' => \$version_option,
|
||||
);
|
||||
|
||||
# Parse options.
|
||||
Getopt::Long::config('bundling');
|
||||
GetOptions (%opt_def,
|
||||
help => sub { print $help_info; exit },
|
||||
version => sub { print $version_info; exit },
|
||||
) or die $help_info;
|
||||
|
||||
die $help_info unless @ARGV == 1;
|
||||
|
||||
my %include = ();
|
||||
my %append = ();
|
||||
my @include = (); # retain order given in include file
|
||||
|
||||
# Process include file (if given). Format is:
|
||||
#
|
||||
# [section name]
|
||||
# verbatim text
|
||||
#
|
||||
# or
|
||||
#
|
||||
# /pattern/
|
||||
# verbatim text
|
||||
#
|
||||
|
||||
while (@opt_include)
|
||||
{
|
||||
my ($inc, $required) = @{shift @opt_include};
|
||||
|
||||
next unless -f $inc or $required;
|
||||
die "$this_program: can't open `$inc' ($!)\n"
|
||||
unless open INC, $inc;
|
||||
|
||||
my $key;
|
||||
my $hash = \%include;
|
||||
|
||||
while (<INC>)
|
||||
{
|
||||
# [section]
|
||||
if (/^\[([^]]+)\]/)
|
||||
{
|
||||
$key = uc $1;
|
||||
$key =~ s/^\s+//;
|
||||
$key =~ s/\s+$//;
|
||||
$hash = \%include;
|
||||
push @include, $key unless $include{$key};
|
||||
next;
|
||||
}
|
||||
|
||||
# /pattern/
|
||||
if (m!^/(.*)/([ims]*)!)
|
||||
{
|
||||
my $pat = $2 ? "(?$2)$1" : $1;
|
||||
|
||||
# Check pattern.
|
||||
eval { $key = qr($pat) };
|
||||
if ($@)
|
||||
{
|
||||
$@ =~ s/ at .*? line \d.*//;
|
||||
die "$inc:$.:$@";
|
||||
}
|
||||
|
||||
$hash = \%append;
|
||||
next;
|
||||
}
|
||||
|
||||
# Check for options before the first section--anything else is
|
||||
# silently ignored, allowing the first for comments and
|
||||
# revision info.
|
||||
unless ($key)
|
||||
{
|
||||
# handle options
|
||||
if (/^-/)
|
||||
{
|
||||
local @ARGV = split;
|
||||
GetOptions %opt_def;
|
||||
}
|
||||
|
||||
next;
|
||||
}
|
||||
|
||||
$hash->{$key} ||= '';
|
||||
$hash->{$key} .= $_;
|
||||
}
|
||||
|
||||
close INC;
|
||||
|
||||
die "$this_program: no valid information found in `$inc'\n"
|
||||
unless $key;
|
||||
}
|
||||
|
||||
# Compress trailing blank lines.
|
||||
for my $hash (\(%include, %append))
|
||||
{
|
||||
for (keys %$hash) { $hash->{$_} =~ s/\n+$/\n/ }
|
||||
}
|
||||
|
||||
# Turn off localisation of executable's ouput.
|
||||
@ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
|
||||
|
||||
# Turn off localisation of date (for strftime).
|
||||
setlocale LC_TIME, 'C';
|
||||
|
||||
# Grab help and version info from executable.
|
||||
my ($help_text, $version_text) = map {
|
||||
join '', map { s/ +$//; expand $_ } `$ARGV[0] $_ 2>/dev/null`
|
||||
or die "$this_program: can't get `$_' info from $ARGV[0]\n"
|
||||
} $help_option, $version_option;
|
||||
|
||||
my $date = strftime "%B %Y", localtime;
|
||||
(my $program = $ARGV[0]) =~ s!.*/!!;
|
||||
my $package = $program;
|
||||
my $version;
|
||||
|
||||
if ($opt_output)
|
||||
{
|
||||
unlink $opt_output
|
||||
or die "$this_program: can't unlink $opt_output ($!)\n"
|
||||
if -e $opt_output;
|
||||
|
||||
open STDOUT, ">$opt_output"
|
||||
or die "$this_program: can't create $opt_output ($!)\n";
|
||||
}
|
||||
|
||||
# The first line of the --version information is assumed to be in one
|
||||
# of the following formats:
|
||||
#
|
||||
# <version>
|
||||
# <program> <version>
|
||||
# {GNU,Free} <program> <version>
|
||||
# <program> ({GNU,Free} <package>) <version>
|
||||
# <program> - {GNU,Free} <package> <version>
|
||||
#
|
||||
# and seperated from any copyright/author details by a blank line.
|
||||
|
||||
($_, $version_text) = split /\n+/, $version_text, 2;
|
||||
|
||||
if (/^(\S+) +\(((?:GNU|Free) +[^)]+)\) +(.*)/ or
|
||||
/^(\S+) +- *((?:GNU|Free) +\S+) +(.*)/)
|
||||
{
|
||||
$program = $1;
|
||||
$package = $2;
|
||||
$version = $3;
|
||||
}
|
||||
elsif (/^((?:GNU|Free) +)?(\S+) +(.*)/)
|
||||
{
|
||||
$program = $2;
|
||||
$package = $1 ? "$1$2" : $2;
|
||||
$version = $3;
|
||||
}
|
||||
else
|
||||
{
|
||||
$version = $_;
|
||||
}
|
||||
|
||||
$program =~ s!.*/!!;
|
||||
|
||||
# No info for `info' itself.
|
||||
$opt_no_info = 1 if $program eq 'info';
|
||||
|
||||
# --name overrides --include contents.
|
||||
$include{NAME} = "$program \\- $opt_name\n" if $opt_name;
|
||||
|
||||
# Default (useless) NAME paragraph.
|
||||
$include{NAME} ||= "$program \\- manual page for $program $version\n";
|
||||
|
||||
# Man pages traditionally have the page title in caps.
|
||||
my $PROGRAM = uc $program;
|
||||
|
||||
# Set default page head/footers
|
||||
$source ||= "$program $version";
|
||||
unless ($manual)
|
||||
{
|
||||
for ($section)
|
||||
{
|
||||
if (/^(1[Mm]|8)/) { $manual = 'System Administration Utilities' }
|
||||
elsif (/^6/) { $manual = 'Games' }
|
||||
else { $manual = 'User Commands' }
|
||||
}
|
||||
}
|
||||
|
||||
# Extract usage clause(s) [if any] for SYNOPSIS.
|
||||
if ($help_text =~ s/^Usage:( +(\S+))(.*)((?:\n(?: {6}\1| *or: +\S).*)*)//m)
|
||||
{
|
||||
my @syn = $2 . $3;
|
||||
|
||||
if ($_ = $4)
|
||||
{
|
||||
s/^\n//;
|
||||
for (split /\n/) { s/^ *(or: +)?//; push @syn, $_ }
|
||||
}
|
||||
|
||||
my $synopsis = '';
|
||||
for (@syn)
|
||||
{
|
||||
$synopsis .= ".br\n" if $synopsis;
|
||||
s!^\S*/!!;
|
||||
s/^(\S+) *//;
|
||||
$synopsis .= ".B $1\n";
|
||||
s/\s+$//;
|
||||
s/(([][]|\.\.+)+)/\\fR$1\\fI/g;
|
||||
s/^/\\fI/ unless s/^\\fR//;
|
||||
$_ .= '\fR';
|
||||
s/(\\fI)( *)/$2$1/g;
|
||||
s/\\fI\\fR//g;
|
||||
s/^\\fR//;
|
||||
s/\\fI$//;
|
||||
s/^\./\\&./;
|
||||
|
||||
$synopsis .= "$_\n";
|
||||
}
|
||||
|
||||
$include{SYNOPSIS} ||= $synopsis;
|
||||
}
|
||||
|
||||
# Process text, initial section is DESCRIPTION.
|
||||
my $sect = 'DESCRIPTION';
|
||||
$_ = "$help_text\n\n$version_text";
|
||||
|
||||
# Normalise paragraph breaks.
|
||||
s/^\n+//;
|
||||
s/\n*$/\n/;
|
||||
s/\n\n+/\n\n/g;
|
||||
|
||||
# Temporarily exchange leading dots, apostrophes and backslashes for
|
||||
# tokens.
|
||||
s/^\./\x80/mg;
|
||||
s/^'/\x81/mg;
|
||||
s/\\/\x82/g;
|
||||
|
||||
# Start a new paragraph (if required) for these.
|
||||
s/([^\n])\n(Report +bugs|Email +bug +reports +to|Written +by)/$1\n\n$2/g;
|
||||
|
||||
sub convert_option;
|
||||
|
||||
while (length)
|
||||
{
|
||||
# Convert some standard paragraph names.
|
||||
if (s/^(Options|Examples): *\n//)
|
||||
{
|
||||
$sect = uc $1;
|
||||
next;
|
||||
}
|
||||
|
||||
# Copyright section
|
||||
if (/^Copyright +[(\xa9]/)
|
||||
{
|
||||
$sect = 'COPYRIGHT';
|
||||
$include{$sect} ||= '';
|
||||
$include{$sect} .= ".PP\n" if $include{$sect};
|
||||
|
||||
my $copy;
|
||||
($copy, $_) = split /\n\n/, $_, 2;
|
||||
|
||||
for ($copy)
|
||||
{
|
||||
# Add back newline
|
||||
s/\n*$/\n/;
|
||||
|
||||
# Convert iso9959-1 copyright symbol or (c) to nroff
|
||||
# character.
|
||||
s/^Copyright +(?:\xa9|\([Cc]\))/Copyright \\(co/mg;
|
||||
|
||||
# Insert line breaks before additional copyright messages
|
||||
# and the disclaimer.
|
||||
s/(.)\n(Copyright |This +is +free +software)/$1\n.br\n$2/g;
|
||||
|
||||
# Join hyphenated lines.
|
||||
s/([A-Za-z])-\n */$1/g;
|
||||
}
|
||||
|
||||
$include{$sect} .= $copy;
|
||||
$_ ||= '';
|
||||
next;
|
||||
}
|
||||
|
||||
# Catch bug report text.
|
||||
if (/^(Report +bugs|Email +bug +reports +to) /)
|
||||
{
|
||||
$sect = 'REPORTING BUGS';
|
||||
}
|
||||
|
||||
# Author section.
|
||||
elsif (/^Written +by/)
|
||||
{
|
||||
$sect = 'AUTHOR';
|
||||
}
|
||||
|
||||
# Examples, indicated by an indented leading $, % or > are
|
||||
# rendered in a constant width font.
|
||||
if (/^( +)([\$\%>] )\S/)
|
||||
{
|
||||
my $indent = $1;
|
||||
my $prefix = $2;
|
||||
my $break = '.IP';
|
||||
$include{$sect} ||= '';
|
||||
while (s/^$indent\Q$prefix\E(\S.*)\n*//)
|
||||
{
|
||||
$include{$sect} .= "$break\n\\f(CW$prefix$1\\fR\n";
|
||||
$break = '.br';
|
||||
}
|
||||
|
||||
next;
|
||||
}
|
||||
|
||||
my $matched = '';
|
||||
$include{$sect} ||= '';
|
||||
|
||||
# Sub-sections have a trailing colon and the second line indented.
|
||||
if (s/^(\S.*:) *\n / /)
|
||||
{
|
||||
$matched .= $& if %append;
|
||||
$include{$sect} .= qq(.SS "$1"\n);
|
||||
}
|
||||
|
||||
my $indent = 0;
|
||||
my $content = '';
|
||||
|
||||
# Option with description.
|
||||
if (s/^( {1,10}([+-]\S.*?))(?:( +(?!-))|\n( {20,}))(\S.*)\n//)
|
||||
{
|
||||
$matched .= $& if %append;
|
||||
$indent = length ($4 || "$1$3");
|
||||
$content = ".TP\n\x83$2\n\x83$5\n";
|
||||
unless ($4)
|
||||
{
|
||||
# Indent may be different on second line.
|
||||
$indent = length $& if /^ {20,}/;
|
||||
}
|
||||
}
|
||||
|
||||
# Option without description.
|
||||
elsif (s/^ {1,10}([+-]\S.*)\n//)
|
||||
{
|
||||
$matched .= $& if %append;
|
||||
$content = ".HP\n\x83$1\n";
|
||||
$indent = 80; # not continued
|
||||
}
|
||||
|
||||
# Indented paragraph with tag.
|
||||
elsif (s/^( +(\S.*?) +)(\S.*)\n//)
|
||||
{
|
||||
$matched .= $& if %append;
|
||||
$indent = length $1;
|
||||
$content = ".TP\n\x83$2\n\x83$3\n";
|
||||
}
|
||||
|
||||
# Indented paragraph.
|
||||
elsif (s/^( +)(\S.*)\n//)
|
||||
{
|
||||
$matched .= $& if %append;
|
||||
$indent = length $1;
|
||||
$content = ".IP\n\x83$2\n";
|
||||
}
|
||||
|
||||
# Left justified paragraph.
|
||||
else
|
||||
{
|
||||
s/(.*)\n//;
|
||||
$matched .= $& if %append;
|
||||
$content = ".PP\n" if $include{$sect};
|
||||
$content .= "$1\n";
|
||||
}
|
||||
|
||||
# Append continuations.
|
||||
while (s/^ {$indent}(\S.*)\n//)
|
||||
{
|
||||
$matched .= $& if %append;
|
||||
$content .= "\x83$1\n"
|
||||
}
|
||||
|
||||
# Move to next paragraph.
|
||||
s/^\n+//;
|
||||
|
||||
for ($content)
|
||||
{
|
||||
# Leading dot and apostrophe protection.
|
||||
s/\x83\./\x80/g;
|
||||
s/\x83'/\x81/g;
|
||||
s/\x83//g;
|
||||
|
||||
# Convert options.
|
||||
s/(^| )(-[][\w=-]+)/$1 . convert_option $2/mge;
|
||||
}
|
||||
|
||||
# Check if matched paragraph contains /pat/.
|
||||
if (%append)
|
||||
{
|
||||
for my $pat (keys %append)
|
||||
{
|
||||
if ($matched =~ $pat)
|
||||
{
|
||||
$content .= ".PP\n" unless $append{$pat} =~ /^\./;
|
||||
$content .= $append{$pat};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$include{$sect} .= $content;
|
||||
}
|
||||
|
||||
# Refer to the real documentation.
|
||||
unless ($opt_no_info)
|
||||
{
|
||||
my $info_page = $opt_info || $program;
|
||||
|
||||
$sect = 'SEE ALSO';
|
||||
$include{$sect} ||= '';
|
||||
$include{$sect} .= ".PP\n" if $include{$sect};
|
||||
$include{$sect} .= <<EOT;
|
||||
The full documentation for
|
||||
.B $program
|
||||
is maintained as a Texinfo manual. If the
|
||||
.B info
|
||||
and
|
||||
.B $program
|
||||
programs are properly installed at your site, the command
|
||||
.IP
|
||||
.B info $info_page
|
||||
.PP
|
||||
should give you access to the complete manual.
|
||||
EOT
|
||||
}
|
||||
|
||||
# Output header.
|
||||
print <<EOT;
|
||||
.\\" DO NOT MODIFY THIS FILE! It was generated by $this_program $this_version.
|
||||
.TH $PROGRAM "$section" "$date" "$source" "$manual"
|
||||
EOT
|
||||
|
||||
# Section ordering.
|
||||
my @pre = qw(NAME SYNOPSIS DESCRIPTION OPTIONS EXAMPLES);
|
||||
my @post = ('AUTHOR', 'REPORTING BUGS', 'COPYRIGHT', 'SEE ALSO');
|
||||
my $filter = join '|', @pre, @post;
|
||||
|
||||
# Output content.
|
||||
for (@pre, (grep ! /^($filter)$/o, @include), @post)
|
||||
{
|
||||
if ($include{$_})
|
||||
{
|
||||
my $quote = /\W/ ? '"' : '';
|
||||
print ".SH $quote$_$quote\n";
|
||||
|
||||
for ($include{$_})
|
||||
{
|
||||
# Replace leading dot, apostrophe and backslash tokens.
|
||||
s/\x80/\\&./g;
|
||||
s/\x81/\\&'/g;
|
||||
s/\x82/\\e/g;
|
||||
print;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
exit;
|
||||
|
||||
# Convert option dashes to \- to stop nroff from hyphenating 'em, and
|
||||
# embolden. Option arguments get italicised.
|
||||
sub convert_option
|
||||
{
|
||||
local $_ = '\fB' . shift;
|
||||
|
||||
s/-/\\-/g;
|
||||
unless (s/\[=(.*)\]$/\\fR[=\\fI$1\\fR]/)
|
||||
{
|
||||
s/=(.)/\\fR=\\fI$1/;
|
||||
s/ (.)/ \\fI$1/;
|
||||
$_ .= '\fR';
|
||||
}
|
||||
|
||||
$_;
|
||||
}
|
|
@ -1,322 +0,0 @@
|
|||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2004-07-05.00
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
# following copyright and license.
|
||||
#
|
||||
# Copyright (C) 1994 X Consortium
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the X Consortium shall not
|
||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
# ings in this Software without prior written authorization from the X Consor-
|
||||
# tium.
|
||||
#
|
||||
#
|
||||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch. It can only install one file at a time, a restriction
|
||||
# shared with many OS's install programs.
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit="${DOITPROG-}"
|
||||
|
||||
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||
|
||||
mvprog="${MVPROG-mv}"
|
||||
cpprog="${CPPROG-cp}"
|
||||
chmodprog="${CHMODPROG-chmod}"
|
||||
chownprog="${CHOWNPROG-chown}"
|
||||
chgrpprog="${CHGRPPROG-chgrp}"
|
||||
stripprog="${STRIPPROG-strip}"
|
||||
rmprog="${RMPROG-rm}"
|
||||
mkdirprog="${MKDIRPROG-mkdir}"
|
||||
|
||||
chmodcmd="$chmodprog 0755"
|
||||
chowncmd=
|
||||
chgrpcmd=
|
||||
stripcmd=
|
||||
rmcmd="$rmprog -f"
|
||||
mvcmd="$mvprog"
|
||||
src=
|
||||
dst=
|
||||
dir_arg=
|
||||
dstarg=
|
||||
no_target_directory=
|
||||
|
||||
usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||
or: $0 [OPTION]... -d DIRECTORIES...
|
||||
|
||||
In the 1st form, copy SRCFILE to DSTFILE.
|
||||
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
||||
In the 4th, create DIRECTORIES.
|
||||
|
||||
Options:
|
||||
-c (ignored)
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-s $stripprog installed files.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
--help display this help and exit.
|
||||
--version display version info and exit.
|
||||
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
|
||||
"
|
||||
|
||||
while test -n "$1"; do
|
||||
case $1 in
|
||||
-c) shift
|
||||
continue;;
|
||||
|
||||
-d) dir_arg=true
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
--help) echo "$usage"; exit 0;;
|
||||
|
||||
-m) chmodcmd="$chmodprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-s) stripcmd=$stripprog
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-t) dstarg=$2
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-T) no_target_directory=true
|
||||
shift
|
||||
continue;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit 0;;
|
||||
|
||||
*) # When -d is used, all remaining arguments are directories to create.
|
||||
# When -t is used, the destination is already specified.
|
||||
test -n "$dir_arg$dstarg" && break
|
||||
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||
for arg
|
||||
do
|
||||
if test -n "$dstarg"; then
|
||||
# $@ is not empty: it contains at least $arg.
|
||||
set fnord "$@" "$dstarg"
|
||||
shift # fnord
|
||||
fi
|
||||
shift # arg
|
||||
dstarg=$arg
|
||||
done
|
||||
break;;
|
||||
esac
|
||||
done
|
||||
|
||||
if test -z "$1"; then
|
||||
if test -z "$dir_arg"; then
|
||||
echo "$0: no input file specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
# It's OK to call `install-sh -d' without argument.
|
||||
# This can happen when creating conditional directories.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
for src
|
||||
do
|
||||
# Protect names starting with `-'.
|
||||
case $src in
|
||||
-*) src=./$src ;;
|
||||
esac
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
dst=$src
|
||||
src=
|
||||
|
||||
if test -d "$dst"; then
|
||||
mkdircmd=:
|
||||
chmodcmd=
|
||||
else
|
||||
mkdircmd=$mkdirprog
|
||||
fi
|
||||
else
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
if test ! -f "$src" && test ! -d "$src"; then
|
||||
echo "$0: $src does not exist." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$dstarg"; then
|
||||
echo "$0: no destination specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
dst=$dstarg
|
||||
# Protect names starting with `-'.
|
||||
case $dst in
|
||||
-*) dst=./$dst ;;
|
||||
esac
|
||||
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
if test -d "$dst"; then
|
||||
if test -n "$no_target_directory"; then
|
||||
echo "$0: $dstarg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dst=$dst/`basename "$src"`
|
||||
fi
|
||||
fi
|
||||
|
||||
# This sed command emulates the dirname command.
|
||||
dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
||||
|
||||
# Make sure that the destination directory exists.
|
||||
|
||||
# Skip lots of stat calls in the usual case.
|
||||
if test ! -d "$dstdir"; then
|
||||
defaultIFS='
|
||||
'
|
||||
IFS="${IFS-$defaultIFS}"
|
||||
|
||||
oIFS=$IFS
|
||||
# Some sh's can't handle IFS=/ for some reason.
|
||||
IFS='%'
|
||||
set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||
IFS=$oIFS
|
||||
|
||||
pathcomp=
|
||||
|
||||
while test $# -ne 0 ; do
|
||||
pathcomp=$pathcomp$1
|
||||
shift
|
||||
if test ! -d "$pathcomp"; then
|
||||
$mkdirprog "$pathcomp"
|
||||
# mkdir can fail with a `File exist' error in case several
|
||||
# install-sh are creating the directory concurrently. This
|
||||
# is OK.
|
||||
test -d "$pathcomp" || exit
|
||||
fi
|
||||
pathcomp=$pathcomp/
|
||||
done
|
||||
fi
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
$doit $mkdircmd "$dst" \
|
||||
&& { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
|
||||
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
|
||||
&& { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
|
||||
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
|
||||
|
||||
else
|
||||
dstfile=`basename "$dst"`
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
|
||||
trap '(exit $?); exit' 1 2 13 15
|
||||
|
||||
# Copy the file name to the temp name.
|
||||
$doit $cpprog "$src" "$dsttmp" &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits.
|
||||
#
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
||||
#
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
|
||||
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
|
||||
&& { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
|
||||
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
{ $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
|
||||
|| {
|
||||
# The rename failed, perhaps because mv can't rename something else
|
||||
# to itself, or perhaps because mv is so ancient that it does not
|
||||
# support -f.
|
||||
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
if test -f "$dstdir/$dstfile"; then
|
||||
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
|
||||
|| $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
|
||||
|| {
|
||||
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
|
||||
(exit 1); exit
|
||||
}
|
||||
else
|
||||
:
|
||||
fi
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
|
||||
}
|
||||
}
|
||||
fi || { (exit 1); exit; }
|
||||
done
|
||||
|
||||
# The final little trick to "correctly" pass the exit status to the exit trap.
|
||||
{
|
||||
(exit 0); exit
|
||||
}
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
|
@ -1,170 +0,0 @@
|
|||
#!/bin/sh
|
||||
# Get modification time of a file or directory and pretty-print it.
|
||||
|
||||
scriptversion=2003-11-09.00
|
||||
|
||||
# Copyright (C) 1995, 1996, 1997, 2003 Free Software Foundation, Inc.
|
||||
# written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, June 1995
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No file. Try \`$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: mdate-sh [--help] [--version] FILE
|
||||
|
||||
Pretty-print the modification time of FILE.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit 0
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "mdate-sh $scriptversion"
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
# Prevent date giving response in another language.
|
||||
LANG=C
|
||||
export LANG
|
||||
LC_ALL=C
|
||||
export LC_ALL
|
||||
LC_TIME=C
|
||||
export LC_TIME
|
||||
|
||||
save_arg1="$1"
|
||||
|
||||
# Find out how to get the extended ls output of a file or directory.
|
||||
if ls -L /dev/null 1>/dev/null 2>&1; then
|
||||
ls_command='ls -L -l -d'
|
||||
else
|
||||
ls_command='ls -l -d'
|
||||
fi
|
||||
|
||||
# A `ls -l' line looks as follows on OS/2.
|
||||
# drwxrwx--- 0 Aug 11 2001 foo
|
||||
# This differs from Unix, which adds ownership information.
|
||||
# drwxrwx--- 2 root root 4096 Aug 11 2001 foo
|
||||
#
|
||||
# To find the date, we split the line on spaces and iterate on words
|
||||
# until we find a month. This cannot work with files whose owner is a
|
||||
# user named `Jan', or `Feb', etc. However, it's unlikely that `/'
|
||||
# will be owned by a user whose name is a month. So we first look at
|
||||
# the extended ls output of the root directory to decide how many
|
||||
# words should be skipped to get the date.
|
||||
|
||||
# On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below.
|
||||
set - x`$ls_command /`
|
||||
|
||||
# Find which argument is the month.
|
||||
month=
|
||||
command=
|
||||
until test $month
|
||||
do
|
||||
shift
|
||||
# Add another shift to the command.
|
||||
command="$command shift;"
|
||||
case $1 in
|
||||
Jan) month=January; nummonth=1;;
|
||||
Feb) month=February; nummonth=2;;
|
||||
Mar) month=March; nummonth=3;;
|
||||
Apr) month=April; nummonth=4;;
|
||||
May) month=May; nummonth=5;;
|
||||
Jun) month=June; nummonth=6;;
|
||||
Jul) month=July; nummonth=7;;
|
||||
Aug) month=August; nummonth=8;;
|
||||
Sep) month=September; nummonth=9;;
|
||||
Oct) month=October; nummonth=10;;
|
||||
Nov) month=November; nummonth=11;;
|
||||
Dec) month=December; nummonth=12;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Get the extended ls output of the file or directory.
|
||||
set - x`eval "$ls_command \"\$save_arg1\""`
|
||||
|
||||
# Remove all preceding arguments
|
||||
eval $command
|
||||
|
||||
# Get the month. Next argument is day, followed by the year or time.
|
||||
case $1 in
|
||||
Jan) month=January; nummonth=1;;
|
||||
Feb) month=February; nummonth=2;;
|
||||
Mar) month=March; nummonth=3;;
|
||||
Apr) month=April; nummonth=4;;
|
||||
May) month=May; nummonth=5;;
|
||||
Jun) month=June; nummonth=6;;
|
||||
Jul) month=July; nummonth=7;;
|
||||
Aug) month=August; nummonth=8;;
|
||||
Sep) month=September; nummonth=9;;
|
||||
Oct) month=October; nummonth=10;;
|
||||
Nov) month=November; nummonth=11;;
|
||||
Dec) month=December; nummonth=12;;
|
||||
esac
|
||||
|
||||
day=$2
|
||||
|
||||
# Here we have to deal with the problem that the ls output gives either
|
||||
# the time of day or the year.
|
||||
case $3 in
|
||||
*:*) set `date`; eval year=\$$#
|
||||
case $2 in
|
||||
Jan) nummonthtod=1;;
|
||||
Feb) nummonthtod=2;;
|
||||
Mar) nummonthtod=3;;
|
||||
Apr) nummonthtod=4;;
|
||||
May) nummonthtod=5;;
|
||||
Jun) nummonthtod=6;;
|
||||
Jul) nummonthtod=7;;
|
||||
Aug) nummonthtod=8;;
|
||||
Sep) nummonthtod=9;;
|
||||
Oct) nummonthtod=10;;
|
||||
Nov) nummonthtod=11;;
|
||||
Dec) nummonthtod=12;;
|
||||
esac
|
||||
# For the first six month of the year the time notation can also
|
||||
# be used for files modified in the last year.
|
||||
if (expr $nummonth \> $nummonthtod) > /dev/null;
|
||||
then
|
||||
year=`expr $year - 1`
|
||||
fi;;
|
||||
*) year=$3;;
|
||||
esac
|
||||
|
||||
# The result.
|
||||
echo $day $month $year
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
|
@ -1,360 +0,0 @@
|
|||
#! /bin/sh
|
||||
# Common stub for a few missing GNU programs while installing.
|
||||
|
||||
scriptversion=2003-09-02.23
|
||||
|
||||
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003
|
||||
# Free Software Foundation, Inc.
|
||||
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
run=:
|
||||
|
||||
# In the cases where this matters, `missing' is being run in the
|
||||
# srcdir already.
|
||||
if test -f configure.ac; then
|
||||
configure_ac=configure.ac
|
||||
else
|
||||
configure_ac=configure.in
|
||||
fi
|
||||
|
||||
msg="missing on your system"
|
||||
|
||||
case "$1" in
|
||||
--run)
|
||||
# Try to run requested program, and just exit if it succeeds.
|
||||
run=
|
||||
shift
|
||||
"$@" && exit 0
|
||||
# Exit code 63 means version mismatch. This often happens
|
||||
# when the user try to use an ancient version of a tool on
|
||||
# a file that requires a minimum version. In this case we
|
||||
# we should proceed has if the program had been absent, or
|
||||
# if --run hadn't been passed.
|
||||
if test $? = 63; then
|
||||
run=:
|
||||
msg="probably too old"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# If it does not exist, or fails to run (possibly an outdated version),
|
||||
# try to emulate it.
|
||||
case "$1" in
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
||||
error status if there is no known handling for PROGRAM.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
--run try to run the given command, and emulate it if it fails
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal touch file \`aclocal.m4'
|
||||
autoconf touch file \`configure'
|
||||
autoheader touch file \`config.h.in'
|
||||
automake touch all \`Makefile.in' files
|
||||
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
flex create \`lex.yy.c', if possible, from existing .c
|
||||
help2man touch the output file
|
||||
lex create \`lex.yy.c', if possible, from existing .c
|
||||
makeinfo touch the output file
|
||||
tar try tar, gnutar, gtar, then tar without non-portable flags
|
||||
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
|
||||
Send bug reports to <bug-automake@gnu.org>."
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing $scriptversion (GNU Automake)"
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: Unknown \`$1' option"
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
aclocal*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
|
||||
to install the \`Automake' and \`Perl' packages. Grab them from
|
||||
any GNU archive site."
|
||||
touch aclocal.m4
|
||||
;;
|
||||
|
||||
autoconf)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`${configure_ac}'. You might want to install the
|
||||
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
|
||||
archive site."
|
||||
touch configure
|
||||
;;
|
||||
|
||||
autoheader)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`acconfig.h' or \`${configure_ac}'. You might want
|
||||
to install the \`Autoconf' and \`GNU m4' packages. Grab them
|
||||
from any GNU archive site."
|
||||
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
|
||||
test -z "$files" && files="config.h"
|
||||
touch_files=
|
||||
for f in $files; do
|
||||
case "$f" in
|
||||
*:*) touch_files="$touch_files "`echo "$f" |
|
||||
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
||||
*) touch_files="$touch_files $f.in";;
|
||||
esac
|
||||
done
|
||||
touch $touch_files
|
||||
;;
|
||||
|
||||
automake*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
|
||||
You might want to install the \`Automake' and \`Perl' packages.
|
||||
Grab them from any GNU archive site."
|
||||
find . -type f -name Makefile.am -print |
|
||||
sed 's/\.am$/.in/' |
|
||||
while read f; do touch "$f"; done
|
||||
;;
|
||||
|
||||
autom4te)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, but is $msg.
|
||||
You might have modified some files without having the
|
||||
proper tools for further handling them.
|
||||
You can get \`$1' as part of \`Autoconf' from any GNU
|
||||
archive site."
|
||||
|
||||
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
|
||||
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo "#! /bin/sh"
|
||||
echo "# Created by GNU Automake missing as a replacement of"
|
||||
echo "# $ $@"
|
||||
echo "exit 0"
|
||||
chmod +x $file
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
bison|yacc)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' $msg. You should only need it if
|
||||
you modified a \`.y' file. You may need the \`Bison' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Bison' from any GNU archive site."
|
||||
rm -f y.tab.c y.tab.h
|
||||
if [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.y)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.c
|
||||
fi
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.h
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f y.tab.h ]; then
|
||||
echo >y.tab.h
|
||||
fi
|
||||
if [ ! -f y.tab.c ]; then
|
||||
echo 'main() { return 0; }' >y.tab.c
|
||||
fi
|
||||
;;
|
||||
|
||||
lex|flex)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a \`.l' file. You may need the \`Flex' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Flex' from any GNU archive site."
|
||||
rm -f lex.yy.c
|
||||
if [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.l)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" lex.yy.c
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f lex.yy.c ]; then
|
||||
echo 'main() { return 0; }' >lex.yy.c
|
||||
fi
|
||||
;;
|
||||
|
||||
help2man)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a dependency of a manual page. You may need the
|
||||
\`Help2man' package in order for those modifications to take
|
||||
effect. You can get \`Help2man' from any GNU archive site."
|
||||
|
||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||
if test -z "$file"; then
|
||||
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
|
||||
fi
|
||||
if [ -f "$file" ]; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo ".ab help2man is required to generate this page"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
makeinfo)
|
||||
if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
|
||||
# We have makeinfo, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a \`.texi' or \`.texinfo' file, or any other file
|
||||
indirectly affecting the aspect of the manual. The spurious
|
||||
call might also be the consequence of using a buggy \`make' (AIX,
|
||||
DU, IRIX). You might want to install the \`Texinfo' package or
|
||||
the \`GNU make' package. Grab either from any GNU archive site."
|
||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||
if test -z "$file"; then
|
||||
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
||||
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
|
||||
fi
|
||||
touch $file
|
||||
;;
|
||||
|
||||
tar)
|
||||
shift
|
||||
if test -n "$run"; then
|
||||
echo 1>&2 "ERROR: \`tar' requires --run"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# We have already tried tar in the generic part.
|
||||
# Look for gnutar/gtar before invocation to avoid ugly error
|
||||
# messages.
|
||||
if (gnutar --version > /dev/null 2>&1); then
|
||||
gnutar "$@" && exit 0
|
||||
fi
|
||||
if (gtar --version > /dev/null 2>&1); then
|
||||
gtar "$@" && exit 0
|
||||
fi
|
||||
firstarg="$1"
|
||||
if shift; then
|
||||
case "$firstarg" in
|
||||
*o*)
|
||||
firstarg=`echo "$firstarg" | sed s/o//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
case "$firstarg" in
|
||||
*h*)
|
||||
firstarg=`echo "$firstarg" | sed s/h//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: I can't seem to be able to run \`tar' with the given arguments.
|
||||
You may want to install GNU tar or Free paxutils, or check the
|
||||
command line arguments."
|
||||
exit 1
|
||||
;;
|
||||
|
||||
*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and is $msg.
|
||||
You might have modified some files without having the
|
||||
proper tools for further handling them. Check the \`README' file,
|
||||
it often tells you about the needed prerequisites for installing
|
||||
this package. You may also peek at any GNU archive site, in case
|
||||
some other package would contain this missing \`$1' program."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
|
@ -1,660 +0,0 @@
|
|||
#! /bin/sh
|
||||
# texi2dvi --- produce DVI (or PDF) files from Texinfo (or LaTeX) sources.
|
||||
# $Id: texi2dvi,v 1.1.1.1 2004/03/03 12:51:44 bonzini Exp $
|
||||
#
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001,
|
||||
# 2002, 2003 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, you can either send email to this
|
||||
# program's maintainer or write to: The Free Software Foundation,
|
||||
# Inc.; 51 Franklin Street, Fifth Floor; Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# Original author: Noah Friedman <friedman@gnu.org>.
|
||||
#
|
||||
# Please send bug reports, etc. to bug-texinfo@gnu.org.
|
||||
# If possible, please send a copy of the output of the script called with
|
||||
# the `--debug' option when making a bug report.
|
||||
|
||||
# This string is expanded by rcs automatically when this file is checked out.
|
||||
rcs_revision='$Revision: 1.1.1.1 $'
|
||||
rcs_version=`set - $rcs_revision; echo $2`
|
||||
program=`echo $0 | sed -e 's!.*/!!'`
|
||||
version="texi2dvi (GNU Texinfo 4.5) $rcs_version
|
||||
|
||||
Copyright (C) 2003 Free Software Foundation, Inc.
|
||||
There is NO warranty. You may redistribute this software
|
||||
under the terms of the GNU General Public License.
|
||||
For more information about these matters, see the files named COPYING."
|
||||
|
||||
usage="Usage: $program [OPTION]... FILE...
|
||||
|
||||
Run each Texinfo or LaTeX FILE through TeX in turn until all
|
||||
cross-references are resolved, building all indices. The directory
|
||||
containing each FILE is searched for included files. The suffix of FILE
|
||||
is used to determine its language (LaTeX or Texinfo).
|
||||
|
||||
Makeinfo is used to perform Texinfo macro expansion before running TeX
|
||||
when needed.
|
||||
|
||||
Operation modes:
|
||||
-b, --batch no interaction
|
||||
-c, --clean remove all auxiliary files
|
||||
-D, --debug turn on shell debugging (set -x)
|
||||
-h, --help display this help and exit successfully
|
||||
-o, --output=OFILE leave output in OFILE (implies --clean);
|
||||
Only one input FILE may be specified in this case
|
||||
-q, --quiet no output unless errors (implies --batch)
|
||||
-s, --silent same as --quiet
|
||||
-v, --version display version information and exit successfully
|
||||
-V, --verbose report on what is done
|
||||
|
||||
TeX tuning:
|
||||
-@ use @input instead of \input; for preloaded Texinfo
|
||||
-e, -E, --expand force macro expansion using makeinfo
|
||||
-I DIR search DIR for Texinfo files
|
||||
-l, --language=LANG specify the LANG of FILE (LaTeX or Texinfo)
|
||||
-p, --pdf use pdftex or pdflatex for processing
|
||||
-t, --texinfo=CMD insert CMD after @setfilename in copy of input file
|
||||
multiple values accumulate
|
||||
|
||||
The values of the BIBTEX, LATEX (or PDFLATEX), MAKEINDEX, MAKEINFO,
|
||||
TEX (or PDFTEX), and TEXINDEX environment variables are used to run
|
||||
those commands, if they are set.
|
||||
|
||||
Email bug reports to <bug-texinfo@gnu.org>,
|
||||
general questions and discussion to <help-texinfo@gnu.org>.
|
||||
Texinfo home page: http://www.gnu.org/software/texinfo/"
|
||||
|
||||
# Initialize variables for option overriding and otherwise.
|
||||
# Don't use `unset' since old bourne shells don't have this command.
|
||||
# Instead, assign them an empty value.
|
||||
batch=false # eval for batch mode
|
||||
clean=
|
||||
debug=
|
||||
escape='\'
|
||||
expand= # t for expansion via makeinfo
|
||||
miincludes= # makeinfo include path
|
||||
oformat=dvi
|
||||
oname= # --output
|
||||
quiet= # by default let the tools' message be displayed
|
||||
set_language=
|
||||
textra=
|
||||
tmpdir=${TMPDIR:-/tmp}/t2d$$ # avoid collisions on 8.3 filesystems.
|
||||
txincludes= # TEXINPUTS extensions, with trailing colon
|
||||
txiprereq=19990129 # minimum texinfo.tex version to have macro expansion
|
||||
verbose=false # echo for verbose mode
|
||||
|
||||
orig_pwd=`pwd`
|
||||
|
||||
# Systems which define $COMSPEC or $ComSpec use semicolons to separate
|
||||
# directories in TEXINPUTS.
|
||||
if test -n "$COMSPEC$ComSpec"; then
|
||||
path_sep=";"
|
||||
else
|
||||
path_sep=":"
|
||||
fi
|
||||
|
||||
# Pacify verbose cds.
|
||||
CDPATH=${ZSH_VERSION+.}$path_sep
|
||||
|
||||
# In case someone crazy insists on using grep -E.
|
||||
: ${EGREP=egrep}
|
||||
|
||||
# Save this so we can construct a new TEXINPUTS path for each file.
|
||||
TEXINPUTS_orig="$TEXINPUTS"
|
||||
# Unfortunately makeindex does not read TEXINPUTS.
|
||||
INDEXSTYLE_orig="$INDEXSTYLE"
|
||||
export TEXINPUTS INDEXSTYLE
|
||||
|
||||
# Push a token among the arguments that will be used to notice when we
|
||||
# ended options/arguments parsing.
|
||||
# Use "set dummy ...; shift" rather than 'set - ..." because on
|
||||
# Solaris set - turns off set -x (but keeps set -e).
|
||||
# Use ${1+"$@"} rather than "$@" because Digital Unix and Ultrix 4.3
|
||||
# still expand "$@" to a single argument (the empty string) rather
|
||||
# than nothing at all.
|
||||
arg_sep="$$--$$"
|
||||
set dummy ${1+"$@"} "$arg_sep"; shift
|
||||
|
||||
#
|
||||
# Parse command line arguments.
|
||||
while test x"$1" != x"$arg_sep"; do
|
||||
|
||||
# Handle --option=value by splitting apart and putting back on argv.
|
||||
case "$1" in
|
||||
--*=*)
|
||||
opt=`echo "$1" | sed -e 's/=.*//'`
|
||||
val=`echo "$1" | sed -e 's/[^=]*=//'`
|
||||
shift
|
||||
set dummy "$opt" "$val" ${1+"$@"}; shift
|
||||
;;
|
||||
esac
|
||||
|
||||
# This recognizes --quark as --quiet. So what.
|
||||
case "$1" in
|
||||
-@ ) escape=@;;
|
||||
# Silently and without documentation accept -b and --b[atch] as synonyms.
|
||||
-b | --b*) batch=eval;;
|
||||
-q | -s | --q* | --s*) quiet=t; batch=eval;;
|
||||
-c | --c*) clean=t;;
|
||||
-D | --d*) debug=t;;
|
||||
-e | -E | --e*) expand=t;;
|
||||
-h | --h*) echo "$usage"; exit 0;;
|
||||
-I | --I*)
|
||||
shift
|
||||
miincludes="$miincludes -I $1"
|
||||
txincludes="$txincludes$1$path_sep"
|
||||
;;
|
||||
-l | --l*) shift; set_language=$1;;
|
||||
-o | --o*)
|
||||
shift
|
||||
clean=t
|
||||
case "$1" in
|
||||
/* | ?:/*) oname=$1;;
|
||||
*) oname="$orig_pwd/$1";;
|
||||
esac;;
|
||||
-p | --p*) oformat=pdf;;
|
||||
-t | --t*) shift; textra="$textra\\
|
||||
$1";;
|
||||
-v | --vers*) echo "$version"; exit 0;;
|
||||
-V | --verb*) verbose=echo;;
|
||||
--) # What remains are not options.
|
||||
shift
|
||||
while test x"$1" != x"$arg_sep"; do
|
||||
set dummy ${1+"$@"} "$1"; shift
|
||||
shift
|
||||
done
|
||||
break;;
|
||||
-*)
|
||||
echo "$0: Unknown or ambiguous option \`$1'." >&2
|
||||
echo "$0: Try \`--help' for more information." >&2
|
||||
exit 1;;
|
||||
*) set dummy ${1+"$@"} "$1"; shift;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
# Pop the token
|
||||
shift
|
||||
|
||||
# Interpret remaining command line args as filenames.
|
||||
case $# in
|
||||
0)
|
||||
echo "$0: Missing file arguments." >&2
|
||||
echo "$0: Try \`--help' for more information." >&2
|
||||
exit 2
|
||||
;;
|
||||
1) ;;
|
||||
*)
|
||||
if test -n "$oname"; then
|
||||
echo "$0: Can't use option \`--output' with more than one argument." >&2
|
||||
exit 2
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# Prepare the temporary directory. Remove it at exit, unless debugging.
|
||||
if test -z "$debug"; then
|
||||
trap "cd / && rm -rf $tmpdir" 0 1 2 15
|
||||
fi
|
||||
|
||||
# Create the temporary directory with strict rights
|
||||
(umask 077 && mkdir $tmpdir) || exit 1
|
||||
|
||||
# Prepare the tools we might need. This may be extra work in some
|
||||
# cases, but improves the readibility of the script.
|
||||
utildir=$tmpdir/utils
|
||||
mkdir $utildir || exit 1
|
||||
|
||||
# A sed script that preprocesses Texinfo sources in order to keep the
|
||||
# iftex sections only. We want to remove non TeX sections, and
|
||||
# comment (with `@c texi2dvi') TeX sections so that makeinfo does not
|
||||
# try to parse them. Nevertheless, while commenting TeX sections,
|
||||
# don't comment @macro/@end macro so that makeinfo does propagate
|
||||
# them. Unfortunately makeinfo --iftex --no-ifhtml --no-ifinfo
|
||||
# doesn't work well enough (yet) to use that, so work around with sed.
|
||||
comment_iftex_sed=$utildir/comment.sed
|
||||
cat <<EOF >$comment_iftex_sed
|
||||
/^@tex/,/^@end tex/{
|
||||
s/^/@c texi2dvi/
|
||||
}
|
||||
/^@iftex/,/^@end iftex/{
|
||||
s/^/@c texi2dvi/
|
||||
/^@c texi2dvi@macro/,/^@c texi2dvi@end macro/{
|
||||
s/^@c texi2dvi//
|
||||
}
|
||||
}
|
||||
/^@html/,/^@end html/{
|
||||
s/^/@c (texi2dvi)/
|
||||
}
|
||||
/^@ifhtml/,/^@end ifhtml/{
|
||||
s/^/@c (texi2dvi)/
|
||||
}
|
||||
/^@ifnottex/,/^@end ifnottex/{
|
||||
s/^/@c (texi2dvi)/
|
||||
}
|
||||
/^@ifinfo/,/^@end ifinfo/{
|
||||
/^@node/p
|
||||
/^@menu/,/^@end menu/p
|
||||
t
|
||||
s/^/@c (texi2dvi)/
|
||||
}
|
||||
s/^@ifnotinfo/@c texi2dvi@ifnotinfo/
|
||||
s/^@end ifnotinfo/@c texi2dvi@end ifnotinfo/
|
||||
EOF
|
||||
# Uncommenting is simple: Remove any leading `@c texi2dvi'.
|
||||
uncomment_iftex_sed=$utildir/uncomment.sed
|
||||
cat <<EOF >$uncomment_iftex_sed
|
||||
s/^@c texi2dvi//
|
||||
EOF
|
||||
|
||||
# A shell script that computes the list of xref files.
|
||||
# Takes the filename (without extension) of which we look for xref
|
||||
# files as argument. The index files must be reported last.
|
||||
get_xref_files=$utildir/get_xref.sh
|
||||
cat <<\EOF >$get_xref_files
|
||||
#! /bin/sh
|
||||
|
||||
# Get list of xref files (indexes, tables and lists).
|
||||
# Find all files having root filename with a two-letter extension,
|
||||
# saves the ones that are really Texinfo-related files. .?o? catches
|
||||
# many files: .toc, .log, LaTeX tables and lists, FiXme's .lox, maybe more.
|
||||
for this_file in "$1".?o? "$1".aux "$1".?? "$1".idx; do
|
||||
# If file is empty, skip it.
|
||||
test -s "$this_file" || continue
|
||||
# If the file is not suitable to be an index or xref file, don't
|
||||
# process it. The file can't be if its first character is not a
|
||||
# backslash or single quote.
|
||||
first_character=`sed -n '1s/^\(.\).*$/\1/p;q' $this_file`
|
||||
if test "x$first_character" = "x\\" \
|
||||
|| test "x$first_character" = "x'"; then
|
||||
xref_files="$xref_files ./$this_file"
|
||||
fi
|
||||
done
|
||||
echo "$xref_files"
|
||||
EOF
|
||||
chmod 500 $get_xref_files
|
||||
|
||||
# File descriptor usage:
|
||||
# 0 standard input
|
||||
# 1 standard output (--verbose messages)
|
||||
# 2 standard error
|
||||
# 3 some systems may open it to /dev/tty
|
||||
# 4 used on the Kubota Titan
|
||||
# 5 tools output (turned off by --quiet)
|
||||
|
||||
# Tools' output. If quiet, discard, else redirect to the message flow.
|
||||
if test "$quiet" = t; then
|
||||
exec 5>/dev/null
|
||||
else
|
||||
exec 5>&1
|
||||
fi
|
||||
|
||||
# Enable tracing
|
||||
test "$debug" = t && set -x
|
||||
|
||||
#
|
||||
# TeXify files.
|
||||
|
||||
for command_line_filename in ${1+"$@"}; do
|
||||
$verbose "Processing $command_line_filename ..."
|
||||
|
||||
# If the COMMAND_LINE_FILENAME is not absolute (e.g., --debug.tex),
|
||||
# prepend `./' in order to avoid that the tools take it as an option.
|
||||
echo "$command_line_filename" | $EGREP '^(/|[A-z]:/)' >/dev/null \
|
||||
|| command_line_filename="./$command_line_filename"
|
||||
|
||||
# See if the file exists. If it doesn't we're in trouble since, even
|
||||
# though the user may be able to reenter a valid filename at the tex
|
||||
# prompt (assuming they're attending the terminal), this script won't
|
||||
# be able to find the right xref files and so forth.
|
||||
if test ! -r "$command_line_filename"; then
|
||||
echo "$0: Could not read $command_line_filename, skipping." >&2
|
||||
continue
|
||||
fi
|
||||
|
||||
# Get the name of the current directory. We want the full path
|
||||
# because in clean mode we are in tmp, in which case a relative
|
||||
# path has no meaning.
|
||||
filename_dir=`echo $command_line_filename | sed 's!/[^/]*$!!;s!^$!.!'`
|
||||
filename_dir=`cd "$filename_dir" >/dev/null && pwd`
|
||||
|
||||
# Strip directory part but leave extension.
|
||||
filename_ext=`basename "$command_line_filename"`
|
||||
# Strip extension.
|
||||
filename_noext=`echo "$filename_ext" | sed 's/\.[^.]*$//'`
|
||||
ext=`echo "$filename_ext" | sed 's/^.*\.//'`
|
||||
|
||||
# _src. Use same basename since we want to generate aux files with
|
||||
# the same basename as the manual. If --expand, then output the
|
||||
# macro-expanded file to here, else copy the original file.
|
||||
tmpdir_src=$tmpdir/src
|
||||
filename_src=$tmpdir_src/$filename_noext.$ext
|
||||
|
||||
# _xtr. The file with the user's extra commands.
|
||||
tmpdir_xtr=$tmpdir/xtr
|
||||
filename_xtr=$tmpdir_xtr/$filename_noext.$ext
|
||||
|
||||
# _bak. Copies of the previous xref files (another round is run if
|
||||
# they differ from the new one).
|
||||
tmpdir_bak=$tmpdir/bak
|
||||
|
||||
# Make all those directories and give up if we can't succeed.
|
||||
mkdir $tmpdir_src $tmpdir_xtr $tmpdir_bak || exit 1
|
||||
|
||||
# Source file might include additional sources.
|
||||
# We want `.:$orig_pwd' before anything else. (We'll add `.:' later
|
||||
# after all other directories have been turned into absolute paths.)
|
||||
# `.' goes first to ensure that any old .aux, .cps,
|
||||
# etc. files in ${directory} don't get used in preference to fresher
|
||||
# files in `.'. Include orig_pwd in case we are in clean mode, where
|
||||
# we've cd'd to a temp directory.
|
||||
common="$orig_pwd$path_sep$filename_dir$path_sep$txincludes"
|
||||
TEXINPUTS="$common$TEXINPUTS_orig"
|
||||
INDEXSTYLE="$common$INDEXSTYLE_orig"
|
||||
|
||||
# Convert relative paths to absolute paths, so we can run in another
|
||||
# directory (e.g., in --clean mode, or during the macro-support
|
||||
# detection.)
|
||||
#
|
||||
# Empty path components are meaningful to tex. We rewrite them
|
||||
# as `EMPTY' so they don't get lost when we split on $path_sep.
|
||||
TEXINPUTS=`echo $TEXINPUTS |sed 's/^:/EMPTY:/;s/:$/:EMPTY/;s/::/:EMPTY:/g'`
|
||||
INDEXSTYLE=`echo $INDEXSTYLE |sed 's/^:/EMPTY:/;s/:$/:EMPTY/;s/::/:EMPTY:/g'`
|
||||
save_IFS=$IFS
|
||||
IFS=$path_sep
|
||||
set x $TEXINPUTS; shift
|
||||
TEXINPUTS=.
|
||||
for dir
|
||||
do
|
||||
case $dir in
|
||||
EMPTY)
|
||||
TEXINPUTS=$TEXINPUTS$path_sep
|
||||
;;
|
||||
[\\/]* | ?:[\\/]*) # Absolute paths don't need to be expansed.
|
||||
TEXINPUTS=$TEXINPUTS$path_sep$dir
|
||||
;;
|
||||
*)
|
||||
abs=`cd "$dir" && pwd` && TEXINPUTS=$TEXINPUTS$path_sep$abs
|
||||
;;
|
||||
esac
|
||||
done
|
||||
set x $INDEXSTYLE; shift
|
||||
INDEXSTYLE=.
|
||||
for dir
|
||||
do
|
||||
case $dir in
|
||||
EMPTY)
|
||||
INDEXSTYLE=$INDEXSTYLE$path_sep
|
||||
;;
|
||||
[\\/]* | ?:[\\/]*) # Absolute paths don't need to be expansed.
|
||||
INDEXSTYLE=$INDEXSTYLE$path_sep$dir
|
||||
;;
|
||||
*)
|
||||
abs=`cd "$dir" && pwd` && INDEXSTYLE=$INDEXSTYLE$path_sep$abs
|
||||
;;
|
||||
esac
|
||||
done
|
||||
IFS=$save_IFS
|
||||
|
||||
# If the user explicitly specified the language, use that.
|
||||
# Otherwise, if the first line is \input texinfo, assume it's texinfo.
|
||||
# Otherwise, guess from the file extension.
|
||||
if test -n "$set_language"; then
|
||||
language=$set_language
|
||||
elif sed 1q "$command_line_filename" | grep 'input texinfo' >/dev/null; then
|
||||
language=texinfo
|
||||
else
|
||||
language=
|
||||
fi
|
||||
|
||||
# Get the type of the file (latex or texinfo) from the given language
|
||||
# we just guessed, or from the file extension if not set yet.
|
||||
case ${language:-$filename_ext} in
|
||||
[lL]a[tT]e[xX] | *.ltx | *.tex)
|
||||
# Assume a LaTeX file. LaTeX needs bibtex and uses latex for
|
||||
# compilation. No makeinfo.
|
||||
bibtex=${BIBTEX:-bibtex}
|
||||
makeinfo= # no point in running makeinfo on latex source.
|
||||
texindex=${MAKEINDEX:-makeindex}
|
||||
if test $oformat = dvi; then
|
||||
tex=${LATEX:-latex}
|
||||
else
|
||||
tex=${PDFLATEX:-pdflatex}
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
# Assume a Texinfo file. Texinfo files need makeinfo, texindex and tex.
|
||||
bibtex=
|
||||
texindex=${TEXINDEX:-texindex}
|
||||
if test $oformat = dvi; then
|
||||
tex=${TEX:-tex}
|
||||
else
|
||||
tex=${PDFTEX:-pdftex}
|
||||
fi
|
||||
# Unless required by the user, makeinfo expansion is wanted only
|
||||
# if texinfo.tex is too old.
|
||||
if test "$expand" = t; then
|
||||
makeinfo=${MAKEINFO:-makeinfo}
|
||||
else
|
||||
# Check if texinfo.tex performs macro expansion by looking for
|
||||
# its version. The version is a date of the form YEAR-MO-DA.
|
||||
# We don't need to use [0-9] to match the digits since anyway
|
||||
# the comparison with $txiprereq, a number, will fail with non
|
||||
# digits.
|
||||
txiversion_tex=txiversion.tex
|
||||
echo '\input texinfo.tex @bye' >$tmpdir/$txiversion_tex
|
||||
# Run in the tmpdir to avoid leaving files.
|
||||
eval `cd $tmpdir >/dev/null &&
|
||||
$tex $txiversion_tex 2>/dev/null |
|
||||
sed -n 's/^.*\[\(.*\)version \(....\)-\(..\)-\(..\).*$/txiformat=\1 txiversion="\2\3\4"/p'`
|
||||
$verbose "texinfo.tex preloaded as \`$txiformat', version is \`$txiversion' ..."
|
||||
if test "$txiprereq" -le "$txiversion" >/dev/null 2>&1; then
|
||||
makeinfo=
|
||||
else
|
||||
makeinfo=${MAKEINFO:-makeinfo}
|
||||
fi
|
||||
# As long as we had to run TeX, offer the user this convenience
|
||||
if test "$txiformat" = Texinfo; then
|
||||
escape=@
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# Expand macro commands in the original source file using Makeinfo.
|
||||
# Always use `end' footnote style, since the `separate' style
|
||||
# generates different output (arguably this is a bug in -E).
|
||||
# Discard main info output, the user asked to run TeX, not makeinfo.
|
||||
if test -n "$makeinfo"; then
|
||||
$verbose "Macro-expanding $command_line_filename to $filename_src ..."
|
||||
sed -f $comment_iftex_sed "$command_line_filename" \
|
||||
| $makeinfo --footnote-style=end -I "$filename_dir" $miincludes \
|
||||
-o /dev/null --macro-expand=- \
|
||||
| sed -f $uncomment_iftex_sed >"$filename_src"
|
||||
filename_input=$filename_src
|
||||
fi
|
||||
|
||||
# If makeinfo failed (or was not even run), use the original file as input.
|
||||
if test $? -ne 0 \
|
||||
|| test ! -r "$filename_src"; then
|
||||
$verbose "Reverting to $command_line_filename ..."
|
||||
filename_input=$filename_dir/$filename_ext
|
||||
fi
|
||||
|
||||
# Used most commonly for @finalout, @smallbook, etc.
|
||||
if test -n "$textra"; then
|
||||
$verbose "Inserting extra commands: $textra"
|
||||
sed '/^@setfilename/a\
|
||||
'"$textra" "$filename_input" >$filename_xtr
|
||||
filename_input=$filename_xtr
|
||||
fi
|
||||
|
||||
# If clean mode was specified, then move to the temporary directory.
|
||||
if test "$clean" = t; then
|
||||
$verbose "cd $tmpdir_src"
|
||||
cd "$tmpdir_src" || exit 1
|
||||
fi
|
||||
|
||||
while :; do # will break out of loop below
|
||||
orig_xref_files=`$get_xref_files "$filename_noext"`
|
||||
|
||||
# Save copies of originals for later comparison.
|
||||
if test -n "$orig_xref_files"; then
|
||||
$verbose "Backing up xref files: `echo $orig_xref_files | sed 's|\./||g'`"
|
||||
cp $orig_xref_files $tmpdir_bak
|
||||
fi
|
||||
|
||||
# Run bibtex on current file.
|
||||
# - If its input (AUX) exists.
|
||||
# - If AUX contains both `\bibdata' and `\bibstyle'.
|
||||
# - If some citations are missing (LOG contains `Citation').
|
||||
# or the LOG complains of a missing .bbl
|
||||
#
|
||||
# We run bibtex first, because I can see reasons for the indexes
|
||||
# to change after bibtex is run, but I see no reason for the
|
||||
# converse.
|
||||
#
|
||||
# Don't try to be too smart. Running bibtex only if the bbl file
|
||||
# exists and is older than the LaTeX file is wrong, since the
|
||||
# document might include files that have changed. Because there
|
||||
# can be several AUX (if there are \include's), but a single LOG,
|
||||
# looking for missing citations in LOG is easier, though we take
|
||||
# the risk to match false messages.
|
||||
if test -n "$bibtex" \
|
||||
&& test -r "$filename_noext.aux" \
|
||||
&& test -r "$filename_noext.log" \
|
||||
&& (grep '^\\bibdata[{]' "$filename_noext.aux" \
|
||||
&& grep '^\\bibstyle[{]' "$filename_noext.aux" \
|
||||
&& (grep 'Warning:.*Citation.*undefined' "$filename_noext.log" \
|
||||
|| grep 'No file .*\.bbl\.' "$filename_noext.log")) \
|
||||
>/dev/null 2>&1; \
|
||||
then
|
||||
$verbose "Running $bibtex $filename_noext ..."
|
||||
if $bibtex "$filename_noext" >&5; then :; else
|
||||
echo "$0: $bibtex exited with bad status, quitting." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# What we'll run texindex on -- exclude non-index files.
|
||||
# Since we know index files are last, it is correct to remove everything
|
||||
# before .aux and .?o?. But don't really do <anything>o<anything>
|
||||
# -- don't match whitespace as <anything>.
|
||||
# Otherwise, if orig_xref_files contains something like
|
||||
# foo.xo foo.whatever
|
||||
# the space after the o will get matched.
|
||||
index_files=`echo "$orig_xref_files" \
|
||||
| sed "s!.*\.aux!!g;
|
||||
s!./$filename_noext\.[^ ]o[^ ]!!g;
|
||||
s/^[ ]*//;s/[ ]*$//"`
|
||||
# Run texindex (or makeindex) on current index files. If they
|
||||
# already exist, and after running TeX a first time the index
|
||||
# files don't change, then there's no reason to run TeX again.
|
||||
# But we won't know that if the index files are out of date or
|
||||
# nonexistent.
|
||||
if test -n "$texindex" && test -n "$index_files"; then
|
||||
$verbose "Running $texindex $index_files ..."
|
||||
if $texindex $index_files 2>&5 1>&2; then :; else
|
||||
echo "$0: $texindex exited with bad status, quitting." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Finally, run TeX.
|
||||
# Prevent $ESCAPE from being interpreted by the shell if it happens
|
||||
# to be `/'.
|
||||
$batch tex_args="\\${escape}nonstopmode\ \\${escape}input"
|
||||
cmd="$tex $tex_args $filename_input"
|
||||
$verbose "Running $cmd ..."
|
||||
if $cmd >&5; then :; else
|
||||
echo "$0: $tex exited with bad status, quitting." >&2
|
||||
echo "$0: see $filename_noext.log for errors." >&2
|
||||
test "$clean" = t \
|
||||
&& cp "$filename_noext.log" "$orig_pwd"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
# Decide if looping again is needed.
|
||||
finished=t
|
||||
|
||||
# LaTeX (and the package changebar) report in the LOG file if it
|
||||
# should be rerun. This is needed for files included from
|
||||
# subdirs, since texi2dvi does not try to compare xref files in
|
||||
# subdirs. Performing xref files test is still good since LaTeX
|
||||
# does not report changes in xref files.
|
||||
if grep "Rerun to get" "$filename_noext.log" >/dev/null 2>&1; then
|
||||
finished=
|
||||
fi
|
||||
|
||||
# Check if xref files changed.
|
||||
new_xref_files=`$get_xref_files "$filename_noext"`
|
||||
$verbose "Original xref files = `echo $orig_xref_files | sed 's|\./||g'`"
|
||||
$verbose "New xref files = `echo $new_xref_files | sed 's|\./||g'`"
|
||||
|
||||
# If old and new lists don't at least have the same file list,
|
||||
# then one file or another has definitely changed.
|
||||
test "x$orig_xref_files" != "x$new_xref_files" && finished=
|
||||
|
||||
# File list is the same. We must compare each file until we find
|
||||
# a difference.
|
||||
if test -n "$finished"; then
|
||||
for this_file in $new_xref_files; do
|
||||
$verbose "Comparing xref file `echo $this_file | sed 's|\./||g'` ..."
|
||||
# cmp -s returns nonzero exit status if files differ.
|
||||
if cmp -s "$this_file" "$tmpdir_bak/$this_file"; then :; else
|
||||
# We only need to keep comparing until we find one that
|
||||
# differs, because we'll have to run texindex & tex again no
|
||||
# matter how many more there might be.
|
||||
finished=
|
||||
$verbose "xref file `echo $this_file | sed 's|\./||g'` differed ..."
|
||||
test "$debug" = t && diff -c "$tmpdir_bak/$this_file" "$this_file"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# If finished, exit the loop, else rerun the loop.
|
||||
test -n "$finished" && break
|
||||
done
|
||||
|
||||
# If we were in clean mode, compilation was in a tmp directory.
|
||||
# Copy the DVI (or PDF) file into the directory where the compilation
|
||||
# has been done. (The temp dir is about to get removed anyway.)
|
||||
# We also return to the original directory so that
|
||||
# - the next file is processed in correct conditions
|
||||
# - the temporary file can be removed
|
||||
if test -n "$clean"; then
|
||||
if test -n "$oname"; then
|
||||
dest=$oname
|
||||
else
|
||||
dest=$orig_pwd
|
||||
fi
|
||||
$verbose "Copying $oformat file from `pwd` to $dest"
|
||||
cp -p "./$filename_noext.$oformat" "$dest"
|
||||
cd / # in case $orig_pwd is on a different drive (for DOS)
|
||||
cd $orig_pwd || exit 1
|
||||
fi
|
||||
|
||||
# Remove temporary files.
|
||||
if test "x$debug" = "x"; then
|
||||
$verbose "Removing $tmpdir_src $tmpdir_xtr $tmpdir_bak ..."
|
||||
cd /
|
||||
rm -rf $tmpdir_src $tmpdir_xtr $tmpdir_bak
|
||||
fi
|
||||
done
|
||||
|
||||
$verbose "$0 done."
|
||||
exit 0 # exit successfully, not however we ended the loop.
|
File diff suppressed because it is too large
Load diff
37
config.h.in
37
config.h.in
|
@ -1,37 +0,0 @@
|
|||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define if test programs should not run the compiled code */
|
||||
#undef LIGHTNING_CROSS
|
||||
|
||||
/* Define if the test programs should disassemble the code they produce */
|
||||
#undef LIGHTNING_DISASSEMBLE
|
||||
|
||||
/* Used to pick the appropriate disassembler, for debugging */
|
||||
#undef LIGHTNING_TARGET
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#undef PACKAGE_URL
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
/* Define to enable assertions */
|
||||
#undef _ASM_SAFETY
|
26
configure.ac
26
configure.ac
|
@ -44,30 +44,9 @@ LIGHTNING_CONFIGURE_LINKS(
|
|||
AC_SUBST(cpu)
|
||||
AM_CONDITIONAL(LIGHTNING_MAIN, :)
|
||||
|
||||
dnl ---------------------------- COMMAND LINE ---------------------------------
|
||||
|
||||
AC_ARG_ENABLE( disassembling,
|
||||
[ --enable-disassembling make the test programs disassemble the code
|
||||
enabled by default if host != target],
|
||||
, enable_disassembling=no)
|
||||
|
||||
AM_CONDITIONAL(REGRESSION_TESTING, test "$host_cpu" = "$target_cpu")
|
||||
if test "$host_cpu" != "$target_cpu"; then
|
||||
AC_DEFINE(LIGHTNING_CROSS, 1,
|
||||
[Define if test programs should not run the compiled code])
|
||||
enable_disassembling=yes
|
||||
fi
|
||||
|
||||
if test "$enable_disassembling" != no; then
|
||||
AC_DEFINE(LIGHTNING_DISASSEMBLE, 1,
|
||||
[Define if the test programs should disassemble the code they produce])
|
||||
LIBDISASS="libdisass.a"
|
||||
else
|
||||
LIBDISASS=
|
||||
fi
|
||||
AM_CONDITIONAL(DISASS, test "$enable_disassembling" != no)
|
||||
test "$enable_disassembling" != no &&
|
||||
AC_SUBST(LIBDISASS)
|
||||
dnl ---------------------------- COMMAND LINE ---------------------------------
|
||||
|
||||
AC_ARG_ENABLE( assertions,
|
||||
[ --enable-assertions perform internal consistency checks],
|
||||
|
@ -79,9 +58,8 @@ fi
|
|||
|
||||
dnl --------------------------- PRODUCE OUTPUT --------------------------------
|
||||
|
||||
AC_CONFIG_FILES(Makefile doc/Makefile tests/Makefile opcode/Makefile
|
||||
AC_CONFIG_FILES(Makefile doc/Makefile tests/Makefile
|
||||
lightning/Makefile)
|
||||
AC_CONFIG_FILES(lightningize, chmod +x lightningize)
|
||||
|
||||
AC_OUTPUT
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
TEXI2DVI=$(top_srcdir)/build-aux/texi2dvi
|
||||
HELP2MAN = $(top_srcdir)/build-aux/help2man
|
||||
|
||||
dist_man1_MANS = lightningize.1
|
||||
info_TEXINFOS = lightning.texi
|
||||
EXTRA_TEXINFOS = u-lightning.texi p-lightning.texi
|
||||
MOSTLYCLEANFILES = lightning.tmp
|
||||
|
@ -9,8 +8,3 @@ MOSTLYCLEANFILES = lightning.tmp
|
|||
lightning_TEXINFOS = body.texi toc.texi using.texi porting.texi version.texi
|
||||
u_lightning_TEXINFOS = body.texi toc.texi using.texi version.texi
|
||||
p_lightning_TEXINFOS = body.texi toc.texi porting.texi version.texi
|
||||
|
||||
lightningize.1: $(top_srcdir)/lightningize.in $(top_srcdir)/configure.ac
|
||||
cd $(top_builddir) && $(MAKE) lightningize
|
||||
$(HELP2MAN) -p lightning $(top_builddir)/lightningize > $(srcdir)/lightningize.1
|
||||
|
||||
|
|
692
doc/Makefile.in
692
doc/Makefile.in
|
@ -1,692 +0,0 @@
|
|||
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
|
||||
# Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
subdir = doc
|
||||
DIST_COMMON = $(dist_man1_MANS) $(lightning_TEXINFOS) \
|
||||
$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
|
||||
$(srcdir)/stamp-vti $(srcdir)/version.texi
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/build-aux/lightning.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
INFO_DEPS = $(srcdir)/lightning.info
|
||||
TEXINFO_TEX = $(top_srcdir)/build-aux/texinfo.tex
|
||||
am__TEXINFO_TEX_DIR = $(top_srcdir)/build-aux
|
||||
DVIS = lightning.dvi
|
||||
PDFS = lightning.pdf
|
||||
PSS = lightning.ps
|
||||
HTMLS = lightning.html
|
||||
TEXINFOS = lightning.texi
|
||||
TEXI2PDF = $(TEXI2DVI) --pdf --batch
|
||||
MAKEINFOHTML = $(MAKEINFO) --html
|
||||
AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS)
|
||||
DVIPS = dvips
|
||||
am__installdirs = "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)"
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
man1dir = $(mandir)/man1
|
||||
NROFF = nroff
|
||||
MANS = $(dist_man1_MANS)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BACKENDS = @BACKENDS@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EXEEXT = @EXEEXT@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_INFO = @INSTALL_INFO@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBDISASS = @LIBDISASS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
cpu = @cpu@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
TEXI2DVI = $(top_srcdir)/build-aux/texi2dvi
|
||||
HELP2MAN = $(top_srcdir)/build-aux/help2man
|
||||
dist_man1_MANS = lightningize.1
|
||||
info_TEXINFOS = lightning.texi
|
||||
EXTRA_TEXINFOS = u-lightning.texi p-lightning.texi
|
||||
MOSTLYCLEANFILES = lightning.tmp
|
||||
lightning_TEXINFOS = body.texi toc.texi using.texi porting.texi version.texi
|
||||
u_lightning_TEXINFOS = body.texi toc.texi using.texi version.texi
|
||||
p_lightning_TEXINFOS = body.texi toc.texi porting.texi version.texi
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .dvi .html .info .pdf .ps .texi
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu doc/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
.texi.info:
|
||||
restore=: && backupdir="$(am__leading_dot)am$$$$" && \
|
||||
am__cwd=`pwd` && $(am__cd) $(srcdir) && \
|
||||
rm -rf $$backupdir && mkdir $$backupdir && \
|
||||
if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
|
||||
for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
|
||||
if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
|
||||
done; \
|
||||
else :; fi && \
|
||||
cd "$$am__cwd"; \
|
||||
if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
|
||||
-o $@ $<; \
|
||||
then \
|
||||
rc=0; \
|
||||
$(am__cd) $(srcdir); \
|
||||
else \
|
||||
rc=$$?; \
|
||||
$(am__cd) $(srcdir) && \
|
||||
$$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
|
||||
fi; \
|
||||
rm -rf $$backupdir; exit $$rc
|
||||
|
||||
.texi.dvi:
|
||||
TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
|
||||
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
|
||||
$(TEXI2DVI) $<
|
||||
|
||||
.texi.pdf:
|
||||
TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
|
||||
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
|
||||
$(TEXI2PDF) $<
|
||||
|
||||
.texi.html:
|
||||
rm -rf $(@:.html=.htp)
|
||||
if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
|
||||
-o $(@:.html=.htp) $<; \
|
||||
then \
|
||||
rm -rf $@; \
|
||||
if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
|
||||
mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \
|
||||
else \
|
||||
if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
|
||||
rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \
|
||||
exit 1; \
|
||||
fi
|
||||
$(srcdir)/lightning.info: lightning.texi $(srcdir)/version.texi $(lightning_TEXINFOS)
|
||||
lightning.dvi: lightning.texi $(srcdir)/version.texi $(lightning_TEXINFOS)
|
||||
lightning.pdf: lightning.texi $(srcdir)/version.texi $(lightning_TEXINFOS)
|
||||
lightning.html: lightning.texi $(srcdir)/version.texi $(lightning_TEXINFOS)
|
||||
$(srcdir)/version.texi: $(srcdir)/stamp-vti
|
||||
$(srcdir)/stamp-vti: lightning.texi $(top_srcdir)/configure
|
||||
@(dir=.; test -f ./lightning.texi || dir=$(srcdir); \
|
||||
set `$(SHELL) $(top_srcdir)/build-aux/mdate-sh $$dir/lightning.texi`; \
|
||||
echo "@set UPDATED $$1 $$2 $$3"; \
|
||||
echo "@set UPDATED-MONTH $$2 $$3"; \
|
||||
echo "@set EDITION $(VERSION)"; \
|
||||
echo "@set VERSION $(VERSION)") > vti.tmp
|
||||
@cmp -s vti.tmp $(srcdir)/version.texi \
|
||||
|| (echo "Updating $(srcdir)/version.texi"; \
|
||||
cp vti.tmp $(srcdir)/version.texi)
|
||||
-@rm -f vti.tmp
|
||||
@cp $(srcdir)/version.texi $@
|
||||
|
||||
mostlyclean-vti:
|
||||
-rm -f vti.tmp
|
||||
|
||||
maintainer-clean-vti:
|
||||
-rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi
|
||||
.dvi.ps:
|
||||
TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
|
||||
$(DVIPS) -o $@ $<
|
||||
|
||||
uninstall-dvi-am:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(DVIS)'; test -n "$(dvidir)" || list=; \
|
||||
for p in $$list; do \
|
||||
$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(dvidir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-html-am:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(HTMLS)'; test -n "$(htmldir)" || list=; \
|
||||
for p in $$list; do \
|
||||
$(am__strip_dir) \
|
||||
echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \
|
||||
rm -rf "$(DESTDIR)$(htmldir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-info-am:
|
||||
@$(PRE_UNINSTALL)
|
||||
@if test -d '$(DESTDIR)$(infodir)' && \
|
||||
(install-info --version && \
|
||||
install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
|
||||
list='$(INFO_DEPS)'; \
|
||||
for file in $$list; do \
|
||||
relfile=`echo "$$file" | sed 's|^.*/||'`; \
|
||||
echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \
|
||||
if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \
|
||||
then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; fi; \
|
||||
done; \
|
||||
else :; fi
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(INFO_DEPS)'; \
|
||||
for file in $$list; do \
|
||||
relfile=`echo "$$file" | sed 's|^.*/||'`; \
|
||||
relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
|
||||
(if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \
|
||||
echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \
|
||||
rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
|
||||
else :; fi); \
|
||||
done
|
||||
|
||||
uninstall-pdf-am:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
|
||||
for p in $$list; do \
|
||||
$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(pdfdir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-ps-am:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(PSS)'; test -n "$(psdir)" || list=; \
|
||||
for p in $$list; do \
|
||||
$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(psdir)/$$f"; \
|
||||
done
|
||||
|
||||
dist-info: $(INFO_DEPS)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(INFO_DEPS)'; \
|
||||
for base in $$list; do \
|
||||
case $$base in \
|
||||
$(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
esac; \
|
||||
if test -f $$base; then d=.; else d=$(srcdir); fi; \
|
||||
base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \
|
||||
for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \
|
||||
if test -f $$file; then \
|
||||
relfile=`expr "$$file" : "$$d/\(.*\)"`; \
|
||||
test -f "$(distdir)/$$relfile" || \
|
||||
cp -p $$file "$(distdir)/$$relfile"; \
|
||||
else :; fi; \
|
||||
done; \
|
||||
done
|
||||
|
||||
mostlyclean-aminfo:
|
||||
-rm -rf lightning.aux lightning.cp lightning.cps lightning.fn lightning.fns \
|
||||
lightning.ky lightning.kys lightning.log lightning.pg \
|
||||
lightning.pgs lightning.tmp lightning.toc lightning.tp \
|
||||
lightning.tps lightning.vr lightning.vrs
|
||||
|
||||
clean-aminfo:
|
||||
-test -z "lightning.dvi lightning.pdf lightning.ps lightning.html" \
|
||||
|| rm -rf lightning.dvi lightning.pdf lightning.ps lightning.html
|
||||
|
||||
maintainer-clean-aminfo:
|
||||
@list='$(INFO_DEPS)'; for i in $$list; do \
|
||||
i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \
|
||||
echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
|
||||
rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
|
||||
done
|
||||
install-man1: $(dist_man1_MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
|
||||
@list='$(dist_man1_MANS)'; test -n "$(man1dir)" || exit 0; \
|
||||
{ for i in $$list; do echo "$$i"; done; \
|
||||
} | while read p; do \
|
||||
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; echo "$$p"; \
|
||||
done | \
|
||||
sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
|
||||
sed 'N;N;s,\n, ,g' | { \
|
||||
list=; while read file base inst; do \
|
||||
if test "$$base" = "$$inst"; then list="$$list $$file"; else \
|
||||
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
|
||||
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
|
||||
fi; \
|
||||
done; \
|
||||
for i in $$list; do echo "$$i"; done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
test -z "$$files" || { \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
|
||||
done; }
|
||||
|
||||
uninstall-man1:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(dist_man1_MANS)'; test -n "$(man1dir)" || exit 0; \
|
||||
files=`{ for i in $$list; do echo "$$i"; done; \
|
||||
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
|
||||
test -z "$$files" || { \
|
||||
echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
ctags: CTAGS
|
||||
CTAGS:
|
||||
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@list='$(MANS)'; if test -n "$$list"; then \
|
||||
list=`for p in $$list; do \
|
||||
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
|
||||
if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
|
||||
if test -n "$$list" && \
|
||||
grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
|
||||
echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
|
||||
grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
|
||||
echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
|
||||
echo " typically \`make maintainer-clean' will remove them" >&2; \
|
||||
exit 1; \
|
||||
else :; fi; \
|
||||
else :; fi
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$(top_distdir)" distdir="$(distdir)" \
|
||||
dist-info
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(INFO_DEPS) $(MANS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-aminfo clean-generic mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am: $(DVIS)
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am: $(HTMLS)
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am: $(INFO_DEPS)
|
||||
|
||||
install-data-am: install-info-am install-man
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am: $(DVIS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)"
|
||||
@list='$(DVIS)'; test -n "$(dvidir)" || list=; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; \
|
||||
done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \
|
||||
done
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am: $(HTMLS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"
|
||||
@list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
$(am__strip_dir) \
|
||||
if test -d "$$d$$p"; then \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
|
||||
echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
|
||||
$(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \
|
||||
else \
|
||||
list2="$$list2 $$d$$p"; \
|
||||
fi; \
|
||||
done; \
|
||||
test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \
|
||||
while read files; do \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \
|
||||
done; }
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am: $(INFO_DEPS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)"
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
|
||||
for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
esac; \
|
||||
if test -f $$file; then d=.; else d=$(srcdir); fi; \
|
||||
file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \
|
||||
for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \
|
||||
$$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \
|
||||
if test -f $$ifile; then \
|
||||
echo "$$ifile"; \
|
||||
else : ; fi; \
|
||||
done; \
|
||||
done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done
|
||||
@$(POST_INSTALL)
|
||||
@if (install-info --version && \
|
||||
install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
|
||||
list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
|
||||
for file in $$list; do \
|
||||
relfile=`echo "$$file" | sed 's|^.*/||'`; \
|
||||
echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\
|
||||
install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\
|
||||
done; \
|
||||
else : ; fi
|
||||
install-man: install-man1
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am: $(PDFS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)"
|
||||
@list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; \
|
||||
done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am: $(PSS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)"
|
||||
@list='$(PSS)'; test -n "$(psdir)" || list=; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; \
|
||||
done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(psdir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; done
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-aminfo \
|
||||
maintainer-clean-generic maintainer-clean-vti
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-aminfo mostlyclean-generic mostlyclean-vti
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am: $(PDFS)
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am: $(PSS)
|
||||
|
||||
uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \
|
||||
uninstall-man uninstall-pdf-am uninstall-ps-am
|
||||
|
||||
uninstall-man: uninstall-man1
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-aminfo clean-generic \
|
||||
dist-info distclean distclean-generic distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-dvi install-dvi-am install-exec \
|
||||
install-exec-am install-html install-html-am install-info \
|
||||
install-info-am install-man install-man1 install-pdf \
|
||||
install-pdf-am install-ps install-ps-am install-strip \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-aminfo maintainer-clean-generic \
|
||||
maintainer-clean-vti mostlyclean mostlyclean-aminfo \
|
||||
mostlyclean-generic mostlyclean-vti pdf pdf-am ps ps-am \
|
||||
uninstall uninstall-am uninstall-dvi-am uninstall-html-am \
|
||||
uninstall-info-am uninstall-man uninstall-man1 \
|
||||
uninstall-pdf-am uninstall-ps-am
|
||||
|
||||
|
||||
lightningize.1: $(top_srcdir)/lightningize.in $(top_srcdir)/configure.ac
|
||||
cd $(top_builddir) && $(MAKE) lightningize
|
||||
$(HELP2MAN) -p lightning $(top_builddir)/lightningize > $(srcdir)/lightningize.1
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
|
@ -1,45 +0,0 @@
|
|||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.28.
|
||||
.TH LIGHTNINGIZE "1" "June 2009" "lightningize 1.2c" "User Commands"
|
||||
.SH NAME
|
||||
lightningize \- manual page for lightningize 1.2c
|
||||
.SH SYNOPSIS
|
||||
.B lightningize
|
||||
[\fIOPTION\fR]...
|
||||
.SH DESCRIPTION
|
||||
Prepare a package to use lightning.
|
||||
.TP
|
||||
\fB\-\-automake\fR
|
||||
work silently, and assume that Automake is in use
|
||||
.TP
|
||||
\fB\-c\fR, \fB\-\-copy\fR
|
||||
copy files rather than symlinking them
|
||||
.TP
|
||||
\fB\-\-debug\fR
|
||||
enable verbose shell tracing
|
||||
.TP
|
||||
\fB\-n\fR, \fB\-\-dry\-run\fR
|
||||
print commands rather than running them
|
||||
.TP
|
||||
\fB\-f\fR, \fB\-\-force\fR
|
||||
replace existing files
|
||||
.TP
|
||||
\fB\-\-help\fR
|
||||
display this message and exit
|
||||
.TP
|
||||
\fB\-\-version\fR
|
||||
print version information and exit
|
||||
.PP
|
||||
You must `cd' to the top directory of your package before you run
|
||||
`lightningize'.
|
||||
.SH "SEE ALSO"
|
||||
The full documentation for
|
||||
.B lightningize
|
||||
is maintained as a Texinfo manual. If the
|
||||
.B info
|
||||
and
|
||||
.B lightningize
|
||||
programs are properly installed at your site, the command
|
||||
.IP
|
||||
.B info lightning
|
||||
.PP
|
||||
should give you access to the complete manual.
|
|
@ -1,524 +0,0 @@
|
|||
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
|
||||
# Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
subdir = lightning
|
||||
DIST_COMMON = $(am__dist_lightning_HEADERS_DIST) \
|
||||
$(am__dist_pkgdata_DATA_DIST) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/build-aux/lightning.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES = asm.h fp.h core.h funcs.h
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__dist_pkgdata_DATA_DIST = Makefile.am
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__installdirs = "$(DESTDIR)$(pkgdatadir)" \
|
||||
"$(DESTDIR)$(lightningdir)" "$(DESTDIR)$(lightningdir)"
|
||||
DATA = $(dist_pkgdata_DATA)
|
||||
am__dist_lightning_HEADERS_DIST = funcs-common.h core-common.h \
|
||||
fp-common.h asm-common.h
|
||||
HEADERS = $(dist_lightning_HEADERS) $(nodist_lightning_HEADERS)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BACKENDS = @BACKENDS@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EXEEXT = @EXEEXT@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_INFO = @INSTALL_INFO@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBDISASS = @LIBDISASS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
cpu = @cpu@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
DISTCLEANFILES = asm.h core.h funcs.h fp.h
|
||||
EXTRA_DIST = i386/Makefile.frag \
|
||||
i386/asm-32.h i386/asm-64.h i386/asm.h \
|
||||
i386/core-32.h i386/core-64.h i386/core.h \
|
||||
i386/fp-32.h i386/fp-64.h i386/fp.h \
|
||||
i386/funcs.h \
|
||||
sparc/asm.h sparc/core.h sparc/funcs.h sparc/fp.h \
|
||||
ppc/asm.h ppc/core.h ppc/funcs.h ppc/fp.h
|
||||
|
||||
LIGHTNING_COMMON_FILES = funcs-common.h core-common.h fp-common.h asm-common.h
|
||||
@LIGHTNING_MAIN_TRUE@lightningdir = $(includedir)/lightning
|
||||
@LIGHTNING_MAIN_TRUE@dist_pkgdata_DATA = Makefile.am
|
||||
@LIGHTNING_MAIN_TRUE@dist_lightning_HEADERS = $(LIGHTNING_COMMON_FILES)
|
||||
@LIGHTNING_MAIN_TRUE@nodist_lightning_HEADERS = asm.h core.h funcs.h fp.h $(LIGHTNING_TARGET_FILES)
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lightning/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu lightning/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
install-dist_pkgdataDATA: $(dist_pkgdata_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)"
|
||||
@list='$(dist_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; \
|
||||
done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgdatadir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(pkgdatadir)" || exit $$?; \
|
||||
done
|
||||
|
||||
uninstall-dist_pkgdataDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(dist_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \
|
||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||
test -n "$$files" || exit 0; \
|
||||
echo " ( cd '$(DESTDIR)$(pkgdatadir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(pkgdatadir)" && rm -f $$files
|
||||
install-dist_lightningHEADERS: $(dist_lightning_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(lightningdir)" || $(MKDIR_P) "$(DESTDIR)$(lightningdir)"
|
||||
@list='$(dist_lightning_HEADERS)'; test -n "$(lightningdir)" || list=; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; \
|
||||
done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(lightningdir)'"; \
|
||||
$(INSTALL_HEADER) $$files "$(DESTDIR)$(lightningdir)" || exit $$?; \
|
||||
done
|
||||
|
||||
uninstall-dist_lightningHEADERS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(dist_lightning_HEADERS)'; test -n "$(lightningdir)" || list=; \
|
||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||
test -n "$$files" || exit 0; \
|
||||
echo " ( cd '$(DESTDIR)$(lightningdir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(lightningdir)" && rm -f $$files
|
||||
install-nodist_lightningHEADERS: $(nodist_lightning_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(lightningdir)" || $(MKDIR_P) "$(DESTDIR)$(lightningdir)"
|
||||
@list='$(nodist_lightning_HEADERS)'; test -n "$(lightningdir)" || list=; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; \
|
||||
done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(lightningdir)'"; \
|
||||
$(INSTALL_HEADER) $$files "$(DESTDIR)$(lightningdir)" || exit $$?; \
|
||||
done
|
||||
|
||||
uninstall-nodist_lightningHEADERS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(nodist_lightning_HEADERS)'; test -n "$(lightningdir)" || list=; \
|
||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||
test -n "$$files" || exit 0; \
|
||||
echo " ( cd '$(DESTDIR)$(lightningdir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(lightningdir)" && rm -f $$files
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
@LIGHTNING_MAIN_TRUE@dist-hook:
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$(top_distdir)" distdir="$(distdir)" \
|
||||
dist-hook
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(DATA) $(HEADERS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(lightningdir)" "$(DESTDIR)$(lightningdir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
@LIGHTNING_MAIN_TRUE@clean-local:
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-local mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-dist_lightningHEADERS \
|
||||
install-dist_pkgdataDATA install-nodist_lightningHEADERS
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-dist_lightningHEADERS \
|
||||
uninstall-dist_pkgdataDATA uninstall-nodist_lightningHEADERS
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-local ctags dist-hook distclean distclean-generic \
|
||||
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am \
|
||||
install-dist_lightningHEADERS install-dist_pkgdataDATA \
|
||||
install-dvi install-dvi-am install-exec install-exec-am \
|
||||
install-html install-html-am install-info install-info-am \
|
||||
install-man install-nodist_lightningHEADERS install-pdf \
|
||||
install-pdf-am install-ps install-ps-am install-strip \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
|
||||
pdf-am ps ps-am tags uninstall uninstall-am \
|
||||
uninstall-dist_lightningHEADERS uninstall-dist_pkgdataDATA \
|
||||
uninstall-nodist_lightningHEADERS
|
||||
|
||||
|
||||
@lightning_frag@
|
||||
|
||||
@LIGHTNING_MAIN_FALSE@all-am:
|
||||
@LIGHTNING_MAIN_FALSE@ @set frob $(LIGHTNING_TARGET_FILES); shift; \
|
||||
@LIGHTNING_MAIN_FALSE@ for i; \
|
||||
@LIGHTNING_MAIN_FALSE@ do \
|
||||
@LIGHTNING_MAIN_FALSE@ echo $(LN_S) -f $(srcdir)/$$i `basename $$i`; \
|
||||
@LIGHTNING_MAIN_FALSE@ $(LN_S) -f $(srcdir)/$$i `basename $$i`; \
|
||||
@LIGHTNING_MAIN_FALSE@ done
|
||||
|
||||
@LIGHTNING_MAIN_FALSE@clean-local:
|
||||
@LIGHTNING_MAIN_FALSE@ @set frob $(LIGHTNING_TARGET_FILES); shift; \
|
||||
@LIGHTNING_MAIN_FALSE@ for i; \
|
||||
@LIGHTNING_MAIN_FALSE@ do \
|
||||
@LIGHTNING_MAIN_FALSE@ echo rm -f `basename $$i`; \
|
||||
@LIGHTNING_MAIN_FALSE@ rm -f `basename $$i`; \
|
||||
@LIGHTNING_MAIN_FALSE@ done
|
||||
|
||||
@LIGHTNING_MAIN_FALSE@dist-hook:
|
||||
@LIGHTNING_MAIN_FALSE@ cp -p $(srcdir)/lightning.h $(distdir)
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
|
@ -1594,9 +1594,7 @@ enum {
|
|||
/* [2] "Intel Architecture Software Developer's Manual Volume 2: Instruction Set Reference", */
|
||||
/* Intel Corporation 1997. */
|
||||
|
||||
#if LIGHTNING_CROSS \
|
||||
? LIGHTNING_TARGET == LIGHTNING_X86_64 \
|
||||
: defined (__x86_64__)
|
||||
#if defined (__x86_64__)
|
||||
#include "asm-64.h"
|
||||
#else
|
||||
#include "asm-32.h"
|
||||
|
|
|
@ -355,9 +355,7 @@
|
|||
#define jit_align(n) NOPi(_jit_alignment(_jit_UL(_jit.x.pc), (n)))
|
||||
|
||||
|
||||
#if LIGHTNING_CROSS \
|
||||
? LIGHTNING_TARGET == LIGHTNING_X86_64 \
|
||||
: defined (__x86_64__)
|
||||
#if defined (__x86_64__)
|
||||
#include "core-64.h"
|
||||
#else
|
||||
#include "core-32.h"
|
||||
|
|
|
@ -34,9 +34,7 @@
|
|||
#ifndef __lightning_fp_i386_h
|
||||
#define __lightning_fp_i386_h
|
||||
|
||||
#if LIGHTNING_CROSS \
|
||||
? LIGHTNING_TARGET == LIGHTNING_X86_64 \
|
||||
: defined (__x86_64__)
|
||||
#if defined (__x86_64__)
|
||||
#include "fp-64.h"
|
||||
#else
|
||||
#include "fp-32.h"
|
||||
|
|
|
@ -258,11 +258,6 @@ struct jit_local_state {
|
|||
#define jit_ori_i(d, rs, is) jit_chk_imu((is), ORIrri((d), (rs), (is)), ORrrr((d), (rs), JIT_AUX))
|
||||
#define jit_orr_i(d, s1, s2) ORrrr((d), (s1), (s2))
|
||||
|
||||
#ifdef JIT_NEED_PUSH_POP
|
||||
#define jit_popr_i(rs) (LWZrm((rs), 0, 1), ADDIrri(1, 1, 4))
|
||||
#define jit_pushr_i(rs) (STWrm((rs), -4, 1), ADDIrri (1, 1, -4))
|
||||
#endif
|
||||
|
||||
#define jit_prepare_i(numi) (_jitl.nextarg_puti = numi)
|
||||
#define jit_prepare_f(numf) (_jitl.nextarg_putf = numf)
|
||||
#define jit_prepare_d(numd) (_jitl.nextarg_putd = numd)
|
||||
|
|
|
@ -43,7 +43,6 @@
|
|||
static void
|
||||
jit_flush_code(void *start, void *end)
|
||||
{
|
||||
#ifndef LIGHTNING_CROSS
|
||||
register char *ddest, *idest;
|
||||
|
||||
static int cache_line_size;
|
||||
|
@ -84,7 +83,6 @@ jit_flush_code(void *start, void *end)
|
|||
__asm__ __volatile__ ("icbi 0,%0" : : "r"(idest));
|
||||
}
|
||||
__asm__ __volatile__ ("isync" : : );
|
||||
#endif /* !LIGHTNING_CROSS */
|
||||
}
|
||||
#endif /* __GNUC__ || __GNUG__ */
|
||||
|
||||
|
|
|
@ -34,11 +34,7 @@
|
|||
#define __lightning_core_h
|
||||
|
||||
#define JIT_R_NUM 3
|
||||
#ifdef JIT_NEED_PUSH_POP
|
||||
# define JIT_V_NUM 7
|
||||
#else
|
||||
# define JIT_V_NUM 8
|
||||
#endif
|
||||
#define JIT_V_NUM 8
|
||||
|
||||
#define JIT_R(i) _Rg(2 + (i))
|
||||
#define JIT_V(i) _Rl(i)
|
||||
|
@ -103,21 +99,7 @@ struct jit_local_state {
|
|||
jit_insn delay;
|
||||
};
|
||||
|
||||
#ifdef JIT_NEED_PUSH_POP
|
||||
/* Maximum size for the "automatic variables" area on the stack (the area
|
||||
that starts from %fp-1 and ends at %sp+104, see the ABI doc). This must
|
||||
be a multiple of 8 so that %sp remains double-word aligned as required by
|
||||
SysV ABI (see page 3-10). In lightning, this effectively limits the
|
||||
number of registers that can be pushed with `pushr'.
|
||||
|
||||
Initialize %l7 to contain the (negative) offset relative to %fp of the last
|
||||
register pushed. */
|
||||
# define JIT_SPARC_MAX_STACK_REGISTER_AREA (8 * sizeof (void *))
|
||||
# define JIT_SPARC_INIT_PUSH_POP() (MOVrr (_Rg(0), _Rl(7)))
|
||||
#else
|
||||
# define JIT_SPARC_MAX_STACK_REGISTER_AREA 0
|
||||
# define JIT_SPARC_INIT_PUSH_POP() ((void)0)
|
||||
#endif
|
||||
#define JIT_SPARC_MAX_STACK_REGISTER_AREA 0
|
||||
|
||||
/* Minimum size of a stack frame. */
|
||||
#define JIT_SPARC_MIN_FRAME_SIZE (104 + JIT_SPARC_MAX_STACK_REGISTER_AREA)
|
||||
|
@ -316,7 +298,7 @@ struct jit_local_state {
|
|||
#define jit_orr_i(d, s1, s2) ORrrr((s1), (s2), (d))
|
||||
#define jit_patch_at(delay_pc, pv) jit_patch_ (((delay_pc) - 1) , (pv))
|
||||
#define jit_prepare_i(num) (_jitl.nextarg_put += (num))
|
||||
#define jit_prolog(numargs) (_jitl.save = (jit_insn *) _jit.x.pc, SAVErir (JIT_SP, -JIT_SPARC_MIN_FRAME_SIZE, JIT_SP), _jitl.frame_size = JIT_SPARC_MIN_FRAME_SIZE, _jitl.alloca_offset = -JIT_SPARC_MAX_STACK_REGISTER_AREA, _jitl.nextarg_get = _Ri(0), JIT_SPARC_INIT_PUSH_POP ())
|
||||
#define jit_prolog(numargs) (_jitl.save = (jit_insn *) _jit.x.pc, SAVErir (JIT_SP, -JIT_SPARC_MIN_FRAME_SIZE, JIT_SP), _jitl.frame_size = JIT_SPARC_MIN_FRAME_SIZE, _jitl.alloca_offset = -JIT_SPARC_MAX_STACK_REGISTER_AREA, _jitl.nextarg_get = _Ri(0), 0)
|
||||
|
||||
#define jit_pusharg_i(rs) (--_jitl.nextarg_put, MOVrr((rs), _Ro(_jitl.nextarg_put)))
|
||||
#define jit_ret() (RET(), RESTORE())
|
||||
|
@ -338,9 +320,4 @@ struct jit_local_state {
|
|||
#define jit_xori_i(d, rs, is) jit_chk_imm((is), XORrir((rs), (is), (d)), XORrrr((rs), JIT_BIG, (d)))
|
||||
#define jit_xorr_i(d, s1, s2) XORrrr((s1), (s2), (d))
|
||||
|
||||
#ifdef JIT_NEED_PUSH_POP
|
||||
# define jit_pushr_i(rs) (SUBrir(_Rl(7), sizeof (void *), _Rl(7)), STWrx((rs), JIT_FP, _Rl(7)))
|
||||
# define jit_popr_i(rd) (LDSWxr(_Rl(7), JIT_FP, (rd)), ADDrir(_Rl(7), sizeof (void *), _Rl(7)))
|
||||
#endif
|
||||
|
||||
#endif /* __lightning_core_h */
|
||||
|
|
|
@ -48,7 +48,6 @@
|
|||
static void
|
||||
jit_flush_code(void* start, void* end)
|
||||
{
|
||||
#ifndef LIGHTNING_CROSS
|
||||
register char *dest;
|
||||
|
||||
__asm__ __volatile__ ("stbar");
|
||||
|
@ -58,7 +57,6 @@ jit_flush_code(void* start, void* end)
|
|||
|
||||
/* [SPARC Architecture Manual v8, page 139, implementation note #5] */
|
||||
__asm__ __volatile__ ("nop; nop; nop; nop; nop");
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
235
lightningize.in
235
lightningize.in
|
@ -1,235 +0,0 @@
|
|||
#! /bin/sh
|
||||
# lightningize - Prepare a package to use lightning.
|
||||
# Generated automatically from lightningize.in by configure.
|
||||
# Copyright (C) 1996-2000 Free Software Foundation, Inc.
|
||||
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# The name of this program.
|
||||
progname=`echo "$0" | sed 's%^.*/%%'`
|
||||
|
||||
# Constants.
|
||||
PROGRAM=lightningize
|
||||
PACKAGE=@PACKAGE@
|
||||
VERSION=@VERSION@
|
||||
|
||||
# Directory names.
|
||||
prefix="@prefix@"
|
||||
datarootdir="@datarootdir@"
|
||||
datadir="@datadir@"
|
||||
includedir="@includedir@"
|
||||
pkgincludedir=$includedir/$PACKAGE
|
||||
aclocaldir=${datadir}/aclocal
|
||||
|
||||
BACKENDS="@BACKENDS@"
|
||||
file_base_names="asm core funcs fp"
|
||||
macro_name=LIGHTNING_CONFIGURE_IF_NOT_FOUND
|
||||
lightning_m4="$aclocaldir/lightning.m4"
|
||||
|
||||
# Global variables.
|
||||
automake=
|
||||
copy=
|
||||
force=
|
||||
configure_ac=
|
||||
status=0
|
||||
dry_run=no
|
||||
help="Try \`$progname --help' for more information."
|
||||
rm="rm -f"
|
||||
ln_s="@LN_S@"
|
||||
cp="cp -f"
|
||||
mkdir="mkdir"
|
||||
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
--help)
|
||||
cat <<EOF
|
||||
Usage: $progname [OPTION]...
|
||||
|
||||
Prepare a package to use lightning.
|
||||
|
||||
--automake work silently, and assume that Automake is in use
|
||||
-c, --copy copy files rather than symlinking them
|
||||
--debug enable verbose shell tracing
|
||||
-n, --dry-run print commands rather than running them
|
||||
-f, --force replace existing files
|
||||
--help display this message and exit
|
||||
--version print version information and exit
|
||||
|
||||
You must \`cd' to the top directory of your package before you run
|
||||
\`$progname'.
|
||||
EOF
|
||||
exit 0
|
||||
;;
|
||||
|
||||
--version)
|
||||
echo "$PROGRAM (GNU $PACKAGE) $VERSION"
|
||||
exit 0
|
||||
;;
|
||||
|
||||
--automake)
|
||||
automake=yes
|
||||
;;
|
||||
|
||||
-c | --copy)
|
||||
ln_s=
|
||||
;;
|
||||
|
||||
--debug)
|
||||
echo "$progname: enabling shell trace mode"
|
||||
set -x
|
||||
;;
|
||||
|
||||
-n | --dry-run)
|
||||
if test "$dry_run" != yes; then
|
||||
dry_run=yes
|
||||
rm="echo $rm"
|
||||
test -n "$ln_s" && ln_s="echo $ln_s"
|
||||
cp="echo $cp"
|
||||
mkdir="echo $mkdir"
|
||||
fi
|
||||
;;
|
||||
|
||||
-f | --force)
|
||||
force=yes
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo "$progname: unrecognized option \`$arg'" 1>&2
|
||||
echo "$help" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "$progname: too many arguments" 1>&2
|
||||
echo "$help" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if test -f configure.ac; then
|
||||
configure_ac=configure.ac
|
||||
elif test -f configure.in; then
|
||||
configure_ac=configure.in
|
||||
else
|
||||
echo "$progname: \`configure.ac' does not exist" 1>&2
|
||||
echo "$help" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test "$automake" = yes; then
|
||||
if egrep "^$macro_name" $configure_ac >/dev/null 2>&1; then :
|
||||
else
|
||||
echo "Remember to add \`$macro_name' to \`$configure_ac' and reconfigure your package."
|
||||
fi
|
||||
|
||||
else
|
||||
if egrep "^$macro_name" $configure_ac >/dev/null 2>&1; then :
|
||||
else
|
||||
echo "Remember to add \`$macro_name' to \`$configure_ac'."
|
||||
fi
|
||||
|
||||
if grep 'generated automatically by aclocal' aclocal.m4 >/dev/null 2>&1; then
|
||||
updatemsg="update your \`aclocal.m4' by running aclocal"
|
||||
else
|
||||
updatemsg="add the contents of \`$lightning_m4' to \`aclocal.m4'"
|
||||
fi
|
||||
|
||||
if egrep '^AC_DEFUN\(\['$macro_name aclocal.m4 >/dev/null 2>&1; then
|
||||
# Check the version number on lightning.m4 and the one used in aclocal.m4.
|
||||
instserial=`grep '^# serial ' $lightning_m4 | grep $macro_name | sed -e 's/^# serial \([0-9][0-9]*\).*$/\1/; q'`
|
||||
|
||||
if test -z "$instserial"; then
|
||||
echo "$progname: warning: no serial number on \`$lightning_m4'" 1>&2
|
||||
else
|
||||
# If the local macro has no serial number, we assume it's ancient.
|
||||
localserial=`grep '^# serial ' aclocal.m4 | grep $macro_name | sed -e 's/^# serial \([0-9][0-9]*\).*$/\1/; q'`
|
||||
|
||||
test -z "$localserial" && localserial=0
|
||||
|
||||
if test "$localserial" -lt "$instserial"; then
|
||||
echo "You should $updatemsg."
|
||||
elif test "$localserial" -gt "$instserial"; then
|
||||
echo "$progname: \`$lightning_m4' is serial $instserial, less than $localserial in \`aclocal.m4'" 1>&2
|
||||
if test -z "$force"; then
|
||||
echo "Use \`--force' to replace newer lightning files with this version." 1>&2
|
||||
exit 1
|
||||
fi
|
||||
echo "To remain compatible, you should $updatemsg."
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo "You should $updatemsg."
|
||||
fi
|
||||
fi
|
||||
|
||||
# Create the list of directories and files to be updated
|
||||
# Syntax is DESTINATION-DIRECTORY:ABSOLUTE-SRC-PATH
|
||||
|
||||
dirs="lightning"
|
||||
files="lightning:$includedir/lightning.h lightning:$pkgdatadir/Makefile.am"
|
||||
for i in $file_base_names; do
|
||||
files="$files lightning:$pkgincludedir/$i-common.h"
|
||||
done
|
||||
for j in $BACKENDS; do
|
||||
dir=`echo $j | sed -e 's,:.*,,' `
|
||||
suffix=`echo $j | sed -ne 's,.*:,,p' `
|
||||
dirs="$dirs lightning/$dir"
|
||||
for i in $file_base_names; do
|
||||
test -f "$pkgincludedir/$dir/$i$suffix.h" && \
|
||||
files="$files lightning/$dir:$pkgincludedir/$dir/$i$suffix.h"
|
||||
done
|
||||
done
|
||||
|
||||
for dir in $dirs; do
|
||||
if test -d $dir; then :
|
||||
elif $mkdir $dir; then :
|
||||
else
|
||||
echo "$progname: cannot create \`$dir'" 1>&2
|
||||
status=1
|
||||
fi
|
||||
done
|
||||
|
||||
for file in $files; do
|
||||
base=`echo $file | sed 's%^.*/%%' `
|
||||
src=`echo $file | sed 's/^.*://' `
|
||||
dest=`echo $file | sed 's/:.*//' `/$base
|
||||
if test -f "$dest" && test -z "$force"; then
|
||||
test -z "$automake" && echo "$progname: \`$dest' exists: use \`--force' to overwrite" 1>&2
|
||||
continue
|
||||
fi
|
||||
|
||||
$rm $dest
|
||||
if test -n "$ln_s" && $ln_s $src $dest; then :
|
||||
elif $cp $src $dest; then :
|
||||
else
|
||||
echo "$progname: cannot copy \`$src' to \`$dest'" 1>&2
|
||||
status=1
|
||||
fi
|
||||
done
|
||||
|
||||
exit $status
|
||||
|
||||
# Local Variables:
|
||||
# mode:shell-script
|
||||
# sh-indentation:2
|
||||
# End:
|
|
@ -1,9 +0,0 @@
|
|||
EXTRA_LIBRARIES = libdisass.a
|
||||
noinst_LIBRARIES = @LIBDISASS@
|
||||
|
||||
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/lightning/$(cpu)
|
||||
|
||||
libdisass_a_SOURCES = dis-buf.c i386-dis.c ppc-dis.c ppc-opc.c sparc-dis.c \
|
||||
sparc-opc.c disass.c
|
||||
|
||||
noinst_HEADERS = ansidecl.h bfd.h dis-asm.h i386.h ppc.h sparc.h sysdep.h
|
|
@ -1,451 +0,0 @@
|
|||
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
|
||||
# Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
subdir = opcode
|
||||
DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/build-aux/lightning.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
LIBRARIES = $(noinst_LIBRARIES)
|
||||
AR = ar
|
||||
ARFLAGS = cru
|
||||
libdisass_a_AR = $(AR) $(ARFLAGS)
|
||||
libdisass_a_LIBADD =
|
||||
am_libdisass_a_OBJECTS = dis-buf.$(OBJEXT) i386-dis.$(OBJEXT) \
|
||||
ppc-dis.$(OBJEXT) ppc-opc.$(OBJEXT) sparc-dis.$(OBJEXT) \
|
||||
sparc-opc.$(OBJEXT) disass.$(OBJEXT)
|
||||
libdisass_a_OBJECTS = $(am_libdisass_a_OBJECTS)
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
am__mv = mv -f
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(libdisass_a_SOURCES)
|
||||
DIST_SOURCES = $(libdisass_a_SOURCES)
|
||||
HEADERS = $(noinst_HEADERS)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BACKENDS = @BACKENDS@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EXEEXT = @EXEEXT@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_INFO = @INSTALL_INFO@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBDISASS = @LIBDISASS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
cpu = @cpu@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
EXTRA_LIBRARIES = libdisass.a
|
||||
noinst_LIBRARIES = @LIBDISASS@
|
||||
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/lightning/$(cpu)
|
||||
libdisass_a_SOURCES = dis-buf.c i386-dis.c ppc-dis.c ppc-opc.c sparc-dis.c \
|
||||
sparc-opc.c disass.c
|
||||
|
||||
noinst_HEADERS = ansidecl.h bfd.h dis-asm.h i386.h ppc.h sparc.h sysdep.h
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .o .obj
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu opcode/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu opcode/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
clean-noinstLIBRARIES:
|
||||
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
|
||||
libdisass.a: $(libdisass_a_OBJECTS) $(libdisass_a_DEPENDENCIES)
|
||||
-rm -f libdisass.a
|
||||
$(libdisass_a_AR) libdisass.a $(libdisass_a_OBJECTS) $(libdisass_a_LIBADD)
|
||||
$(RANLIB) libdisass.a
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dis-buf.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/disass.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i386-dis.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppc-dis.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppc-opc.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sparc-dis.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sparc-opc.Po@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(LIBRARIES) $(HEADERS)
|
||||
installdirs:
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-noinstLIBRARIES ctags distclean distclean-compile \
|
||||
distclean-generic distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-dvi install-dvi-am install-exec \
|
||||
install-exec-am install-html install-html-am install-info \
|
||||
install-info-am install-man install-pdf install-pdf-am \
|
||||
install-ps install-ps-am install-strip installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
|
||||
uninstall-am
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
|
@ -1,13 +0,0 @@
|
|||
#ifndef __ANSIDECL_H_SEEN
|
||||
#define __ANSIDECL_H_SEEN
|
||||
|
||||
#ifdef __STDC__
|
||||
#define PARAMS(x) x
|
||||
typedef void *PTR;
|
||||
#else
|
||||
#define CONST const
|
||||
#define PARAMS(x) ()
|
||||
typedef char *PTR;
|
||||
#endif
|
||||
|
||||
#endif
|
185
opcode/bfd.h
185
opcode/bfd.h
|
@ -1,185 +0,0 @@
|
|||
/* Main header file for the bfd library -- portable access to object files.
|
||||
Copyright 1990, 91, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
|
||||
Contributed by Cygnus Support.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
(Simplified and modified for GNU lightning)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
/* bfd.h -- The only header file required by users of the bfd library
|
||||
|
||||
The bfd.h file is generated from bfd-in.h and various .c files; if you
|
||||
change it, your changes will probably be lost.
|
||||
|
||||
All the prototypes and definitions following the comment "THE FOLLOWING
|
||||
IS EXTRACTED FROM THE SOURCE" are extracted from the source files for
|
||||
BFD. If you change it, someone oneday will extract it from the source
|
||||
again, and your changes will be lost. To save yourself from this bind,
|
||||
change the definitions in the source in the bfd directory. Type "make
|
||||
docs" and then "make headers" in that directory, and magically this file
|
||||
will change to reflect your changes.
|
||||
|
||||
If you don't have the tools to perform the extraction, then you are
|
||||
safe from someone on your system trampling over your header files.
|
||||
You should still maintain the equivalence between the source and this
|
||||
file though; every change you make to the .c file should be reflected
|
||||
here. */
|
||||
|
||||
#ifndef __BFD_H_SEEN__
|
||||
#define __BFD_H_SEEN__
|
||||
|
||||
#include "ansidecl.h"
|
||||
|
||||
#ifndef INLINE
|
||||
#if __GNUC__ >= 2
|
||||
#define INLINE __inline__
|
||||
#else
|
||||
#define INLINE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* To squelch erroneous compiler warnings ("illegal pointer
|
||||
combination") from the SVR3 compiler, we would like to typedef
|
||||
boolean to int (it doesn't like functions which return boolean.
|
||||
Making sure they are never implicitly declared to return int
|
||||
doesn't seem to help). But this file is not configured based on
|
||||
the host. */
|
||||
/* General rules: functions which are boolean return true on success
|
||||
and false on failure (unless they're a predicate). -- bfd.doc */
|
||||
/* I'm sure this is going to break something and someone is going to
|
||||
force me to change it. */
|
||||
/* typedef enum boolean {false, true} boolean; */
|
||||
/* Yup, SVR4 has a "typedef enum boolean" in <sys/types.h> -fnf */
|
||||
/* It gets worse if the host also defines a true/false enum... -sts */
|
||||
/* And even worse if your compiler has built-in boolean types... -law */
|
||||
#if defined (__GNUG__) && (__GNUC_MINOR__ > 5)
|
||||
#define TRUE_FALSE_ALREADY_DEFINED
|
||||
#endif
|
||||
#ifdef MPW
|
||||
/* Pre-emptive strike - get the file with the enum. */
|
||||
#include <Types.h>
|
||||
#define TRUE_FALSE_ALREADY_DEFINED
|
||||
#endif /* MPW */
|
||||
#ifndef TRUE_FALSE_ALREADY_DEFINED
|
||||
typedef enum bfd_boolean {false, true} boolean;
|
||||
#define BFD_TRUE_FALSE
|
||||
#else
|
||||
/* Use enum names that will appear nowhere else. */
|
||||
typedef enum bfd_boolean {bfd_fffalse, bfd_tttrue} boolean;
|
||||
#endif
|
||||
|
||||
/* A pointer to a position in a file. */
|
||||
/* FIXME: This should be using off_t from <sys/types.h>.
|
||||
For now, try to avoid breaking stuff by not including <sys/types.h> here.
|
||||
This will break on systems with 64-bit file offsets (e.g. 4.4BSD).
|
||||
Probably the best long-term answer is to avoid using file_ptr AND off_t
|
||||
in this header file, and to handle this in the BFD implementation
|
||||
rather than in its interface. */
|
||||
/* typedef off_t file_ptr; */
|
||||
typedef long int file_ptr;
|
||||
|
||||
/* Represent a target address. Also used as a generic unsigned type
|
||||
which is guaranteed to be big enough to hold any arithmetic types
|
||||
we need to deal with. */
|
||||
typedef unsigned long bfd_vma;
|
||||
|
||||
/* A generic signed type which is guaranteed to be big enough to hold any
|
||||
arithmetic types we need to deal with. Can be assumed to be compatible
|
||||
with bfd_vma in the same way that signed and unsigned ints are compatible
|
||||
(as parameters, in assignment, etc). */
|
||||
typedef long bfd_signed_vma;
|
||||
|
||||
typedef unsigned long symvalue;
|
||||
typedef unsigned long bfd_size_type;
|
||||
|
||||
/* Print a bfd_vma x on stream s. */
|
||||
#define fprintf_vma(s,x) fprintf(s, "%08lx", x)
|
||||
#define sprintf_vma(s,x) sprintf(s, "%08lx", x)
|
||||
#define printf_vma(x) fprintf_vma(stdout,x)
|
||||
|
||||
typedef unsigned int flagword; /* 32 bits of flags */
|
||||
typedef unsigned char bfd_byte;
|
||||
|
||||
enum bfd_architecture
|
||||
{
|
||||
bfd_arch_unknown, /* File arch not known */
|
||||
bfd_arch_obscure, /* Arch known, not one of these */
|
||||
bfd_arch_m68k, /* Motorola 68xxx */
|
||||
bfd_arch_vax, /* DEC Vax */
|
||||
bfd_arch_i960, /* Intel 960 */
|
||||
/* The order of the following is important.
|
||||
lower number indicates a machine type that
|
||||
only accepts a subset of the instructions
|
||||
available to machines with higher numbers.
|
||||
The exception is the "ca", which is
|
||||
incompatible with all other machines except
|
||||
"core". */
|
||||
|
||||
#define bfd_mach_i960_core 1
|
||||
#define bfd_mach_i960_ka_sa 2
|
||||
#define bfd_mach_i960_kb_sb 3
|
||||
#define bfd_mach_i960_mc 4
|
||||
#define bfd_mach_i960_xa 5
|
||||
#define bfd_mach_i960_ca 6
|
||||
#define bfd_mach_i960_jx 7
|
||||
#define bfd_mach_i960_hx 8
|
||||
|
||||
bfd_arch_a29k, /* AMD 29000 */
|
||||
bfd_arch_sparc, /* SPARC */
|
||||
#define bfd_mach_sparc 1
|
||||
/* The difference between v8plus and v9 is that v9 is a true 64 bit env. */
|
||||
#define bfd_mach_sparc_v8plus 2
|
||||
#define bfd_mach_sparc_v8plusa 3 /* with ultrasparc add'ns */
|
||||
#define bfd_mach_sparc_v9 4
|
||||
#define bfd_mach_sparc_v9a 5 /* with ultrasparc add'ns */
|
||||
/* Nonzero if MACH has the v9 instruction set. */
|
||||
#define bfd_mach_sparc_v9_p(mach) ((mach) != bfd_mach_sparc)
|
||||
bfd_arch_mips, /* MIPS Rxxxx */
|
||||
bfd_arch_i386, /* Intel 386 */
|
||||
bfd_arch_we32k, /* AT&T WE32xxx */
|
||||
bfd_arch_tahoe, /* CCI/Harris Tahoe */
|
||||
bfd_arch_i860, /* Intel 860 */
|
||||
bfd_arch_romp, /* IBM ROMP PC/RT */
|
||||
bfd_arch_alliant, /* Alliant */
|
||||
bfd_arch_convex, /* Convex */
|
||||
bfd_arch_m88k, /* Motorola 88xxx */
|
||||
bfd_arch_pyramid, /* Pyramid Technology */
|
||||
bfd_arch_h8300, /* Hitachi H8/300 */
|
||||
#define bfd_mach_h8300 1
|
||||
#define bfd_mach_h8300h 2
|
||||
bfd_arch_powerpc, /* PowerPC */
|
||||
bfd_arch_rs6000, /* IBM RS/6000 */
|
||||
bfd_arch_hppa, /* HP PA RISC */
|
||||
bfd_arch_z8k, /* Zilog Z8000 */
|
||||
#define bfd_mach_z8001 1
|
||||
#define bfd_mach_z8002 2
|
||||
bfd_arch_h8500, /* Hitachi H8/500 */
|
||||
bfd_arch_sh, /* Hitachi SH */
|
||||
bfd_arch_alpha, /* Dec Alpha */
|
||||
bfd_arch_arm, /* Advanced Risc Machines ARM */
|
||||
bfd_arch_ns32k, /* National Semiconductors ns32000 */
|
||||
bfd_arch_w65, /* WDC 65816 */
|
||||
bfd_arch_last
|
||||
};
|
||||
|
||||
enum bfd_endian { BFD_ENDIAN_UNKNOWN };
|
||||
|
||||
typedef struct bfd bfd;
|
||||
|
||||
#define bfd_getb32(x) *((int *)(x))
|
||||
#define bfd_getl32(x) *((int *)(x))
|
||||
|
||||
#endif
|
175
opcode/dis-asm.h
175
opcode/dis-asm.h
|
@ -1,175 +0,0 @@
|
|||
/* Interface between the opcode library and its callers.
|
||||
Written by Cygnus Support, 1993.
|
||||
|
||||
The opcode library (libopcodes.a) provides instruction decoders for
|
||||
a large variety of instruction sets, callable with an identical
|
||||
interface, for making instruction-processing programs more independent
|
||||
of the instruction set being processed. */
|
||||
|
||||
#ifndef DIS_ASM_H
|
||||
#define DIS_ASM_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include "bfd.h"
|
||||
|
||||
typedef int (*fprintf_ftype) PARAMS((FILE*, const char*, ...));
|
||||
|
||||
enum dis_insn_type {
|
||||
dis_noninsn, /* Not a valid instruction */
|
||||
dis_nonbranch, /* Not a branch instruction */
|
||||
dis_branch, /* Unconditional branch */
|
||||
dis_condbranch, /* Conditional branch */
|
||||
dis_jsr, /* Jump to subroutine */
|
||||
dis_condjsr, /* Conditional jump to subroutine */
|
||||
dis_dref, /* Data reference instruction */
|
||||
dis_dref2 /* Two data references in instruction */
|
||||
};
|
||||
|
||||
/* This struct is passed into the instruction decoding routine,
|
||||
and is passed back out into each callback. The various fields are used
|
||||
for conveying information from your main routine into your callbacks,
|
||||
for passing information into the instruction decoders (such as the
|
||||
addresses of the callback functions), or for passing information
|
||||
back from the instruction decoders to their callers.
|
||||
|
||||
It must be initialized before it is first passed; this can be done
|
||||
by hand, or using one of the initialization macros below. */
|
||||
|
||||
typedef struct disassemble_info {
|
||||
fprintf_ftype fprintf_func;
|
||||
FILE *stream;
|
||||
PTR application_data;
|
||||
|
||||
/* Target description. We could replace this with a pointer to the bfd,
|
||||
but that would require one. There currently isn't any such requirement
|
||||
so to avoid introducing one we record these explicitly. */
|
||||
/* The bfd_arch value. */
|
||||
enum bfd_architecture arch;
|
||||
/* The bfd_mach value. */
|
||||
unsigned long mach;
|
||||
/* Endianness (for bi-endian cpus). Mono-endian cpus can ignore this. */
|
||||
enum bfd_endian endian;
|
||||
|
||||
/* For use by the disassembler.
|
||||
The top 16 bits are reserved for public use (and are documented here).
|
||||
The bottom 16 bits are for the internal use of the disassembler. */
|
||||
unsigned long flags;
|
||||
PTR private_data;
|
||||
|
||||
/* Function used to get bytes to disassemble. MEMADDR is the
|
||||
address of the stuff to be disassembled, MYADDR is the address to
|
||||
put the bytes in, and LENGTH is the number of bytes to read.
|
||||
INFO is a pointer to this struct.
|
||||
Returns an errno value or 0 for success. */
|
||||
int (*read_memory_func)
|
||||
PARAMS ((bfd_vma memaddr, bfd_byte *myaddr, int length,
|
||||
struct disassemble_info *info));
|
||||
|
||||
/* Function which should be called if we get an error that we can't
|
||||
recover from. STATUS is the errno value from read_memory_func and
|
||||
MEMADDR is the address that we were trying to read. INFO is a
|
||||
pointer to this struct. */
|
||||
void (*memory_error_func)
|
||||
PARAMS ((int status, bfd_vma memaddr, struct disassemble_info *info));
|
||||
|
||||
/* Function called to print ADDR. */
|
||||
void (*print_address_func)
|
||||
PARAMS ((bfd_vma addr, struct disassemble_info *info));
|
||||
|
||||
/* These are for buffer_read_memory. */
|
||||
bfd_byte *buffer;
|
||||
bfd_vma buffer_vma;
|
||||
int buffer_length;
|
||||
|
||||
/* Results from instruction decoders. Not all decoders yet support
|
||||
this information. This info is set each time an instruction is
|
||||
decoded, and is only valid for the last such instruction.
|
||||
|
||||
To determine whether this decoder supports this information, set
|
||||
insn_info_valid to 0, decode an instruction, then check it. */
|
||||
|
||||
char insn_info_valid; /* Branch info has been set. */
|
||||
char branch_delay_insns; /* How many sequential insn's will run before
|
||||
a branch takes effect. (0 = normal) */
|
||||
char data_size; /* Size of data reference in insn, in bytes */
|
||||
enum dis_insn_type insn_type; /* Type of instruction */
|
||||
bfd_vma target; /* Target address of branch or dref, if known;
|
||||
zero if unknown. */
|
||||
bfd_vma target2; /* Second target address for dref2 */
|
||||
|
||||
} disassemble_info;
|
||||
|
||||
|
||||
/* Standard disassemblers. Disassemble one instruction at the given
|
||||
target address. Return number of bytes processed. */
|
||||
typedef int (*disassembler_ftype)
|
||||
PARAMS((bfd_vma, disassemble_info *));
|
||||
|
||||
extern int print_insn_big_mips PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_little_mips PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_i386 PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_m68k PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_z8001 PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_z8002 PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_h8300 PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_h8300h PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_h8500 PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_alpha PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_big_arm PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_little_arm PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_sparc PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_sparc64 PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_big_a29k PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_little_a29k PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_i960 PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_sh PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_shl PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_hppa PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_m88k PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_ns32k PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_big_powerpc PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_little_powerpc PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_rs6000 PARAMS ((bfd_vma, disassemble_info*));
|
||||
extern int print_insn_w65 PARAMS ((bfd_vma, disassemble_info*));
|
||||
|
||||
/* Fetch the disassembler for a given BFD, if that support is available. */
|
||||
extern disassembler_ftype disassembler PARAMS ((bfd *));
|
||||
|
||||
|
||||
/* This block of definitions is for particular callers who read instructions
|
||||
into a buffer before calling the instruction decoder. */
|
||||
|
||||
/* Here is a function which callers may wish to use for read_memory_func.
|
||||
It gets bytes from a buffer. */
|
||||
extern int buffer_read_memory
|
||||
PARAMS ((bfd_vma, bfd_byte *, int, struct disassemble_info *));
|
||||
|
||||
/* This function goes with buffer_read_memory.
|
||||
It prints a message using info->fprintf_func and info->stream. */
|
||||
extern void perror_memory PARAMS ((int, bfd_vma, struct disassemble_info *));
|
||||
|
||||
|
||||
/* Just print the address in hex. This is included for completeness even
|
||||
though both GDB and objdump provide their own (to print symbolic
|
||||
addresses). */
|
||||
extern void generic_print_address
|
||||
PARAMS ((bfd_vma, struct disassemble_info *));
|
||||
|
||||
/* Macro to initialize a disassemble_info struct. This should be called
|
||||
by all applications creating such a struct. */
|
||||
#define INIT_DISASSEMBLE_INFO(INFO, STREAM, FPRINTF_FUNC) \
|
||||
(INFO).fprintf_func = (FPRINTF_FUNC), \
|
||||
(INFO).stream = (STREAM), \
|
||||
(INFO).buffer = NULL, \
|
||||
(INFO).buffer_vma = 0, \
|
||||
(INFO).buffer_length = 0, \
|
||||
(INFO).read_memory_func = buffer_read_memory, \
|
||||
(INFO).memory_error_func = perror_memory, \
|
||||
(INFO).print_address_func = generic_print_address, \
|
||||
(INFO).arch = bfd_arch_unknown, \
|
||||
(INFO).mach = 0, \
|
||||
(INFO).endian = BFD_ENDIAN_UNKNOWN, \
|
||||
(INFO).flags = 0, \
|
||||
(INFO).insn_info_valid = 0
|
||||
|
||||
#endif /* ! defined (DIS_ASM_H) */
|
|
@ -1,70 +0,0 @@
|
|||
/* Disassemble from a buffer, for GNU.
|
||||
Copyright (C) 1993, 1994 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#include "sysdep.h"
|
||||
#include "dis-asm.h"
|
||||
#include <errno.h>
|
||||
|
||||
/* Get LENGTH bytes from info's buffer, at target address memaddr.
|
||||
Transfer them to myaddr. */
|
||||
int
|
||||
buffer_read_memory (memaddr, myaddr, length, info)
|
||||
bfd_vma memaddr;
|
||||
bfd_byte *myaddr;
|
||||
int length;
|
||||
struct disassemble_info *info;
|
||||
{
|
||||
if (memaddr < info->buffer_vma
|
||||
|| memaddr + length > info->buffer_vma + info->buffer_length)
|
||||
/* Out of bounds. Use EIO because GDB uses it. */
|
||||
return EIO;
|
||||
memcpy (myaddr, info->buffer + (memaddr - info->buffer_vma), length);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Print an error message. We can assume that this is in response to
|
||||
an error return from buffer_read_memory. */
|
||||
void
|
||||
perror_memory (status, memaddr, info)
|
||||
int status;
|
||||
bfd_vma memaddr;
|
||||
struct disassemble_info *info;
|
||||
{
|
||||
if (status != EIO)
|
||||
/* Can't happen. */
|
||||
(*info->fprintf_func) (info->stream, "Unknown error %d\n", status);
|
||||
else
|
||||
/* Actually, address between memaddr and memaddr + len was
|
||||
out of bounds. */
|
||||
(*info->fprintf_func) (info->stream,
|
||||
"Address 0x%x is out of bounds.\n", memaddr);
|
||||
}
|
||||
|
||||
/* This could be in a separate file, to save miniscule amounts of space
|
||||
in statically linked executables. */
|
||||
|
||||
/* Just print the address is hex. This is included for completeness even
|
||||
though both GDB and objdump provide their own (to print symbolic
|
||||
addresses). */
|
||||
|
||||
void
|
||||
generic_print_address (addr, info)
|
||||
bfd_vma addr;
|
||||
struct disassemble_info *info;
|
||||
{
|
||||
(*info->fprintf_func) (info->stream, "0x%x", addr);
|
||||
}
|
|
@ -1,83 +0,0 @@
|
|||
/******************************** -*- C -*- ****************************
|
||||
*
|
||||
* lightning disassembling support
|
||||
*
|
||||
***********************************************************************/
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Copyright 2000 Free Software Foundation, Inc.
|
||||
* Written by Paolo Bonzini.
|
||||
*
|
||||
* This file is part of GNU lightning.
|
||||
*
|
||||
* GNU lightning is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published
|
||||
* by the Free Software Foundation; either version 3, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* GNU lightning is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with GNU lightning; see the file COPYING.LESSER; if not, write to the
|
||||
* Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301, USA.
|
||||
*
|
||||
***********************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "config.h"
|
||||
#include "dis-asm.h"
|
||||
|
||||
#define LIGHTNING_I386 0
|
||||
#define LIGHTNING_X86_64 1
|
||||
#define LIGHTNING_PPC 2
|
||||
#define LIGHTNING_SPARC 3
|
||||
|
||||
void disassemble(stream, from, to)
|
||||
FILE *stream;
|
||||
char *from, *to;
|
||||
{
|
||||
disassemble_info info;
|
||||
bfd_vma pc = (bfd_vma) from;
|
||||
bfd_vma end = (bfd_vma) to;
|
||||
|
||||
INIT_DISASSEMBLE_INFO(info, stream, fprintf);
|
||||
info.buffer = NULL;
|
||||
info.buffer_vma = 0;
|
||||
info.buffer_length = end;
|
||||
|
||||
while (pc < end) {
|
||||
fprintf_vma(stream, pc);
|
||||
putc('\t', stream);
|
||||
#if LIGHTNING_TARGET == LIGHTNING_I386_32
|
||||
pc += print_insn_i386(pc, &info);
|
||||
#elif LIGHTNING_TARGET == LIGHTNING_PPC
|
||||
pc += print_insn_big_powerpc(pc, &info);
|
||||
#elif LIGHTNING_TARGET == LIGHTNING_SPARC
|
||||
pc += print_insn_sparc(pc, &info);
|
||||
#else
|
||||
# error disassembling not yet supported for your architecture
|
||||
#endif
|
||||
putc('\n', stream);
|
||||
}
|
||||
}
|
||||
|
||||
/* Panic on failing malloc */
|
||||
PTR
|
||||
xmalloc(size)
|
||||
size_t size;
|
||||
{
|
||||
PTR ret = malloc(size ? size : 1);
|
||||
if (!ret) {
|
||||
fprintf(stderr, "Couldn't allocate memory\n");
|
||||
exit(1);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
2031
opcode/i386-dis.c
2031
opcode/i386-dis.c
File diff suppressed because it is too large
Load diff
898
opcode/i386.h
898
opcode/i386.h
|
@ -1,898 +0,0 @@
|
|||
/* i386-opcode.h -- Intel 80386 opcode table
|
||||
Copyright 1989, 1991, 1992, 1995 Free Software Foundation.
|
||||
|
||||
This file is part of GAS, the GNU Assembler, and GDB, the GNU Debugger.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
static const template i386_optab[] = {
|
||||
|
||||
#define _ None
|
||||
/* move instructions */
|
||||
#define MOV_AX_DISP32 0xa0
|
||||
{ "mov", 2, 0xa0, _, DW|NoModrm, { Disp32, Acc, 0 } },
|
||||
{ "mov", 2, 0x88, _, DW|Modrm, { Reg, Reg|Mem, 0 } },
|
||||
{ "mov", 2, 0xb0, _, ShortFormW, { Imm, Reg, 0 } },
|
||||
{ "mov", 2, 0xc6, _, W|Modrm, { Imm, Reg|Mem, 0 } },
|
||||
{ "mov", 2, 0x8c, _, D|Modrm, { SReg3|SReg2, Reg16|Mem, 0 } },
|
||||
/* move to/from control debug registers */
|
||||
{ "mov", 2, 0x0f20, _, D|Modrm, { Control, Reg32, 0} },
|
||||
{ "mov", 2, 0x0f21, _, D|Modrm, { Debug, Reg32, 0} },
|
||||
{ "mov", 2, 0x0f24, _, D|Modrm, { Test, Reg32, 0} },
|
||||
|
||||
/* move with sign extend */
|
||||
/* "movsbl" & "movsbw" must not be unified into "movsb" to avoid
|
||||
conflict with the "movs" string move instruction. Thus,
|
||||
{"movsb", 2, 0x0fbe, _, ReverseRegRegmem|Modrm, { Reg8|Mem, Reg16|Reg32, 0} },
|
||||
is not kosher; we must seperate the two instructions. */
|
||||
{"movsbl", 2, 0x0fbe, _, ReverseRegRegmem|Modrm|Data32, { Reg8|Mem, Reg32, 0} },
|
||||
{"movsbw", 2, 0x0fbe, _, ReverseRegRegmem|Modrm|Data16, { Reg8|Mem, Reg16, 0} },
|
||||
{"movswl", 2, 0x0fbf, _, ReverseRegRegmem|Modrm, { Reg16|Mem, Reg32, 0} },
|
||||
|
||||
/* move with zero extend */
|
||||
{"movzb", 2, 0x0fb6, _, ReverseRegRegmem|Modrm, { Reg8|Mem, Reg16|Reg32, 0} },
|
||||
{"movzwl", 2, 0x0fb7, _, ReverseRegRegmem|Modrm, { Reg16|Mem, Reg32, 0} },
|
||||
|
||||
/* push instructions */
|
||||
{"push", 1, 0x50, _, ShortForm, { WordReg,0,0 } },
|
||||
{"push", 1, 0xff, 0x6, Modrm, { WordReg|WordMem, 0, 0 } },
|
||||
{"push", 1, 0x6a, _, NoModrm, { Imm8S, 0, 0} },
|
||||
{"push", 1, 0x68, _, NoModrm, { Imm16|Imm32, 0, 0} },
|
||||
{"push", 1, 0x06, _, Seg2ShortForm, { SReg2,0,0 } },
|
||||
{"push", 1, 0x0fa0, _, Seg3ShortForm, { SReg3,0,0 } },
|
||||
/* push all */
|
||||
{"pusha", 0, 0x60, _, NoModrm, { 0, 0, 0 } },
|
||||
|
||||
/* pop instructions */
|
||||
{"pop", 1, 0x58, _, ShortForm, { WordReg,0,0 } },
|
||||
{"pop", 1, 0x8f, 0x0, Modrm, { WordReg|WordMem, 0, 0 } },
|
||||
#define POP_SEG_SHORT 0x7
|
||||
{"pop", 1, 0x07, _, Seg2ShortForm, { SReg2,0,0 } },
|
||||
{"pop", 1, 0x0fa1, _, Seg3ShortForm, { SReg3,0,0 } },
|
||||
/* pop all */
|
||||
{"popa", 0, 0x61, _, NoModrm, { 0, 0, 0 } },
|
||||
|
||||
/* xchg exchange instructions
|
||||
xchg commutes: we allow both operand orders */
|
||||
{"xchg", 2, 0x90, _, ShortForm, { WordReg, Acc, 0 } },
|
||||
{"xchg", 2, 0x90, _, ShortForm, { Acc, WordReg, 0 } },
|
||||
{"xchg", 2, 0x86, _, W|Modrm, { Reg, Reg|Mem, 0 } },
|
||||
{"xchg", 2, 0x86, _, W|Modrm, { Reg|Mem, Reg, 0 } },
|
||||
|
||||
/* in/out from ports */
|
||||
{"in", 2, 0xe4, _, W|NoModrm, { Imm8, Acc, 0 } },
|
||||
{"in", 2, 0xec, _, W|NoModrm, { InOutPortReg, Acc, 0 } },
|
||||
{"in", 1, 0xe4, _, W|NoModrm, { Imm8, 0, 0 } },
|
||||
{"in", 1, 0xec, _, W|NoModrm, { InOutPortReg, 0, 0 } },
|
||||
{"out", 2, 0xe6, _, W|NoModrm, { Acc, Imm8, 0 } },
|
||||
{"out", 2, 0xee, _, W|NoModrm, { Acc, InOutPortReg, 0 } },
|
||||
{"out", 1, 0xe6, _, W|NoModrm, { Imm8, 0, 0 } },
|
||||
{"out", 1, 0xee, _, W|NoModrm, { InOutPortReg, 0, 0 } },
|
||||
|
||||
/* load effective address */
|
||||
{"lea", 2, 0x8d, _, Modrm, { WordMem, WordReg, 0 } },
|
||||
|
||||
/* load segment registers from memory */
|
||||
{"lds", 2, 0xc5, _, Modrm, { Mem, Reg32, 0} },
|
||||
{"les", 2, 0xc4, _, Modrm, { Mem, Reg32, 0} },
|
||||
{"lfs", 2, 0x0fb4, _, Modrm, { Mem, Reg32, 0} },
|
||||
{"lgs", 2, 0x0fb5, _, Modrm, { Mem, Reg32, 0} },
|
||||
{"lss", 2, 0x0fb2, _, Modrm, { Mem, Reg32, 0} },
|
||||
|
||||
/* flags register instructions */
|
||||
{"clc", 0, 0xf8, _, NoModrm, { 0, 0, 0} },
|
||||
{"cld", 0, 0xfc, _, NoModrm, { 0, 0, 0} },
|
||||
{"cli", 0, 0xfa, _, NoModrm, { 0, 0, 0} },
|
||||
{"clts", 0, 0x0f06, _, NoModrm, { 0, 0, 0} },
|
||||
{"cmc", 0, 0xf5, _, NoModrm, { 0, 0, 0} },
|
||||
{"lahf", 0, 0x9f, _, NoModrm, { 0, 0, 0} },
|
||||
{"sahf", 0, 0x9e, _, NoModrm, { 0, 0, 0} },
|
||||
{"pushfl", 0, 0x9c, _, NoModrm|Data32, { 0, 0, 0} },
|
||||
{"popfl", 0, 0x9d, _, NoModrm|Data32, { 0, 0, 0} },
|
||||
{"pushfw", 0, 0x9c, _, NoModrm|Data16, { 0, 0, 0} },
|
||||
{"popfw", 0, 0x9d, _, NoModrm|Data16, { 0, 0, 0} },
|
||||
{"pushf", 0, 0x9c, _, NoModrm, { 0, 0, 0} },
|
||||
{"popf", 0, 0x9d, _, NoModrm, { 0, 0, 0} },
|
||||
{"stc", 0, 0xf9, _, NoModrm, { 0, 0, 0} },
|
||||
{"std", 0, 0xfd, _, NoModrm, { 0, 0, 0} },
|
||||
{"sti", 0, 0xfb, _, NoModrm, { 0, 0, 0} },
|
||||
|
||||
{"add", 2, 0x0, _, DW|Modrm, { Reg, Reg|Mem, 0} },
|
||||
{"add", 2, 0x83, 0, Modrm, { Imm8S, WordReg|WordMem, 0} },
|
||||
{"add", 2, 0x4, _, W|NoModrm, { Imm, Acc, 0} },
|
||||
{"add", 2, 0x80, 0, W|Modrm, { Imm, Reg|Mem, 0} },
|
||||
|
||||
{"inc", 1, 0x40, _, ShortForm, { WordReg, 0, 0} },
|
||||
{"inc", 1, 0xfe, 0, W|Modrm, { Reg|Mem, 0, 0} },
|
||||
|
||||
{"sub", 2, 0x28, _, DW|Modrm, { Reg, Reg|Mem, 0} },
|
||||
{"sub", 2, 0x83, 5, Modrm, { Imm8S, WordReg|WordMem, 0} },
|
||||
{"sub", 2, 0x2c, _, W|NoModrm, { Imm, Acc, 0} },
|
||||
{"sub", 2, 0x80, 5, W|Modrm, { Imm, Reg|Mem, 0} },
|
||||
|
||||
{"dec", 1, 0x48, _, ShortForm, { WordReg, 0, 0} },
|
||||
{"dec", 1, 0xfe, 1, W|Modrm, { Reg|Mem, 0, 0} },
|
||||
|
||||
{"sbb", 2, 0x18, _, DW|Modrm, { Reg, Reg|Mem, 0} },
|
||||
{"sbb", 2, 0x83, 3, Modrm, { Imm8S, WordReg|WordMem, 0} },
|
||||
{"sbb", 2, 0x1c, _, W|NoModrm, { Imm, Acc, 0} },
|
||||
{"sbb", 2, 0x80, 3, W|Modrm, { Imm, Reg|Mem, 0} },
|
||||
|
||||
{"cmp", 2, 0x38, _, DW|Modrm, { Reg, Reg|Mem, 0} },
|
||||
{"cmp", 2, 0x83, 7, Modrm, { Imm8S, WordReg|WordMem, 0} },
|
||||
{"cmp", 2, 0x3c, _, W|NoModrm, { Imm, Acc, 0} },
|
||||
{"cmp", 2, 0x80, 7, W|Modrm, { Imm, Reg|Mem, 0} },
|
||||
|
||||
{"test", 2, 0x84, _, W|Modrm, { Reg|Mem, Reg, 0} },
|
||||
{"test", 2, 0x84, _, W|Modrm, { Reg, Reg|Mem, 0} },
|
||||
{"test", 2, 0xa8, _, W|NoModrm, { Imm, Acc, 0} },
|
||||
{"test", 2, 0xf6, 0, W|Modrm, { Imm, Reg|Mem, 0} },
|
||||
|
||||
{"and", 2, 0x20, _, DW|Modrm, { Reg, Reg|Mem, 0} },
|
||||
{"and", 2, 0x83, 4, Modrm, { Imm8S, WordReg|WordMem, 0} },
|
||||
{"and", 2, 0x24, _, W|NoModrm, { Imm, Acc, 0} },
|
||||
{"and", 2, 0x80, 4, W|Modrm, { Imm, Reg|Mem, 0} },
|
||||
|
||||
{"or", 2, 0x08, _, DW|Modrm, { Reg, Reg|Mem, 0} },
|
||||
{"or", 2, 0x83, 1, Modrm, { Imm8S, WordReg|WordMem, 0} },
|
||||
{"or", 2, 0x0c, _, W|NoModrm, { Imm, Acc, 0} },
|
||||
{"or", 2, 0x80, 1, W|Modrm, { Imm, Reg|Mem, 0} },
|
||||
|
||||
{"xor", 2, 0x30, _, DW|Modrm, { Reg, Reg|Mem, 0} },
|
||||
{"xor", 2, 0x83, 6, Modrm, { Imm8S, WordReg|WordMem, 0} },
|
||||
{"xor", 2, 0x34, _, W|NoModrm, { Imm, Acc, 0} },
|
||||
{"xor", 2, 0x80, 6, W|Modrm, { Imm, Reg|Mem, 0} },
|
||||
|
||||
{"adc", 2, 0x10, _, DW|Modrm, { Reg, Reg|Mem, 0} },
|
||||
{"adc", 2, 0x83, 2, Modrm, { Imm8S, WordReg|WordMem, 0} },
|
||||
{"adc", 2, 0x14, _, W|NoModrm, { Imm, Acc, 0} },
|
||||
{"adc", 2, 0x80, 2, W|Modrm, { Imm, Reg|Mem, 0} },
|
||||
|
||||
{"neg", 1, 0xf6, 3, W|Modrm, { Reg|Mem, 0, 0} },
|
||||
{"not", 1, 0xf6, 2, W|Modrm, { Reg|Mem, 0, 0} },
|
||||
|
||||
{"aaa", 0, 0x37, _, NoModrm, { 0, 0, 0} },
|
||||
{"aas", 0, 0x3f, _, NoModrm, { 0, 0, 0} },
|
||||
{"daa", 0, 0x27, _, NoModrm, { 0, 0, 0} },
|
||||
{"das", 0, 0x2f, _, NoModrm, { 0, 0, 0} },
|
||||
{"aad", 0, 0xd50a, _, NoModrm, { 0, 0, 0} },
|
||||
{"aam", 0, 0xd40a, _, NoModrm, { 0, 0, 0} },
|
||||
|
||||
/* conversion insns */
|
||||
/* conversion: intel naming */
|
||||
{"cbw", 0, 0x98, _, NoModrm|Data16, { 0, 0, 0} },
|
||||
{"cwd", 0, 0x99, _, NoModrm|Data16, { 0, 0, 0} },
|
||||
{"cwde", 0, 0x98, _, NoModrm|Data32, { 0, 0, 0} },
|
||||
{"cdq", 0, 0x99, _, NoModrm|Data32, { 0, 0, 0} },
|
||||
/* att naming */
|
||||
{"cbtw", 0, 0x98, _, NoModrm|Data16, { 0, 0, 0} },
|
||||
{"cwtl", 0, 0x98, _, NoModrm|Data32, { 0, 0, 0} },
|
||||
{"cwtd", 0, 0x99, _, NoModrm|Data16, { 0, 0, 0} },
|
||||
{"cltd", 0, 0x99, _, NoModrm|Data32, { 0, 0, 0} },
|
||||
|
||||
/* Warning! the mul/imul (opcode 0xf6) must only have 1 operand! They are
|
||||
expanding 64-bit multiplies, and *cannot* be selected to accomplish
|
||||
'imul %ebx, %eax' (opcode 0x0faf must be used in this case)
|
||||
These multiplies can only be selected with single operand forms. */
|
||||
{"mul", 1, 0xf6, 4, W|Modrm, { Reg|Mem, 0, 0} },
|
||||
{"imul", 1, 0xf6, 5, W|Modrm, { Reg|Mem, 0, 0} },
|
||||
|
||||
|
||||
|
||||
|
||||
/* imulKludge here is needed to reverse the i.rm.reg & i.rm.regmem fields.
|
||||
These instructions are exceptions: 'imul $2, %eax, %ecx' would put
|
||||
'%eax' in the reg field and '%ecx' in the regmem field if we did not
|
||||
switch them. */
|
||||
{"imul", 2, 0x0faf, _, Modrm|ReverseRegRegmem, { WordReg|Mem, WordReg, 0} },
|
||||
{"imul", 3, 0x6b, _, Modrm|ReverseRegRegmem, { Imm8S, WordReg|Mem, WordReg} },
|
||||
{"imul", 3, 0x69, _, Modrm|ReverseRegRegmem, { Imm16|Imm32, WordReg|Mem, WordReg} },
|
||||
/*
|
||||
imul with 2 operands mimicks imul with 3 by puting register both
|
||||
in i.rm.reg & i.rm.regmem fields
|
||||
*/
|
||||
{"imul", 2, 0x6b, _, Modrm|imulKludge, { Imm8S, WordReg, 0} },
|
||||
{"imul", 2, 0x69, _, Modrm|imulKludge, { Imm16|Imm32, WordReg, 0} },
|
||||
{"div", 1, 0xf6, 6, W|Modrm, { Reg|Mem, 0, 0} },
|
||||
{"div", 2, 0xf6, 6, W|Modrm, { Reg|Mem, Acc, 0} },
|
||||
{"idiv", 1, 0xf6, 7, W|Modrm, { Reg|Mem, 0, 0} },
|
||||
{"idiv", 2, 0xf6, 7, W|Modrm, { Reg|Mem, Acc, 0} },
|
||||
|
||||
{"rol", 2, 0xd0, 0, W|Modrm, { Imm1, Reg|Mem, 0} },
|
||||
{"rol", 2, 0xc0, 0, W|Modrm, { Imm8, Reg|Mem, 0} },
|
||||
{"rol", 2, 0xd2, 0, W|Modrm, { ShiftCount, Reg|Mem, 0} },
|
||||
{"rol", 1, 0xd0, 0, W|Modrm, { Reg|Mem, 0, 0} },
|
||||
|
||||
{"ror", 2, 0xd0, 1, W|Modrm, { Imm1, Reg|Mem, 0} },
|
||||
{"ror", 2, 0xc0, 1, W|Modrm, { Imm8, Reg|Mem, 0} },
|
||||
{"ror", 2, 0xd2, 1, W|Modrm, { ShiftCount, Reg|Mem, 0} },
|
||||
{"ror", 1, 0xd0, 1, W|Modrm, { Reg|Mem, 0, 0} },
|
||||
|
||||
{"rcl", 2, 0xd0, 2, W|Modrm, { Imm1, Reg|Mem, 0} },
|
||||
{"rcl", 2, 0xc0, 2, W|Modrm, { Imm8, Reg|Mem, 0} },
|
||||
{"rcl", 2, 0xd2, 2, W|Modrm, { ShiftCount, Reg|Mem, 0} },
|
||||
{"rcl", 1, 0xd0, 2, W|Modrm, { Reg|Mem, 0, 0} },
|
||||
|
||||
{"rcr", 2, 0xd0, 3, W|Modrm, { Imm1, Reg|Mem, 0} },
|
||||
{"rcr", 2, 0xc0, 3, W|Modrm, { Imm8, Reg|Mem, 0} },
|
||||
{"rcr", 2, 0xd2, 3, W|Modrm, { ShiftCount, Reg|Mem, 0} },
|
||||
{"rcr", 1, 0xd0, 3, W|Modrm, { Reg|Mem, 0, 0} },
|
||||
|
||||
{"sal", 2, 0xd0, 4, W|Modrm, { Imm1, Reg|Mem, 0} },
|
||||
{"sal", 2, 0xc0, 4, W|Modrm, { Imm8, Reg|Mem, 0} },
|
||||
{"sal", 2, 0xd2, 4, W|Modrm, { ShiftCount, Reg|Mem, 0} },
|
||||
{"sal", 1, 0xd0, 4, W|Modrm, { Reg|Mem, 0, 0} },
|
||||
{"shl", 2, 0xd0, 4, W|Modrm, { Imm1, Reg|Mem, 0} },
|
||||
{"shl", 2, 0xc0, 4, W|Modrm, { Imm8, Reg|Mem, 0} },
|
||||
{"shl", 2, 0xd2, 4, W|Modrm, { ShiftCount, Reg|Mem, 0} },
|
||||
{"shl", 1, 0xd0, 4, W|Modrm, { Reg|Mem, 0, 0} },
|
||||
|
||||
{"shld", 3, 0x0fa4, _, Modrm, { Imm8, WordReg, WordReg|Mem} },
|
||||
{"shld", 3, 0x0fa5, _, Modrm, { ShiftCount, WordReg, WordReg|Mem} },
|
||||
{"shld", 2, 0x0fa5, _, Modrm, { WordReg, WordReg|Mem, 0} },
|
||||
|
||||
{"shr", 2, 0xd0, 5, W|Modrm, { Imm1, Reg|Mem, 0} },
|
||||
{"shr", 2, 0xc0, 5, W|Modrm, { Imm8, Reg|Mem, 0} },
|
||||
{"shr", 2, 0xd2, 5, W|Modrm, { ShiftCount, Reg|Mem, 0} },
|
||||
{"shr", 1, 0xd0, 5, W|Modrm, { Reg|Mem, 0, 0} },
|
||||
|
||||
{"shrd", 3, 0x0fac, _, Modrm, { Imm8, WordReg, WordReg|Mem} },
|
||||
{"shrd", 3, 0x0fad, _, Modrm, { ShiftCount, WordReg, WordReg|Mem} },
|
||||
{"shrd", 2, 0x0fad, _, Modrm, { WordReg, WordReg|Mem, 0} },
|
||||
|
||||
{"sar", 2, 0xd0, 7, W|Modrm, { Imm1, Reg|Mem, 0} },
|
||||
{"sar", 2, 0xc0, 7, W|Modrm, { Imm8, Reg|Mem, 0} },
|
||||
{"sar", 2, 0xd2, 7, W|Modrm, { ShiftCount, Reg|Mem, 0} },
|
||||
{"sar", 1, 0xd0, 7, W|Modrm, { Reg|Mem, 0, 0} },
|
||||
|
||||
/* control transfer instructions */
|
||||
#define CALL_PC_RELATIVE 0xe8
|
||||
{"call", 1, 0xe8, _, JumpDword, { Disp32, 0, 0} },
|
||||
{"call", 1, 0xff, 2, Modrm|Data32, { Reg|Mem|JumpAbsolute, 0, 0} },
|
||||
{"callw", 1, 0xff, 2, Modrm|Data16, { Reg|Mem|JumpAbsolute, 0, 0} },
|
||||
#define CALL_FAR_IMMEDIATE 0x9a
|
||||
{"lcall", 2, 0x9a, _, JumpInterSegment, { Imm16, Abs32|Imm32, 0} },
|
||||
{"lcall", 1, 0xff, 3, Modrm|Data32, { Mem, 0, 0} },
|
||||
{"lcallw", 1, 0xff, 3, Modrm|Data16, { Mem, 0, 0} },
|
||||
|
||||
#define JUMP_PC_RELATIVE 0xeb
|
||||
{"jmp", 1, 0xeb, _, Jump, { Disp, 0, 0} },
|
||||
{"jmp", 1, 0xff, 4, Modrm, { Reg32|Mem|JumpAbsolute, 0, 0} },
|
||||
#define JUMP_FAR_IMMEDIATE 0xea
|
||||
{"ljmp", 2, 0xea, _, JumpInterSegment, { Imm16, Imm32, 0} },
|
||||
{"ljmp", 1, 0xff, 5, Modrm|Data32, { Mem, 0, 0} },
|
||||
|
||||
{"ret", 0, 0xc3, _, NoModrm|Data32, { 0, 0, 0} },
|
||||
{"ret", 1, 0xc2, _, NoModrm|Data32, { Imm16, 0, 0} },
|
||||
{"retw", 0, 0xc3, _, NoModrm|Data16, { 0, 0, 0} },
|
||||
{"retw", 1, 0xc2, _, NoModrm|Data16, { Imm16, 0, 0} },
|
||||
{"lret", 0, 0xcb, _, NoModrm|Data32, { 0, 0, 0} },
|
||||
{"lret", 1, 0xca, _, NoModrm|Data32, { Imm16, 0, 0} },
|
||||
{"lretw", 0, 0xcb, _, NoModrm|Data16, { 0, 0, 0} },
|
||||
{"lretw", 1, 0xca, _, NoModrm|Data16, { Imm16, 0, 0} },
|
||||
{"enter", 2, 0xc8, _, NoModrm|Data32, { Imm16, Imm8, 0} },
|
||||
{"leave", 0, 0xc9, _, NoModrm|Data32, { 0, 0, 0} },
|
||||
{"enterw", 2, 0xc8, _, NoModrm|Data16, { Imm16, Imm8, 0} },
|
||||
{"leavew", 0, 0xc9, _, NoModrm|Data16, { 0, 0, 0} },
|
||||
|
||||
/* conditional jumps */
|
||||
{"jo", 1, 0x70, _, Jump, { Disp, 0, 0} },
|
||||
|
||||
{"jno", 1, 0x71, _, Jump, { Disp, 0, 0} },
|
||||
|
||||
{"jb", 1, 0x72, _, Jump, { Disp, 0, 0} },
|
||||
{"jc", 1, 0x72, _, Jump, { Disp, 0, 0} },
|
||||
{"jnae", 1, 0x72, _, Jump, { Disp, 0, 0} },
|
||||
|
||||
{"jnb", 1, 0x73, _, Jump, { Disp, 0, 0} },
|
||||
{"jnc", 1, 0x73, _, Jump, { Disp, 0, 0} },
|
||||
{"jae", 1, 0x73, _, Jump, { Disp, 0, 0} },
|
||||
|
||||
{"je", 1, 0x74, _, Jump, { Disp, 0, 0} },
|
||||
{"jz", 1, 0x74, _, Jump, { Disp, 0, 0} },
|
||||
|
||||
{"jne", 1, 0x75, _, Jump, { Disp, 0, 0} },
|
||||
{"jnz", 1, 0x75, _, Jump, { Disp, 0, 0} },
|
||||
|
||||
{"jbe", 1, 0x76, _, Jump, { Disp, 0, 0} },
|
||||
{"jna", 1, 0x76, _, Jump, { Disp, 0, 0} },
|
||||
|
||||
{"jnbe", 1, 0x77, _, Jump, { Disp, 0, 0} },
|
||||
{"ja", 1, 0x77, _, Jump, { Disp, 0, 0} },
|
||||
|
||||
{"js", 1, 0x78, _, Jump, { Disp, 0, 0} },
|
||||
|
||||
{"jns", 1, 0x79, _, Jump, { Disp, 0, 0} },
|
||||
|
||||
{"jp", 1, 0x7a, _, Jump, { Disp, 0, 0} },
|
||||
{"jpe", 1, 0x7a, _, Jump, { Disp, 0, 0} },
|
||||
|
||||
{"jnp", 1, 0x7b, _, Jump, { Disp, 0, 0} },
|
||||
{"jpo", 1, 0x7b, _, Jump, { Disp, 0, 0} },
|
||||
|
||||
{"jl", 1, 0x7c, _, Jump, { Disp, 0, 0} },
|
||||
{"jnge", 1, 0x7c, _, Jump, { Disp, 0, 0} },
|
||||
|
||||
{"jnl", 1, 0x7d, _, Jump, { Disp, 0, 0} },
|
||||
{"jge", 1, 0x7d, _, Jump, { Disp, 0, 0} },
|
||||
|
||||
{"jle", 1, 0x7e, _, Jump, { Disp, 0, 0} },
|
||||
{"jng", 1, 0x7e, _, Jump, { Disp, 0, 0} },
|
||||
|
||||
{"jnle", 1, 0x7f, _, Jump, { Disp, 0, 0} },
|
||||
{"jg", 1, 0x7f, _, Jump, { Disp, 0, 0} },
|
||||
|
||||
#if 0 /* XXX where are these macros used?
|
||||
To get them working again, they need to take
|
||||
an entire template as the parameter,
|
||||
and check for Data16/Data32 flags. */
|
||||
/* these turn into pseudo operations when disp is larger than 8 bits */
|
||||
#define IS_JUMP_ON_CX_ZERO(o) \
|
||||
(o == 0x66e3)
|
||||
#define IS_JUMP_ON_ECX_ZERO(o) \
|
||||
(o == 0xe3)
|
||||
#endif
|
||||
|
||||
{"jcxz", 1, 0xe3, _, JumpByte|Data16, { Disp, 0, 0} },
|
||||
{"jecxz", 1, 0xe3, _, JumpByte|Data32, { Disp, 0, 0} },
|
||||
|
||||
#define IS_LOOP_ECX_TIMES(o) \
|
||||
(o == 0xe2 || o == 0xe1 || o == 0xe0)
|
||||
|
||||
{"loop", 1, 0xe2, _, JumpByte, { Disp, 0, 0} },
|
||||
|
||||
{"loopz", 1, 0xe1, _, JumpByte, { Disp, 0, 0} },
|
||||
{"loope", 1, 0xe1, _, JumpByte, { Disp, 0, 0} },
|
||||
|
||||
{"loopnz", 1, 0xe0, _, JumpByte, { Disp, 0, 0} },
|
||||
{"loopne", 1, 0xe0, _, JumpByte, { Disp, 0, 0} },
|
||||
|
||||
/* set byte on flag instructions */
|
||||
{"seto", 1, 0x0f90, 0, Modrm, { Reg8|Mem, 0, 0} },
|
||||
|
||||
{"setno", 1, 0x0f91, 0, Modrm, { Reg8|Mem, 0, 0} },
|
||||
|
||||
{"setb", 1, 0x0f92, 0, Modrm, { Reg8|Mem, 0, 0} },
|
||||
{"setc", 1, 0x0f92, 0, Modrm, { Reg8|Mem, 0, 0} },
|
||||
{"setnae", 1, 0x0f92, 0, Modrm, { Reg8|Mem, 0, 0} },
|
||||
|
||||
{"setnb", 1, 0x0f93, 0, Modrm, { Reg8|Mem, 0, 0} },
|
||||
{"setnc", 1, 0x0f93, 0, Modrm, { Reg8|Mem, 0, 0} },
|
||||
{"setae", 1, 0x0f93, 0, Modrm, { Reg8|Mem, 0, 0} },
|
||||
|
||||
{"sete", 1, 0x0f94, 0, Modrm, { Reg8|Mem, 0, 0} },
|
||||
{"setz", 1, 0x0f94, 0, Modrm, { Reg8|Mem, 0, 0} },
|
||||
|
||||
{"setne", 1, 0x0f95, 0, Modrm, { Reg8|Mem, 0, 0} },
|
||||
{"setnz", 1, 0x0f95, 0, Modrm, { Reg8|Mem, 0, 0} },
|
||||
|
||||
{"setbe", 1, 0x0f96, 0, Modrm, { Reg8|Mem, 0, 0} },
|
||||
{"setna", 1, 0x0f96, 0, Modrm, { Reg8|Mem, 0, 0} },
|
||||
|
||||
{"setnbe", 1, 0x0f97, 0, Modrm, { Reg8|Mem, 0, 0} },
|
||||
{"seta", 1, 0x0f97, 0, Modrm, { Reg8|Mem, 0, 0} },
|
||||
|
||||
{"sets", 1, 0x0f98, 0, Modrm, { Reg8|Mem, 0, 0} },
|
||||
|
||||
{"setns", 1, 0x0f99, 0, Modrm, { Reg8|Mem, 0, 0} },
|
||||
|
||||
{"setp", 1, 0x0f9a, 0, Modrm, { Reg8|Mem, 0, 0} },
|
||||
{"setpe", 1, 0x0f9a, 0, Modrm, { Reg8|Mem, 0, 0} },
|
||||
|
||||
{"setnp", 1, 0x0f9b, 0, Modrm, { Reg8|Mem, 0, 0} },
|
||||
{"setpo", 1, 0x0f9b, 0, Modrm, { Reg8|Mem, 0, 0} },
|
||||
|
||||
{"setl", 1, 0x0f9c, 0, Modrm, { Reg8|Mem, 0, 0} },
|
||||
{"setnge", 1, 0x0f9c, 0, Modrm, { Reg8|Mem, 0, 0} },
|
||||
|
||||
{"setnl", 1, 0x0f9d, 0, Modrm, { Reg8|Mem, 0, 0} },
|
||||
{"setge", 1, 0x0f9d, 0, Modrm, { Reg8|Mem, 0, 0} },
|
||||
|
||||
{"setle", 1, 0x0f9e, 0, Modrm, { Reg8|Mem, 0, 0} },
|
||||
{"setng", 1, 0x0f9e, 0, Modrm, { Reg8|Mem, 0, 0} },
|
||||
|
||||
{"setnle", 1, 0x0f9f, 0, Modrm, { Reg8|Mem, 0, 0} },
|
||||
{"setg", 1, 0x0f9f, 0, Modrm, { Reg8|Mem, 0, 0} },
|
||||
|
||||
#define IS_STRING_INSTRUCTION(o) \
|
||||
((o) == 0xa6 || (o) == 0x6c || (o) == 0x6e || (o) == 0x6e || \
|
||||
(o) == 0xac || (o) == 0xa4 || (o) == 0xae || (o) == 0xaa || \
|
||||
(o) == 0xd7)
|
||||
|
||||
/* string manipulation */
|
||||
{"cmps", 0, 0xa6, _, W|NoModrm, { 0, 0, 0} },
|
||||
{"scmp", 0, 0xa6, _, W|NoModrm, { 0, 0, 0} },
|
||||
{"ins", 0, 0x6c, _, W|NoModrm, { 0, 0, 0} },
|
||||
{"outs", 0, 0x6e, _, W|NoModrm, { 0, 0, 0} },
|
||||
{"lods", 0, 0xac, _, W|NoModrm, { 0, 0, 0} },
|
||||
{"slod", 0, 0xac, _, W|NoModrm, { 0, 0, 0} },
|
||||
{"movs", 0, 0xa4, _, W|NoModrm, { 0, 0, 0} },
|
||||
{"smov", 0, 0xa4, _, W|NoModrm, { 0, 0, 0} },
|
||||
{"scas", 0, 0xae, _, W|NoModrm, { 0, 0, 0} },
|
||||
{"ssca", 0, 0xae, _, W|NoModrm, { 0, 0, 0} },
|
||||
{"stos", 0, 0xaa, _, W|NoModrm, { 0, 0, 0} },
|
||||
{"ssto", 0, 0xaa, _, W|NoModrm, { 0, 0, 0} },
|
||||
{"xlat", 0, 0xd7, _, NoModrm, { 0, 0, 0} },
|
||||
|
||||
/* bit manipulation */
|
||||
{"bsf", 2, 0x0fbc, _, Modrm|ReverseRegRegmem, { Reg|Mem, Reg, 0} },
|
||||
{"bsr", 2, 0x0fbd, _, Modrm|ReverseRegRegmem, { Reg|Mem, Reg, 0} },
|
||||
{"bt", 2, 0x0fa3, _, Modrm, { Reg, Reg|Mem, 0} },
|
||||
{"bt", 2, 0x0fba, 4, Modrm, { Imm8, Reg|Mem, 0} },
|
||||
{"btc", 2, 0x0fbb, _, Modrm, { Reg, Reg|Mem, 0} },
|
||||
{"btc", 2, 0x0fba, 7, Modrm, { Imm8, Reg|Mem, 0} },
|
||||
{"btr", 2, 0x0fb3, _, Modrm, { Reg, Reg|Mem, 0} },
|
||||
{"btr", 2, 0x0fba, 6, Modrm, { Imm8, Reg|Mem, 0} },
|
||||
{"bts", 2, 0x0fab, _, Modrm, { Reg, Reg|Mem, 0} },
|
||||
{"bts", 2, 0x0fba, 5, Modrm, { Imm8, Reg|Mem, 0} },
|
||||
|
||||
/* interrupts & op. sys insns */
|
||||
/* See gas/config/tc-i386.c for conversion of 'int $3' into the special
|
||||
int 3 insn. */
|
||||
#define INT_OPCODE 0xcd
|
||||
#define INT3_OPCODE 0xcc
|
||||
{"int", 1, 0xcd, _, NoModrm, { Imm8, 0, 0} },
|
||||
{"int3", 0, 0xcc, _, NoModrm, { 0, 0, 0} },
|
||||
{"into", 0, 0xce, _, NoModrm, { 0, 0, 0} },
|
||||
{"iret", 0, 0xcf, _, NoModrm|Data32, { 0, 0, 0} },
|
||||
{"iretw", 0, 0xcf, _, NoModrm|Data16, { 0, 0, 0} },
|
||||
/* i386sl, i486sl, later 486, and Pentium */
|
||||
{"rsm", 0, 0x0faa, _, NoModrm,{ 0, 0, 0} },
|
||||
|
||||
{"boundl", 2, 0x62, _, Modrm|Data32, { Reg32, Mem, 0} },
|
||||
{"boundw", 2, 0x62, _, Modrm|Data16, { Reg16, Mem, 0} },
|
||||
|
||||
{"hlt", 0, 0xf4, _, NoModrm, { 0, 0, 0} },
|
||||
{"wait", 0, 0x9b, _, NoModrm, { 0, 0, 0} },
|
||||
/* nop is actually 'xchgl %eax, %eax' */
|
||||
{"nop", 0, 0x90, _, NoModrm, { 0, 0, 0} },
|
||||
|
||||
/* protection control */
|
||||
{"arpl", 2, 0x63, _, Modrm, { Reg16, Reg16|Mem, 0} },
|
||||
{"lar", 2, 0x0f02, _, Modrm|ReverseRegRegmem, { WordReg|Mem, WordReg, 0} },
|
||||
{"lgdt", 1, 0x0f01, 2, Modrm, { Mem, 0, 0} },
|
||||
{"lidt", 1, 0x0f01, 3, Modrm, { Mem, 0, 0} },
|
||||
{"lldt", 1, 0x0f00, 2, Modrm, { WordReg|Mem, 0, 0} },
|
||||
{"lmsw", 1, 0x0f01, 6, Modrm, { WordReg|Mem, 0, 0} },
|
||||
{"lsl", 2, 0x0f03, _, Modrm|ReverseRegRegmem, { WordReg|Mem, WordReg, 0} },
|
||||
{"ltr", 1, 0x0f00, 3, Modrm, { WordReg|Mem, 0, 0} },
|
||||
|
||||
{"sgdt", 1, 0x0f01, 0, Modrm, { Mem, 0, 0} },
|
||||
{"sidt", 1, 0x0f01, 1, Modrm, { Mem, 0, 0} },
|
||||
{"sldt", 1, 0x0f00, 0, Modrm, { WordReg|Mem, 0, 0} },
|
||||
{"smsw", 1, 0x0f01, 4, Modrm, { WordReg|Mem, 0, 0} },
|
||||
{"str", 1, 0x0f00, 1, Modrm, { Reg16|Mem, 0, 0} },
|
||||
|
||||
{"verr", 1, 0x0f00, 4, Modrm, { WordReg|Mem, 0, 0} },
|
||||
{"verw", 1, 0x0f00, 5, Modrm, { WordReg|Mem, 0, 0} },
|
||||
|
||||
/* floating point instructions */
|
||||
|
||||
/* load */
|
||||
{"fld", 1, 0xd9c0, _, ShortForm, { FloatReg, 0, 0} }, /* register */
|
||||
{"flds", 1, 0xd9, 0, Modrm, { Mem, 0, 0} }, /* %st0 <-- mem float */
|
||||
{"fldl", 1, 0xdd, 0, Modrm, { Mem, 0, 0} }, /* %st0 <-- mem double */
|
||||
{"fldl", 1, 0xd9c0, _, ShortForm, { FloatReg, 0, 0} }, /* register */
|
||||
{"fild", 1, 0xdf, 0, Modrm, { Mem, 0, 0} }, /* %st0 <-- mem word (16) */
|
||||
{"fildl", 1, 0xdb, 0, Modrm, { Mem, 0, 0} }, /* %st0 <-- mem dword (32) */
|
||||
{"fildq",1, 0xdf, 5, Modrm, { Mem, 0, 0} }, /* %st0 <-- mem qword (64) */
|
||||
{"fildll",1, 0xdf, 5, Modrm, { Mem, 0, 0} }, /* %st0 <-- mem qword (64) */
|
||||
{"fldt", 1, 0xdb, 5, Modrm, { Mem, 0, 0} }, /* %st0 <-- mem efloat */
|
||||
{"fbld", 1, 0xdf, 4, Modrm, { Mem, 0, 0} }, /* %st0 <-- mem bcd */
|
||||
|
||||
/* store (no pop) */
|
||||
{"fst", 1, 0xddd0, _, ShortForm, { FloatReg, 0, 0} }, /* register */
|
||||
{"fsts", 1, 0xd9, 2, Modrm, { Mem, 0, 0} }, /* %st0 --> mem float */
|
||||
{"fstl", 1, 0xdd, 2, Modrm, { Mem, 0, 0} }, /* %st0 --> mem double */
|
||||
{"fstl", 1, 0xddd0, _, ShortForm, { FloatReg, 0, 0} }, /* register */
|
||||
{"fist", 1, 0xdf, 2, Modrm, { Mem, 0, 0} }, /* %st0 --> mem word (16) */
|
||||
{"fistl", 1, 0xdb, 2, Modrm, { Mem, 0, 0} }, /* %st0 --> mem dword (32) */
|
||||
|
||||
/* store (with pop) */
|
||||
{"fstp", 1, 0xddd8, _, ShortForm, { FloatReg, 0, 0} }, /* register */
|
||||
{"fstps", 1, 0xd9, 3, Modrm, { Mem, 0, 0} }, /* %st0 --> mem float */
|
||||
{"fstpl", 1, 0xdd, 3, Modrm, { Mem, 0, 0} }, /* %st0 --> mem double */
|
||||
{"fstpl", 1, 0xddd8, _, ShortForm, { FloatReg, 0, 0} }, /* register */
|
||||
{"fistp", 1, 0xdf, 3, Modrm, { Mem, 0, 0} }, /* %st0 --> mem word (16) */
|
||||
{"fistpl",1, 0xdb, 3, Modrm, { Mem, 0, 0} }, /* %st0 --> mem dword (32) */
|
||||
{"fistpq",1, 0xdf, 7, Modrm, { Mem, 0, 0} }, /* %st0 --> mem qword (64) */
|
||||
{"fistpll",1,0xdf, 7, Modrm, { Mem, 0, 0} }, /* %st0 --> mem qword (64) */
|
||||
{"fstpt", 1, 0xdb, 7, Modrm, { Mem, 0, 0} }, /* %st0 --> mem efloat */
|
||||
{"fbstp", 1, 0xdf, 6, Modrm, { Mem, 0, 0} }, /* %st0 --> mem bcd */
|
||||
|
||||
/* exchange %st<n> with %st0 */
|
||||
{"fxch", 1, 0xd9c8, _, ShortForm, { FloatReg, 0, 0} },
|
||||
{"fxch", 0, 0xd9c9, _, NoModrm, { 0, 0, 0} }, /* alias for fxch %st, %st(1) */
|
||||
|
||||
/* comparison (without pop) */
|
||||
{"fcom", 1, 0xd8d0, _, ShortForm, { FloatReg, 0, 0} },
|
||||
{"fcoms", 1, 0xd8, 2, Modrm, { Mem, 0, 0} }, /* compare %st0, mem float */
|
||||
{"ficoml", 1, 0xda, 2, Modrm, { Mem, 0, 0} }, /* compare %st0, mem word */
|
||||
{"fcoml", 1, 0xdc, 2, Modrm, { Mem, 0, 0} }, /* compare %st0, mem double */
|
||||
{"fcoml", 1, 0xd8d0, _, ShortForm, { FloatReg, 0, 0} },
|
||||
{"ficoms", 1, 0xde, 2, Modrm, { Mem, 0, 0} }, /* compare %st0, mem dword */
|
||||
|
||||
/* comparison (with pop) */
|
||||
{"fcomp", 1, 0xd8d8, _, ShortForm, { FloatReg, 0, 0} },
|
||||
{"fcomps", 1, 0xd8, 3, Modrm, { Mem, 0, 0} }, /* compare %st0, mem float */
|
||||
{"ficompl", 1, 0xda, 3, Modrm, { Mem, 0, 0} }, /* compare %st0, mem word */
|
||||
{"fcompl", 1, 0xdc, 3, Modrm, { Mem, 0, 0} }, /* compare %st0, mem double */
|
||||
{"fcompl", 1, 0xd8d8, _, ShortForm, { FloatReg, 0, 0} },
|
||||
{"ficomps", 1, 0xde, 3, Modrm, { Mem, 0, 0} }, /* compare %st0, mem dword */
|
||||
{"fcompp", 0, 0xded9, _, NoModrm, { 0, 0, 0} }, /* compare %st0, %st1 & pop 2 */
|
||||
|
||||
/* unordered comparison (with pop) */
|
||||
{"fucom", 1, 0xdde0, _, ShortForm, { FloatReg, 0, 0} },
|
||||
{"fucomp", 1, 0xdde8, _, ShortForm, { FloatReg, 0, 0} },
|
||||
{"fucompp", 0, 0xdae9, _, NoModrm, { 0, 0, 0} }, /* ucompare %st0, %st1 & pop twice */
|
||||
|
||||
{"ftst", 0, 0xd9e4, _, NoModrm, { 0, 0, 0} }, /* test %st0 */
|
||||
{"fxam", 0, 0xd9e5, _, NoModrm, { 0, 0, 0} }, /* examine %st0 */
|
||||
|
||||
/* load constants into %st0 */
|
||||
{"fld1", 0, 0xd9e8, _, NoModrm, { 0, 0, 0} }, /* %st0 <-- 1.0 */
|
||||
{"fldl2t", 0, 0xd9e9, _, NoModrm, { 0, 0, 0} }, /* %st0 <-- log2(10) */
|
||||
{"fldl2e", 0, 0xd9ea, _, NoModrm, { 0, 0, 0} }, /* %st0 <-- log2(e) */
|
||||
{"fldpi", 0, 0xd9eb, _, NoModrm, { 0, 0, 0} }, /* %st0 <-- pi */
|
||||
{"fldlg2", 0, 0xd9ec, _, NoModrm, { 0, 0, 0} }, /* %st0 <-- log10(2) */
|
||||
{"fldln2", 0, 0xd9ed, _, NoModrm, { 0, 0, 0} }, /* %st0 <-- ln(2) */
|
||||
{"fldz", 0, 0xd9ee, _, NoModrm, { 0, 0, 0} }, /* %st0 <-- 0.0 */
|
||||
|
||||
/* arithmetic */
|
||||
|
||||
/* add */
|
||||
{"fadd", 1, 0xd8c0, _, ShortForm, { FloatReg, 0, 0} },
|
||||
{"fadd", 2, 0xd8c0, _, ShortForm|FloatD, { FloatReg, FloatAcc, 0} },
|
||||
{"fadd", 0, 0xdcc1, _, NoModrm, { 0, 0, 0} }, /* alias for fadd %st, %st(1) */
|
||||
{"faddp", 1, 0xdac0, _, ShortForm, { FloatReg, 0, 0} },
|
||||
{"faddp", 2, 0xdac0, _, ShortForm|FloatD, { FloatReg, FloatAcc, 0} },
|
||||
{"faddp", 0, 0xdec1, _, NoModrm, { 0, 0, 0} }, /* alias for faddp %st, %st(1) */
|
||||
{"fadds", 1, 0xd8, 0, Modrm, { Mem, 0, 0} },
|
||||
{"fiaddl", 1, 0xda, 0, Modrm, { Mem, 0, 0} },
|
||||
{"faddl", 1, 0xdc, 0, Modrm, { Mem, 0, 0} },
|
||||
{"fiadds", 1, 0xde, 0, Modrm, { Mem, 0, 0} },
|
||||
|
||||
/* sub */
|
||||
/* Note: intel has decided that certain of these operations are reversed
|
||||
in assembler syntax. */
|
||||
{"fsub", 1, 0xd8e0, _, ShortForm, { FloatReg, 0, 0} },
|
||||
{"fsub", 2, 0xd8e0, _, ShortForm, { FloatReg, FloatAcc, 0} },
|
||||
#ifdef NON_BROKEN_OPCODES
|
||||
{"fsub", 2, 0xdce8, _, ShortForm, { FloatAcc, FloatReg, 0} },
|
||||
#else
|
||||
{"fsub", 2, 0xdce0, _, ShortForm, { FloatAcc, FloatReg, 0} },
|
||||
#endif
|
||||
{"fsub", 0, 0xdce1, _, NoModrm, { 0, 0, 0} },
|
||||
{"fsubp", 1, 0xdae0, _, ShortForm, { FloatReg, 0, 0} },
|
||||
{"fsubp", 2, 0xdae0, _, ShortForm, { FloatReg, FloatAcc, 0} },
|
||||
#ifdef NON_BROKEN_OPCODES
|
||||
{"fsubp", 2, 0xdee8, _, ShortForm, { FloatAcc, FloatReg, 0} },
|
||||
#else
|
||||
{"fsubp", 2, 0xdee0, _, ShortForm, { FloatAcc, FloatReg, 0} },
|
||||
#endif
|
||||
{"fsubp", 0, 0xdee1, _, NoModrm, { 0, 0, 0} },
|
||||
{"fsubs", 1, 0xd8, 4, Modrm, { Mem, 0, 0} },
|
||||
{"fisubl", 1, 0xda, 4, Modrm, { Mem, 0, 0} },
|
||||
{"fsubl", 1, 0xdc, 4, Modrm, { Mem, 0, 0} },
|
||||
{"fisubs", 1, 0xde, 4, Modrm, { Mem, 0, 0} },
|
||||
|
||||
/* sub reverse */
|
||||
{"fsubr", 1, 0xd8e8, _, ShortForm, { FloatReg, 0, 0} },
|
||||
{"fsubr", 2, 0xd8e8, _, ShortForm, { FloatReg, FloatAcc, 0} },
|
||||
#ifdef NON_BROKEN_OPCODES
|
||||
{"fsubr", 2, 0xdce0, _, ShortForm, { FloatAcc, FloatReg, 0} },
|
||||
#else
|
||||
{"fsubr", 2, 0xdce8, _, ShortForm, { FloatAcc, FloatReg, 0} },
|
||||
#endif
|
||||
{"fsubr", 0, 0xdce9, _, NoModrm, { 0, 0, 0} },
|
||||
{"fsubrp", 1, 0xdae8, _, ShortForm, { FloatReg, 0, 0} },
|
||||
{"fsubrp", 2, 0xdae8, _, ShortForm, { FloatReg, FloatAcc, 0} },
|
||||
#ifdef NON_BROKEN_OPCODES
|
||||
{"fsubrp", 2, 0xdee0, _, ShortForm, { FloatAcc, FloatReg, 0} },
|
||||
#else
|
||||
{"fsubrp", 2, 0xdee8, _, ShortForm, { FloatAcc, FloatReg, 0} },
|
||||
#endif
|
||||
{"fsubrp", 0, 0xdee9, _, NoModrm, { 0, 0, 0} },
|
||||
{"fsubrs", 1, 0xd8, 5, Modrm, { Mem, 0, 0} },
|
||||
{"fisubrl", 1, 0xda, 5, Modrm, { Mem, 0, 0} },
|
||||
{"fsubrl", 1, 0xdc, 5, Modrm, { Mem, 0, 0} },
|
||||
{"fisubrs", 1, 0xde, 5, Modrm, { Mem, 0, 0} },
|
||||
|
||||
/* mul */
|
||||
{"fmul", 1, 0xd8c8, _, ShortForm, { FloatReg, 0, 0} },
|
||||
{"fmul", 2, 0xd8c8, _, ShortForm|FloatD, { FloatReg, FloatAcc, 0} },
|
||||
{"fmul", 0, 0xdcc9, _, NoModrm, { 0, 0, 0} },
|
||||
{"fmulp", 1, 0xdac8, _, ShortForm, { FloatReg, 0, 0} },
|
||||
{"fmulp", 2, 0xdac8, _, ShortForm|FloatD, { FloatReg, FloatAcc, 0} },
|
||||
{"fmulp", 0, 0xdec9, _, NoModrm, { 0, 0, 0} },
|
||||
{"fmuls", 1, 0xd8, 1, Modrm, { Mem, 0, 0} },
|
||||
{"fimull", 1, 0xda, 1, Modrm, { Mem, 0, 0} },
|
||||
{"fmull", 1, 0xdc, 1, Modrm, { Mem, 0, 0} },
|
||||
{"fimuls", 1, 0xde, 1, Modrm, { Mem, 0, 0} },
|
||||
|
||||
/* div */
|
||||
/* Note: intel has decided that certain of these operations are reversed
|
||||
in assembler syntax. */
|
||||
{"fdiv", 1, 0xd8f0, _, ShortForm, { FloatReg, 0, 0} },
|
||||
{"fdiv", 2, 0xd8f0, _, ShortForm, { FloatReg, FloatAcc, 0} },
|
||||
#ifdef NON_BROKEN_OPCODES
|
||||
{"fdiv", 2, 0xdcf8, _, ShortForm, { FloatAcc, FloatReg, 0} },
|
||||
#else
|
||||
{"fdiv", 2, 0xdcf0, _, ShortForm, { FloatAcc, FloatReg, 0} },
|
||||
#endif
|
||||
{"fdiv", 0, 0xdcf1, _, NoModrm, { 0, 0, 0} },
|
||||
{"fdivp", 1, 0xdaf0, _, ShortForm, { FloatReg, 0, 0} },
|
||||
{"fdivp", 2, 0xdaf0, _, ShortForm, { FloatReg, FloatAcc, 0} },
|
||||
#ifdef NON_BROKEN_OPCODES
|
||||
{"fdivp", 2, 0xdef8, _, ShortForm, { FloatAcc, FloatReg, 0} },
|
||||
#else
|
||||
{"fdivp", 2, 0xdef0, _, ShortForm, { FloatAcc, FloatReg, 0} },
|
||||
#endif
|
||||
{"fdivp", 0, 0xdef1, _, NoModrm, { 0, 0, 0} },
|
||||
{"fdivs", 1, 0xd8, 6, Modrm, { Mem, 0, 0} },
|
||||
{"fidivl", 1, 0xda, 6, Modrm, { Mem, 0, 0} },
|
||||
{"fdivl", 1, 0xdc, 6, Modrm, { Mem, 0, 0} },
|
||||
{"fidivs", 1, 0xde, 6, Modrm, { Mem, 0, 0} },
|
||||
|
||||
/* div reverse */
|
||||
{"fdivr", 1, 0xd8f8, _, ShortForm, { FloatReg, 0, 0} },
|
||||
{"fdivr", 2, 0xd8f8, _, ShortForm, { FloatReg, FloatAcc, 0} },
|
||||
#ifdef NON_BROKEN_OPCODES
|
||||
{"fdivr", 2, 0xdcf0, _, ShortForm, { FloatAcc, FloatReg, 0} },
|
||||
#else
|
||||
{"fdivr", 2, 0xdcf8, _, ShortForm, { FloatAcc, FloatReg, 0} },
|
||||
#endif
|
||||
{"fdivr", 0, 0xdcf9, _, NoModrm, { 0, 0, 0} },
|
||||
{"fdivrp", 1, 0xdaf8, _, ShortForm, { FloatReg, 0, 0} },
|
||||
{"fdivrp", 2, 0xdaf8, _, ShortForm, { FloatReg, FloatAcc, 0} },
|
||||
#ifdef NON_BROKEN_OPCODES
|
||||
{"fdivrp", 2, 0xdef0, _, ShortForm, { FloatAcc, FloatReg, 0} },
|
||||
#else
|
||||
{"fdivrp", 2, 0xdef8, _, ShortForm, { FloatAcc, FloatReg, 0} },
|
||||
#endif
|
||||
{"fdivrp", 0, 0xdef9, _, NoModrm, { 0, 0, 0} },
|
||||
{"fdivrs", 1, 0xd8, 7, Modrm, { Mem, 0, 0} },
|
||||
{"fidivrl", 1, 0xda, 7, Modrm, { Mem, 0, 0} },
|
||||
{"fdivrl", 1, 0xdc, 7, Modrm, { Mem, 0, 0} },
|
||||
{"fidivrs", 1, 0xde, 7, Modrm, { Mem, 0, 0} },
|
||||
|
||||
{"f2xm1", 0, 0xd9f0, _, NoModrm, { 0, 0, 0} },
|
||||
{"fyl2x", 0, 0xd9f1, _, NoModrm, { 0, 0, 0} },
|
||||
{"fptan", 0, 0xd9f2, _, NoModrm, { 0, 0, 0} },
|
||||
{"fpatan", 0, 0xd9f3, _, NoModrm, { 0, 0, 0} },
|
||||
{"fxtract", 0, 0xd9f4, _, NoModrm, { 0, 0, 0} },
|
||||
{"fprem1", 0, 0xd9f5, _, NoModrm, { 0, 0, 0} },
|
||||
{"fdecstp", 0, 0xd9f6, _, NoModrm, { 0, 0, 0} },
|
||||
{"fincstp", 0, 0xd9f7, _, NoModrm, { 0, 0, 0} },
|
||||
{"fprem", 0, 0xd9f8, _, NoModrm, { 0, 0, 0} },
|
||||
{"fyl2xp1", 0, 0xd9f9, _, NoModrm, { 0, 0, 0} },
|
||||
{"fsqrt", 0, 0xd9fa, _, NoModrm, { 0, 0, 0} },
|
||||
{"fsincos", 0, 0xd9fb, _, NoModrm, { 0, 0, 0} },
|
||||
{"frndint", 0, 0xd9fc, _, NoModrm, { 0, 0, 0} },
|
||||
{"fscale", 0, 0xd9fd, _, NoModrm, { 0, 0, 0} },
|
||||
{"fsin", 0, 0xd9fe, _, NoModrm, { 0, 0, 0} },
|
||||
{"fcos", 0, 0xd9ff, _, NoModrm, { 0, 0, 0} },
|
||||
|
||||
{"fchs", 0, 0xd9e0, _, NoModrm, { 0, 0, 0} },
|
||||
{"fabs", 0, 0xd9e1, _, NoModrm, { 0, 0, 0} },
|
||||
|
||||
/* processor control */
|
||||
{"fninit", 0, 0xdbe3, _, NoModrm, { 0, 0, 0} },
|
||||
{"finit", 0, 0x9bdbe3, _, NoModrm, { 0, 0, 0} },
|
||||
{"fldcw", 1, 0xd9, 5, Modrm, { Mem, 0, 0} },
|
||||
{"fnstcw", 1, 0xd9, 7, Modrm, { Mem, 0, 0} },
|
||||
{"fstcw", 1, 0x9bd9, 7, Modrm, { Mem, 0, 0} },
|
||||
{"fnstsw", 1, 0xdfe0, _, NoModrm, { Acc, 0, 0} },
|
||||
{"fnstsw", 1, 0xdd, 7, Modrm, { Mem, 0, 0} },
|
||||
{"fnstsw", 0, 0xdfe0, _, NoModrm, { 0, 0, 0} },
|
||||
{"fstsw", 1, 0x9bdfe0, _, NoModrm, { Acc, 0, 0} },
|
||||
{"fstsw", 1, 0x9bdd, 7, Modrm, { Mem, 0, 0} },
|
||||
{"fstsw", 0, 0x9bdfe0, _, NoModrm, { 0, 0, 0} },
|
||||
{"fnclex", 0, 0xdbe2, _, NoModrm, { 0, 0, 0} },
|
||||
{"fclex", 0, 0x9bdbe2, _, NoModrm, { 0, 0, 0} },
|
||||
/*
|
||||
We ignore the short format (287) versions of fstenv/fldenv & fsave/frstor
|
||||
instructions; i'm not sure how to add them or how they are different.
|
||||
My 386/387 book offers no details about this.
|
||||
*/
|
||||
{"fnstenv", 1, 0xd9, 6, Modrm, { Mem, 0, 0} },
|
||||
{"fstenv", 1, 0x9bd9, 6, Modrm, { Mem, 0, 0} },
|
||||
{"fldenv", 1, 0xd9, 4, Modrm, { Mem, 0, 0} },
|
||||
{"fnsave", 1, 0xdd, 6, Modrm, { Mem, 0, 0} },
|
||||
{"fsave", 1, 0x9bdd, 6, Modrm, { Mem, 0, 0} },
|
||||
{"frstor", 1, 0xdd, 4, Modrm, { Mem, 0, 0} },
|
||||
|
||||
{"ffree", 1, 0xddc0, _, ShortForm, { FloatReg, 0, 0} },
|
||||
{"fnop", 0, 0xd9d0, _, NoModrm, { 0, 0, 0} },
|
||||
{"fwait", 0, 0x9b, _, NoModrm, { 0, 0, 0} },
|
||||
|
||||
/*
|
||||
opcode prefixes; we allow them as seperate insns too
|
||||
(see prefix table below)
|
||||
*/
|
||||
{"aword", 0, 0x67, _, NoModrm, { 0, 0, 0} },
|
||||
{"addr16", 0, 0x67, _, NoModrm, { 0, 0, 0} },
|
||||
{"word", 0, 0x66, _, NoModrm, { 0, 0, 0} },
|
||||
{"data16", 0, 0x66, _, NoModrm, { 0, 0, 0} },
|
||||
{"lock", 0, 0xf0, _, NoModrm, { 0, 0, 0} },
|
||||
{"cs", 0, 0x2e, _, NoModrm, { 0, 0, 0} },
|
||||
{"ds", 0, 0x3e, _, NoModrm, { 0, 0, 0} },
|
||||
{"es", 0, 0x26, _, NoModrm, { 0, 0, 0} },
|
||||
{"fs", 0, 0x64, _, NoModrm, { 0, 0, 0} },
|
||||
{"gs", 0, 0x65, _, NoModrm, { 0, 0, 0} },
|
||||
{"ss", 0, 0x36, _, NoModrm, { 0, 0, 0} },
|
||||
{"rep", 0, 0xf3, _, NoModrm, { 0, 0, 0} },
|
||||
{"repe", 0, 0xf3, _, NoModrm, { 0, 0, 0} },
|
||||
{"repz", 0, 0xf3, _, NoModrm, { 0, 0, 0} },
|
||||
{"repne", 0, 0xf2, _, NoModrm, { 0, 0, 0} },
|
||||
{"repnz", 0, 0xf2, _, NoModrm, { 0, 0, 0} },
|
||||
|
||||
/* 486 extensions */
|
||||
|
||||
{"bswap", 1, 0x0fc8, _, ShortForm, { Reg32,0,0 } },
|
||||
{"xadd", 2, 0x0fc0, _, DW|Modrm, { Reg, Reg|Mem, 0 } },
|
||||
{"cmpxchg", 2, 0x0fb0, _, DW|Modrm, { Reg, Reg|Mem, 0 } },
|
||||
{"invd", 0, 0x0f08, _, NoModrm, { 0, 0, 0} },
|
||||
{"wbinvd", 0, 0x0f09, _, NoModrm, { 0, 0, 0} },
|
||||
{"invlpg", 1, 0x0f01, 7, Modrm, { Mem, 0, 0} },
|
||||
|
||||
/* 586 and late 486 extensions */
|
||||
{"cpuid", 0, 0x0fa2, _, NoModrm, { 0, 0, 0} },
|
||||
|
||||
/* Pentium extensions */
|
||||
{"wrmsr", 0, 0x0f30, _, NoModrm, { 0, 0, 0} },
|
||||
{"rdtsc", 0, 0x0f31, _, NoModrm, { 0, 0, 0} },
|
||||
{"rdmsr", 0, 0x0f32, _, NoModrm, { 0, 0, 0} },
|
||||
{"cmpxchg8b", 1, 0x0fc7, 1, Modrm, { Mem, 0, 0} },
|
||||
|
||||
/* Pentium Pro extensions */
|
||||
{"rdpmc", 0, 0x0f33, _, NoModrm, { 0, 0, 0} },
|
||||
|
||||
{"cmovo", 2, 0x0f40, _, W|Modrm|ReverseRegRegmem, { WordReg|WordMem, WordReg, 0} },
|
||||
{"cmovno", 2, 0x0f41, _, W|Modrm|ReverseRegRegmem, { WordReg|WordMem, WordReg, 0} },
|
||||
{"cmovb", 2, 0x0f42, _, W|Modrm|ReverseRegRegmem, { WordReg|WordMem, WordReg, 0} },
|
||||
{"cmovae", 2, 0x0f43, _, W|Modrm|ReverseRegRegmem, { WordReg|WordMem, WordReg, 0} },
|
||||
{"cmove", 2, 0x0f44, _, W|Modrm|ReverseRegRegmem, { WordReg|WordMem, WordReg, 0} },
|
||||
{"cmovne", 2, 0x0f45, _, W|Modrm|ReverseRegRegmem, { WordReg|WordMem, WordReg, 0} },
|
||||
{"cmovbe", 2, 0x0f46, _, W|Modrm|ReverseRegRegmem, { WordReg|WordMem, WordReg, 0} },
|
||||
{"cmova", 2, 0x0f47, _, W|Modrm|ReverseRegRegmem, { WordReg|WordMem, WordReg, 0} },
|
||||
{"cmovs", 2, 0x0f48, _, W|Modrm|ReverseRegRegmem, { WordReg|WordMem, WordReg, 0} },
|
||||
{"cmovns", 2, 0x0f49, _, W|Modrm|ReverseRegRegmem, { WordReg|WordMem, WordReg, 0} },
|
||||
{"cmovp", 2, 0x0f4a, _, W|Modrm|ReverseRegRegmem, { WordReg|WordMem, WordReg, 0} },
|
||||
{"cmovnp", 2, 0x0f4b, _, W|Modrm|ReverseRegRegmem, { WordReg|WordMem, WordReg, 0} },
|
||||
{"cmovl", 2, 0x0f4c, _, W|Modrm|ReverseRegRegmem, { WordReg|WordMem, WordReg, 0} },
|
||||
{"cmovge", 2, 0x0f4d, _, W|Modrm|ReverseRegRegmem, { WordReg|WordMem, WordReg, 0} },
|
||||
{"cmovle", 2, 0x0f4e, _, W|Modrm|ReverseRegRegmem, { WordReg|WordMem, WordReg, 0} },
|
||||
{"cmovg", 2, 0x0f4f, _, W|Modrm|ReverseRegRegmem, { WordReg|WordMem, WordReg, 0} },
|
||||
|
||||
{"fcmovb", 2, 0xdac0, _, ShortForm, { FloatReg, FloatAcc, 0} },
|
||||
{"fcmove", 2, 0xdac8, _, ShortForm, { FloatReg, FloatAcc, 0} },
|
||||
{"fcmovbe",2, 0xdad0, _, ShortForm, { FloatReg, FloatAcc, 0} },
|
||||
{"fcmovu", 2, 0xdad8, _, ShortForm, { FloatReg, FloatAcc, 0} },
|
||||
{"fcmovnb", 2, 0xdbc0, _, ShortForm, { FloatReg, FloatAcc, 0} },
|
||||
{"fcmovne", 2, 0xdbc8, _, ShortForm, { FloatReg, FloatAcc, 0} },
|
||||
{"fcmovnbe",2, 0xdbd0, _, ShortForm, { FloatReg, FloatAcc, 0} },
|
||||
{"fcmovnu", 2, 0xdbd8, _, ShortForm, { FloatReg, FloatAcc, 0} },
|
||||
|
||||
{"fcomi", 2, 0xdbf0, _, ShortForm, { FloatReg, FloatAcc, 0} },
|
||||
{"fucomi", 2, 0xdbe8, _, ShortForm, { FloatReg, FloatAcc, 0} },
|
||||
{"fcomip", 2, 0xdff0, _, ShortForm, { FloatReg, FloatAcc, 0} },
|
||||
{"fucomip",2, 0xdfe8, _, ShortForm, { FloatReg, FloatAcc, 0} },
|
||||
|
||||
{"", 0, 0, 0, 0, { 0, 0, 0} } /* sentinel */
|
||||
};
|
||||
#undef _
|
||||
|
||||
static const template *const i386_optab_end
|
||||
= i386_optab + sizeof (i386_optab)/sizeof(i386_optab[0]);
|
||||
|
||||
/* 386 register table */
|
||||
|
||||
static const reg_entry i386_regtab[] = {
|
||||
/* 8 bit regs */
|
||||
{"al", Reg8|Acc, 0}, {"cl", Reg8|ShiftCount, 1}, {"dl", Reg8, 2},
|
||||
{"bl", Reg8, 3},
|
||||
{"ah", Reg8, 4}, {"ch", Reg8, 5}, {"dh", Reg8, 6}, {"bh", Reg8, 7},
|
||||
/* 16 bit regs */
|
||||
{"ax", Reg16|Acc, 0}, {"cx", Reg16, 1}, {"dx", Reg16|InOutPortReg, 2}, {"bx", Reg16, 3},
|
||||
{"sp", Reg16, 4}, {"bp", Reg16, 5}, {"si", Reg16, 6}, {"di", Reg16, 7},
|
||||
/* 32 bit regs */
|
||||
{"eax", Reg32|Acc, 0}, {"ecx", Reg32, 1}, {"edx", Reg32, 2}, {"ebx", Reg32, 3},
|
||||
{"esp", Reg32, 4}, {"ebp", Reg32, 5}, {"esi", Reg32, 6}, {"edi", Reg32, 7},
|
||||
/* segment registers */
|
||||
{"es", SReg2, 0}, {"cs", SReg2, 1}, {"ss", SReg2, 2},
|
||||
{"ds", SReg2, 3}, {"fs", SReg3, 4}, {"gs", SReg3, 5},
|
||||
/* control registers */
|
||||
{"cr0", Control, 0}, {"cr2", Control, 2}, {"cr3", Control, 3},
|
||||
{"cr4", Control, 4},
|
||||
/* debug registers */
|
||||
{"db0", Debug, 0}, {"db1", Debug, 1}, {"db2", Debug, 2},
|
||||
{"db3", Debug, 3}, {"db6", Debug, 6}, {"db7", Debug, 7},
|
||||
{"dr0", Debug, 0}, {"dr1", Debug, 1}, {"dr2", Debug, 2},
|
||||
{"dr3", Debug, 3}, {"dr6", Debug, 6}, {"dr7", Debug, 7},
|
||||
/* test registers */
|
||||
{"tr3", Test, 3}, {"tr4", Test, 4}, {"tr5", Test, 5},
|
||||
{"tr6", Test, 6}, {"tr7", Test, 7},
|
||||
/* float registers */
|
||||
{"st(0)", FloatReg|FloatAcc, 0},
|
||||
{"st", FloatReg|FloatAcc, 0},
|
||||
{"st(1)", FloatReg, 1}, {"st(2)", FloatReg, 2},
|
||||
{"st(3)", FloatReg, 3}, {"st(4)", FloatReg, 4}, {"st(5)", FloatReg, 5},
|
||||
{"st(6)", FloatReg, 6}, {"st(7)", FloatReg, 7}
|
||||
};
|
||||
|
||||
#define MAX_REG_NAME_SIZE 8 /* for parsing register names from input */
|
||||
|
||||
static const reg_entry *const i386_regtab_end
|
||||
= i386_regtab + sizeof(i386_regtab)/sizeof(i386_regtab[0]);
|
||||
|
||||
/* segment stuff */
|
||||
static const seg_entry cs = { "cs", 0x2e };
|
||||
static const seg_entry ds = { "ds", 0x3e };
|
||||
static const seg_entry ss = { "ss", 0x36 };
|
||||
static const seg_entry es = { "es", 0x26 };
|
||||
static const seg_entry fs = { "fs", 0x64 };
|
||||
static const seg_entry gs = { "gs", 0x65 };
|
||||
static const seg_entry null = { "", 0x0 };
|
||||
|
||||
/*
|
||||
This table is used to store the default segment register implied by all
|
||||
possible memory addressing modes.
|
||||
It is indexed by the mode & modrm entries of the modrm byte as follows:
|
||||
index = (mode<<3) | modrm;
|
||||
*/
|
||||
static const seg_entry *const one_byte_segment_defaults[] = {
|
||||
/* mode 0 */
|
||||
&ds, &ds, &ds, &ds, &null, &ds, &ds, &ds,
|
||||
/* mode 1 */
|
||||
&ds, &ds, &ds, &ds, &null, &ss, &ds, &ds,
|
||||
/* mode 2 */
|
||||
&ds, &ds, &ds, &ds, &null, &ss, &ds, &ds,
|
||||
/* mode 3 --- not a memory reference; never referenced */
|
||||
};
|
||||
|
||||
static const seg_entry *const two_byte_segment_defaults[] = {
|
||||
/* mode 0 */
|
||||
&ds, &ds, &ds, &ds, &ss, &ds, &ds, &ds,
|
||||
/* mode 1 */
|
||||
&ds, &ds, &ds, &ds, &ss, &ds, &ds, &ds,
|
||||
/* mode 2 */
|
||||
&ds, &ds, &ds, &ds, &ss, &ds, &ds, &ds,
|
||||
/* mode 3 --- not a memory reference; never referenced */
|
||||
};
|
||||
|
||||
static const prefix_entry i386_prefixtab[] = {
|
||||
#define ADDR_PREFIX_OPCODE 0x67
|
||||
{ "addr16", 0x67 }, /* address size prefix ==> 16bit addressing
|
||||
* (How is this useful?) */
|
||||
#define WORD_PREFIX_OPCODE 0x66
|
||||
{ "data16", 0x66 }, /* operand size prefix */
|
||||
{ "lock", 0xf0 }, /* bus lock prefix */
|
||||
{ "wait", 0x9b }, /* wait for coprocessor */
|
||||
{ "cs", 0x2e }, { "ds", 0x3e }, /* segment overrides ... */
|
||||
{ "es", 0x26 }, { "fs", 0x64 },
|
||||
{ "gs", 0x65 }, { "ss", 0x36 },
|
||||
/* REPE & REPNE used to detect rep/repne with a non-string instruction */
|
||||
#define REPNE 0xf2
|
||||
#define REPE 0xf3
|
||||
{ "rep", 0xf3 }, /* repeat string instructions */
|
||||
{ "repe", 0xf3 }, { "repz", 0xf3 },
|
||||
{ "repne", 0xf2 }, { "repnz", 0xf2 }
|
||||
};
|
||||
|
||||
static const prefix_entry *const i386_prefixtab_end
|
||||
= i386_prefixtab + sizeof(i386_prefixtab)/sizeof(i386_prefixtab[0]);
|
||||
|
||||
/* end of i386-opcode.h */
|
238
opcode/ppc-dis.c
238
opcode/ppc-dis.c
|
@ -1,238 +0,0 @@
|
|||
/* ppc-dis.c -- Disassemble PowerPC instructions
|
||||
Copyright 1994 Free Software Foundation, Inc.
|
||||
Written by Ian Lance Taylor, Cygnus Support
|
||||
|
||||
This file is part of GDB, GAS, and the GNU binutils.
|
||||
|
||||
GDB, GAS, and the GNU binutils are free software; you can redistribute
|
||||
them and/or modify them under the terms of the GNU General Public
|
||||
License as published by the Free Software Foundation; either version
|
||||
2, or (at your option) any later version.
|
||||
|
||||
GDB, GAS, and the GNU binutils are distributed in the hope that they
|
||||
will be useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
|
||||
the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this file; see the file COPYING. If not, write to the Free
|
||||
Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#include <stdio.h>
|
||||
#include "ansidecl.h"
|
||||
#include "sysdep.h"
|
||||
#include "dis-asm.h"
|
||||
#include "opcode/ppc.h"
|
||||
|
||||
/* This file provides several disassembler functions, all of which use
|
||||
the disassembler interface defined in dis-asm.h. Several functions
|
||||
are provided because this file handles disassembly for the PowerPC
|
||||
in both big and little endian mode and also for the POWER (RS/6000)
|
||||
chip. */
|
||||
|
||||
static int print_insn_powerpc PARAMS ((bfd_vma, struct disassemble_info *,
|
||||
int bigendian, int dialect));
|
||||
|
||||
/* Print a big endian PowerPC instruction. For convenience, also
|
||||
disassemble instructions supported by the Motorola PowerPC 601. */
|
||||
|
||||
int
|
||||
print_insn_big_powerpc (memaddr, info)
|
||||
bfd_vma memaddr;
|
||||
struct disassemble_info *info;
|
||||
{
|
||||
return print_insn_powerpc (memaddr, info, 1,
|
||||
PPC_OPCODE_PPC | PPC_OPCODE_601);
|
||||
}
|
||||
|
||||
/* Print a little endian PowerPC instruction. For convenience, also
|
||||
disassemble instructions supported by the Motorola PowerPC 601. */
|
||||
|
||||
int
|
||||
print_insn_little_powerpc (memaddr, info)
|
||||
bfd_vma memaddr;
|
||||
struct disassemble_info *info;
|
||||
{
|
||||
return print_insn_powerpc (memaddr, info, 0,
|
||||
PPC_OPCODE_PPC | PPC_OPCODE_601);
|
||||
}
|
||||
|
||||
/* Print a POWER (RS/6000) instruction. */
|
||||
|
||||
int
|
||||
print_insn_rs6000 (memaddr, info)
|
||||
bfd_vma memaddr;
|
||||
struct disassemble_info *info;
|
||||
{
|
||||
return print_insn_powerpc (memaddr, info, 1, PPC_OPCODE_POWER);
|
||||
}
|
||||
|
||||
/* Print a PowerPC or POWER instruction. */
|
||||
|
||||
static int
|
||||
print_insn_powerpc (memaddr, info, bigendian, dialect)
|
||||
bfd_vma memaddr;
|
||||
struct disassemble_info *info;
|
||||
int bigendian;
|
||||
int dialect;
|
||||
{
|
||||
bfd_byte buffer[4];
|
||||
int status;
|
||||
unsigned long insn;
|
||||
const struct powerpc_opcode *opcode;
|
||||
const struct powerpc_opcode *opcode_end;
|
||||
unsigned long op;
|
||||
|
||||
status = (*info->read_memory_func) (memaddr, buffer, 4, info);
|
||||
if (status != 0)
|
||||
{
|
||||
(*info->memory_error_func) (status, memaddr, info);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (bigendian)
|
||||
insn = bfd_getb32 (buffer);
|
||||
else
|
||||
insn = bfd_getl32 (buffer);
|
||||
|
||||
/* Get the major opcode of the instruction. */
|
||||
op = PPC_OP (insn);
|
||||
|
||||
/* Find the first match in the opcode table. We could speed this up
|
||||
a bit by doing a binary search on the major opcode. */
|
||||
opcode_end = powerpc_opcodes + powerpc_num_opcodes;
|
||||
for (opcode = powerpc_opcodes; opcode < opcode_end; opcode++)
|
||||
{
|
||||
unsigned long table_op;
|
||||
const unsigned char *opindex;
|
||||
const struct powerpc_operand *operand;
|
||||
int invalid;
|
||||
int need_comma;
|
||||
int need_paren;
|
||||
|
||||
table_op = PPC_OP (opcode->opcode);
|
||||
if (op < table_op)
|
||||
break;
|
||||
if (op > table_op)
|
||||
continue;
|
||||
|
||||
if ((insn & opcode->mask) != opcode->opcode
|
||||
|| (opcode->flags & dialect) == 0)
|
||||
continue;
|
||||
|
||||
/* Make two passes over the operands. First see if any of them
|
||||
have extraction functions, and, if they do, make sure the
|
||||
instruction is valid. */
|
||||
invalid = 0;
|
||||
for (opindex = opcode->operands; *opindex != 0; opindex++)
|
||||
{
|
||||
operand = powerpc_operands + *opindex;
|
||||
if (operand->extract)
|
||||
(*operand->extract) (insn, &invalid);
|
||||
}
|
||||
if (invalid)
|
||||
continue;
|
||||
|
||||
/* The instruction is valid. */
|
||||
(*info->fprintf_func) (info->stream, "%s", opcode->name);
|
||||
if (opcode->operands[0] != 0)
|
||||
(*info->fprintf_func) (info->stream, "\t");
|
||||
|
||||
/* Now extract and print the operands. */
|
||||
need_comma = 0;
|
||||
need_paren = 0;
|
||||
for (opindex = opcode->operands; *opindex != 0; opindex++)
|
||||
{
|
||||
long value;
|
||||
|
||||
operand = powerpc_operands + *opindex;
|
||||
|
||||
/* Operands that are marked FAKE are simply ignored. We
|
||||
already made sure that the extract function considered
|
||||
the instruction to be valid. */
|
||||
if ((operand->flags & PPC_OPERAND_FAKE) != 0)
|
||||
continue;
|
||||
|
||||
/* Extract the value from the instruction. */
|
||||
if (operand->extract)
|
||||
value = (*operand->extract) (insn, (int *) NULL);
|
||||
else
|
||||
{
|
||||
value = (insn >> operand->shift) & ((1 << operand->bits) - 1);
|
||||
if ((operand->flags & PPC_OPERAND_SIGNED) != 0
|
||||
&& (value & (1 << (operand->bits - 1))) != 0)
|
||||
value -= 1 << operand->bits;
|
||||
}
|
||||
|
||||
/* If the operand is optional, and the value is zero, don't
|
||||
print anything. */
|
||||
if ((operand->flags & PPC_OPERAND_OPTIONAL) != 0
|
||||
&& (operand->flags & PPC_OPERAND_NEXT) == 0
|
||||
&& value == 0)
|
||||
continue;
|
||||
|
||||
if (need_comma)
|
||||
{
|
||||
(*info->fprintf_func) (info->stream, ",");
|
||||
need_comma = 0;
|
||||
}
|
||||
|
||||
/* Print the operand as directed by the flags. */
|
||||
if ((operand->flags & PPC_OPERAND_GPR) != 0)
|
||||
(*info->fprintf_func) (info->stream, "r%ld", value);
|
||||
else if ((operand->flags & PPC_OPERAND_FPR) != 0)
|
||||
(*info->fprintf_func) (info->stream, "f%ld", value);
|
||||
else if ((operand->flags & PPC_OPERAND_RELATIVE) != 0)
|
||||
(*info->print_address_func) (memaddr + value, info);
|
||||
else if ((operand->flags & PPC_OPERAND_ABSOLUTE) != 0)
|
||||
(*info->print_address_func) ((bfd_vma) value & 0xffffffff, info);
|
||||
else if ((operand->flags & PPC_OPERAND_CR) == 0
|
||||
|| (dialect & PPC_OPCODE_PPC) == 0)
|
||||
(*info->fprintf_func) (info->stream, "%ld", value);
|
||||
else
|
||||
{
|
||||
if (operand->bits == 3)
|
||||
(*info->fprintf_func) (info->stream, "cr%d", value);
|
||||
else
|
||||
{
|
||||
static const char *cbnames[4] = { "lt", "gt", "eq", "so" };
|
||||
int cr;
|
||||
int cc;
|
||||
|
||||
cr = value >> 2;
|
||||
if (cr != 0)
|
||||
(*info->fprintf_func) (info->stream, "4*cr%d", cr);
|
||||
cc = value & 3;
|
||||
if (cc != 0)
|
||||
{
|
||||
if (cr != 0)
|
||||
(*info->fprintf_func) (info->stream, "+");
|
||||
(*info->fprintf_func) (info->stream, "%s", cbnames[cc]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (need_paren)
|
||||
{
|
||||
(*info->fprintf_func) (info->stream, ")");
|
||||
need_paren = 0;
|
||||
}
|
||||
|
||||
if ((operand->flags & PPC_OPERAND_PARENS) == 0)
|
||||
need_comma = 1;
|
||||
else
|
||||
{
|
||||
(*info->fprintf_func) (info->stream, "(");
|
||||
need_paren = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* We have found and printed an instruction; return. */
|
||||
return 4;
|
||||
}
|
||||
|
||||
/* We could not find a match. */
|
||||
(*info->fprintf_func) (info->stream, ".long 0x%lx", insn);
|
||||
|
||||
return 4;
|
||||
}
|
2830
opcode/ppc-opc.c
2830
opcode/ppc-opc.c
File diff suppressed because it is too large
Load diff
248
opcode/ppc.h
248
opcode/ppc.h
|
@ -1,248 +0,0 @@
|
|||
/* ppc.h -- Header file for PowerPC opcode table
|
||||
Copyright 1994, 1995 Free Software Foundation, Inc.
|
||||
Written by Ian Lance Taylor, Cygnus Support
|
||||
|
||||
This file is part of GDB, GAS, and the GNU binutils.
|
||||
|
||||
GDB, GAS, and the GNU binutils are free software; you can redistribute
|
||||
them and/or modify them under the terms of the GNU General Public
|
||||
License as published by the Free Software Foundation; either version
|
||||
1, or (at your option) any later version.
|
||||
|
||||
GDB, GAS, and the GNU binutils are distributed in the hope that they
|
||||
will be useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
|
||||
the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this file; see the file COPYING. If not, write to the Free
|
||||
Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#ifndef PPC_H
|
||||
#define PPC_H
|
||||
|
||||
/* The opcode table is an array of struct powerpc_opcode. */
|
||||
|
||||
struct powerpc_opcode
|
||||
{
|
||||
/* The opcode name. */
|
||||
const char *name;
|
||||
|
||||
/* The opcode itself. Those bits which will be filled in with
|
||||
operands are zeroes. */
|
||||
unsigned long opcode;
|
||||
|
||||
/* The opcode mask. This is used by the disassembler. This is a
|
||||
mask containing ones indicating those bits which must match the
|
||||
opcode field, and zeroes indicating those bits which need not
|
||||
match (and are presumably filled in by operands). */
|
||||
unsigned long mask;
|
||||
|
||||
/* One bit flags for the opcode. These are used to indicate which
|
||||
specific processors support the instructions. The defined values
|
||||
are listed below. */
|
||||
unsigned long flags;
|
||||
|
||||
/* An array of operand codes. Each code is an index into the
|
||||
operand table. They appear in the order which the operands must
|
||||
appear in assembly code, and are terminated by a zero. */
|
||||
unsigned char operands[8];
|
||||
};
|
||||
|
||||
/* The table itself is sorted by major opcode number, and is otherwise
|
||||
in the order in which the disassembler should consider
|
||||
instructions. */
|
||||
extern const struct powerpc_opcode powerpc_opcodes[];
|
||||
extern const int powerpc_num_opcodes;
|
||||
|
||||
/* Values defined for the flags field of a struct powerpc_opcode. */
|
||||
|
||||
/* Opcode is defined for the PowerPC architecture. */
|
||||
#define PPC_OPCODE_PPC (01)
|
||||
|
||||
/* Opcode is defined for the POWER (RS/6000) architecture. */
|
||||
#define PPC_OPCODE_POWER (02)
|
||||
|
||||
/* Opcode is defined for the POWER2 (Rios 2) architecture. */
|
||||
#define PPC_OPCODE_POWER2 (04)
|
||||
|
||||
/* Opcode is only defined on 32 bit architectures. */
|
||||
#define PPC_OPCODE_32 (010)
|
||||
|
||||
/* Opcode is only defined on 64 bit architectures. */
|
||||
#define PPC_OPCODE_64 (020)
|
||||
|
||||
/* Opcode is supported by the Motorola PowerPC 601 processor. The 601
|
||||
is assumed to support all PowerPC (PPC_OPCODE_PPC) instructions,
|
||||
but it also supports many additional POWER instructions. */
|
||||
#define PPC_OPCODE_601 (040)
|
||||
|
||||
/* Opcode is supported in both the Power and PowerPC architectures
|
||||
(ie, compiler's -mcpu=common or assembler's -mcom). */
|
||||
#define PPC_OPCODE_COMMON (0100)
|
||||
|
||||
/* Opcode is supported for any Power or PowerPC platform (this is
|
||||
for the assembler's -many option, and it eliminates duplicates). */
|
||||
#define PPC_OPCODE_ANY (0200)
|
||||
|
||||
/* A macro to extract the major opcode from an instruction. */
|
||||
#define PPC_OP(i) (((i) >> 26) & 0x3f)
|
||||
|
||||
/* The operands table is an array of struct powerpc_operand. */
|
||||
|
||||
struct powerpc_operand
|
||||
{
|
||||
/* The number of bits in the operand. */
|
||||
int bits;
|
||||
|
||||
/* How far the operand is left shifted in the instruction. */
|
||||
int shift;
|
||||
|
||||
/* Insertion function. This is used by the assembler. To insert an
|
||||
operand value into an instruction, check this field.
|
||||
|
||||
If it is NULL, execute
|
||||
i |= (op & ((1 << o->bits) - 1)) << o->shift;
|
||||
(i is the instruction which we are filling in, o is a pointer to
|
||||
this structure, and op is the opcode value; this assumes twos
|
||||
complement arithmetic).
|
||||
|
||||
If this field is not NULL, then simply call it with the
|
||||
instruction and the operand value. It will return the new value
|
||||
of the instruction. If the ERRMSG argument is not NULL, then if
|
||||
the operand value is illegal, *ERRMSG will be set to a warning
|
||||
string (the operand will be inserted in any case). If the
|
||||
operand value is legal, *ERRMSG will be unchanged (most operands
|
||||
can accept any value). */
|
||||
unsigned long (*insert) PARAMS ((unsigned long instruction, long op,
|
||||
const char **errmsg));
|
||||
|
||||
/* Extraction function. This is used by the disassembler. To
|
||||
extract this operand type from an instruction, check this field.
|
||||
|
||||
If it is NULL, compute
|
||||
op = ((i) >> o->shift) & ((1 << o->bits) - 1);
|
||||
if ((o->flags & PPC_OPERAND_SIGNED) != 0
|
||||
&& (op & (1 << (o->bits - 1))) != 0)
|
||||
op -= 1 << o->bits;
|
||||
(i is the instruction, o is a pointer to this structure, and op
|
||||
is the result; this assumes twos complement arithmetic).
|
||||
|
||||
If this field is not NULL, then simply call it with the
|
||||
instruction value. It will return the value of the operand. If
|
||||
the INVALID argument is not NULL, *INVALID will be set to
|
||||
non-zero if this operand type can not actually be extracted from
|
||||
this operand (i.e., the instruction does not match). If the
|
||||
operand is valid, *INVALID will not be changed. */
|
||||
long (*extract) PARAMS ((unsigned long instruction, int *invalid));
|
||||
|
||||
/* One bit syntax flags. */
|
||||
unsigned long flags;
|
||||
};
|
||||
|
||||
/* Elements in the table are retrieved by indexing with values from
|
||||
the operands field of the powerpc_opcodes table. */
|
||||
|
||||
extern const struct powerpc_operand powerpc_operands[];
|
||||
|
||||
/* Values defined for the flags field of a struct powerpc_operand. */
|
||||
|
||||
/* This operand takes signed values. */
|
||||
#define PPC_OPERAND_SIGNED (01)
|
||||
|
||||
/* This operand takes signed values, but also accepts a full positive
|
||||
range of values when running in 32 bit mode. That is, if bits is
|
||||
16, it takes any value from -0x8000 to 0xffff. In 64 bit mode,
|
||||
this flag is ignored. */
|
||||
#define PPC_OPERAND_SIGNOPT (02)
|
||||
|
||||
/* This operand does not actually exist in the assembler input. This
|
||||
is used to support extended mnemonics such as mr, for which two
|
||||
operands fields are identical. The assembler should call the
|
||||
insert function with any op value. The disassembler should call
|
||||
the extract function, ignore the return value, and check the value
|
||||
placed in the valid argument. */
|
||||
#define PPC_OPERAND_FAKE (04)
|
||||
|
||||
/* The next operand should be wrapped in parentheses rather than
|
||||
separated from this one by a comma. This is used for the load and
|
||||
store instructions which want their operands to look like
|
||||
reg,displacement(reg)
|
||||
*/
|
||||
#define PPC_OPERAND_PARENS (010)
|
||||
|
||||
/* This operand may use the symbolic names for the CR fields, which
|
||||
are
|
||||
lt 0 gt 1 eq 2 so 3 un 3
|
||||
cr0 0 cr1 1 cr2 2 cr3 3
|
||||
cr4 4 cr5 5 cr6 6 cr7 7
|
||||
These may be combined arithmetically, as in cr2*4+gt. These are
|
||||
only supported on the PowerPC, not the POWER. */
|
||||
#define PPC_OPERAND_CR (020)
|
||||
|
||||
/* This operand names a register. The disassembler uses this to print
|
||||
register names with a leading 'r'. */
|
||||
#define PPC_OPERAND_GPR (040)
|
||||
|
||||
/* This operand names a floating point register. The disassembler
|
||||
prints these with a leading 'f'. */
|
||||
#define PPC_OPERAND_FPR (0100)
|
||||
|
||||
/* This operand is a relative branch displacement. The disassembler
|
||||
prints these symbolically if possible. */
|
||||
#define PPC_OPERAND_RELATIVE (0200)
|
||||
|
||||
/* This operand is an absolute branch address. The disassembler
|
||||
prints these symbolically if possible. */
|
||||
#define PPC_OPERAND_ABSOLUTE (0400)
|
||||
|
||||
/* This operand is optional, and is zero if omitted. This is used for
|
||||
the optional BF and L fields in the comparison instructions. The
|
||||
assembler must count the number of operands remaining on the line,
|
||||
and the number of operands remaining for the opcode, and decide
|
||||
whether this operand is present or not. The disassembler should
|
||||
print this operand out only if it is not zero. */
|
||||
#define PPC_OPERAND_OPTIONAL (01000)
|
||||
|
||||
/* This flag is only used with PPC_OPERAND_OPTIONAL. If this operand
|
||||
is omitted, then for the next operand use this operand value plus
|
||||
1, ignoring the next operand field for the opcode. This wretched
|
||||
hack is needed because the Power rotate instructions can take
|
||||
either 4 or 5 operands. The disassembler should print this operand
|
||||
out regardless of the PPC_OPERAND_OPTIONAL field. */
|
||||
#define PPC_OPERAND_NEXT (02000)
|
||||
|
||||
/* This operand should be regarded as a negative number for the
|
||||
purposes of overflow checking (i.e., the normal most negative
|
||||
number is disallowed and one more than the normal most positive
|
||||
number is allowed). This flag will only be set for a signed
|
||||
operand. */
|
||||
#define PPC_OPERAND_NEGATIVE (04000)
|
||||
|
||||
/* The POWER and PowerPC assemblers use a few macros. We keep them
|
||||
with the operands table for simplicity. The macro table is an
|
||||
array of struct powerpc_macro. */
|
||||
|
||||
struct powerpc_macro
|
||||
{
|
||||
/* The macro name. */
|
||||
const char *name;
|
||||
|
||||
/* The number of operands the macro takes. */
|
||||
unsigned int operands;
|
||||
|
||||
/* One bit flags for the opcode. These are used to indicate which
|
||||
specific processors support the instructions. The values are the
|
||||
same as those for the struct powerpc_opcode flags field. */
|
||||
unsigned long flags;
|
||||
|
||||
/* A format string to turn the macro into a normal instruction.
|
||||
Each %N in the string is replaced with operand number N (zero
|
||||
based). */
|
||||
const char *format;
|
||||
};
|
||||
|
||||
extern const struct powerpc_macro powerpc_macros[];
|
||||
extern const int powerpc_num_macros;
|
||||
|
||||
#endif /* PPC_H */
|
|
@ -1,868 +0,0 @@
|
|||
/* Print SPARC instructions.
|
||||
Copyright (C) 1989, 91-93, 1995, 1996 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#include "ansidecl.h"
|
||||
#include "opcode/sparc.h"
|
||||
#include "dis-asm.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* Bitmask of v9 architectures. */
|
||||
#define MASK_V9 ((1 << SPARC_OPCODE_ARCH_V9) \
|
||||
| (1 << SPARC_OPCODE_ARCH_V9A))
|
||||
/* 1 if INSN is for v9 only. */
|
||||
#define V9_ONLY_P(insn) (! ((insn)->architecture & ~MASK_V9))
|
||||
/* 1 if INSN is for v9. */
|
||||
#define V9_P(insn) (((insn)->architecture & MASK_V9) != 0)
|
||||
|
||||
/* For faster lookup, after insns are sorted they are hashed. */
|
||||
/* ??? I think there is room for even more improvement. */
|
||||
|
||||
#define HASH_SIZE 256
|
||||
/* It is important that we only look at insn code bits as that is how the
|
||||
opcode table is hashed. OPCODE_BITS is a table of valid bits for each
|
||||
of the main types (0,1,2,3). */
|
||||
static int opcode_bits[4] = { 0x01c00000, 0x0, 0x01f80000, 0x01f80000 };
|
||||
#define HASH_INSN(INSN) \
|
||||
((((INSN) >> 24) & 0xc0) | (((INSN) & opcode_bits[((INSN) >> 30) & 3]) >> 19))
|
||||
struct opcode_hash {
|
||||
struct opcode_hash *next;
|
||||
struct sparc_opcode *opcode;
|
||||
};
|
||||
static struct opcode_hash *opcode_hash_table[HASH_SIZE];
|
||||
static void build_hash_table ();
|
||||
|
||||
/* Sign-extend a value which is N bits long. */
|
||||
#define SEX(value, bits) \
|
||||
((((int)(value)) << ((8 * sizeof (int)) - bits)) \
|
||||
>> ((8 * sizeof (int)) - bits) )
|
||||
|
||||
static char *reg_names[] =
|
||||
{ "g0", "g1", "g2", "g3", "g4", "g5", "g6", "g7",
|
||||
"o0", "o1", "o2", "o3", "o4", "o5", "sp", "o7",
|
||||
"l0", "l1", "l2", "l3", "l4", "l5", "l6", "l7",
|
||||
"i0", "i1", "i2", "i3", "i4", "i5", "fp", "i7",
|
||||
"f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7",
|
||||
"f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15",
|
||||
"f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23",
|
||||
"f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31",
|
||||
"f32", "f33", "f34", "f35", "f36", "f37", "f38", "f39",
|
||||
"f40", "f41", "f42", "f43", "f44", "f45", "f46", "f47",
|
||||
"f48", "f49", "f50", "f51", "f52", "f53", "f54", "f55",
|
||||
"f56", "f57", "f58", "f59", "f60", "f61", "f62", "f63",
|
||||
/* psr, wim, tbr, fpsr, cpsr are v8 only. */
|
||||
"y", "psr", "wim", "tbr", "pc", "npc", "fpsr", "cpsr"
|
||||
};
|
||||
|
||||
#define freg_names (®_names[4 * 8])
|
||||
|
||||
/* These are ordered according to there register number in
|
||||
rdpr and wrpr insns. */
|
||||
static char *v9_priv_reg_names[] =
|
||||
{
|
||||
"tpc", "tnpc", "tstate", "tt", "tick", "tba", "pstate", "tl",
|
||||
"pil", "cwp", "cansave", "canrestore", "cleanwin", "otherwin",
|
||||
"wstate", "fq"
|
||||
/* "ver" - special cased */
|
||||
};
|
||||
|
||||
/* Macros used to extract instruction fields. Not all fields have
|
||||
macros defined here, only those which are actually used. */
|
||||
|
||||
#define X_RD(i) (((i) >> 25) & 0x1f)
|
||||
#define X_RS1(i) (((i) >> 14) & 0x1f)
|
||||
#define X_LDST_I(i) (((i) >> 13) & 1)
|
||||
#define X_ASI(i) (((i) >> 5) & 0xff)
|
||||
#define X_RS2(i) (((i) >> 0) & 0x1f)
|
||||
#define X_IMM13(i) (((i) >> 0) & 0x1fff)
|
||||
#define X_DISP22(i) (((i) >> 0) & 0x3fffff)
|
||||
#define X_IMM22(i) X_DISP22 (i)
|
||||
#define X_DISP30(i) (((i) >> 0) & 0x3fffffff)
|
||||
|
||||
/* These are for v9. */
|
||||
#define X_DISP16(i) (((((i) >> 20) & 3) << 14) | (((i) >> 0) & 0x3fff))
|
||||
#define X_DISP19(i) (((i) >> 0) & 0x7ffff)
|
||||
#define X_MEMBAR(i) ((i) & 0x7f)
|
||||
|
||||
/* Here is the union which was used to extract instruction fields
|
||||
before the shift and mask macros were written.
|
||||
|
||||
union sparc_insn
|
||||
{
|
||||
unsigned long int code;
|
||||
struct
|
||||
{
|
||||
unsigned int anop:2;
|
||||
#define op ldst.anop
|
||||
unsigned int anrd:5;
|
||||
#define rd ldst.anrd
|
||||
unsigned int op3:6;
|
||||
unsigned int anrs1:5;
|
||||
#define rs1 ldst.anrs1
|
||||
unsigned int i:1;
|
||||
unsigned int anasi:8;
|
||||
#define asi ldst.anasi
|
||||
unsigned int anrs2:5;
|
||||
#define rs2 ldst.anrs2
|
||||
#define shcnt rs2
|
||||
} ldst;
|
||||
struct
|
||||
{
|
||||
unsigned int anop:2, anrd:5, op3:6, anrs1:5, i:1;
|
||||
unsigned int IMM13:13;
|
||||
#define imm13 IMM13.IMM13
|
||||
} IMM13;
|
||||
struct
|
||||
{
|
||||
unsigned int anop:2;
|
||||
unsigned int a:1;
|
||||
unsigned int cond:4;
|
||||
unsigned int op2:3;
|
||||
unsigned int DISP22:22;
|
||||
#define disp22 branch.DISP22
|
||||
#define imm22 disp22
|
||||
} branch;
|
||||
struct
|
||||
{
|
||||
unsigned int anop:2;
|
||||
unsigned int a:1;
|
||||
unsigned int z:1;
|
||||
unsigned int rcond:3;
|
||||
unsigned int op2:3;
|
||||
unsigned int DISP16HI:2;
|
||||
unsigned int p:1;
|
||||
unsigned int _rs1:5;
|
||||
unsigned int DISP16LO:14;
|
||||
} branch16;
|
||||
struct
|
||||
{
|
||||
unsigned int anop:2;
|
||||
unsigned int adisp30:30;
|
||||
#define disp30 call.adisp30
|
||||
} call;
|
||||
};
|
||||
|
||||
*/
|
||||
|
||||
/* Nonzero if INSN is the opcode for a delayed branch. */
|
||||
static int
|
||||
is_delayed_branch (insn)
|
||||
unsigned long insn;
|
||||
{
|
||||
struct opcode_hash *op;
|
||||
|
||||
for (op = opcode_hash_table[HASH_INSN (insn)]; op; op = op->next)
|
||||
{
|
||||
const struct sparc_opcode *opcode = op->opcode;
|
||||
if ((opcode->match & insn) == opcode->match
|
||||
&& (opcode->lose & insn) == 0)
|
||||
return (opcode->flags & F_DELAYED);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Nonzero of opcode table has been initialized. */
|
||||
static int opcodes_initialized = 0;
|
||||
|
||||
/* extern void qsort (); */
|
||||
static int compare_opcodes ();
|
||||
|
||||
/* Print one instruction from MEMADDR on INFO->STREAM.
|
||||
|
||||
We suffix the instruction with a comment that gives the absolute
|
||||
address involved, as well as its symbolic form, if the instruction
|
||||
is preceded by a findable `sethi' and it either adds an immediate
|
||||
displacement to that register, or it is an `add' or `or' instruction
|
||||
on that register. */
|
||||
|
||||
int
|
||||
print_insn_sparc (memaddr, info)
|
||||
bfd_vma memaddr;
|
||||
disassemble_info *info;
|
||||
{
|
||||
FILE *stream = info->stream;
|
||||
bfd_byte buffer[4];
|
||||
unsigned long insn;
|
||||
register unsigned int i;
|
||||
register struct opcode_hash *op;
|
||||
int sparc_v9_p = bfd_mach_sparc_v9_p (info->mach);
|
||||
|
||||
if (!opcodes_initialized)
|
||||
{
|
||||
qsort ((char *) sparc_opcodes, sparc_num_opcodes,
|
||||
sizeof (sparc_opcodes[0]), compare_opcodes);
|
||||
build_hash_table (sparc_opcodes, opcode_hash_table, sparc_num_opcodes);
|
||||
opcodes_initialized = 1;
|
||||
}
|
||||
|
||||
{
|
||||
int status =
|
||||
(*info->read_memory_func) (memaddr, buffer, sizeof (buffer), info);
|
||||
if (status != 0)
|
||||
{
|
||||
(*info->memory_error_func) (status, memaddr, info);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
insn = bfd_getb32 (buffer);
|
||||
|
||||
info->insn_info_valid = 1; /* We do return this info */
|
||||
info->insn_type = dis_nonbranch; /* Assume non branch insn */
|
||||
info->branch_delay_insns = 0; /* Assume no delay */
|
||||
info->target = 0; /* Assume no target known */
|
||||
|
||||
for (op = opcode_hash_table[HASH_INSN (insn)]; op; op = op->next)
|
||||
{
|
||||
const struct sparc_opcode *opcode = op->opcode;
|
||||
|
||||
/* ??? These architecture tests need to be more selective. */
|
||||
|
||||
/* If the current architecture isn't sparc64, skip sparc64 insns. */
|
||||
if (!sparc_v9_p
|
||||
&& V9_ONLY_P (opcode))
|
||||
continue;
|
||||
|
||||
/* If the current architecture is sparc64, skip sparc32 only insns. */
|
||||
if (sparc_v9_p
|
||||
&& ! V9_P (opcode))
|
||||
continue;
|
||||
|
||||
if ((opcode->match & insn) == opcode->match
|
||||
&& (opcode->lose & insn) == 0)
|
||||
{
|
||||
/* Nonzero means that we have found an instruction which has
|
||||
the effect of adding or or'ing the imm13 field to rs1. */
|
||||
int imm_added_to_rs1 = 0;
|
||||
|
||||
/* Nonzero means that we have found a plus sign in the args
|
||||
field of the opcode table. */
|
||||
int found_plus = 0;
|
||||
|
||||
/* Nonzero means we have an annulled branch. */
|
||||
int is_annulled = 0;
|
||||
|
||||
/* Do we have an `add' or `or' instruction where rs1 is the same
|
||||
as rsd, and which has the i bit set? */
|
||||
if ((opcode->match == 0x80102000 || opcode->match == 0x80002000)
|
||||
/* (or) (add) */
|
||||
&& X_RS1 (insn) == X_RD (insn))
|
||||
imm_added_to_rs1 = 1;
|
||||
|
||||
if (X_RS1 (insn) != X_RD (insn)
|
||||
&& strchr (opcode->args, 'r') != 0)
|
||||
/* Can't do simple format if source and dest are different. */
|
||||
continue;
|
||||
if (X_RS2 (insn) != X_RD (insn)
|
||||
&& strchr (opcode->args, 'O') != 0)
|
||||
/* Can't do simple format if source and dest are different. */
|
||||
continue;
|
||||
|
||||
(*info->fprintf_func) (stream, opcode->name);
|
||||
|
||||
{
|
||||
register const char *s;
|
||||
|
||||
if (opcode->args[0] != ',')
|
||||
(*info->fprintf_func) (stream, " ");
|
||||
for (s = opcode->args; *s != '\0'; ++s)
|
||||
{
|
||||
while (*s == ',')
|
||||
{
|
||||
(*info->fprintf_func) (stream, ",");
|
||||
++s;
|
||||
switch (*s) {
|
||||
case 'a':
|
||||
(*info->fprintf_func) (stream, "a");
|
||||
is_annulled = 1;
|
||||
++s;
|
||||
continue;
|
||||
case 'N':
|
||||
(*info->fprintf_func) (stream, "pn");
|
||||
++s;
|
||||
continue;
|
||||
|
||||
case 'T':
|
||||
(*info->fprintf_func) (stream, "pt");
|
||||
++s;
|
||||
continue;
|
||||
|
||||
default:
|
||||
break;
|
||||
} /* switch on arg */
|
||||
} /* while there are comma started args */
|
||||
|
||||
(*info->fprintf_func) (stream, " ");
|
||||
|
||||
switch (*s)
|
||||
{
|
||||
case '+':
|
||||
found_plus = 1;
|
||||
|
||||
/* note fall-through */
|
||||
default:
|
||||
(*info->fprintf_func) (stream, "%c", *s);
|
||||
break;
|
||||
|
||||
case '#':
|
||||
(*info->fprintf_func) (stream, "0");
|
||||
break;
|
||||
|
||||
#define reg(n) (*info->fprintf_func) (stream, "%%%s", reg_names[n])
|
||||
case '1':
|
||||
case 'r':
|
||||
reg (X_RS1 (insn));
|
||||
break;
|
||||
|
||||
case '2':
|
||||
case 'O':
|
||||
reg (X_RS2 (insn));
|
||||
break;
|
||||
|
||||
case 'd':
|
||||
reg (X_RD (insn));
|
||||
break;
|
||||
#undef reg
|
||||
|
||||
#define freg(n) (*info->fprintf_func) (stream, "%%%s", freg_names[n])
|
||||
#define fregx(n) (*info->fprintf_func) (stream, "%%%s", freg_names[((n) & ~1) | (((n) & 1) << 5)])
|
||||
case 'e':
|
||||
freg (X_RS1 (insn));
|
||||
break;
|
||||
case 'v': /* double/even */
|
||||
case 'V': /* quad/multiple of 4 */
|
||||
fregx (X_RS1 (insn));
|
||||
break;
|
||||
|
||||
case 'f':
|
||||
freg (X_RS2 (insn));
|
||||
break;
|
||||
case 'B': /* double/even */
|
||||
case 'R': /* quad/multiple of 4 */
|
||||
fregx (X_RS2 (insn));
|
||||
break;
|
||||
|
||||
case 'g':
|
||||
freg (X_RD (insn));
|
||||
break;
|
||||
case 'H': /* double/even */
|
||||
case 'J': /* quad/multiple of 4 */
|
||||
fregx (X_RD (insn));
|
||||
break;
|
||||
#undef freg
|
||||
#undef fregx
|
||||
|
||||
#define creg(n) (*info->fprintf_func) (stream, "%%c%u", (unsigned int) (n))
|
||||
case 'b':
|
||||
creg (X_RS1 (insn));
|
||||
break;
|
||||
|
||||
case 'c':
|
||||
creg (X_RS2 (insn));
|
||||
break;
|
||||
|
||||
case 'D':
|
||||
creg (X_RD (insn));
|
||||
break;
|
||||
#undef creg
|
||||
|
||||
case 'h':
|
||||
(*info->fprintf_func) (stream, "%%hi(%#x)",
|
||||
(0xFFFFFFFF
|
||||
& ((int) X_IMM22 (insn) << 10)));
|
||||
break;
|
||||
|
||||
case 'i':
|
||||
{
|
||||
int imm = SEX (X_IMM13 (insn), 13);
|
||||
|
||||
/* Check to see whether we have a 1+i, and take
|
||||
note of that fact.
|
||||
|
||||
Note: because of the way we sort the table,
|
||||
we will be matching 1+i rather than i+1,
|
||||
so it is OK to assume that i is after +,
|
||||
not before it. */
|
||||
if (found_plus)
|
||||
imm_added_to_rs1 = 1;
|
||||
|
||||
if (imm <= 9)
|
||||
(*info->fprintf_func) (stream, "%d", imm);
|
||||
else
|
||||
(*info->fprintf_func) (stream, "%#x", imm);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'I': /* 11 bit immediate. */
|
||||
case 'j': /* 10 bit immediate. */
|
||||
{
|
||||
int imm;
|
||||
|
||||
if (*s == 'I')
|
||||
imm = SEX (X_IMM13 (insn), 11);
|
||||
else
|
||||
imm = SEX (X_IMM13 (insn), 10);
|
||||
|
||||
/* Check to see whether we have a 1+i, and take
|
||||
note of that fact.
|
||||
|
||||
Note: because of the way we sort the table,
|
||||
we will be matching 1+i rather than i+1,
|
||||
so it is OK to assume that i is after +,
|
||||
not before it. */
|
||||
if (found_plus)
|
||||
imm_added_to_rs1 = 1;
|
||||
|
||||
if (imm <= 9)
|
||||
(info->fprintf_func) (stream, "%d", imm);
|
||||
else
|
||||
(info->fprintf_func) (stream, "%#x", (unsigned) imm);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'K':
|
||||
{
|
||||
int mask = X_MEMBAR (insn);
|
||||
int bit = 0x40, printed_one = 0;
|
||||
char *name;
|
||||
|
||||
if (mask == 0)
|
||||
(info->fprintf_func) (stream, "0");
|
||||
else
|
||||
while (bit)
|
||||
{
|
||||
if (mask & bit)
|
||||
{
|
||||
if (printed_one)
|
||||
(info->fprintf_func) (stream, "|");
|
||||
name = sparc_decode_membar (bit);
|
||||
(info->fprintf_func) (stream, "%s", name);
|
||||
printed_one = 1;
|
||||
}
|
||||
bit >>= 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case 'k':
|
||||
info->target = memaddr + SEX (X_DISP16 (insn), 16) * 4;
|
||||
(*info->print_address_func) (info->target, info);
|
||||
break;
|
||||
|
||||
case 'G':
|
||||
info->target = memaddr + SEX (X_DISP19 (insn), 19) * 4;
|
||||
(*info->print_address_func) (info->target, info);
|
||||
break;
|
||||
|
||||
case '6':
|
||||
case '7':
|
||||
case '8':
|
||||
case '9':
|
||||
(*info->fprintf_func) (stream, "%%fcc%c", *s - '6' + '0');
|
||||
break;
|
||||
|
||||
case 'z':
|
||||
(*info->fprintf_func) (stream, "%%icc");
|
||||
break;
|
||||
|
||||
case 'Z':
|
||||
(*info->fprintf_func) (stream, "%%xcc");
|
||||
break;
|
||||
|
||||
case 'E':
|
||||
(*info->fprintf_func) (stream, "%%ccr");
|
||||
break;
|
||||
|
||||
case 's':
|
||||
(*info->fprintf_func) (stream, "%%fprs");
|
||||
break;
|
||||
|
||||
case 'o':
|
||||
(*info->fprintf_func) (stream, "%%asi");
|
||||
break;
|
||||
|
||||
case 'W':
|
||||
(*info->fprintf_func) (stream, "%%tick");
|
||||
break;
|
||||
|
||||
case 'P':
|
||||
(*info->fprintf_func) (stream, "%%pc");
|
||||
break;
|
||||
|
||||
case '?':
|
||||
if (X_RS1 (insn) == 31)
|
||||
(*info->fprintf_func) (stream, "%%ver");
|
||||
else if ((unsigned) X_RS1 (insn) < 16)
|
||||
(*info->fprintf_func) (stream, "%%%s",
|
||||
v9_priv_reg_names[X_RS1 (insn)]);
|
||||
else
|
||||
(*info->fprintf_func) (stream, "%%reserved");
|
||||
break;
|
||||
|
||||
case '!':
|
||||
if ((unsigned) X_RD (insn) < 15)
|
||||
(*info->fprintf_func) (stream, "%%%s",
|
||||
v9_priv_reg_names[X_RD (insn)]);
|
||||
else
|
||||
(*info->fprintf_func) (stream, "%%reserved");
|
||||
break;
|
||||
|
||||
case '*':
|
||||
{
|
||||
char *name = sparc_decode_prefetch (X_RD (insn));
|
||||
|
||||
if (name)
|
||||
(*info->fprintf_func) (stream, "%s", name);
|
||||
else
|
||||
(*info->fprintf_func) (stream, "%d", X_RD (insn));
|
||||
break;
|
||||
}
|
||||
|
||||
case 'M':
|
||||
(*info->fprintf_func) (stream, "%%asr%d", X_RS1 (insn));
|
||||
break;
|
||||
|
||||
case 'm':
|
||||
(*info->fprintf_func) (stream, "%%asr%d", X_RD (insn));
|
||||
break;
|
||||
|
||||
case 'L':
|
||||
info->target = memaddr + SEX (X_DISP30 (insn), 30) * 4;
|
||||
(*info->print_address_func) (info->target, info);
|
||||
break;
|
||||
|
||||
case 'n':
|
||||
(*info->fprintf_func)
|
||||
(stream, "%#x", SEX (X_DISP22 (insn), 22));
|
||||
break;
|
||||
|
||||
case 'l':
|
||||
info->target = memaddr + SEX (X_DISP22 (insn), 22) * 4;
|
||||
(*info->print_address_func) (info->target, info);
|
||||
break;
|
||||
|
||||
case 'A':
|
||||
{
|
||||
char *name = sparc_decode_asi (X_ASI (insn));
|
||||
|
||||
if (name)
|
||||
(*info->fprintf_func) (stream, "%s", name);
|
||||
else
|
||||
(*info->fprintf_func) (stream, "(%d)", X_ASI (insn));
|
||||
break;
|
||||
}
|
||||
|
||||
case 'C':
|
||||
(*info->fprintf_func) (stream, "%%csr");
|
||||
break;
|
||||
|
||||
case 'F':
|
||||
(*info->fprintf_func) (stream, "%%fsr");
|
||||
break;
|
||||
|
||||
case 'p':
|
||||
(*info->fprintf_func) (stream, "%%psr");
|
||||
break;
|
||||
|
||||
case 'q':
|
||||
(*info->fprintf_func) (stream, "%%fq");
|
||||
break;
|
||||
|
||||
case 'Q':
|
||||
(*info->fprintf_func) (stream, "%%cq");
|
||||
break;
|
||||
|
||||
case 't':
|
||||
(*info->fprintf_func) (stream, "%%tbr");
|
||||
break;
|
||||
|
||||
case 'w':
|
||||
(*info->fprintf_func) (stream, "%%wim");
|
||||
break;
|
||||
|
||||
case 'x':
|
||||
(*info->fprintf_func) (stream, "%d",
|
||||
((X_LDST_I (insn) << 8)
|
||||
+ X_ASI (insn)));
|
||||
break;
|
||||
|
||||
case 'y':
|
||||
(*info->fprintf_func) (stream, "%%y");
|
||||
break;
|
||||
|
||||
case 'u':
|
||||
case 'U':
|
||||
{
|
||||
int val = *s == 'U' ? X_RS1 (insn) : X_RD (insn);
|
||||
char *name = sparc_decode_sparclet_cpreg (val);
|
||||
|
||||
if (name)
|
||||
(*info->fprintf_func) (stream, "%s", name);
|
||||
else
|
||||
(*info->fprintf_func) (stream, "%%cpreg(%d)", val);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* If we are adding or or'ing something to rs1, then
|
||||
check to see whether the previous instruction was
|
||||
a sethi to the same register as in the sethi.
|
||||
If so, attempt to print the result of the add or
|
||||
or (in this context add and or do the same thing)
|
||||
and its symbolic value. */
|
||||
if (imm_added_to_rs1)
|
||||
{
|
||||
unsigned long prev_insn;
|
||||
int errcode;
|
||||
|
||||
errcode =
|
||||
(*info->read_memory_func)
|
||||
(memaddr - 4, buffer, sizeof (buffer), info);
|
||||
prev_insn = bfd_getb32 (buffer);
|
||||
|
||||
if (errcode == 0)
|
||||
{
|
||||
/* If it is a delayed branch, we need to look at the
|
||||
instruction before the delayed branch. This handles
|
||||
sequences such as
|
||||
|
||||
sethi %o1, %hi(_foo), %o1
|
||||
call _printf
|
||||
or %o1, %lo(_foo), %o1
|
||||
*/
|
||||
|
||||
if (is_delayed_branch (prev_insn))
|
||||
{
|
||||
errcode = (*info->read_memory_func)
|
||||
(memaddr - 8, buffer, sizeof (buffer), info);
|
||||
prev_insn = bfd_getb32 (buffer);
|
||||
}
|
||||
}
|
||||
|
||||
/* If there was a problem reading memory, then assume
|
||||
the previous instruction was not sethi. */
|
||||
if (errcode == 0)
|
||||
{
|
||||
/* Is it sethi to the same register? */
|
||||
if ((prev_insn & 0xc1c00000) == 0x01000000
|
||||
&& X_RD (prev_insn) == X_RS1 (insn))
|
||||
{
|
||||
(*info->fprintf_func) (stream, "\t! ");
|
||||
info->target =
|
||||
(0xFFFFFFFF & (int) X_IMM22 (prev_insn) << 10)
|
||||
| SEX (X_IMM13 (insn), 13);
|
||||
(*info->print_address_func) (info->target, info);
|
||||
info->insn_type = dis_dref;
|
||||
info->data_size = 4; /* FIXME!!! */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (opcode->flags & (F_UNBR|F_CONDBR|F_JSR))
|
||||
{
|
||||
/* FIXME -- check is_annulled flag */
|
||||
if (opcode->flags & F_UNBR)
|
||||
info->insn_type = dis_branch;
|
||||
if (opcode->flags & F_CONDBR)
|
||||
info->insn_type = dis_condbranch;
|
||||
if (opcode->flags & F_JSR)
|
||||
info->insn_type = dis_jsr;
|
||||
if (opcode->flags & F_DELAYED)
|
||||
info->branch_delay_insns = 1;
|
||||
}
|
||||
|
||||
return sizeof (buffer);
|
||||
}
|
||||
}
|
||||
|
||||
info->insn_type = dis_noninsn; /* Mark as non-valid instruction */
|
||||
(*info->fprintf_func) (stream, "unknown");
|
||||
return sizeof (buffer);
|
||||
}
|
||||
|
||||
/* Compare opcodes A and B. */
|
||||
|
||||
static int
|
||||
compare_opcodes (a, b)
|
||||
char *a, *b;
|
||||
{
|
||||
struct sparc_opcode *op0 = (struct sparc_opcode *) a;
|
||||
struct sparc_opcode *op1 = (struct sparc_opcode *) b;
|
||||
unsigned long int match0 = op0->match, match1 = op1->match;
|
||||
unsigned long int lose0 = op0->lose, lose1 = op1->lose;
|
||||
register unsigned int i;
|
||||
|
||||
/* If a bit is set in both match and lose, there is something
|
||||
wrong with the opcode table. */
|
||||
if (match0 & lose0)
|
||||
{
|
||||
fprintf (stderr, "Internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n",
|
||||
op0->name, match0, lose0);
|
||||
op0->lose &= ~op0->match;
|
||||
lose0 = op0->lose;
|
||||
}
|
||||
|
||||
if (match1 & lose1)
|
||||
{
|
||||
fprintf (stderr, "Internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n",
|
||||
op1->name, match1, lose1);
|
||||
op1->lose &= ~op1->match;
|
||||
lose1 = op1->lose;
|
||||
}
|
||||
|
||||
/* Because the bits that are variable in one opcode are constant in
|
||||
another, it is important to order the opcodes in the right order. */
|
||||
for (i = 0; i < 32; ++i)
|
||||
{
|
||||
unsigned long int x = 1 << i;
|
||||
int x0 = (match0 & x) != 0;
|
||||
int x1 = (match1 & x) != 0;
|
||||
|
||||
if (x0 != x1)
|
||||
return x1 - x0;
|
||||
}
|
||||
|
||||
for (i = 0; i < 32; ++i)
|
||||
{
|
||||
unsigned long int x = 1 << i;
|
||||
int x0 = (lose0 & x) != 0;
|
||||
int x1 = (lose1 & x) != 0;
|
||||
|
||||
if (x0 != x1)
|
||||
return x1 - x0;
|
||||
}
|
||||
|
||||
/* Put non-sparc64 insns ahead of sparc64 ones. */
|
||||
if (V9_ONLY_P (op0) != V9_ONLY_P (op1))
|
||||
return V9_ONLY_P (op0) - V9_ONLY_P (op1);
|
||||
|
||||
/* They are functionally equal. So as long as the opcode table is
|
||||
valid, we can put whichever one first we want, on aesthetic grounds. */
|
||||
|
||||
/* Our first aesthetic ground is that aliases defer to real insns. */
|
||||
{
|
||||
int alias_diff = (op0->flags & F_ALIAS) - (op1->flags & F_ALIAS);
|
||||
if (alias_diff != 0)
|
||||
/* Put the one that isn't an alias first. */
|
||||
return alias_diff;
|
||||
}
|
||||
|
||||
/* Except for aliases, two "identical" instructions had
|
||||
better have the same opcode. This is a sanity check on the table. */
|
||||
i = strcmp (op0->name, op1->name);
|
||||
if (i)
|
||||
if (op0->flags & F_ALIAS) /* If they're both aliases, be arbitrary. */
|
||||
return i;
|
||||
else
|
||||
fprintf (stderr,
|
||||
"Internal error: bad sparc-opcode.h: \"%s\" == \"%s\"\n",
|
||||
op0->name, op1->name);
|
||||
|
||||
/* Fewer arguments are preferred. */
|
||||
{
|
||||
int length_diff = strlen (op0->args) - strlen (op1->args);
|
||||
if (length_diff != 0)
|
||||
/* Put the one with fewer arguments first. */
|
||||
return length_diff;
|
||||
}
|
||||
|
||||
/* Put 1+i before i+1. */
|
||||
{
|
||||
char *p0 = (char *) strchr(op0->args, '+');
|
||||
char *p1 = (char *) strchr(op1->args, '+');
|
||||
|
||||
if (p0 && p1)
|
||||
{
|
||||
/* There is a plus in both operands. Note that a plus
|
||||
sign cannot be the first character in args,
|
||||
so the following [-1]'s are valid. */
|
||||
if (p0[-1] == 'i' && p1[1] == 'i')
|
||||
/* op0 is i+1 and op1 is 1+i, so op1 goes first. */
|
||||
return 1;
|
||||
if (p0[1] == 'i' && p1[-1] == 'i')
|
||||
/* op0 is 1+i and op1 is i+1, so op0 goes first. */
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Put 1,i before i,1. */
|
||||
{
|
||||
int i0 = strncmp (op0->args, "i,1", 3) == 0;
|
||||
int i1 = strncmp (op1->args, "i,1", 3) == 0;
|
||||
|
||||
if (i0 ^ i1)
|
||||
return i0 - i1;
|
||||
}
|
||||
|
||||
/* They are, as far as we can tell, identical.
|
||||
Since qsort may have rearranged the table partially, there is
|
||||
no way to tell which one was first in the opcode table as
|
||||
written, so just say there are equal. */
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Build a hash table from the opcode table. */
|
||||
|
||||
static void
|
||||
build_hash_table (table, hash_table, num_opcodes)
|
||||
struct sparc_opcode *table;
|
||||
struct opcode_hash **hash_table;
|
||||
int num_opcodes;
|
||||
{
|
||||
register int i;
|
||||
int hash_count[HASH_SIZE];
|
||||
static struct opcode_hash *hash_buf = NULL;
|
||||
|
||||
/* Start at the end of the table and work backwards so that each
|
||||
chain is sorted. */
|
||||
|
||||
memset (hash_table, 0, HASH_SIZE * sizeof (hash_table[0]));
|
||||
memset (hash_count, 0, HASH_SIZE * sizeof (hash_count[0]));
|
||||
if (hash_buf != NULL)
|
||||
free (hash_buf);
|
||||
hash_buf = (struct opcode_hash *) xmalloc (sizeof (struct opcode_hash) * num_opcodes);
|
||||
for (i = num_opcodes - 1; i >= 0; --i)
|
||||
{
|
||||
register int hash = HASH_INSN (sparc_opcodes[i].match);
|
||||
register struct opcode_hash *h = &hash_buf[i];
|
||||
h->next = hash_table[hash];
|
||||
h->opcode = &sparc_opcodes[i];
|
||||
hash_table[hash] = h;
|
||||
++hash_count[hash];
|
||||
}
|
||||
|
||||
#if 0 /* for debugging */
|
||||
{
|
||||
int min_count = num_opcodes, max_count = 0;
|
||||
int total;
|
||||
|
||||
for (i = 0; i < HASH_SIZE; ++i)
|
||||
{
|
||||
if (hash_count[i] < min_count)
|
||||
min_count = hash_count[i];
|
||||
if (hash_count[i] > max_count)
|
||||
max_count = hash_count[i];
|
||||
total += hash_count[i];
|
||||
}
|
||||
|
||||
printf ("Opcode hash table stats: min %d, max %d, ave %f\n",
|
||||
min_count, max_count, (double) total / HASH_SIZE);
|
||||
}
|
||||
#endif
|
||||
}
|
1757
opcode/sparc-opc.c
1757
opcode/sparc-opc.c
File diff suppressed because it is too large
Load diff
220
opcode/sparc.h
220
opcode/sparc.h
|
@ -1,220 +0,0 @@
|
|||
/* Definitions for opcode table for the sparc.
|
||||
Copyright (C) 1989, 1991, 1992, 1995, 1996 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GAS, the GNU Assembler, GDB, the GNU debugger, and
|
||||
the GNU Binutils.
|
||||
|
||||
GAS/GDB is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GAS/GDB is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GAS or GDB; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA. */
|
||||
|
||||
/* The SPARC opcode table (and other related data) is defined in
|
||||
the opcodes library in sparc-opc.c. If you change anything here, make
|
||||
sure you fix up that file, and vice versa. */
|
||||
|
||||
/* FIXME-someday: perhaps the ,a's and such should be embedded in the
|
||||
instruction's name rather than the args. This would make gas faster, pinsn
|
||||
slower, but would mess up some macros a bit. xoxorich. */
|
||||
|
||||
/* List of instruction sets variations.
|
||||
These values are such that each element is either a superset of a
|
||||
preceding each one or they conflict in which case SPARC_OPCODE_CONFLICT_P
|
||||
returns non-zero.
|
||||
The values are indices into `sparc_opcode_archs' defined in sparc-opc.c.
|
||||
Don't change this without updating sparc-opc.c. */
|
||||
|
||||
enum sparc_opcode_arch_val {
|
||||
SPARC_OPCODE_ARCH_V6 = 0,
|
||||
SPARC_OPCODE_ARCH_V7,
|
||||
SPARC_OPCODE_ARCH_V8,
|
||||
SPARC_OPCODE_ARCH_SPARCLET,
|
||||
SPARC_OPCODE_ARCH_SPARCLITE,
|
||||
/* v9 variants must appear last */
|
||||
SPARC_OPCODE_ARCH_V9,
|
||||
SPARC_OPCODE_ARCH_V9A, /* v9 with ultrasparc additions */
|
||||
SPARC_OPCODE_ARCH_BAD /* error return from sparc_opcode_lookup_arch */
|
||||
};
|
||||
|
||||
/* The highest architecture in the table. */
|
||||
#define SPARC_OPCODE_ARCH_MAX (SPARC_OPCODE_ARCH_BAD - 1)
|
||||
|
||||
/* Table of cpu variants. */
|
||||
|
||||
struct sparc_opcode_arch {
|
||||
const char *name;
|
||||
/* Mask of sparc_opcode_arch_val's supported.
|
||||
EG: For v7 this would be ((1 << v6) | (1 << v7)). */
|
||||
/* These are short's because sparc_opcode.architecture is. */
|
||||
short supported;
|
||||
};
|
||||
|
||||
extern const struct sparc_opcode_arch sparc_opcode_archs[];
|
||||
|
||||
/* Given architecture name, look up it's sparc_opcode_arch_val value. */
|
||||
extern enum sparc_opcode_arch_val sparc_opcode_lookup_arch ();
|
||||
|
||||
/* Return the bitmask of supported architectures for ARCH. */
|
||||
#define SPARC_OPCODE_SUPPORTED(ARCH) (sparc_opcode_archs[ARCH].supported)
|
||||
|
||||
/* Non-zero if ARCH1 conflicts with ARCH2.
|
||||
IE: ARCH1 as a supported bit set that ARCH2 doesn't, and vice versa. */
|
||||
#define SPARC_OPCODE_CONFLICT_P(ARCH1, ARCH2) \
|
||||
(((SPARC_OPCODE_SUPPORTED (ARCH1) & SPARC_OPCODE_SUPPORTED (ARCH2)) \
|
||||
!= SPARC_OPCODE_SUPPORTED (ARCH1)) \
|
||||
&& ((SPARC_OPCODE_SUPPORTED (ARCH1) & SPARC_OPCODE_SUPPORTED (ARCH2)) \
|
||||
!= SPARC_OPCODE_SUPPORTED (ARCH2)))
|
||||
|
||||
/* Structure of an opcode table entry. */
|
||||
|
||||
struct sparc_opcode {
|
||||
const char *name;
|
||||
unsigned long match; /* Bits that must be set. */
|
||||
unsigned long lose; /* Bits that must not be set. */
|
||||
const char *args;
|
||||
/* This was called "delayed" in versions before the flags. */
|
||||
char flags;
|
||||
short architecture; /* Bitmask of sparc_opcode_arch_val's. */
|
||||
};
|
||||
|
||||
#define F_DELAYED 1 /* Delayed branch */
|
||||
#define F_ALIAS 2 /* Alias for a "real" instruction */
|
||||
#define F_UNBR 4 /* Unconditional branch */
|
||||
#define F_CONDBR 8 /* Conditional branch */
|
||||
#define F_JSR 16 /* Subroutine call */
|
||||
/* FIXME: Add F_ANACHRONISTIC flag for v9. */
|
||||
|
||||
/*
|
||||
|
||||
All sparc opcodes are 32 bits, except for the `set' instruction (really a
|
||||
macro), which is 64 bits. It is handled as a special case.
|
||||
|
||||
The match component is a mask saying which bits must match a particular
|
||||
opcode in order for an instruction to be an instance of that opcode.
|
||||
|
||||
The args component is a string containing one character for each operand of the
|
||||
instruction.
|
||||
|
||||
Kinds of operands:
|
||||
# Number used by optimizer. It is ignored.
|
||||
1 rs1 register.
|
||||
2 rs2 register.
|
||||
d rd register.
|
||||
e frs1 floating point register.
|
||||
v frs1 floating point register (double/even).
|
||||
V frs1 floating point register (quad/multiple of 4).
|
||||
f frs2 floating point register.
|
||||
B frs2 floating point register (double/even).
|
||||
R frs2 floating point register (quad/multiple of 4).
|
||||
g frsd floating point register.
|
||||
H frsd floating point register (double/even).
|
||||
J frsd floating point register (quad/multiple of 4).
|
||||
b crs1 coprocessor register
|
||||
c crs2 coprocessor register
|
||||
D crsd coprocessor register
|
||||
m alternate space register (asr) in rd
|
||||
M alternate space register (asr) in rs1
|
||||
h 22 high bits.
|
||||
K MEMBAR mask (7 bits). (v9)
|
||||
j 10 bit Immediate. (v9)
|
||||
I 11 bit Immediate. (v9)
|
||||
i 13 bit Immediate.
|
||||
n 22 bit immediate.
|
||||
k 2+14 bit PC relative immediate. (v9)
|
||||
G 19 bit PC relative immediate. (v9)
|
||||
l 22 bit PC relative immediate.
|
||||
L 30 bit PC relative immediate.
|
||||
a Annul. The annul bit is set.
|
||||
A Alternate address space. Stored as 8 bits.
|
||||
C Coprocessor state register.
|
||||
F floating point state register.
|
||||
p Processor state register.
|
||||
N Branch predict clear ",pn" (v9)
|
||||
T Branch predict set ",pt" (v9)
|
||||
z %icc. (v9)
|
||||
Z %xcc. (v9)
|
||||
q Floating point queue.
|
||||
r Single register that is both rs1 and rd.
|
||||
O Single register that is both rs2 and rd.
|
||||
Q Coprocessor queue.
|
||||
S Special case.
|
||||
t Trap base register.
|
||||
w Window invalid mask register.
|
||||
y Y register.
|
||||
u sparclet coprocessor registers in rd position
|
||||
U sparclet coprocessor registers in rs1 position
|
||||
E %ccr. (v9)
|
||||
s %fprs. (v9)
|
||||
P %pc. (v9)
|
||||
W %tick. (v9)
|
||||
o %asi. (v9)
|
||||
6 %fcc0. (v9)
|
||||
7 %fcc1. (v9)
|
||||
8 %fcc2. (v9)
|
||||
9 %fcc3. (v9)
|
||||
! Privileged Register in rd (v9)
|
||||
? Privileged Register in rs1 (v9)
|
||||
* Prefetch function constant. (v9)
|
||||
x OPF field (v9 impdep).
|
||||
|
||||
The following chars are unused: (note: ,[] are used as punctuation)
|
||||
[XY3450]
|
||||
|
||||
*/
|
||||
|
||||
#define OP2(x) (((x)&0x7) << 22) /* op2 field of format2 insns */
|
||||
#define OP3(x) (((x)&0x3f) << 19) /* op3 field of format3 insns */
|
||||
#define OP(x) ((unsigned)((x)&0x3) << 30) /* op field of all insns */
|
||||
#define OPF(x) (((x)&0x1ff) << 5) /* opf field of float insns */
|
||||
#define OPF_LOW5(x) OPF((x)&0x1f) /* v9 */
|
||||
#define F3F(x, y, z) (OP(x) | OP3(y) | OPF(z)) /* format3 float insns */
|
||||
#define F3I(x) (((x)&0x1) << 13) /* immediate field of format 3 insns */
|
||||
#define F2(x, y) (OP(x) | OP2(y)) /* format 2 insns */
|
||||
#define F3(x, y, z) (OP(x) | OP3(y) | F3I(z)) /* format3 insns */
|
||||
#define F1(x) (OP(x))
|
||||
#define DISP30(x) ((x)&0x3fffffff)
|
||||
#define ASI(x) (((x)&0xff) << 5) /* asi field of format3 insns */
|
||||
#define RS2(x) ((x)&0x1f) /* rs2 field */
|
||||
#define SIMM13(x) ((x)&0x1fff) /* simm13 field */
|
||||
#define RD(x) (((x)&0x1f) << 25) /* destination register field */
|
||||
#define RS1(x) (((x)&0x1f) << 14) /* rs1 field */
|
||||
#define ASI_RS2(x) (SIMM13(x))
|
||||
#define MEMBAR(x) ((x)&0x7f)
|
||||
|
||||
#define ANNUL (1<<29)
|
||||
#define BPRED (1<<19) /* v9 */
|
||||
#define IMMED F3I(1)
|
||||
#define RD_G0 RD(~0)
|
||||
#define RS1_G0 RS1(~0)
|
||||
#define RS2_G0 RS2(~0)
|
||||
|
||||
extern struct sparc_opcode sparc_opcodes[];
|
||||
extern const int sparc_num_opcodes;
|
||||
|
||||
int sparc_encode_asi ();
|
||||
char *sparc_decode_asi ();
|
||||
int sparc_encode_membar ();
|
||||
char *sparc_decode_membar ();
|
||||
int sparc_encode_prefetch ();
|
||||
char *sparc_decode_prefetch ();
|
||||
int sparc_encode_sparclet_cpreg ();
|
||||
char *sparc_decode_sparclet_cpreg ();
|
||||
|
||||
/*
|
||||
* Local Variables:
|
||||
* fill-column: 131
|
||||
* comment-column: 0
|
||||
* End:
|
||||
*/
|
||||
|
||||
/* end of sparc.h */
|
|
@ -1,6 +0,0 @@
|
|||
#ifndef __SYSDEP_H_SEEN
|
||||
#define __SYSDEP_H_SEEN
|
||||
|
||||
#include "lightning.h"
|
||||
|
||||
#endif
|
20
tests/3to2.c
20
tests/3to2.c
|
@ -38,7 +38,6 @@
|
|||
#include <stdlib.h>
|
||||
#include "lightning.h"
|
||||
|
||||
#ifdef JIT_FPR
|
||||
static jit_insn codeBuffer[1024];
|
||||
|
||||
double
|
||||
|
@ -59,14 +58,8 @@ test_double (int a, int b, int c)
|
|||
|
||||
jit_flush_code ((char *) codeBuffer, jit_get_ip ().ptr);
|
||||
|
||||
#ifdef LIGHTNING_DISASSEMBLE
|
||||
disassemble (stderr, (char *) codeBuffer, jit_get_ip ().ptr);
|
||||
#endif
|
||||
|
||||
#ifndef LIGHTNING_CROSS
|
||||
x = ((double (*) (double, double)) codeBuffer) (3.0, 2.0);
|
||||
printf ("%g %g\n", ((b == c) ? 0.0 : 1.0), x);
|
||||
#endif
|
||||
|
||||
return x;
|
||||
}
|
||||
|
@ -89,14 +82,8 @@ test_int (int a, int b, int c)
|
|||
|
||||
jit_flush_code ((char *) codeBuffer, jit_get_ip ().ptr);
|
||||
|
||||
#ifdef LIGHTNING_DISASSEMBLE
|
||||
disassemble (stderr, (char *) codeBuffer, jit_get_ip ().ptr);
|
||||
#endif
|
||||
|
||||
#ifndef LIGHTNING_CROSS
|
||||
x = ((int (*) (int, int)) codeBuffer) (3, 2);
|
||||
printf ("%d %d\n", ((b == c) ? 0 : 1), x);
|
||||
#endif
|
||||
|
||||
return x;
|
||||
}
|
||||
|
@ -134,10 +121,3 @@ main ()
|
|||
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
int
|
||||
main()
|
||||
{
|
||||
return (77);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -2,23 +2,19 @@ AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_srcdir)/lightning/$(cpu)
|
|||
|
||||
check_PROGRAMS = fibit incr printf printf2 rpn fib fibdelay \
|
||||
add bp testfp funcfp rpnfp modi ldxi divi movi ret \
|
||||
allocai push-pop sete 3to2 ldst
|
||||
allocai sete 3to2 ldst
|
||||
|
||||
noinst_DATA = fibit.ok incr.ok printf.ok printf2.ok rpn.ok \
|
||||
fib.ok fibdelay.ok testfp.ok funcfp.ok rpnfp.ok add.ok \
|
||||
bp.ok modi.ok ldxi.ok divi.ok movi.ok ret.ok \
|
||||
allocai.ok push-pop.ok sete.ok 3to2.ok ldst.ok
|
||||
allocai.ok sete.ok 3to2.ok ldst.ok
|
||||
|
||||
EXTRA_DIST = $(noinst_DATA) run-test
|
||||
|
||||
if DISASS
|
||||
LDADD = $(top_builddir)/opcode/libdisass.a
|
||||
endif
|
||||
|
||||
if REGRESSION_TESTING
|
||||
TESTS = fib fibit fibdelay incr printf printf2 rpn add bp \
|
||||
testfp funcfp rpnfp modi ldxi divi movi ret allocai \
|
||||
push-pop sete 3to2 ldst
|
||||
sete 3to2 ldst
|
||||
|
||||
TESTS_ENVIRONMENT=$(srcdir)/run-test
|
||||
endif
|
||||
|
|
|
@ -1,745 +0,0 @@
|
|||
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
|
||||
# Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
check_PROGRAMS = fibit$(EXEEXT) incr$(EXEEXT) printf$(EXEEXT) \
|
||||
printf2$(EXEEXT) rpn$(EXEEXT) fib$(EXEEXT) fibdelay$(EXEEXT) \
|
||||
add$(EXEEXT) bp$(EXEEXT) testfp$(EXEEXT) funcfp$(EXEEXT) \
|
||||
rpnfp$(EXEEXT) modi$(EXEEXT) ldxi$(EXEEXT) divi$(EXEEXT) \
|
||||
movi$(EXEEXT) ret$(EXEEXT) allocai$(EXEEXT) push-pop$(EXEEXT) \
|
||||
sete$(EXEEXT) 3to2$(EXEEXT) ldst$(EXEEXT)
|
||||
@REGRESSION_TESTING_TRUE@TESTS = fib$(EXEEXT) fibit$(EXEEXT) \
|
||||
@REGRESSION_TESTING_TRUE@ fibdelay$(EXEEXT) incr$(EXEEXT) \
|
||||
@REGRESSION_TESTING_TRUE@ printf$(EXEEXT) printf2$(EXEEXT) \
|
||||
@REGRESSION_TESTING_TRUE@ rpn$(EXEEXT) add$(EXEEXT) bp$(EXEEXT) \
|
||||
@REGRESSION_TESTING_TRUE@ testfp$(EXEEXT) funcfp$(EXEEXT) \
|
||||
@REGRESSION_TESTING_TRUE@ rpnfp$(EXEEXT) modi$(EXEEXT) \
|
||||
@REGRESSION_TESTING_TRUE@ ldxi$(EXEEXT) divi$(EXEEXT) \
|
||||
@REGRESSION_TESTING_TRUE@ movi$(EXEEXT) ret$(EXEEXT) \
|
||||
@REGRESSION_TESTING_TRUE@ allocai$(EXEEXT) push-pop$(EXEEXT) \
|
||||
@REGRESSION_TESTING_TRUE@ sete$(EXEEXT) 3to2$(EXEEXT) \
|
||||
@REGRESSION_TESTING_TRUE@ ldst$(EXEEXT)
|
||||
subdir = tests
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/build-aux/lightning.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
3to2_SOURCES = 3to2.c
|
||||
3to2_OBJECTS = 3to2.$(OBJEXT)
|
||||
3to2_LDADD = $(LDADD)
|
||||
@DISASS_TRUE@3to2_DEPENDENCIES = $(top_builddir)/opcode/libdisass.a
|
||||
add_SOURCES = add.c
|
||||
add_OBJECTS = add.$(OBJEXT)
|
||||
add_LDADD = $(LDADD)
|
||||
@DISASS_TRUE@add_DEPENDENCIES = $(top_builddir)/opcode/libdisass.a
|
||||
allocai_SOURCES = allocai.c
|
||||
allocai_OBJECTS = allocai.$(OBJEXT)
|
||||
allocai_LDADD = $(LDADD)
|
||||
@DISASS_TRUE@allocai_DEPENDENCIES = \
|
||||
@DISASS_TRUE@ $(top_builddir)/opcode/libdisass.a
|
||||
bp_SOURCES = bp.c
|
||||
bp_OBJECTS = bp.$(OBJEXT)
|
||||
bp_LDADD = $(LDADD)
|
||||
@DISASS_TRUE@bp_DEPENDENCIES = $(top_builddir)/opcode/libdisass.a
|
||||
divi_SOURCES = divi.c
|
||||
divi_OBJECTS = divi.$(OBJEXT)
|
||||
divi_LDADD = $(LDADD)
|
||||
@DISASS_TRUE@divi_DEPENDENCIES = $(top_builddir)/opcode/libdisass.a
|
||||
fib_SOURCES = fib.c
|
||||
fib_OBJECTS = fib.$(OBJEXT)
|
||||
fib_LDADD = $(LDADD)
|
||||
@DISASS_TRUE@fib_DEPENDENCIES = $(top_builddir)/opcode/libdisass.a
|
||||
fibdelay_SOURCES = fibdelay.c
|
||||
fibdelay_OBJECTS = fibdelay.$(OBJEXT)
|
||||
fibdelay_LDADD = $(LDADD)
|
||||
@DISASS_TRUE@fibdelay_DEPENDENCIES = \
|
||||
@DISASS_TRUE@ $(top_builddir)/opcode/libdisass.a
|
||||
fibit_SOURCES = fibit.c
|
||||
fibit_OBJECTS = fibit.$(OBJEXT)
|
||||
fibit_LDADD = $(LDADD)
|
||||
@DISASS_TRUE@fibit_DEPENDENCIES = $(top_builddir)/opcode/libdisass.a
|
||||
funcfp_SOURCES = funcfp.c
|
||||
funcfp_OBJECTS = funcfp.$(OBJEXT)
|
||||
funcfp_LDADD = $(LDADD)
|
||||
@DISASS_TRUE@funcfp_DEPENDENCIES = $(top_builddir)/opcode/libdisass.a
|
||||
incr_SOURCES = incr.c
|
||||
incr_OBJECTS = incr.$(OBJEXT)
|
||||
incr_LDADD = $(LDADD)
|
||||
@DISASS_TRUE@incr_DEPENDENCIES = $(top_builddir)/opcode/libdisass.a
|
||||
ldst_SOURCES = ldst.c
|
||||
ldst_OBJECTS = ldst-ldst.$(OBJEXT)
|
||||
ldst_LDADD = $(LDADD)
|
||||
@DISASS_TRUE@ldst_DEPENDENCIES = $(top_builddir)/opcode/libdisass.a
|
||||
ldst_LINK = $(CCLD) $(ldst_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
|
||||
-o $@
|
||||
ldxi_SOURCES = ldxi.c
|
||||
ldxi_OBJECTS = ldxi.$(OBJEXT)
|
||||
ldxi_LDADD = $(LDADD)
|
||||
@DISASS_TRUE@ldxi_DEPENDENCIES = $(top_builddir)/opcode/libdisass.a
|
||||
modi_SOURCES = modi.c
|
||||
modi_OBJECTS = modi.$(OBJEXT)
|
||||
modi_LDADD = $(LDADD)
|
||||
@DISASS_TRUE@modi_DEPENDENCIES = $(top_builddir)/opcode/libdisass.a
|
||||
movi_SOURCES = movi.c
|
||||
movi_OBJECTS = movi.$(OBJEXT)
|
||||
movi_LDADD = $(LDADD)
|
||||
@DISASS_TRUE@movi_DEPENDENCIES = $(top_builddir)/opcode/libdisass.a
|
||||
printf_SOURCES = printf.c
|
||||
printf_OBJECTS = printf.$(OBJEXT)
|
||||
printf_LDADD = $(LDADD)
|
||||
@DISASS_TRUE@printf_DEPENDENCIES = $(top_builddir)/opcode/libdisass.a
|
||||
printf2_SOURCES = printf2.c
|
||||
printf2_OBJECTS = printf2.$(OBJEXT)
|
||||
printf2_LDADD = $(LDADD)
|
||||
@DISASS_TRUE@printf2_DEPENDENCIES = \
|
||||
@DISASS_TRUE@ $(top_builddir)/opcode/libdisass.a
|
||||
push_pop_SOURCES = push-pop.c
|
||||
push_pop_OBJECTS = push-pop.$(OBJEXT)
|
||||
push_pop_LDADD = $(LDADD)
|
||||
@DISASS_TRUE@push_pop_DEPENDENCIES = \
|
||||
@DISASS_TRUE@ $(top_builddir)/opcode/libdisass.a
|
||||
ret_SOURCES = ret.c
|
||||
ret_OBJECTS = ret.$(OBJEXT)
|
||||
ret_LDADD = $(LDADD)
|
||||
@DISASS_TRUE@ret_DEPENDENCIES = $(top_builddir)/opcode/libdisass.a
|
||||
rpn_SOURCES = rpn.c
|
||||
rpn_OBJECTS = rpn.$(OBJEXT)
|
||||
rpn_LDADD = $(LDADD)
|
||||
@DISASS_TRUE@rpn_DEPENDENCIES = $(top_builddir)/opcode/libdisass.a
|
||||
rpnfp_SOURCES = rpnfp.c
|
||||
rpnfp_OBJECTS = rpnfp.$(OBJEXT)
|
||||
rpnfp_LDADD = $(LDADD)
|
||||
@DISASS_TRUE@rpnfp_DEPENDENCIES = $(top_builddir)/opcode/libdisass.a
|
||||
sete_SOURCES = sete.c
|
||||
sete_OBJECTS = sete.$(OBJEXT)
|
||||
sete_LDADD = $(LDADD)
|
||||
@DISASS_TRUE@sete_DEPENDENCIES = $(top_builddir)/opcode/libdisass.a
|
||||
testfp_SOURCES = testfp.c
|
||||
testfp_OBJECTS = testfp.$(OBJEXT)
|
||||
testfp_LDADD = $(LDADD)
|
||||
@DISASS_TRUE@testfp_DEPENDENCIES = $(top_builddir)/opcode/libdisass.a
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
am__mv = mv -f
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = 3to2.c add.c allocai.c bp.c divi.c fib.c fibdelay.c fibit.c \
|
||||
funcfp.c incr.c ldst.c ldxi.c modi.c movi.c printf.c printf2.c \
|
||||
push-pop.c ret.c rpn.c rpnfp.c sete.c testfp.c
|
||||
DIST_SOURCES = 3to2.c add.c allocai.c bp.c divi.c fib.c fibdelay.c \
|
||||
fibit.c funcfp.c incr.c ldst.c ldxi.c modi.c movi.c printf.c \
|
||||
printf2.c push-pop.c ret.c rpn.c rpnfp.c sete.c testfp.c
|
||||
DATA = $(noinst_DATA)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
am__tty_colors = \
|
||||
red=; grn=; lgn=; blu=; std=
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BACKENDS = @BACKENDS@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EXEEXT = @EXEEXT@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_INFO = @INSTALL_INFO@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBDISASS = @LIBDISASS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
cpu = @cpu@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_srcdir)/lightning/$(cpu)
|
||||
noinst_DATA = fibit.ok incr.ok printf.ok printf2.ok rpn.ok \
|
||||
fib.ok fibdelay.ok testfp.ok funcfp.ok rpnfp.ok add.ok \
|
||||
bp.ok modi.ok ldxi.ok divi.ok movi.ok ret.ok \
|
||||
allocai.ok push-pop.ok sete.ok 3to2.ok ldst.ok
|
||||
|
||||
EXTRA_DIST = $(noinst_DATA) run-test
|
||||
@DISASS_TRUE@LDADD = $(top_builddir)/opcode/libdisass.a
|
||||
@REGRESSION_TESTING_TRUE@TESTS_ENVIRONMENT = $(srcdir)/run-test
|
||||
ldst_CFLAGS = -ffloat-store
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .o .obj
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu tests/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
clean-checkPROGRAMS:
|
||||
-test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS)
|
||||
3to2$(EXEEXT): $(3to2_OBJECTS) $(3to2_DEPENDENCIES)
|
||||
@rm -f 3to2$(EXEEXT)
|
||||
$(LINK) $(3to2_OBJECTS) $(3to2_LDADD) $(LIBS)
|
||||
add$(EXEEXT): $(add_OBJECTS) $(add_DEPENDENCIES)
|
||||
@rm -f add$(EXEEXT)
|
||||
$(LINK) $(add_OBJECTS) $(add_LDADD) $(LIBS)
|
||||
allocai$(EXEEXT): $(allocai_OBJECTS) $(allocai_DEPENDENCIES)
|
||||
@rm -f allocai$(EXEEXT)
|
||||
$(LINK) $(allocai_OBJECTS) $(allocai_LDADD) $(LIBS)
|
||||
bp$(EXEEXT): $(bp_OBJECTS) $(bp_DEPENDENCIES)
|
||||
@rm -f bp$(EXEEXT)
|
||||
$(LINK) $(bp_OBJECTS) $(bp_LDADD) $(LIBS)
|
||||
divi$(EXEEXT): $(divi_OBJECTS) $(divi_DEPENDENCIES)
|
||||
@rm -f divi$(EXEEXT)
|
||||
$(LINK) $(divi_OBJECTS) $(divi_LDADD) $(LIBS)
|
||||
fib$(EXEEXT): $(fib_OBJECTS) $(fib_DEPENDENCIES)
|
||||
@rm -f fib$(EXEEXT)
|
||||
$(LINK) $(fib_OBJECTS) $(fib_LDADD) $(LIBS)
|
||||
fibdelay$(EXEEXT): $(fibdelay_OBJECTS) $(fibdelay_DEPENDENCIES)
|
||||
@rm -f fibdelay$(EXEEXT)
|
||||
$(LINK) $(fibdelay_OBJECTS) $(fibdelay_LDADD) $(LIBS)
|
||||
fibit$(EXEEXT): $(fibit_OBJECTS) $(fibit_DEPENDENCIES)
|
||||
@rm -f fibit$(EXEEXT)
|
||||
$(LINK) $(fibit_OBJECTS) $(fibit_LDADD) $(LIBS)
|
||||
funcfp$(EXEEXT): $(funcfp_OBJECTS) $(funcfp_DEPENDENCIES)
|
||||
@rm -f funcfp$(EXEEXT)
|
||||
$(LINK) $(funcfp_OBJECTS) $(funcfp_LDADD) $(LIBS)
|
||||
incr$(EXEEXT): $(incr_OBJECTS) $(incr_DEPENDENCIES)
|
||||
@rm -f incr$(EXEEXT)
|
||||
$(LINK) $(incr_OBJECTS) $(incr_LDADD) $(LIBS)
|
||||
ldst$(EXEEXT): $(ldst_OBJECTS) $(ldst_DEPENDENCIES)
|
||||
@rm -f ldst$(EXEEXT)
|
||||
$(ldst_LINK) $(ldst_OBJECTS) $(ldst_LDADD) $(LIBS)
|
||||
ldxi$(EXEEXT): $(ldxi_OBJECTS) $(ldxi_DEPENDENCIES)
|
||||
@rm -f ldxi$(EXEEXT)
|
||||
$(LINK) $(ldxi_OBJECTS) $(ldxi_LDADD) $(LIBS)
|
||||
modi$(EXEEXT): $(modi_OBJECTS) $(modi_DEPENDENCIES)
|
||||
@rm -f modi$(EXEEXT)
|
||||
$(LINK) $(modi_OBJECTS) $(modi_LDADD) $(LIBS)
|
||||
movi$(EXEEXT): $(movi_OBJECTS) $(movi_DEPENDENCIES)
|
||||
@rm -f movi$(EXEEXT)
|
||||
$(LINK) $(movi_OBJECTS) $(movi_LDADD) $(LIBS)
|
||||
printf$(EXEEXT): $(printf_OBJECTS) $(printf_DEPENDENCIES)
|
||||
@rm -f printf$(EXEEXT)
|
||||
$(LINK) $(printf_OBJECTS) $(printf_LDADD) $(LIBS)
|
||||
printf2$(EXEEXT): $(printf2_OBJECTS) $(printf2_DEPENDENCIES)
|
||||
@rm -f printf2$(EXEEXT)
|
||||
$(LINK) $(printf2_OBJECTS) $(printf2_LDADD) $(LIBS)
|
||||
push-pop$(EXEEXT): $(push_pop_OBJECTS) $(push_pop_DEPENDENCIES)
|
||||
@rm -f push-pop$(EXEEXT)
|
||||
$(LINK) $(push_pop_OBJECTS) $(push_pop_LDADD) $(LIBS)
|
||||
ret$(EXEEXT): $(ret_OBJECTS) $(ret_DEPENDENCIES)
|
||||
@rm -f ret$(EXEEXT)
|
||||
$(LINK) $(ret_OBJECTS) $(ret_LDADD) $(LIBS)
|
||||
rpn$(EXEEXT): $(rpn_OBJECTS) $(rpn_DEPENDENCIES)
|
||||
@rm -f rpn$(EXEEXT)
|
||||
$(LINK) $(rpn_OBJECTS) $(rpn_LDADD) $(LIBS)
|
||||
rpnfp$(EXEEXT): $(rpnfp_OBJECTS) $(rpnfp_DEPENDENCIES)
|
||||
@rm -f rpnfp$(EXEEXT)
|
||||
$(LINK) $(rpnfp_OBJECTS) $(rpnfp_LDADD) $(LIBS)
|
||||
sete$(EXEEXT): $(sete_OBJECTS) $(sete_DEPENDENCIES)
|
||||
@rm -f sete$(EXEEXT)
|
||||
$(LINK) $(sete_OBJECTS) $(sete_LDADD) $(LIBS)
|
||||
testfp$(EXEEXT): $(testfp_OBJECTS) $(testfp_DEPENDENCIES)
|
||||
@rm -f testfp$(EXEEXT)
|
||||
$(LINK) $(testfp_OBJECTS) $(testfp_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/3to2.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/add.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/allocai.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bp.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/divi.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fib.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fibdelay.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fibit.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/funcfp.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/incr.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ldst-ldst.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ldxi.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modi.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/movi.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf2.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/push-pop.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ret.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rpn.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rpnfp.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sete.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testfp.Po@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
ldst-ldst.o: ldst.c
|
||||
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ldst_CFLAGS) $(CFLAGS) -MT ldst-ldst.o -MD -MP -MF $(DEPDIR)/ldst-ldst.Tpo -c -o ldst-ldst.o `test -f 'ldst.c' || echo '$(srcdir)/'`ldst.c
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ldst-ldst.Tpo $(DEPDIR)/ldst-ldst.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ldst.c' object='ldst-ldst.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ldst_CFLAGS) $(CFLAGS) -c -o ldst-ldst.o `test -f 'ldst.c' || echo '$(srcdir)/'`ldst.c
|
||||
|
||||
ldst-ldst.obj: ldst.c
|
||||
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ldst_CFLAGS) $(CFLAGS) -MT ldst-ldst.obj -MD -MP -MF $(DEPDIR)/ldst-ldst.Tpo -c -o ldst-ldst.obj `if test -f 'ldst.c'; then $(CYGPATH_W) 'ldst.c'; else $(CYGPATH_W) '$(srcdir)/ldst.c'; fi`
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ldst-ldst.Tpo $(DEPDIR)/ldst-ldst.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ldst.c' object='ldst-ldst.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ldst_CFLAGS) $(CFLAGS) -c -o ldst-ldst.obj `if test -f 'ldst.c'; then $(CYGPATH_W) 'ldst.c'; else $(CYGPATH_W) '$(srcdir)/ldst.c'; fi`
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
check-TESTS: $(TESTS)
|
||||
@failed=0; all=0; xfail=0; xpass=0; skip=0; \
|
||||
srcdir=$(srcdir); export srcdir; \
|
||||
list=' $(TESTS) '; \
|
||||
$(am__tty_colors); \
|
||||
if test -n "$$list"; then \
|
||||
for tst in $$list; do \
|
||||
if test -f ./$$tst; then dir=./; \
|
||||
elif test -f $$tst; then dir=; \
|
||||
else dir="$(srcdir)/"; fi; \
|
||||
if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
|
||||
all=`expr $$all + 1`; \
|
||||
case " $(XFAIL_TESTS) " in \
|
||||
*[\ \ ]$$tst[\ \ ]*) \
|
||||
xpass=`expr $$xpass + 1`; \
|
||||
failed=`expr $$failed + 1`; \
|
||||
col=$$red; res=XPASS; \
|
||||
;; \
|
||||
*) \
|
||||
col=$$grn; res=PASS; \
|
||||
;; \
|
||||
esac; \
|
||||
elif test $$? -ne 77; then \
|
||||
all=`expr $$all + 1`; \
|
||||
case " $(XFAIL_TESTS) " in \
|
||||
*[\ \ ]$$tst[\ \ ]*) \
|
||||
xfail=`expr $$xfail + 1`; \
|
||||
col=$$lgn; res=XFAIL; \
|
||||
;; \
|
||||
*) \
|
||||
failed=`expr $$failed + 1`; \
|
||||
col=$$red; res=FAIL; \
|
||||
;; \
|
||||
esac; \
|
||||
else \
|
||||
skip=`expr $$skip + 1`; \
|
||||
col=$$blu; res=SKIP; \
|
||||
fi; \
|
||||
echo "$${col}$$res$${std}: $$tst"; \
|
||||
done; \
|
||||
if test "$$all" -eq 1; then \
|
||||
tests="test"; \
|
||||
All=""; \
|
||||
else \
|
||||
tests="tests"; \
|
||||
All="All "; \
|
||||
fi; \
|
||||
if test "$$failed" -eq 0; then \
|
||||
if test "$$xfail" -eq 0; then \
|
||||
banner="$$All$$all $$tests passed"; \
|
||||
else \
|
||||
if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
|
||||
banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
|
||||
fi; \
|
||||
else \
|
||||
if test "$$xpass" -eq 0; then \
|
||||
banner="$$failed of $$all $$tests failed"; \
|
||||
else \
|
||||
if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
|
||||
banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
|
||||
fi; \
|
||||
fi; \
|
||||
dashes="$$banner"; \
|
||||
skipped=""; \
|
||||
if test "$$skip" -ne 0; then \
|
||||
if test "$$skip" -eq 1; then \
|
||||
skipped="($$skip test was not run)"; \
|
||||
else \
|
||||
skipped="($$skip tests were not run)"; \
|
||||
fi; \
|
||||
test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
|
||||
dashes="$$skipped"; \
|
||||
fi; \
|
||||
report=""; \
|
||||
if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
|
||||
report="Please report to $(PACKAGE_BUGREPORT)"; \
|
||||
test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
|
||||
dashes="$$report"; \
|
||||
fi; \
|
||||
dashes=`echo "$$dashes" | sed s/./=/g`; \
|
||||
if test "$$failed" -eq 0; then \
|
||||
echo "$$grn$$dashes"; \
|
||||
else \
|
||||
echo "$$red$$dashes"; \
|
||||
fi; \
|
||||
echo "$$banner"; \
|
||||
test -z "$$skipped" || echo "$$skipped"; \
|
||||
test -z "$$report" || echo "$$report"; \
|
||||
echo "$$dashes$$std"; \
|
||||
test "$$failed" -eq 0; \
|
||||
else :; fi
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
|
||||
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
|
||||
check: check-am
|
||||
all-am: Makefile $(DATA)
|
||||
installdirs:
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-checkPROGRAMS clean-generic mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: check-am install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
|
||||
clean-checkPROGRAMS clean-generic ctags distclean \
|
||||
distclean-compile distclean-generic distclean-tags distdir dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-data install-data-am install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-html install-html-am \
|
||||
install-info install-info-am install-man install-pdf \
|
||||
install-pdf-am install-ps install-ps-am install-strip \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
|
||||
uninstall-am
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
|
@ -55,11 +55,6 @@ int main()
|
|||
jit_flush_code(codeBuffer, jit_get_ip().ptr);
|
||||
|
||||
/* call the generated code, passing its size as argument */
|
||||
#ifdef LIGHTNING_DISASSEMBLE
|
||||
disassemble(stderr, codeBuffer, jit_get_ip().ptr);
|
||||
#endif
|
||||
#ifndef LIGHTNING_CROSS
|
||||
printf("%d + %d = %d\n", 5, 4, myFunction(5, 4));
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -83,11 +83,6 @@ int main()
|
|||
/* call the generated code, passing 32 as an argument */
|
||||
jit_flush_code(codeBuffer, jit_get_ip().ptr);
|
||||
|
||||
#ifdef LIGHTNING_DISASSEMBLE
|
||||
disassemble(stderr, (char *)codeBuffer, jit_get_ip().ptr);
|
||||
#endif
|
||||
#ifndef LIGHTNING_CROSS
|
||||
printf("nfibs(%d) = %d\n", 32, nfibs(32));
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -71,11 +71,6 @@ int main()
|
|||
/* call the generated code, passing 32 as an argument */
|
||||
jit_flush_code(codeBuffer, jit_get_ip().ptr);
|
||||
|
||||
#ifdef LIGHTNING_DISASSEMBLE
|
||||
disassemble(stderr, codeBuffer, jit_get_ip().ptr);
|
||||
#endif
|
||||
#ifndef LIGHTNING_CROSS
|
||||
printf("nfibs(%d) = %d\n", 32, nfibs(32));
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -70,12 +70,7 @@ int main()
|
|||
|
||||
jit_flush_code(codeBuffer, jit_get_ip().ptr);
|
||||
|
||||
#ifdef LIGHTNING_DISASSEMBLE
|
||||
disassemble(stderr, codeBuffer, jit_get_ip().ptr);
|
||||
#endif
|
||||
#ifndef LIGHTNING_CROSS
|
||||
/* call the generated code, passing 36 as an argument */
|
||||
printf("nfibs(%d) = %d\n", 36, nfibs(36));
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -68,12 +68,7 @@ int main()
|
|||
|
||||
jit_flush_code(codeBuffer, jit_get_ip().ptr);
|
||||
|
||||
#ifdef LIGHTNING_DISASSEMBLE
|
||||
disassemble(stderr, (char *) codeBuffer, jit_get_ip().ptr);
|
||||
#endif
|
||||
#ifndef LIGHTNING_CROSS
|
||||
/* call the generated code, passing 36 as an argument */
|
||||
printf("nfibs(%d) = %d\n", 36, nfibs(36));
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
#include <stdio.h>
|
||||
#include "lightning.h"
|
||||
|
||||
#ifdef JIT_FPR
|
||||
static jit_insn codeBuffer[300];
|
||||
|
||||
typedef int (*intFunc) (int, int);
|
||||
|
@ -64,10 +63,6 @@ makeDblFunc ()
|
|||
jit_ret ();
|
||||
jit_flush_code ((char *) retVal, jit_get_ip ().ptr);
|
||||
|
||||
#ifdef LIGHTNING_DISASSEMBLE
|
||||
disassemble (stderr, (char *) retVal, jit_get_ip ().ptr);
|
||||
#endif
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
|
@ -91,10 +86,6 @@ makeFloatFunc ()
|
|||
jit_ret ();
|
||||
jit_flush_code ((char *) retVal, jit_get_ip ().ptr);
|
||||
|
||||
#ifdef LIGHTNING_DISASSEMBLE
|
||||
disassemble (stderr, (char *) retVal, jit_get_ip ().ptr);
|
||||
#endif
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
|
@ -119,10 +110,6 @@ makeCallFunc (dblFunc theFunc)
|
|||
jit_ret ();
|
||||
jit_flush_code ((char *) retVal, jit_get_ip ().ptr);
|
||||
|
||||
#ifdef LIGHTNING_DISASSEMBLE
|
||||
disassemble (stderr, (char *) retVal, jit_get_ip ().ptr);
|
||||
#endif
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
|
@ -147,10 +134,6 @@ makeCallFloatFunc (floatFunc theFunc)
|
|||
jit_ret ();
|
||||
jit_flush_code ((char *) retVal, jit_get_ip ().ptr);
|
||||
|
||||
#ifdef LIGHTNING_DISASSEMBLE
|
||||
disassemble (stderr, (char *) retVal, jit_get_ip ().ptr);
|
||||
#endif
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
|
@ -168,20 +151,11 @@ main (int argc, char *argv[])
|
|||
myFunc3 = makeFloatFunc ();
|
||||
callIt1 = makeCallFunc (myFunc2);
|
||||
callIt2 = makeCallFloatFunc (myFunc3);
|
||||
#ifndef LIGHTNING_CROSS
|
||||
y = callIt1 (10.5, 15.3);
|
||||
a = 1.5;
|
||||
b = 10.5;
|
||||
z = callIt2 (a, b);
|
||||
printf ("result is %.5g\t %.5g\n", y, z);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
int
|
||||
main()
|
||||
{
|
||||
return (77);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -53,11 +53,6 @@ int main()
|
|||
jit_flush_code(codeBuffer, jit_get_ip().ptr);
|
||||
|
||||
/* call the generated code, passing its size as argument */
|
||||
#ifdef LIGHTNING_DISASSEMBLE
|
||||
disassemble(stderr, codeBuffer, jit_get_ip().ptr);
|
||||
#endif
|
||||
#ifndef LIGHTNING_CROSS
|
||||
printf("%d + 1 = %d\n", 5, myFunction(5));
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -66,12 +66,7 @@ int main()
|
|||
|
||||
jit_flush_code(codeBuffer, end);
|
||||
|
||||
#ifdef LIGHTNING_DISASSEMBLE
|
||||
disassemble(stderr, codeBuffer, end);
|
||||
#endif
|
||||
#ifndef LIGHTNING_CROSS
|
||||
/* call the generated code, passing its size as argument */
|
||||
myFunction(sizeof(codeBuffer));
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1,91 +0,0 @@
|
|||
/******************************** -*- C -*- ****************************
|
||||
*
|
||||
* Test `jit_pushr_i' and `jit_popr_i'
|
||||
*
|
||||
***********************************************************************/
|
||||
|
||||
|
||||
/* Contributed by Ludovic Courtès. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#define JIT_NEED_PUSH_POP
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "lightning.h"
|
||||
|
||||
typedef int (* stakumilo_t) (int);
|
||||
|
||||
static void
|
||||
display_message (const char *fmt, int i)
|
||||
{
|
||||
printf (fmt, i);
|
||||
}
|
||||
|
||||
static stakumilo_t
|
||||
generate_push_pop (void)
|
||||
{
|
||||
static const char msg[] = "we got %i\n";
|
||||
static char buffer[1024];
|
||||
stakumilo_t result;
|
||||
int arg;
|
||||
|
||||
result = (stakumilo_t)(jit_set_ip (buffer).ptr);
|
||||
jit_prolog (1);
|
||||
arg = jit_arg_i ();
|
||||
jit_getarg_i (JIT_R1, arg);
|
||||
|
||||
/* Save R1 on the stack. */
|
||||
jit_pushr_i (JIT_R1);
|
||||
|
||||
/* Save two other registers just for the sake of using the stack. */
|
||||
jit_movi_i (JIT_R0, -1);
|
||||
jit_movi_i (JIT_R2, -1);
|
||||
jit_pushr_i (JIT_R0);
|
||||
jit_pushr_i (JIT_R2);
|
||||
|
||||
jit_movr_i (JIT_R0, JIT_R1);
|
||||
jit_movi_p (JIT_R1, msg);
|
||||
|
||||
/* Invoke a function that may modify R1. */
|
||||
jit_prepare (2);
|
||||
jit_pusharg_i (JIT_R0);
|
||||
jit_pusharg_p (JIT_R1);
|
||||
(void)jit_finish (display_message);
|
||||
|
||||
/* Restore the dummy registers. */
|
||||
jit_popr_i (JIT_R2);
|
||||
jit_popr_i (JIT_R0);
|
||||
|
||||
/* Restore R1. */
|
||||
jit_popr_i (JIT_R1);
|
||||
|
||||
jit_movr_i (JIT_RET, JIT_R1);
|
||||
|
||||
jit_ret ();
|
||||
jit_flush_code (buffer, jit_get_ip ().ptr);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
stakumilo_t stakumilo;
|
||||
|
||||
stakumilo = generate_push_pop ();
|
||||
if (stakumilo (7777) != 7777)
|
||||
{
|
||||
printf ("failed: got %i instead of %i\n",
|
||||
stakumilo (7777), 7777);
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
printf ("succeeded\n");
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,2 +0,0 @@
|
|||
we got 7777
|
||||
succeeded
|
|
@ -428,9 +428,6 @@ compile_rpn (char *expr)
|
|||
jit_ret ();
|
||||
jit_flush_code ((char *) fn, jit_get_ip ().ptr);
|
||||
|
||||
#ifdef LIGHTNING_DISASSEMBLE
|
||||
disassemble (stderr, (char *) fn, jit_get_ip ().ptr);
|
||||
#endif
|
||||
return fn;
|
||||
}
|
||||
|
||||
|
@ -445,7 +442,6 @@ main ()
|
|||
c2f = compile_rpn ("32 x 9 * 5 / +");
|
||||
f2c = compile_rpn ("5 x 32_ + * 9 /");
|
||||
|
||||
#ifndef LIGHTNING_CROSS
|
||||
printf ("\nC:");
|
||||
for (i = 0; i <= 100; i += 10)
|
||||
printf ("%3d ", i);
|
||||
|
@ -461,6 +457,5 @@ main ()
|
|||
for (i = 32; i <= 212; i += 10)
|
||||
printf ("%3d ", f2c (i));
|
||||
printf ("\n");
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
#include <stdlib.h>
|
||||
#include "lightning.h"
|
||||
|
||||
#ifdef JIT_FPR
|
||||
static jit_insn codeBuffer[1024];
|
||||
|
||||
typedef double (*pdfd) (double); /* Pointer to Double Function of Double */
|
||||
|
@ -101,9 +100,6 @@ compile_rpn (char *expr)
|
|||
|
||||
jit_flush_code ((char *) fn, jit_get_ip ().ptr);
|
||||
|
||||
#ifdef LIGHTNING_DISASSEMBLE
|
||||
disassemble (stderr, (char *) fn, jit_get_ip ().ptr);
|
||||
#endif
|
||||
return fn;
|
||||
}
|
||||
|
||||
|
@ -118,7 +114,6 @@ main ()
|
|||
c2f = compile_rpn ("9*5/32+");
|
||||
f2c = compile_rpn ("32-5*9/");
|
||||
|
||||
#ifndef LIGHTNING_CROSS
|
||||
printf ("\nC:");
|
||||
for (i = 0; i <= 100; i += 10)
|
||||
printf ("%6.1f", i);
|
||||
|
@ -134,13 +129,5 @@ main ()
|
|||
for (i = 32; i <= 212; i += 10)
|
||||
printf ("%6.1f", f2c (i));
|
||||
printf ("\n");
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
int
|
||||
main()
|
||||
{
|
||||
return (77);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -56,12 +56,7 @@ int main()
|
|||
jit_flush_code(codeBuffer, jit_get_ip().ptr);
|
||||
|
||||
/* call the generated code, passing its size as argument */
|
||||
#ifdef LIGHTNING_DISASSEMBLE
|
||||
disassemble(stderr, codeBuffer, jit_get_ip().ptr);
|
||||
#endif
|
||||
#ifndef LIGHTNING_CROSS
|
||||
printf("%d == %d? %s\n", 5, 4, myFunction(5, 4) ? "yes" : "no");
|
||||
printf("%d == %d? %s\n", 5, 5, myFunction(5, 5) ? "yes" : "no");
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -68,12 +68,7 @@ main()
|
|||
jit_ret();
|
||||
|
||||
jit_flush_code(codeBuffer, jit_get_ip().ptr);
|
||||
#ifdef LIGHTNING_DISASSEMBLE
|
||||
disassemble(stderr, (char *)codeBuffer, jit_get_ip().ptr);
|
||||
#endif
|
||||
#ifndef LIGHTNING_CROSS
|
||||
int_test("compare", code, -2.6, -2.4, 0, 2.4, 2.6);
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
jit_set_ip(codeBuffer);
|
||||
|
@ -87,12 +82,7 @@ main()
|
|||
jit_ret();
|
||||
|
||||
jit_flush_code(codeBuffer, jit_get_ip().ptr);
|
||||
#ifdef LIGHTNING_DISASSEMBLE
|
||||
disassemble(stderr, (char *)codeBuffer, jit_get_ip().ptr);
|
||||
#endif
|
||||
#ifndef LIGHTNING_CROSS
|
||||
int_test("nans", code, x / x, 1 / (a - a), -1 / (a - a), 0.0, -2.0);
|
||||
#endif
|
||||
#else
|
||||
printf ("nans\t\t1 3 3 0 3\n");
|
||||
#endif
|
||||
|
@ -104,13 +94,8 @@ main()
|
|||
jit_ret();
|
||||
|
||||
jit_flush_code(codeBuffer, jit_get_ip().ptr);
|
||||
#ifdef LIGHTNING_DISASSEMBLE
|
||||
disassemble(stderr, (char *)codeBuffer, jit_get_ip().ptr);
|
||||
#endif
|
||||
#ifndef LIGHTNING_CROSS
|
||||
int_test("trunc", code, -2.6, -2.4, 0, 2.4, 2.6);
|
||||
int_test("trunc", code, -3, -2, 0, 2, 3);
|
||||
#endif
|
||||
|
||||
jit_set_ip(codeBuffer);
|
||||
jit_leaf(0);
|
||||
|
@ -119,13 +104,8 @@ main()
|
|||
jit_ret();
|
||||
|
||||
jit_flush_code(codeBuffer, jit_get_ip().ptr);
|
||||
#ifdef LIGHTNING_DISASSEMBLE
|
||||
disassemble(stderr, (char *)codeBuffer, jit_get_ip().ptr);
|
||||
#endif
|
||||
#ifndef LIGHTNING_CROSS
|
||||
int_test("ceil", code, -2.6, -2.4, 0, 2.4, 2.6);
|
||||
int_test("ceil", code, -3, -2, 0, 2, 3);
|
||||
#endif
|
||||
|
||||
jit_set_ip(codeBuffer);
|
||||
jit_leaf(0);
|
||||
|
@ -134,13 +114,8 @@ main()
|
|||
jit_ret();
|
||||
|
||||
jit_flush_code(codeBuffer, jit_get_ip().ptr);
|
||||
#ifdef LIGHTNING_DISASSEMBLE
|
||||
disassemble(stderr, (char *)codeBuffer, jit_get_ip().ptr);
|
||||
#endif
|
||||
#ifndef LIGHTNING_CROSS
|
||||
int_test("floor", code, -2.6, -2.4, 0, 2.4, 2.6);
|
||||
int_test("floor", code, -3, -2, 0, 2, 3);
|
||||
#endif
|
||||
|
||||
jit_set_ip(codeBuffer);
|
||||
jit_leaf(0);
|
||||
|
@ -149,13 +124,8 @@ main()
|
|||
jit_ret();
|
||||
|
||||
jit_flush_code(codeBuffer, jit_get_ip().ptr);
|
||||
#ifdef LIGHTNING_DISASSEMBLE
|
||||
disassemble(stderr, (char *)codeBuffer, jit_get_ip().ptr);
|
||||
#endif
|
||||
#ifndef LIGHTNING_CROSS
|
||||
int_test("round", code, -2.6, -2.4, 0, 2.4, 2.6);
|
||||
int_test("round", code, -3, -2, 0, 2, 3);
|
||||
#endif
|
||||
|
||||
#if 0 && defined JIT_TRANSCENDENTAL
|
||||
jit_set_ip(codeBuffer);
|
||||
|
@ -169,12 +139,7 @@ main()
|
|||
|
||||
jit_flush_code(codeBuffer, jit_get_ip().ptr);
|
||||
code.vptr();
|
||||
#ifdef LIGHTNING_DISASSEMBLE
|
||||
disassemble(stderr, (char *)codeBuffer, jit_get_ip().ptr);
|
||||
#endif
|
||||
#ifndef LIGHTNING_CROSS
|
||||
printf("log e = \t%f\n", a);
|
||||
#endif
|
||||
|
||||
jit_set_ip(codeBuffer);
|
||||
jit_leaf(0);
|
||||
|
@ -187,12 +152,7 @@ main()
|
|||
|
||||
jit_flush_code(codeBuffer, jit_get_ip().ptr);
|
||||
code.vptr();
|
||||
#ifdef LIGHTNING_DISASSEMBLE
|
||||
disassemble(stderr, (char *)codeBuffer, jit_get_ip().ptr);
|
||||
#endif
|
||||
#ifndef LIGHTNING_CROSS
|
||||
printf("pi = \t%f\n", a*3);
|
||||
#endif
|
||||
|
||||
jit_set_ip(codeBuffer);
|
||||
jit_leaf(0);
|
||||
|
@ -205,12 +165,7 @@ main()
|
|||
|
||||
jit_flush_code(codeBuffer, jit_get_ip().ptr);
|
||||
code.vptr();
|
||||
#ifdef LIGHTNING_DISASSEMBLE
|
||||
disassemble(stderr, (char *)codeBuffer, jit_get_ip().ptr);
|
||||
#endif
|
||||
#ifndef LIGHTNING_CROSS
|
||||
printf("tan^2 pi/3 = \t%f\n", a*a);
|
||||
#endif
|
||||
|
||||
#endif /* JIT_TRANSCEDENTAL */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue