New file(1) port

This commit is contained in:
Dirk Vogt 2012-05-02 13:23:57 +02:00 committed by Thomas Veerman
parent 991c41db8f
commit 835f680238
307 changed files with 28437 additions and 32774 deletions

View file

@ -4,15 +4,19 @@ DIST=${.CURDIR}/../dist
WARNS=4 WARNS=4
BINDIR?= /usr/bin BINDIR?= /usr/bin
USE_FORT?= yes # data-driven bugs? USE_FORT?= no # data-driven bugs?
.if ${USETOOLS} == "yes"
TOOL_MKMAGIC?= ${.OBJDIR}/file TOOL_MKMAGIC?= ${.OBJDIR}/file
.else
TOOL_MKMAGIC= ${.CURDIR}/../bin/file
.endif
MFILESDIR?= /usr/share/misc MFILESDIR?= /usr/share/misc
MFILES?= magic.mgc MFILES?= magic.mgc
MAGIC?= ${MFILESDIR}/magic MAGIC?= ${MFILESDIR}/magic
# -DQUICK #-DQUICK
CPPFLAGS+= -DMAGIC='"${MAGIC}"' -DHAVE_CONFIG_H -DBUILTIN_ELF \ CPPFLAGS+= -DMAGIC='"${MAGIC}"' -DHAVE_CONFIG_H -DBUILTIN_ELF \
-DELFCORE -DELFCORE
CPPFLAGS+= -I${.CURDIR}/../include -I${DIST}/src CPPFLAGS+= -I${.CURDIR}/../include -I${DIST}/src

View file

@ -21,9 +21,9 @@ realall: file magic.mgc
.endif .endif
.if ${MKSHARE} != "no" .if ${MKSHARE} != "no"
magic.mgc: ${PROG} magic.mgc: ${TOOL_MKMAGIC}
${_MKTARGET_CREATE} ${_MKTARGET_CREATE}
${.CURDIR}/${PROG} -C -m ${DIST}/magic/magdir ${TOOL_MKMAGIC} -C -m ${DIST}/magic/magdir
@mv magdir.mgc ${.TARGET} @mv magdir.mgc ${.TARGET}
.else .else

View file

@ -1,3 +1,257 @@
2011-09-01 12:12 Christos Zoulas <christos@zoulas.com>
* Don't wait for any subprocess, just the one we forked.
2011-08-26 16:40 Christos Zoulas <christos@zoulas.com>
* If the application name is not set in a cdf file, try to see
if it has a directory with the application name on it.
2011-08-17 14:32 Christos Zoulas <christos@zoulas.com>
* Fix ELF lseek(2) madness. Inspired by PR/134 by Jan Kaluza
2011-08-14 09:03 Christos Zoulas <christos@zoulas.com>
* Don't use variable string formats.
2011-07-12 12:32 Reuben Thomas <rrt@sc3d.org>
* Fix detection of Zip files (Mantis #128).
* Make some minor improvements to file(1).
* Rename MIME types for filesystem objects for consistency with
xdg-utils. Typically this means that application/x-foo becomes
inode/foo, but some names also change slightly, e.g.
application/x-character-device becomes inode/chardevice.
2011-05-10 20:57 Christos Zoulas <christos@zoulas.com>
* fix mingw compilation (Abradoks)
2011-05-10 20:57 Christos Zoulas <christos@zoulas.com>
* remove patchlevel.h
* Fix read past allocated memory caused by double-incrementing
a pointer in a loop (reported by Roberto Maar)
2011-03-30 15:45 Christos Zoulas <christos@zoulas.com>
* Fix cdf string buffer setting (Sven Anders)
2011-03-20 16:35 Christos Zoulas <christos@zoulas.com>
* Eliminate MAXPATHLEN and use dynamic allocation for
path and file buffers.
2011-03-15 18:15 Christos Zoulas <christos@zoulas.com>
* binary tests on magic entries with masks could spuriously
get converted to ascii.
2011-03-12 18:06 Reuben Thomas <rrt@sc3d.org>
* Improve file.man (remove BUGS, present email addresses consistently).
2011-03-07 19:38 Christos Zoulas <christos@zoulas.com>
* add lrzip support (from Ville Skytta)
2011-02-10 16:36 Christos Zoulas <christos@zoulas.com>
* fix CDF bounds checking (Guy Helmer)
2011-02-10 12:03 Christos Zoulas <christos@zoulas.com>
* add cdf_ctime() that prints a meaningful error when time cannot
be converted.
2011-02-02 20:40 Christos Zoulas <christos@zoulas.com>
* help and version output to stdout.
* When matching softmagic for ascii files, don't just print
the softmagic classification, keep going and print the
text classification too. This fixes broken troff files when
we moved them from keyword recognition to softmagic
(they stopped printing "with CRLF" etc.)
Reported by Doug McIlroy.
2011-01-16 19:31 Reuben Thomas <rrt@sc3d.org>
* Fix two potential buffer overruns in apprentice_list.
2011-01-14 22:33 Reuben Thomas <rrt@sc3d.org>
* New Python binding in pure Python.
* Update libmagic(3).
2011-01-06 21:40 Reuben Thomas <rrt@sc3d.org>
* Fix Python bindings (including recent Python 3 compatibility
update).
2011-01-04 18:43 Reuben Thomas <rrt@sc3d.org>
* magic/Makefile.am: make it easier to recover from magic build failures.
* Fix pstring length specifier parsing to avoid generating invalid
magic files.
* Add pstring length "J" (for "JPEG") to specify that the length
include itself.
* Fix JPEG comment parsing at last using pstring/HJ!
* Ignore section 5 man pages in doc/.cvsignore.
2010-12-22 13:12 Christos Zoulas <christos@zoulas.com>
* Add pstring/BHhLl to specify the type of the length of pascal
strings.
2010-11-26 18:39 Reuben Thomas <rrt@sc3d.org>
* Fix "-e soft": it was ignored when softmagic was called
during asciimagic.
* Improve comments and use "unsigned char" in tar.h/is_tar.c.
2010-11-05 17:26 Reuben Thomas <rrt@sc3d.org>
* Make bug reporting addresses more visible.
2010-11-01 18:35 Reuben Thomas <rrt@sc3d.org>
* Add tcl magic from Gustaf Neumann
2010-10-24 10:42 Christos Zoulas <christos@zoulas.com>
* Fix the whitespace comparing code (Christopher Chittleborough)
2010-10-06 21:05 Christos Zoulas <christos@zoulas.com>
* allow string/t to work (Jan Kaluza)
2010-09-20 22:11 Reuben Thomas <rrt@sc3d.org>
* Apply some patches from Ubuntu and Fedora.
2010-09-20 21:16 Reuben Thomas <rrt@sc3d.org>
* Apply all patches from Debian package 5.04-6 which have not
already been applied and are not Debian-specific.
2010-09-20 15:24 Reuben Thomas <rrt@sc3d.org>
* Minor security fix to softmagic.c (don't use untrusted
string as printf format).
2010-07-21 12:20 Christos Zoulas <christos@zoulas.com>
* MINGW32 portability from LRN
* Don't warn about escaping magic regex chars when we are in a regex.
2010-07-19 10:55 Christos Zoulas <christos@zoulas.com>
* Only try to print prpsinfo for core files. (Jan Kaluza)
2010-04-22 12:55 Christos Zoulas <christos@zoulas.com>
* Try more elf offsets for Debian core files. (Arnaud Giersch)
2010-02-20 15:18 Reuben Thomas <rrt@sc3d.org>
* Clarify which sort of CDF we mean.
2010-02-14 22:58 Reuben Thomas <rrt@sc3d.org>
* Re-jig Zip file type magic so that unsupported special
Zip types (those with "mimetype" at offset 30) can be
recognized.
2010-02-02 21:50 Reuben Thomas <rrt@sc3d.org>
* Add support for OCF (EPUB) files (application/epub+zip)
2010-01-28 18:25 Christos Zoulas <christos@zoulas.com>
* Fix core-dump from unbound loop:
https://bugzilla.redhat.com/show_bug.cgi?id=533245
2010-01-22 15:45 Christos Zoulas <christos@zoulas.com>
* print proper mime for crystal reports file
* print the last summary information of a cdf document, not the
first so that nested documents print the right info
2010-01-16 18:42 Charles Longeau <chl@tuxfamily.org>
* bring back some fixes from OpenBSD:
- make gcc2 builds file
- fix typos in a magic file comment
2009-11-17 18:35 Christos Zoulas <christos@zoulas.com>
* ctime/asctime can return NULL on some OS's although
they should not (Toshit Antani)
2009-09-14 13:49 Christos Zoulas <christos@zoulas.com>
* Centralize magic path handling routines and remove the
special-casing from file.c so that the python module for
example comes up with the same magic path (Fixes ~/.magic
handling) (from Gab)
2009-09-11 23:38 Reuben Thomas <rrt@sc3d.org>
* When magic argument is a directory, read the files in
strcmp-sorted order (fixes Debian bug #488562 and our own FIXME).
2009-09-11 13:11 Reuben Thomas <rrt@sc3d.org>
* Combine overlapping epoc and psion magic files into one (epoc).
* Add some more EPOC MIME types.
2009-08-19 15:55 Christos Zoulas <christos@zoulas.com>
* Fix 3 bugs (From Ian Darwin):
- file_showstr could move one past the end of the array
- parse_apple did not nul terminate the string in the overflow case
- parse_mime truncated the wrong string in the overflow case
2009-08-12 12:28 Robert Byrnes <byrnes@wildpumpkin.net>
* Include Localstuff when compiling magic.
2009-07-15 10:05 Christos Zoulas <christos@zoulas.com>
* Fix logic for including mygetopts.h
* Make cdf.c compile again with debugging
* Add the necessary field handling for crystal reports files to work
2009-06-23 01:34 Reuben Thomas <rrt@sc3d.org>
* Stop "(if" identifying Lisp files, that's plain dumb!
2009-06-09 22:13 Reuben Thomas <rrt@sc3d.org>
* Add a couple of missing MP3 MIME types.
2009-05-27 23:00 Reuben Thomas <rrt@sc3d.org>
* Add full range of hash-bang tests for Python and Ruby.
* Add MIME types for Python and Ruby scripts.
2009-05-13 10:44 Christos Zoulas <christos@zoulas.com>
* off by one in parsing hw capabilities in elf
(Cheng Renquan)
2009-05-08 13:40 Christos Zoulas <christos@zoulas.com>
* lint fixes and more from NetBSD
2009-05-06 10:25 Christos Zoulas <christos@zoulas.com> 2009-05-06 10:25 Christos Zoulas <christos@zoulas.com>
* Avoid null dereference in cdf code (Drew Yao) * Avoid null dereference in cdf code (Drew Yao)

View file

@ -2,15 +2,15 @@ Installation Instructions
************************* *************************
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
2006 Free Software Foundation, Inc. 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
This file is free documentation; the Free Software Foundation gives This file is free documentation; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it. unlimited permission to copy, distribute and modify it.
Basic Installation Basic Installation
================== ==================
Briefly, the shell commands `./configure; make; make install' should Briefly, the shell commands `./configure; make; make install' should
configure, build, and install this package. The following configure, build, and install this package. The following
more-detailed instructions are generic; see the `README' file for more-detailed instructions are generic; see the `README' file for
instructions specific to this package. instructions specific to this package.
@ -67,12 +67,15 @@ The simplest way to compile this package is:
all sorts of other programs in order to regenerate files that came all sorts of other programs in order to regenerate files that came
with the distribution. with the distribution.
6. Often, you can also type `make uninstall' to remove the installed
files again.
Compilers and Options Compilers and Options
===================== =====================
Some systems require unusual options for compilation or linking that the Some systems require unusual options for compilation or linking that
`configure' script does not know about. Run `./configure --help' for the `configure' script does not know about. Run `./configure --help'
details on some of the pertinent environment variables. for details on some of the pertinent environment variables.
You can give `configure' initial values for configuration parameters You can give `configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here by setting variables in the command line or in the environment. Here
@ -85,7 +88,7 @@ is an example:
Compiling For Multiple Architectures Compiling For Multiple Architectures
==================================== ====================================
You can compile the package for more than one kind of computer at the 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 same time, by placing the object files for each architecture in their
own directory. To do this, you can use GNU `make'. `cd' to the own directory. To do this, you can use GNU `make'. `cd' to the
directory where you want the object files and executables to go and run directory where you want the object files and executables to go and run
@ -97,10 +100,24 @@ architecture at a time in the source code directory. After you have
installed the package for one architecture, use `make distclean' before installed the package for one architecture, use `make distclean' before
reconfiguring for another architecture. reconfiguring for another architecture.
On MacOS X 10.5 and later systems, you can create libraries and
executables that work on multiple system types--known as "fat" or
"universal" binaries--by specifying multiple `-arch' options to the
compiler but only a single `-arch' option to the preprocessor. Like
this:
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
CPP="gcc -E" CXXCPP="g++ -E"
This is not guaranteed to produce working output in all cases, you
may have to build one architecture at a time and combine the results
using the `lipo' tool if you have problems.
Installation Names Installation Names
================== ==================
By default, `make install' installs the package's commands under By default, `make install' installs the package's commands under
`/usr/local/bin', include files under `/usr/local/include', etc. You `/usr/local/bin', include files under `/usr/local/include', etc. You
can specify an installation prefix other than `/usr/local' by giving can specify an installation prefix other than `/usr/local' by giving
`configure' the option `--prefix=PREFIX'. `configure' the option `--prefix=PREFIX'.
@ -123,7 +140,7 @@ option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features Optional Features
================= =================
Some packages pay attention to `--enable-FEATURE' options to Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package. `configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where 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 is something like `gnu-as' or `x' (for the X Window System). The
@ -135,14 +152,46 @@ find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations. `--x-libraries=DIR' to specify their locations.
Particular systems
==================
On HP-UX, the default C compiler is not ANSI C compatible. If GNU
CC is not installed, it is recommended to use the following options in
order to use an ANSI C compiler:
./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
a workaround. If GNU CC is not installed, it is therefore recommended
to try
./configure CC="cc"
and if that doesn't work, try
./configure CC="cc -nodtk"
On Solaris, don't put `/usr/ucb' early in your `PATH'. This
directory contains several dysfunctional programs; working variants of
these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
in your `PATH', put it _after_ `/usr/bin'.
On Haiku, software installed for all users goes in `/boot/common',
not `/usr/local'. It is recommended to use the following options:
./configure --prefix=/boot/common
Specifying the System Type Specifying the System Type
========================== ==========================
There may be some features `configure' cannot figure out automatically, There may be some features `configure' cannot figure out
but needs to determine by the type of machine the package will run on. automatically, but needs to determine by the type of machine the package
Usually, assuming the package is built to be run on the _same_ will run on. Usually, assuming the package is built to be run on the
architectures, `configure' can figure that out, but if it prints a _same_ architectures, `configure' can figure that out, but if it prints
message saying it cannot guess the machine type, give it the 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 `--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: type, such as `sun4', or a canonical name which has the form:
@ -150,7 +199,8 @@ type, such as `sun4', or a canonical name which has the form:
where SYSTEM can have one of these forms: where SYSTEM can have one of these forms:
OS KERNEL-OS OS
KERNEL-OS
See the file `config.sub' for the possible values of each field. If 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 `config.sub' isn't included in this package, then this package doesn't
@ -168,9 +218,9 @@ eventually be run) with `--host=TYPE'.
Sharing Defaults Sharing Defaults
================ ================
If you want to set default values for `configure' scripts to share, you If you want to set default values for `configure' scripts to share,
can create a site shell script called `config.site' that gives default you can create a site shell script called `config.site' that gives
values for variables like `CC', `cache_file', and `prefix'. default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then `configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the `PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script. `CONFIG_SITE' environment variable to the location of the site script.
@ -179,7 +229,7 @@ A warning: not all `configure' scripts look for a site script.
Defining Variables Defining Variables
================== ==================
Variables not defined in a site shell script can be set in the Variables not defined in a site shell script can be set in the
environment passed to `configure'. However, some packages may run environment passed to `configure'. However, some packages may run
configure again during the build, and the customized values of these configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set variables may be lost. In order to avoid this problem, you should set
@ -198,11 +248,19 @@ an Autoconf bug. Until the bug is fixed you can use this workaround:
`configure' Invocation `configure' Invocation
====================== ======================
`configure' recognizes the following options to control how it operates. `configure' recognizes the following options to control how it
operates.
`--help' `--help'
`-h' `-h'
Print a summary of the options to `configure', and exit. Print a summary of all of the options to `configure', and exit.
`--help=short'
`--help=recursive'
Print a summary of the options unique to this package's
`configure', and exit. The `short' variant lists options used
only in the top level, while the `recursive' variant lists options
also present in any nested packages.
`--version' `--version'
`-V' `-V'
@ -229,6 +287,16 @@ an Autoconf bug. Until the bug is fixed you can use this workaround:
Look for the package's source code in directory DIR. Usually Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically. `configure' can determine that directory automatically.
`--prefix=DIR'
Use DIR as the installation prefix. *Note Installation Names::
for more details, including other options available for fine-tuning
the installation locations.
`--no-create'
`-n'
Run the configure checks, but stop before creating any output
files.
`configure' also accepts some other, not widely useful, options. Run `configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details. `configure --help' for more details.

View file

@ -1,4 +1,4 @@
#ACLOCAL_AMFLAGS = -I m4 ACLOCAL_AMFLAGS = -I m4
EXTRA_DIST = MAINT EXTRA_DIST = MAINT

View file

@ -1,8 +1,9 @@
# Makefile.in generated by automake 1.10 from Makefile.am. # Makefile.in generated by automake 1.11 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@ -13,11 +14,10 @@
# PARTICULAR PURPOSE. # PARTICULAR PURPOSE.
@SET_MAKE@ @SET_MAKE@
#ACLOCAL_AMFLAGS = -I m4
VPATH = @srcdir@ VPATH = @srcdir@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644 install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c install_sh_PROGRAM = $(install_sh) -c
@ -39,8 +39,10 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
TODO compile config.guess config.sub depcomp install-sh \ TODO compile config.guess config.sub depcomp install-sh \
ltmain.sh missing ltmain.sh missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/configure.ac $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4) $(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
@ -48,6 +50,13 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
mkinstalldirs = $(install_sh) -d mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = config.h CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_GEN = $(am__v_GEN_$(V))
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
am__v_GEN_0 = @echo " GEN " $@;
AM_V_at = $(am__v_at_$(V))
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
am__v_at_0 = @
SOURCES = SOURCES =
DIST_SOURCES = DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
@ -59,6 +68,9 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
ps-recursive uninstall-recursive ps-recursive uninstall-recursive
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-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 ETAGS = etags
CTAGS = ctags CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS) DIST_SUBDIRS = $(SUBDIRS)
@ -66,9 +78,34 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION) distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir) top_distdir = $(distdir)
am__remove_distdir = \ am__remove_distdir = \
{ test ! -d $(distdir) \ { test ! -d "$(distdir)" \
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -fr $(distdir); }; } && 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 DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print distuninstallcheck_listfiles = find . -type f -print
@ -76,6 +113,7 @@ distcleancheck_listfiles = find . -type f -print
pkgdatadir = @pkgdatadir@ pkgdatadir = @pkgdatadir@
ACLOCAL = @ACLOCAL@ ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@ AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@ AR = @AR@
AUTOCONF = @AUTOCONF@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@ AUTOHEADER = @AUTOHEADER@
@ -86,43 +124,47 @@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
CPP = @CPP@ CPP = @CPP@
CPPFLAGS = @CPPFLAGS@ CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@ CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@ DEFS = @DEFS@
DEPDIR = @DEPDIR@ DEPDIR = @DEPDIR@
DSYMUTIL = @DSYMUTIL@ DSYMUTIL = @DSYMUTIL@
ECHO = @ECHO@ DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@ ECHO_T = @ECHO_T@
EGREP = @EGREP@ EGREP = @EGREP@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
F77 = @F77@ FGREP = @FGREP@
FFLAGS = @FFLAGS@
GREP = @GREP@ GREP = @GREP@
INSTALL = @INSTALL@ INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@ LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@ LIBS = @LIBS@
LIBTOOL = @LIBTOOL@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MINGW = @MINGW@
MKDIR_P = @MKDIR_P@ MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@ OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
@ -137,8 +179,7 @@ abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@ abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@ abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@ ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
ac_ct_F77 = @ac_ct_F77@
am__include = @am__include@ am__include = @am__include@
am__leading_dot = @am__leading_dot@ am__leading_dot = @am__leading_dot@
am__quote = @am__quote@ am__quote = @am__quote@
@ -170,6 +211,7 @@ libdir = @libdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
localedir = @localedir@ localedir = @localedir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@ mandir = @mandir@
mkdir_p = @mkdir_p@ mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@ oldincludedir = @oldincludedir@
@ -182,30 +224,31 @@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@ srcdir = @srcdir@
sysconfdir = @sysconfdir@ sysconfdir = @sysconfdir@
target_alias = @target_alias@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@ top_srcdir = @top_srcdir@
ACLOCAL_AMFLAGS = -I m4
EXTRA_DIST = MAINT EXTRA_DIST = MAINT
SUBDIRS = src magic SUBDIRS = src magic doc
#SUBDIRS = src magic tests doc python
all: config.h all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive $(MAKE) $(AM_MAKEFLAGS) all-recursive
.SUFFIXES: .SUFFIXES:
am--refresh: am--refresh:
@: @:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \ @for dep in $?; do \
case '$(am__configure_deps)' in \ case '$(am__configure_deps)' in \
*$$dep*) \ *$$dep*) \
echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
cd $(srcdir) && $(AUTOMAKE) --gnu \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
&& exit 0; \ && exit 0; \
exit 1;; \ exit 1;; \
esac; \ esac; \
done; \ done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
cd $(top_srcdir) && \ $(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu Makefile $(AUTOMAKE) --gnu Makefile
.PRECIOUS: Makefile .PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \ @case '$?' in \
@ -220,10 +263,11 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck $(SHELL) ./config.status --recheck
$(top_srcdir)/configure: $(am__configure_deps) $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(srcdir) && $(AUTOCONF) $(am__cd) $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): $(am__aclocal_m4_deps) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
$(am__aclocal_m4_deps):
config.h: stamp-h1 config.h: stamp-h1
@if test ! -f $@; then \ @if test ! -f $@; then \
@ -234,10 +278,8 @@ config.h: stamp-h1
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h1 @rm -f stamp-h1
cd $(top_builddir) && $(SHELL) ./config.status config.h cd $(top_builddir) && $(SHELL) ./config.status config.h
$(srcdir)/config.h.in: $(am__configure_deps) $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
@echo "NOT REBUILDING $@" ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
NetBSD_DISABLED_srcdir_config.h.in:
cd $(top_srcdir) && $(AUTOHEADER)
rm -f stamp-h1 rm -f stamp-h1
touch $@ touch $@
@ -251,7 +293,7 @@ clean-libtool:
-rm -rf .libs _libs -rm -rf .libs _libs
distclean-libtool: distclean-libtool:
-rm -f libtool -rm -f libtool config.lt
# This directory's subdirectories are mostly independent; you can cd # This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile. # into them and run `make' without going through this Makefile.
@ -277,7 +319,7 @@ $(RECURSIVE_TARGETS):
else \ else \
local_target="$$target"; \ local_target="$$target"; \
fi; \ fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \ || eval $$failcom; \
done; \ done; \
if test "$$dot_seen" = "no"; then \ if test "$$dot_seen" = "no"; then \
@ -311,16 +353,16 @@ $(RECURSIVE_CLEAN_TARGETS):
else \ else \
local_target="$$target"; \ local_target="$$target"; \
fi; \ fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \ || eval $$failcom; \
done && test -z "$$fail" done && test -z "$$fail"
tags-recursive: tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \ list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done done
ctags-recursive: ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \ list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
@ -328,14 +370,14 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
unique=`for i in $$list; do \ unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \ done | \
$(AWK) ' { files[$$0] = 1; } \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { for (i in files) print i; }'`; \ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique mkid -fID $$unique
tags: TAGS tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP) $(TAGS_FILES) $(LISP)
tags=; \ set x; \
here=`pwd`; \ here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \ include_option=--etags-include; \
@ -347,46 +389,50 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
list='$(SUBDIRS)'; for subdir in $$list; do \ list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \ if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \ test ! -f $$subdir/TAGS || \
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \ fi; \
done; \ done; \
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \ unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \ done | \
$(AWK) ' { files[$$0] = 1; } \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { for (i in files) print i; }'`; \ END { if (nonempty) { for (i in files) print i; }; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \ test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ if test $$# -gt 0; then \
$$tags $$unique; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi fi
ctags: CTAGS ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP) $(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \ unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \ done | \
$(AWK) ' { files[$$0] = 1; } \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { for (i in files) print i; }'`; \ END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \ test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique $$unique
GTAGS: GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \ here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \ && $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here && gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags: distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES) distdir: $(DISTFILES)
$(am__remove_distdir) $(am__remove_distdir)
test -d $(distdir) || mkdir $(distdir) test -d "$(distdir)" || mkdir "$(distdir)"
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \ list='$(DISTFILES)'; \
@ -402,38 +448,54 @@ distdir: $(DISTFILES)
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \ if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ if test -d "$(distdir)/$$file"; then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \ fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ 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 \ else \
test -f $(distdir)/$$file \ test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file $(distdir)/$$file \ || cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \ || exit 1; \
fi; \ fi; \
done done
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \ if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \ test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \ || exit 1; \
distdir=`$(am__cd) $(distdir) && pwd`; \ fi; \
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ done
(cd $$subdir && \ @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) \ $(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$top_distdir" \ top_distdir="$$new_top_distdir" \
distdir="$$distdir/$$subdir" \ distdir="$$new_distdir" \
am__remove_distdir=: \ am__remove_distdir=: \
am__skip_length_check=: \ am__skip_length_check=: \
am__skip_mode_fix=: \
distdir) \ distdir) \
|| exit 1; \ || exit 1; \
fi; \ fi; \
done done
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ -test -n "$(am__skip_mode_fix)" \
|| find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -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 {} {} \; \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r $(distdir) || chmod -R a+r "$(distdir)"
dist-gzip: distdir dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir) $(am__remove_distdir)
@ -442,6 +504,14 @@ dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir) $(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 dist-tarZ: distdir
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__remove_distdir) $(am__remove_distdir)
@ -468,6 +538,10 @@ distcheck: dist
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \ *.tar.bz2*) \
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lzma*) \
unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
*.tar.xz*) \
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
*.tar.Z*) \ *.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \ *.shar.gz*) \
@ -479,9 +553,11 @@ distcheck: dist
mkdir $(distdir)/_build mkdir $(distdir)/_build
mkdir $(distdir)/_inst mkdir $(distdir)/_inst
chmod a-w $(distdir) chmod a-w $(distdir)
test -d $(distdir)/_build || exit 0; \
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& cd $(distdir)/_build \ && am__cwd=`pwd` \
&& $(am__cd) $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \
$(DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \
@ -503,13 +579,15 @@ distcheck: dist
&& rm -rf "$$dc_destdir" \ && rm -rf "$$dc_destdir" \
&& $(MAKE) $(AM_MAKEFLAGS) dist \ && $(MAKE) $(AM_MAKEFLAGS) dist \
&& rm -rf $(DIST_ARCHIVES) \ && rm -rf $(DIST_ARCHIVES) \
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
&& cd "$$am__cwd" \
|| exit 1
$(am__remove_distdir) $(am__remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \ @(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ 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' sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
distuninstallcheck: distuninstallcheck:
@cd $(distuninstallcheck_dir) \ @$(am__cd) '$(distuninstallcheck_dir)' \
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|| { echo "ERROR: files left after uninstall:" ; \ || { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \ if test -n "$(DESTDIR)"; then \
@ -551,6 +629,7 @@ clean-generic:
distclean-generic: distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -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: maintainer-clean-generic:
@echo "This command is intended for maintainers to use" @echo "This command is intended for maintainers to use"
@ -571,6 +650,8 @@ dvi-am:
html: html-recursive html: html-recursive
html-am:
info: info-recursive info: info-recursive
info-am: info-am:
@ -579,18 +660,28 @@ install-data-am:
install-dvi: install-dvi-recursive install-dvi: install-dvi-recursive
install-dvi-am:
install-exec-am: install-exec-am:
install-html: install-html-recursive install-html: install-html-recursive
install-html-am:
install-info: install-info-recursive install-info: install-info-recursive
install-info-am:
install-man: install-man:
install-pdf: install-pdf-recursive install-pdf: install-pdf-recursive
install-pdf-am:
install-ps: install-ps-recursive install-ps: install-ps-recursive
install-ps-am:
installcheck-am: installcheck-am:
maintainer-clean: maintainer-clean-recursive maintainer-clean: maintainer-clean-recursive
@ -613,24 +704,25 @@ ps-am:
uninstall-am: uninstall-am:
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \
install-strip ctags-recursive install-am install-strip tags-recursive
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am am--refresh check check-am clean clean-generic \ all all-am am--refresh check check-am clean clean-generic \
clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
dist-gzip dist-shar dist-tarZ dist-zip distcheck distclean \ dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \
distclean-generic distclean-hdr distclean-libtool \ distcheck distclean distclean-generic distclean-hdr \
distclean-tags distcleancheck distdir distuninstallcheck dvi \ distclean-libtool distclean-tags distcleancheck distdir \
dvi-am html html-am info info-am install install-am \ distuninstallcheck dvi dvi-am html html-am info info-am \
install-data install-data-am install-dvi install-dvi-am \ install install-am install-data install-data-am install-dvi \
install-exec install-exec-am install-html install-html-am \ install-dvi-am install-exec install-exec-am install-html \
install-info install-info-am install-man install-pdf \ install-html-am install-info install-info-am install-man \
install-pdf-am install-ps install-ps-am install-strip \ install-pdf install-pdf-am install-ps install-ps-am \
installcheck installcheck-am installdirs installdirs-am \ install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \ installdirs-am maintainer-clean maintainer-clean-generic \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
tags tags-recursive uninstall uninstall-am ps ps-am tags tags-recursive uninstall uninstall-am
# Tell versions [3.59,3.63) of GNU make to not export all variables. # 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. # Otherwise a system limit (for SysV at least) may be exceeded.

View file

@ -1,15 +1,26 @@
** README for file(1) Command ** ** README for file(1) Command **
@(#) $File: README,v 1.42 2009/02/14 15:16:24 christos Exp $ @(#) $File: README,v 1.44 2011/03/24 13:03:39 rrt Exp $
E-mail: christos@astron.com
Mailing List: file@mx.gw.com Mailing List: file@mx.gw.com
Bug tracker: http://bugs.gw.com/
E-mail: christos@astron.com
Phone: Do not even think of telephoning me about this program. Send cash first! Phone: Do not even think of telephoning me about this program. Send cash first!
This is Release 5.x of Ian Darwin's (copyright but distributable) This is Release 5.x of Ian Darwin's (copyright but distributable)
file(1) command. This version is the standard "file" command for Linux, file(1) command, an implementation of the Unix File(1) command.
It knows the 'magic number' of several thousands of file types.
This version is the standard "file" command for Linux,
*BSD, and other systems. (See "patchlevel.h" for the exact release number). *BSD, and other systems. (See "patchlevel.h" for the exact release number).
You can download the latest version of file from:
ftp://ftp.astron.com/pub/file/
A public read-only git repository is available at:
https://github.com/glensc/file
The major changes for 5.x are CDF file parsing, indirect magic, and The major changes for 5.x are CDF file parsing, indirect magic, and
overhaul in mime and ascii encoding handling. overhaul in mime and ascii encoding handling.
@ -102,33 +113,6 @@ guidelines:
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
You can download the latest version of file from:
ftp://ftp.astron.com/pub/file/
If your gzip sometimes fails to decompress things complaining about a short
file, apply this patch [which is going to be in the next version of gzip]:
*** - Tue Oct 29 02:06:35 1996
--- util.c Sun Jul 21 21:51:38 1996
*** 106,111 ****
--- 108,114 ----
if (insize == 0) {
if (eof_ok) return EOF;
+ flush_window();
read_error();
}
bytes_in += (ulg)insize;
Parts of this software were developed at SoftQuad Inc., developers Parts of this software were developed at SoftQuad Inc., developers
of SGML/HTML/XML publishing software, in Toronto, Canada. of SGML/HTML/XML publishing software, in Toronto, Canada.
SoftQuad was swallowed up by Corel in 2002 SoftQuad was swallowed up by Corel in 2002 and does not exist any longer.
and does not exist any longer.
From: Kees Zeelenberg
An MS-Windows (Win32) port of File-4.17 is available from
http://gnuwin32.sourceforge.net/
File is an implementation of the Unix File(1) command.
It knows the 'magic number' of several thousands of file types.

View file

@ -1,15 +1,6 @@
Fix output so that tests for MIME and APPLE flags are not needed all TODOs live in the TODO section of doc/file.man (i.e. file(1)). They
over the place, and actual output is only done in one place. This are more visible there, so please add any further TODOs to that file,
needs a design. Suggestion: push possible outputs on to a list, then not here.
pick the last-pushed (most specific, one hopes) value at the end, or
use a default if the list is empty.
Continue to squash all magic bugs. See Debian BTS for a good source. (This change was made when Reuben Thomas noticed that all the bugs
listed in the BUGS section of the man page had been fixed!)
Store arbitrarily long strings, for example for %s patterns, so that
they can be printed out. Fixes Debian bug #271672.
Add syntax for other sorts of counted string (Debian bug #466032). Use
to fix bug #283760.
Add syntax for relative offsets after current level (Debian bug #466037).

View file

@ -10,15 +10,16 @@ if test "$ac_cv_struct_tm_zone" = yes; then
AC_DEFINE(HAVE_TM_ZONE,1,[HAVE_TM_ZONE]) AC_DEFINE(HAVE_TM_ZONE,1,[HAVE_TM_ZONE])
fi fi
# On SGI, apparently tzname is a #define, but that's ok, AC_CHECK_DECL will
# consider it declared and we won't give our own extern.
AC_CHECK_DECLS([tzname], , , [#include <time.h>])
AC_CACHE_CHECK(for tzname, ac_cv_var_tzname, AC_CACHE_CHECK(for tzname, ac_cv_var_tzname,
[AC_TRY_LINK( [AC_TRY_LINK(
changequote(<<, >>)dnl [#include <time.h>
<<#include <time.h> #if !HAVE_DECL_TZNAME
#ifndef tzname /* For SGI. */ extern char *tzname[];
extern char *tzname[]; /* RS6000 and others reject char **tzname. */ #endif],
#endif>>, [return tzname[0][0];], [ac_cv_var_tzname=yes], [ac_cv_var_tzname=no])])
changequote([, ])dnl
[atoi(*tzname);], ac_cv_var_tzname=yes, ac_cv_var_tzname=no)])
if test $ac_cv_var_tzname = yes; then if test $ac_cv_var_tzname = yes; then
AC_DEFINE(HAVE_TZNAME,1,[HAVE_TZNAME]) AC_DEFINE(HAVE_TZNAME,1,[HAVE_TZNAME])
fi fi
@ -31,11 +32,13 @@ if test "$ac_cv_struct_tm_isdst" = yes; then
AC_DEFINE(HAVE_TM_ISDST,1,[HAVE_TM_ISDST]) AC_DEFINE(HAVE_TM_ISDST,1,[HAVE_TM_ISDST])
fi fi
AC_CHECK_DECLS([daylight], , , [#include <time.h>])
AC_CACHE_CHECK(for daylight, ac_cv_var_daylight, AC_CACHE_CHECK(for daylight, ac_cv_var_daylight,
[AC_TRY_LINK( [AC_TRY_LINK(
changequote(<<, >>)dnl changequote(<<, >>)dnl
<<#include <time.h> <<#include <time.h>
#ifndef daylight /* In case IRIX #defines this, too */ #if !HAVE_DECL_DAYLIGHT
extern int daylight; extern int daylight;
#endif>>, #endif>>,
changequote([, ])dnl changequote([, ])dnl

File diff suppressed because it is too large Load diff

View file

@ -1,9 +1,10 @@
#! /bin/sh #! /bin/sh
# Wrapper for compilers which do not understand `-c -o'. # Wrapper for compilers which do not understand `-c -o'.
scriptversion=2005-05-14.22 scriptversion=2009-04-28.21; # UTC
# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009 Free Software
# Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>. # Written by Tom Tromey <tromey@cygnus.com>.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
@ -17,8 +18,7 @@ scriptversion=2005-05-14.22
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program. If not, see <http://www.gnu.org/licenses/>.
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# As a special exception to the GNU General Public License, if you # As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a # distribute this file as part of a program that contains a
@ -103,13 +103,13 @@ if test -z "$ofile" || test -z "$cfile"; then
fi fi
# Name of file we expect compiler to create. # Name of file we expect compiler to create.
cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'` cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
# Create the lock directory. # Create the lock directory.
# Note: use `[/.-]' here to ensure that we don't use the same name # Note: use `[/\\:.-]' here to ensure that we don't use the same name
# that we are using for the .o file. Also, base the name on the expected # that we are using for the .o file. Also, base the name on the expected
# object file name, since that is what matters with a parallel build. # object file name, since that is what matters with a parallel build.
lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
while true; do while true; do
if mkdir "$lockdir" >/dev/null 2>&1; then if mkdir "$lockdir" >/dev/null 2>&1; then
break break
@ -138,5 +138,6 @@ exit $ret
# eval: (add-hook 'write-file-hooks 'time-stamp) # eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion=" # time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$" # time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End: # End:

View file

@ -1,13 +1,10 @@
#! /bin/sh #! /bin/sh
#
# $NetBSD: config.guess,v 1.1.1.1 2009/05/08 16:35:03 christos Exp $
#
# Attempt to guess a canonical system name. # Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
# Inc. # Free Software Foundation, Inc.
timestamp='2006-07-02' timestamp='2009-04-27'
# This file is free software; you can redistribute it and/or modify it # This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by # under the terms of the GNU General Public License as published by
@ -59,8 +56,8 @@ version="\
GNU config.guess ($timestamp) GNU config.guess ($timestamp)
Originally written by Per Bothner. Originally written by Per Bothner.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
Free Software Foundation, Inc. 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@ -327,14 +324,30 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
case `/usr/bin/uname -p` in case `/usr/bin/uname -p` in
sparc) echo sparc-icl-nx7; exit ;; sparc) echo sparc-icl-nx7; exit ;;
esac ;; esac ;;
s390x:SunOS:*:*)
echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4H:SunOS:5.*:*) sun4H:SunOS:5.*:*)
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;; exit ;;
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;; exit ;;
i86pc:SunOS:5.*:*) i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` eval $set_cc_for_build
SUN_ARCH="i386"
# If there is a compiler, see if it is configured for 64-bit objects.
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
# This test works for both compilers.
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
SUN_ARCH="x86_64"
fi
fi
echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;; exit ;;
sun4*:SunOS:6*:*) sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize # According to config.sub, this is the proper way to canonicalize
@ -535,7 +548,7 @@ EOF
echo rs6000-ibm-aix3.2 echo rs6000-ibm-aix3.2
fi fi
exit ;; exit ;;
*:AIX:*:[45]) *:AIX:*:[456])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000 IBM_ARCH=rs6000
@ -784,7 +797,7 @@ EOF
i*:CYGWIN*:*) i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin echo ${UNAME_MACHINE}-pc-cygwin
exit ;; exit ;;
i*:MINGW*:*) *:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32 echo ${UNAME_MACHINE}-pc-mingw32
exit ;; exit ;;
i*:windows32*:*) i*:windows32*:*)
@ -794,12 +807,18 @@ EOF
i*:PW*:*) i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32 echo ${UNAME_MACHINE}-pc-pw32
exit ;; exit ;;
x86:Interix*:[3456]*) *:Interix*:[3456]*)
echo i586-pc-interix${UNAME_RELEASE} case ${UNAME_MACHINE} in
exit ;; x86)
EM64T:Interix*:[3456]*) echo i586-pc-interix${UNAME_RELEASE}
echo x86_64-unknown-interix${UNAME_RELEASE} exit ;;
exit ;; EM64T | authenticamd | genuineintel)
echo x86_64-unknown-interix${UNAME_RELEASE}
exit ;;
IA64)
echo ia64-unknown-interix${UNAME_RELEASE}
exit ;;
esac ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks echo i${UNAME_MACHINE}-pc-mks
exit ;; exit ;;
@ -833,7 +852,14 @@ EOF
echo ${UNAME_MACHINE}-pc-minix echo ${UNAME_MACHINE}-pc-minix
exit ;; exit ;;
arm*:Linux:*:*) arm*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu eval $set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__
then
echo ${UNAME_MACHINE}-unknown-linux-gnu
else
echo ${UNAME_MACHINE}-unknown-linux-gnueabi
fi
exit ;; exit ;;
avr32*:Linux:*:*) avr32*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu echo ${UNAME_MACHINE}-unknown-linux-gnu
@ -925,6 +951,9 @@ EOF
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
exit ;; exit ;;
padre:Linux:*:*)
echo sparc-unknown-linux-gnu
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*) parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level # Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
@ -954,6 +983,9 @@ EOF
x86_64:Linux:*:*) x86_64:Linux:*:*)
echo x86_64-unknown-linux-gnu echo x86_64-unknown-linux-gnu
exit ;; exit ;;
xtensa*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
i*86:Linux:*:*) i*86:Linux:*:*)
# The BFD linker knows what the default object file format is, so # The BFD linker knows what the default object file format is, so
# first see if it will tell us. cd to the root directory to prevent # first see if it will tell us. cd to the root directory to prevent
@ -972,9 +1004,6 @@ EOF
a.out-i386-linux) a.out-i386-linux)
echo "${UNAME_MACHINE}-pc-linux-gnuaout" echo "${UNAME_MACHINE}-pc-linux-gnuaout"
exit ;; exit ;;
coff-i386)
echo "${UNAME_MACHINE}-pc-linux-gnucoff"
exit ;;
"") "")
# Either a pre-BFD a.out linker (linux-gnuoldld) or # Either a pre-BFD a.out linker (linux-gnuoldld) or
# one that does not give us useful --help. # one that does not give us useful --help.
@ -1089,8 +1118,11 @@ EOF
pc:*:*:*) pc:*:*:*)
# Left here for compatibility: # Left here for compatibility:
# uname -m prints for DJGPP always 'pc', but it prints nothing about # uname -m prints for DJGPP always 'pc', but it prints nothing about
# the processor, so we play safe by assuming i386. # the processor, so we play safe by assuming i586.
echo i386-pc-msdosdjgpp # Note: whatever this is, it MUST be the same as what config.sub
# prints for the "djgpp" host, or else GDB configury will decide that
# this is a cross-build.
echo i586-pc-msdosdjgpp
exit ;; exit ;;
Intel:Mach:3*:*) Intel:Mach:3*:*)
echo i386-pc-mach3 echo i386-pc-mach3
@ -1128,6 +1160,16 @@ EOF
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4; exit; } ;; && { echo i486-ncr-sysv4; exit; } ;;
NCR*:*:4.2:* | MPRAS*:*:4.2:*)
OS_REL='.3'
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4.3${OS_REL}; exit; }
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; }
/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
echo m68k-unknown-lynxos${UNAME_RELEASE} echo m68k-unknown-lynxos${UNAME_RELEASE}
exit ;; exit ;;
@ -1203,6 +1245,9 @@ EOF
BePC:BeOS:*:*) # BeOS running on Intel PC compatible. BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
echo i586-pc-beos echo i586-pc-beos
exit ;; exit ;;
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
echo i586-pc-haiku
exit ;;
SX-4:SUPER-UX:*:*) SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE} echo sx4-nec-superux${UNAME_RELEASE}
exit ;; exit ;;
@ -1212,6 +1257,15 @@ EOF
SX-6:SUPER-UX:*:*) SX-6:SUPER-UX:*:*)
echo sx6-nec-superux${UNAME_RELEASE} echo sx6-nec-superux${UNAME_RELEASE}
exit ;; exit ;;
SX-7:SUPER-UX:*:*)
echo sx7-nec-superux${UNAME_RELEASE}
exit ;;
SX-8:SUPER-UX:*:*)
echo sx8-nec-superux${UNAME_RELEASE}
exit ;;
SX-8R:SUPER-UX:*:*)
echo sx8r-nec-superux${UNAME_RELEASE}
exit ;;
Power*:Rhapsody:*:*) Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE} echo powerpc-apple-rhapsody${UNAME_RELEASE}
exit ;; exit ;;
@ -1302,6 +1356,9 @@ EOF
i*86:rdos:*:*) i*86:rdos:*:*)
echo ${UNAME_MACHINE}-pc-rdos echo ${UNAME_MACHINE}-pc-rdos
exit ;; exit ;;
i*86:AROS:*:*)
echo ${UNAME_MACHINE}-pc-aros
exit ;;
esac esac
#echo '(No uname command or uname output not recognized.)' 1>&2 #echo '(No uname command or uname output not recognized.)' 1>&2
@ -1462,9 +1519,9 @@ This script, last modified $timestamp, has failed to recognize
the operating system you are using. It is advised that you the operating system you are using. It is advised that you
download the most up to date version of the config scripts from download the most up to date version of the config scripts from
http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
and and
http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
If the version you run ($0) is already up to date, please If the version you run ($0) is already up to date, please
send the following data and any information you think might be send the following data and any information you think might be

View file

@ -12,6 +12,14 @@
/* HAVE_DAYLIGHT */ /* HAVE_DAYLIGHT */
#undef HAVE_DAYLIGHT #undef HAVE_DAYLIGHT
/* Define to 1 if you have the declaration of `daylight', and to 0 if you
don't. */
#undef HAVE_DECL_DAYLIGHT
/* Define to 1 if you have the declaration of `tzname', and to 0 if you don't.
*/
#undef HAVE_DECL_TZNAME
/* Define to 1 if you have the <dlfcn.h> header file. */ /* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H #undef HAVE_DLFCN_H
@ -21,9 +29,15 @@
/* Define to 1 if you have the <fcntl.h> header file. */ /* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H #undef HAVE_FCNTL_H
/* Define to 1 if you have the `fork' function. */
#undef HAVE_FORK
/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
#undef HAVE_FSEEKO #undef HAVE_FSEEKO
/* Define to 1 if you have the `getline' function. */
#undef HAVE_GETLINE
/* Define to 1 if you have the <getopt.h> header file. */ /* Define to 1 if you have the <getopt.h> header file. */
#undef HAVE_GETOPT_H #undef HAVE_GETOPT_H
@ -39,6 +53,9 @@
/* Define to 1 if you have the <inttypes.h> header file. */ /* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H #undef HAVE_INTTYPES_H
/* Define to 1 if you have the `gnurx' library (-lgnurx). */
#undef HAVE_LIBGNURX
/* Define to 1 if you have the `z' library (-lz). */ /* Define to 1 if you have the `z' library (-lz). */
#undef HAVE_LIBZ #undef HAVE_LIBZ
@ -63,6 +80,9 @@
/* Define to 1 if you have the `mmap' function. */ /* Define to 1 if you have the `mmap' function. */
#undef HAVE_MMAP #undef HAVE_MMAP
/* Define to 1 if the system has the type `pid_t'. */
#undef HAVE_PID_T
/* Define to 1 if you have the <stdint.h> header file. */ /* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H #undef HAVE_STDINT_H
@ -96,13 +116,13 @@
/* HAVE_STRUCT_OPTION */ /* HAVE_STRUCT_OPTION */
#undef HAVE_STRUCT_OPTION #undef HAVE_STRUCT_OPTION
/* Define to 1 if `st_rdev' is member of `struct stat'. */ /* Define to 1 if `struct stat' is a member of `st_rdev'. */
#undef HAVE_STRUCT_STAT_ST_RDEV #undef HAVE_STRUCT_STAT_ST_RDEV
/* Define to 1 if `tm_gmtoff' is member of `struct tm'. */ /* Define to 1 if `struct tm' is a member of `tm_gmtoff'. */
#undef HAVE_STRUCT_TM_TM_GMTOFF #undef HAVE_STRUCT_TM_TM_GMTOFF
/* Define to 1 if `tm_zone' is member of `struct tm'. */ /* Define to 1 if `struct tm' is a member of `tm_zone'. */
#undef HAVE_STRUCT_TM_TM_ZONE #undef HAVE_STRUCT_TM_TM_ZONE
/* Define to 1 if you have the <sys/mman.h> header file. */ /* Define to 1 if you have the <sys/mman.h> header file. */
@ -171,6 +191,10 @@
/* Define to 1 if you have the <zlib.h> header file. */ /* Define to 1 if you have the <zlib.h> header file. */
#undef HAVE_ZLIB_H #undef HAVE_ZLIB_H
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#undef LT_OBJDIR
/* Define to 1 if `major', `minor', and `makedev' are declared in <mkdev.h>. /* Define to 1 if `major', `minor', and `makedev' are declared in <mkdev.h>.
*/ */
#undef MAJOR_IN_MKDEV #undef MAJOR_IN_MKDEV
@ -197,6 +221,9 @@
/* Define to the one symbol short name of this package. */ /* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME #undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */ /* Define to the version of this package. */
#undef PACKAGE_VERSION #undef PACKAGE_VERSION
@ -209,23 +236,50 @@
/* Define to 1 if your <sys/time.h> declares `struct tm'. */ /* Define to 1 if your <sys/time.h> declares `struct tm'. */
#undef TM_IN_SYS_TIME #undef TM_IN_SYS_TIME
/* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
/* Enable threading extensions on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
#endif
/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
# undef _TANDEM_SOURCE
#endif
/* Enable general extensions on Solaris. */
#ifndef __EXTENSIONS__
# undef __EXTENSIONS__
#endif
/* Version number of package */ /* Version number of package */
#undef VERSION #undef VERSION
/* Number of bits in a file offset, on hosts where this is settable. */ /* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS #undef _FILE_OFFSET_BITS
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ /* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
#undef _LARGEFILE_SOURCE #undef _LARGEFILE_SOURCE
/* Define for large files, on AIX-style hosts. */ /* Define for large files, on AIX-style hosts. */
#undef _LARGE_FILES #undef _LARGE_FILES
/* Define to 1 if on MINIX. */
#undef _MINIX
/* Define to 2 if the system does not provide POSIX.1 features except with
this defined. */
#undef _POSIX_1_SOURCE
/* Define to 1 if you need to in order for `stat' and other things to work. */
#undef _POSIX_SOURCE
/* Define to empty if `const' does not conform to ANSI C. */ /* Define to empty if `const' does not conform to ANSI C. */
#undef const #undef const

View file

@ -1,13 +1,10 @@
#! /bin/sh #! /bin/sh
#
# $NetBSD: config.sub,v 1.1.1.1 2009/05/08 16:35:04 christos Exp $
#
# Configuration validation subroutine script. # Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
# Inc. # Free Software Foundation, Inc.
timestamp='2006-09-20' timestamp='2009-04-17'
# This file is (in principle) common to ALL GNU software. # This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software # The presence of a machine in this file suggests that SOME GNU software
@ -75,8 +72,8 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\ version="\
GNU config.sub ($timestamp) GNU config.sub ($timestamp)
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
Free Software Foundation, Inc. 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@ -125,6 +122,7 @@ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in case $maybe_os in
nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
kopensolaris*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*) storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
@ -248,17 +246,20 @@ case $basic_machine in
| bfin \ | bfin \
| c4x | clipper \ | c4x | clipper \
| d10v | d30v | dlx | dsp16xx \ | d10v | d30v | dlx | dsp16xx \
| fr30 | frv \ | fido | fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \ | i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \ | ip2k | iq2000 \
| lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \ | m32c | m32r | m32rle | m68000 | m68k | m88k \
| maxq | mb | microblaze | mcore \ | maxq | mb | microblaze | mcore | mep | metag \
| mips | mipsbe | mipseb | mipsel | mipsle \ | mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \ | mips16 \
| mips64 | mips64el \ | mips64 | mips64el \
| mips64vr | mips64vrel \ | mips64octeon | mips64octeonel \
| mips64orion | mips64orionel \ | mips64orion | mips64orionel \
| mips64r5900 | mips64r5900el \
| mips64vr | mips64vrel \
| mips64vr4100 | mips64vr4100el \ | mips64vr4100 | mips64vr4100el \
| mips64vr4300 | mips64vr4300el \ | mips64vr4300 | mips64vr4300el \
| mips64vr5000 | mips64vr5000el \ | mips64vr5000 | mips64vr5000el \
@ -271,6 +272,7 @@ case $basic_machine in
| mipsisa64sr71k | mipsisa64sr71kel \ | mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \ | mipstx39 | mipstx39el \
| mn10200 | mn10300 \ | mn10200 | mn10300 \
| moxie \
| mt \ | mt \
| msp430 \ | msp430 \
| nios | nios2 \ | nios | nios2 \
@ -280,7 +282,7 @@ case $basic_machine in
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \ | pyramid \
| score \ | score \
| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \ | sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
@ -289,7 +291,7 @@ case $basic_machine in
| v850 | v850e \ | v850 | v850e \
| we32k \ | we32k \
| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
| z8k) | z8k | z80)
basic_machine=$basic_machine-unknown basic_machine=$basic_machine-unknown
;; ;;
m6811 | m68hc11 | m6812 | m68hc12) m6811 | m68hc11 | m6812 | m68hc12)
@ -327,19 +329,22 @@ case $basic_machine in
| clipper-* | craynv-* | cydra-* \ | clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \ | d10v-* | d30v-* | dlx-* \
| elxsi-* \ | elxsi-* \
| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \ | h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \ | i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \ | ip2k-* | iq2000-* \
| lm32-* \
| m32c-* | m32r-* | m32rle-* \ | m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | maxq-* | mcore-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \ | mips16-* \
| mips64-* | mips64el-* \ | mips64-* | mips64el-* \
| mips64vr-* | mips64vrel-* \ | mips64octeon-* | mips64octeonel-* \
| mips64orion-* | mips64orionel-* \ | mips64orion-* | mips64orionel-* \
| mips64r5900-* | mips64r5900el-* \
| mips64vr-* | mips64vrel-* \
| mips64vr4100-* | mips64vr4100el-* \ | mips64vr4100-* | mips64vr4100el-* \
| mips64vr4300-* | mips64vr4300el-* \ | mips64vr4300-* | mips64vr4300el-* \
| mips64vr5000-* | mips64vr5000el-* \ | mips64vr5000-* | mips64vr5000el-* \
@ -361,20 +366,24 @@ case $basic_machine in
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \ | pyramid-* \
| romp-* | rs6000-* \ | romp-* | rs6000-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \ | sparclite-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \ | tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
| tron-* \ | tron-* \
| v850-* | v850e-* | vax-* \ | v850-* | v850e-* | vax-* \
| we32k-* \ | we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
| xstormy16-* | xtensa-* \ | xstormy16-* | xtensa*-* \
| ymp-* \ | ymp-* \
| z8k-*) | z8k-* | z80-*)
;;
# Recognize the basic CPU types without company name, with glob match.
xtensa*)
basic_machine=$basic_machine-unknown
;; ;;
# Recognize the various machine names and aliases which stand # Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS. # for a CPU type and a company and sometimes even an OS.
@ -438,6 +447,10 @@ case $basic_machine in
basic_machine=m68k-apollo basic_machine=m68k-apollo
os=-bsd os=-bsd
;; ;;
aros)
basic_machine=i386-pc
os=-aros
;;
aux) aux)
basic_machine=m68k-apple basic_machine=m68k-apple
os=-aux os=-aux
@ -446,10 +459,22 @@ case $basic_machine in
basic_machine=ns32k-sequent basic_machine=ns32k-sequent
os=-dynix os=-dynix
;; ;;
blackfin)
basic_machine=bfin-unknown
os=-linux
;;
blackfin-*)
basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
c90) c90)
basic_machine=c90-cray basic_machine=c90-cray
os=-unicos os=-unicos
;; ;;
cegcc)
basic_machine=arm-unknown
os=-cegcc
;;
convex-c1) convex-c1)
basic_machine=c1-convex basic_machine=c1-convex
os=-bsd os=-bsd
@ -478,8 +503,8 @@ case $basic_machine in
basic_machine=craynv-cray basic_machine=craynv-cray
os=-unicosmp os=-unicosmp
;; ;;
cr16c) cr16)
basic_machine=cr16c-unknown basic_machine=cr16-unknown
os=-elf os=-elf
;; ;;
crds | unos) crds | unos)
@ -517,6 +542,10 @@ case $basic_machine in
basic_machine=m88k-motorola basic_machine=m88k-motorola
os=-sysv3 os=-sysv3
;; ;;
dicos)
basic_machine=i686-pc
os=-dicos
;;
djgpp) djgpp)
basic_machine=i586-pc basic_machine=i586-pc
os=-msdosdjgpp os=-msdosdjgpp
@ -671,6 +700,14 @@ case $basic_machine in
basic_machine=m68k-isi basic_machine=m68k-isi
os=-sysv os=-sysv
;; ;;
m68knommu)
basic_machine=m68k-unknown
os=-linux
;;
m68knommu-*)
basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
m88k-omron*) m88k-omron*)
basic_machine=m88k-omron basic_machine=m88k-omron
;; ;;
@ -686,6 +723,10 @@ case $basic_machine in
basic_machine=i386-pc basic_machine=i386-pc
os=-mingw32 os=-mingw32
;; ;;
mingw32ce)
basic_machine=arm-unknown
os=-mingw32ce
;;
miniframe) miniframe)
basic_machine=m68000-convergent basic_machine=m68000-convergent
;; ;;
@ -812,6 +853,14 @@ case $basic_machine in
basic_machine=i860-intel basic_machine=i860-intel
os=-osf os=-osf
;; ;;
parisc)
basic_machine=hppa-unknown
os=-linux
;;
parisc-*)
basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
pbd) pbd)
basic_machine=sparc-tti basic_machine=sparc-tti
;; ;;
@ -1020,6 +1069,10 @@ case $basic_machine in
basic_machine=tic6x-unknown basic_machine=tic6x-unknown
os=-coff os=-coff
;; ;;
tile*)
basic_machine=tile-unknown
os=-linux-gnu
;;
tx39) tx39)
basic_machine=mipstx39-unknown basic_machine=mipstx39-unknown
;; ;;
@ -1095,6 +1148,10 @@ case $basic_machine in
basic_machine=z8k-unknown basic_machine=z8k-unknown
os=-sim os=-sim
;; ;;
z80-*-coff)
basic_machine=z80-unknown
os=-sim
;;
none) none)
basic_machine=none-none basic_machine=none-none
os=-none os=-none
@ -1133,7 +1190,7 @@ case $basic_machine in
we32k) we32k)
basic_machine=we32k-att basic_machine=we32k-att
;; ;;
sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown basic_machine=sh-unknown
;; ;;
sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
@ -1205,8 +1262,9 @@ case $os in
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
| -kopensolaris* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* \ | -aos* | -aros* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
@ -1215,7 +1273,7 @@ case $os in
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* \ | -chorusos* | -chorusrdb* | -cegcc* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \ | -uxpv* | -beos* | -mpeix* | -udk* \
@ -1225,7 +1283,7 @@ case $os in
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku* | -rdos* | -toppers*) | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
# Remember, each alternative MUST END IN *, to match a version number. # Remember, each alternative MUST END IN *, to match a version number.
;; ;;
-qnx*) -qnx*)
@ -1355,6 +1413,9 @@ case $os in
-zvmoe) -zvmoe)
os=-zvmoe os=-zvmoe
;; ;;
-dicos*)
os=-dicos
;;
-none) -none)
;; ;;
*) *)
@ -1420,6 +1481,9 @@ case $basic_machine in
m68*-cisco) m68*-cisco)
os=-aout os=-aout
;; ;;
mep-*)
os=-elf
;;
mips*-cisco) mips*-cisco)
os=-elf os=-elf
;; ;;

File diff suppressed because it is too large Load diff

View file

@ -1,8 +1,11 @@
dnl Process this file with autoconf to produce a configure script. dnl Process this file with autoconf to produce a configure script.
AC_INIT(file, 5.03, christos@astron.com) AC_INIT(file, 5.09, christos@astron.com)
AM_INIT_AUTOMAKE AM_INIT_AUTOMAKE()
AM_MAINTAINER_MODE(disable)
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AM_CONFIG_HEADER(config.h) AM_CONFIG_HEADER(config.h)
#AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_MACRO_DIR([m4])
AC_MSG_CHECKING(for builtin ELF support) AC_MSG_CHECKING(for builtin ELF support)
AC_ARG_ENABLE(elf, AC_ARG_ENABLE(elf,
@ -47,6 +50,18 @@ fi], [
fsect=4 fsect=4
]) ])
AC_CANONICAL_HOST
case "$host_os" in
mingw32*)
MINGW=1
;;
*)
MINGW=0
;;
esac
AC_SUBST(MINGW)
AM_CONDITIONAL(MINGW, test "$MINGW" = 1)
AC_SUBST([pkgdatadir], ['$(datadir)/misc']) AC_SUBST([pkgdatadir], ['$(datadir)/misc'])
AC_SUBST(fsect) AC_SUBST(fsect)
AM_CONDITIONAL(FSECT5, test x$fsect = x5) AM_CONDITIONAL(FSECT5, test x$fsect = x5)
@ -86,7 +101,7 @@ AC_TYPE_MBSTATE_T
AC_STRUCT_OPTION_GETOPT_H AC_STRUCT_OPTION_GETOPT_H
AC_CHECK_TYPES([uint8_t, uint16_t, uint32_t, int32_t, uint64_t, int64_t]) AC_CHECK_TYPES([pid_t, uint8_t, uint16_t, uint32_t, int32_t, uint64_t, int64_t])
AC_CHECK_SIZEOF(long long) AC_CHECK_SIZEOF(long long)
AH_BOTTOM([ AH_BOTTOM([
#ifndef HAVE_UINT8_T #ifndef HAVE_UINT8_T
@ -128,27 +143,30 @@ else
WARNINGS="-Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith \ WARNINGS="-Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith \
-Wmissing-declarations -Wredundant-decls -Wnested-externs \ -Wmissing-declarations -Wredundant-decls -Wnested-externs \
-Wsign-compare -Wreturn-type -Wswitch -Wshadow \ -Wsign-compare -Wreturn-type -Wswitch -Wshadow \
-Wcast-qual -Wwrite-strings -Wextra -Wunused-parameter" -Wcast-qual -Wwrite-strings -Wextra -Wunused-parameter -Wformat=2"
fi], [ fi], [
if test "$GCC" = no; then if test "$GCC" = yes; then
WARNINGS=
AC_MSG_RESULT(no)
else
AC_MSG_RESULT(yes) AC_MSG_RESULT(yes)
WARNINGS="-Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith \ WARNINGS="-Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith \
-Wmissing-declarations -Wredundant-decls -Wnested-externs \ -Wmissing-declarations -Wredundant-decls -Wnested-externs \
-Wsign-compare -Wreturn-type -Wswitch -Wshadow \ -Wsign-compare -Wreturn-type -Wswitch -Wshadow \
-Wcast-qual -Wwrite-strings -Wextra -Wunused-parameter" -Wcast-qual -Wwrite-strings -Wextra -Wunused-parameter -Wformat=2"
else
WARNINGS=
AC_MSG_RESULT(no)
fi]) fi])
dnl Checks for functions dnl Checks for functions
AC_CHECK_FUNCS(mmap strerror strndup strtoul mbrtowc mkstemp utimes utime wcwidth strtof) AC_CHECK_FUNCS(mmap strerror strndup strtoul mbrtowc mkstemp utimes utime wcwidth strtof fork)
dnl Provide implementation of some required functions if necessary dnl Provide implementation of some required functions if necessary
AC_REPLACE_FUNCS(getopt_long asprintf vasprintf strlcpy strlcat) AC_REPLACE_FUNCS(getopt_long asprintf vasprintf strlcpy strlcat getline)
dnl Checks for libraries dnl Checks for libraries
AC_CHECK_LIB(z,gzopen) AC_CHECK_LIB(z,gzopen)
if test "$MINGW" = 1; then
AC_CHECK_LIB(gnurx,regexec,,AC_MSG_ERROR([libgnurx is required to build file(1) with MinGW]))
fi
dnl See if we are cross-compiling dnl See if we are cross-compiling
AM_CONDITIONAL(IS_CROSS_COMPILE, test "$cross_compiling" = yes) AM_CONDITIONAL(IS_CROSS_COMPILE, test "$cross_compiling" = yes)

View file

@ -1,10 +1,10 @@
#! /bin/sh #! /bin/sh
# depcomp - compile a program generating dependencies as side-effects # depcomp - compile a program generating dependencies as side-effects
scriptversion=2006-10-15.18 scriptversion=2009-04-28.21; # UTC
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
# Foundation, Inc. # Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify # 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 # it under the terms of the GNU General Public License as published by
@ -17,9 +17,7 @@ scriptversion=2006-10-15.18
# GNU General Public License for more details. # GNU General Public License for more details.
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program. If not, see <http://www.gnu.org/licenses/>.
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
# As a special exception to the GNU General Public License, if you # As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a # distribute this file as part of a program that contains a
@ -87,6 +85,15 @@ if test "$depmode" = dashXmstdout; then
depmode=dashmstdout depmode=dashmstdout
fi fi
cygpath_u="cygpath -u -f -"
if test "$depmode" = msvcmsys; then
# This is just like msvisualcpp but w/o cygpath translation.
# Just convert the backslash-escaped backslashes to single forward
# slashes to satisfy depend.m4
cygpath_u="sed s,\\\\\\\\,/,g"
depmode=msvisualcpp
fi
case "$depmode" in case "$depmode" in
gcc3) gcc3)
## gcc 3 implements dependency tracking that does exactly what ## gcc 3 implements dependency tracking that does exactly what
@ -192,14 +199,14 @@ sgi)
' < "$tmpdepfile" \ ' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
tr ' tr '
' ' ' >> $depfile ' ' ' >> "$depfile"
echo >> $depfile echo >> "$depfile"
# The second pass generates a dummy entry for each header file. # The second pass generates a dummy entry for each header file.
tr ' ' ' tr ' ' '
' < "$tmpdepfile" \ ' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
>> $depfile >> "$depfile"
else else
# The sourcefile does not contain any dependencies, so just # The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile # store a dummy comment line, to avoid errors with the Makefile
@ -215,34 +222,39 @@ aix)
# current directory. Also, the AIX compiler puts `$object:' at the # current directory. Also, the AIX compiler puts `$object:' at the
# start of each line; $object doesn't have directory information. # start of each line; $object doesn't have directory information.
# Version 6 uses the directory in both cases. # Version 6 uses the directory in both cases.
stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
tmpdepfile="$stripped.u" test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then if test "$libtool" = yes; then
tmpdepfile1=$dir$base.u
tmpdepfile2=$base.u
tmpdepfile3=$dir.libs/$base.u
"$@" -Wc,-M "$@" -Wc,-M
else else
tmpdepfile1=$dir$base.u
tmpdepfile2=$dir$base.u
tmpdepfile3=$dir$base.u
"$@" -M "$@" -M
fi fi
stat=$? stat=$?
if test -f "$tmpdepfile"; then :
else
stripped=`echo "$stripped" | sed 's,^.*/,,'`
tmpdepfile="$stripped.u"
fi
if test $stat -eq 0; then : if test $stat -eq 0; then :
else else
rm -f "$tmpdepfile" rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
exit $stat exit $stat
fi fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then if test -f "$tmpdepfile"; then
outname="$stripped.o"
# Each line is of the form `foo.o: dependent.h'. # Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to # Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'. # `$object: dependent.h' and one to simply `dependent.h:'.
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" # That's a tab and a space in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else else
# The sourcefile does not contain any dependencies, so just # The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile # store a dummy comment line, to avoid errors with the Makefile
@ -323,7 +335,12 @@ hp2)
if test -f "$tmpdepfile"; then if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
# Add `dependent.h:' lines. # Add `dependent.h:' lines.
sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" sed -ne '2,${
s/^ *//
s/ \\*$//
s/$/:/
p
}' "$tmpdepfile" >> "$depfile"
else else
echo "#dummy" > "$depfile" echo "#dummy" > "$depfile"
fi fi
@ -399,7 +416,7 @@ dashmstdout)
# Remove the call to Libtool. # Remove the call to Libtool.
if test "$libtool" = yes; then if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do while test "X$1" != 'X--mode=compile'; do
shift shift
done done
shift shift
@ -450,32 +467,39 @@ makedepend)
"$@" || exit $? "$@" || exit $?
# Remove any Libtool call # Remove any Libtool call
if test "$libtool" = yes; then if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do while test "X$1" != 'X--mode=compile'; do
shift shift
done done
shift shift
fi fi
# X makedepend # X makedepend
shift shift
cleared=no cleared=no eat=no
for arg in "$@"; do for arg
do
case $cleared in case $cleared in
no) no)
set ""; shift set ""; shift
cleared=yes ;; cleared=yes ;;
esac esac
if test $eat = yes; then
eat=no
continue
fi
case "$arg" in case "$arg" in
-D*|-I*) -D*|-I*)
set fnord "$@" "$arg"; shift ;; set fnord "$@" "$arg"; shift ;;
# Strip any option that makedepend may not understand. Remove # Strip any option that makedepend may not understand. Remove
# the object too, otherwise makedepend will parse it as a source file. # the object too, otherwise makedepend will parse it as a source file.
-arch)
eat=yes ;;
-*|$object) -*|$object)
;; ;;
*) *)
set fnord "$@" "$arg"; shift ;; set fnord "$@" "$arg"; shift ;;
esac esac
done done
obj_suffix="`echo $object | sed 's/^.*\././'`" obj_suffix=`echo "$object" | sed 's/^.*\././'`
touch "$tmpdepfile" touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile" rm -f "$depfile"
@ -495,7 +519,7 @@ cpp)
# Remove the call to Libtool. # Remove the call to Libtool.
if test "$libtool" = yes; then if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do while test "X$1" != 'X--mode=compile'; do
shift shift
done done
shift shift
@ -533,13 +557,27 @@ cpp)
msvisualcpp) msvisualcpp)
# Important note: in order to support this mode, a compiler *must* # Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout, regardless of -o, # always write the preprocessed file to stdout.
# because we must use -o when running libtool.
"$@" || exit $? "$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
IFS=" " IFS=" "
for arg for arg
do do
case "$arg" in case "$arg" in
-o)
shift
;;
$object)
shift
;;
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
set fnord "$@" set fnord "$@"
shift shift
@ -552,16 +590,23 @@ msvisualcpp)
;; ;;
esac esac
done done
"$@" -E | "$@" -E 2>/dev/null |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
rm -f "$depfile" rm -f "$depfile"
echo "$object : \\" > "$depfile" echo "$object : \\" > "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
echo " " >> "$depfile" echo " " >> "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile" rm -f "$tmpdepfile"
;; ;;
msvcmsys)
# 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
;;
none) none)
exec "$@" exec "$@"
;; ;;
@ -580,5 +625,6 @@ exit 0
# eval: (add-hook 'write-file-hooks 'time-stamp) # eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion=" # time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$" # time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End: # End:

View file

@ -1,32 +1,32 @@
MAGIC = $(pkgdatadir)/magic #MAGIC = $(pkgdatadir)/magic
if FSECT5 if FSECT5
man_MAGIC = magic.5 #man_MAGIC = magic.5
else else
man_MAGIC = magic.4 #man_MAGIC = magic.4
endif endif
fsect = @fsect@ #fsect = @fsect@
man_MANS = file.1 $(man_MAGIC) libmagic.3 #man_MANS = file.1 $(man_MAGIC) libmagic.3
EXTRA_DIST = file.man magic.man libmagic.man #EXTRA_DIST = file.man magic.man libmagic.man
CLEANFILES = $(man_MANS) #CLEANFILES = $(man_MANS)
file.1: Makefile file.man #file.1: Makefile file.man
@rm -f $@ # @rm -f $@
sed -e s@__CSECTION__@1@g \ # sed -e s@__CSECTION__@1@g \
-e s@__FSECTION__@${fsect}@g \ # -e s@__FSECTION__@${fsect}@g \
-e s@__VERSION__@${VERSION}@g \ # -e s@__VERSION__@${VERSION}@g \
-e s@__MAGIC__@${MAGIC}@g $(srcdir)/file.man > $@ # -e s@__MAGIC__@${MAGIC}@g $(srcdir)/file.man > $@
magic.${fsect}: Makefile magic.man #magic.${fsect}: Makefile magic.man
@rm -f $@ # @rm -f $@
sed -e s@__CSECTION__@1@g \ # sed -e s@__CSECTION__@1@g \
-e s@__FSECTION__@${fsect}@g \ # -e s@__FSECTION__@${fsect}@g \
-e s@__VERSION__@${VERSION}@g \ # -e s@__VERSION__@${VERSION}@g \
-e s@__MAGIC__@${MAGIC}@g $(srcdir)/magic.man > $@ # -e s@__MAGIC__@${MAGIC}@g $(srcdir)/magic.man > $@
libmagic.3: Makefile libmagic.man #libmagic.3: Makefile libmagic.man
@rm -f $@ # @rm -f $@
sed -e s@__CSECTION__@1@g \ # sed -e s@__CSECTION__@1@g \
-e s@__FSECTION__@${fsect}@g \ # -e s@__FSECTION__@${fsect}@g \
-e s@__VERSION__@${VERSION}@g \ # -e s@__VERSION__@${VERSION}@g \
-e s@__MAGIC__@${MAGIC}@g $(srcdir)/libmagic.man > $@ # -e s@__MAGIC__@${MAGIC}@g $(srcdir)/libmagic.man > $@

View file

@ -1,8 +1,9 @@
# Makefile.in generated by automake 1.10 from Makefile.am. # Makefile.in generated by automake 1.11 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@ -14,8 +15,9 @@
@SET_MAKE@ @SET_MAKE@
VPATH = @srcdir@ VPATH = @srcdir@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644 install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c install_sh_PROGRAM = $(install_sh) -c
@ -33,27 +35,29 @@ host_triplet = @host@
subdir = doc subdir = doc
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/configure.ac $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4) $(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_GEN = $(am__v_GEN_$(V))
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
am__v_GEN_0 = @echo " GEN " $@;
AM_V_at = $(am__v_at_$(V))
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
am__v_at_0 = @
SOURCES = SOURCES =
DIST_SOURCES = DIST_SOURCES =
man1dir = $(mandir)/man1
am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" \
"$(DESTDIR)$(man4dir)" "$(DESTDIR)$(man5dir)"
man3dir = $(mandir)/man3
man4dir = $(mandir)/man4
man5dir = $(mandir)/man5
NROFF = nroff
MANS = $(man_MANS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
pkgdatadir = @pkgdatadir@ pkgdatadir = @pkgdatadir@
ACLOCAL = @ACLOCAL@ ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@ AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@ AR = @AR@
AUTOCONF = @AUTOCONF@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@ AUTOHEADER = @AUTOHEADER@
@ -64,43 +68,47 @@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
CPP = @CPP@ CPP = @CPP@
CPPFLAGS = @CPPFLAGS@ CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@ CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@ DEFS = @DEFS@
DEPDIR = @DEPDIR@ DEPDIR = @DEPDIR@
DSYMUTIL = @DSYMUTIL@ DSYMUTIL = @DSYMUTIL@
ECHO = @ECHO@ DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@ ECHO_T = @ECHO_T@
EGREP = @EGREP@ EGREP = @EGREP@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
F77 = @F77@ FGREP = @FGREP@
FFLAGS = @FFLAGS@
GREP = @GREP@ GREP = @GREP@
INSTALL = @INSTALL@ INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@ LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@ LIBS = @LIBS@
LIBTOOL = @LIBTOOL@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MINGW = @MINGW@
MKDIR_P = @MKDIR_P@ MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@ OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
@ -115,8 +123,7 @@ abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@ abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@ abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@ ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
ac_ct_F77 = @ac_ct_F77@
am__include = @am__include@ am__include = @am__include@
am__leading_dot = @am__leading_dot@ am__leading_dot = @am__leading_dot@
am__quote = @am__quote@ am__quote = @am__quote@
@ -148,6 +155,7 @@ libdir = @libdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
localedir = @localedir@ localedir = @localedir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@ mandir = @mandir@
mkdir_p = @mkdir_p@ mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@ oldincludedir = @oldincludedir@
@ -160,29 +168,24 @@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@ srcdir = @srcdir@
sysconfdir = @sysconfdir@ sysconfdir = @sysconfdir@
target_alias = @target_alias@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@ top_srcdir = @top_srcdir@
MAGIC = $(pkgdatadir)/magic
@FSECT5_FALSE@man_MAGIC = magic.4
@FSECT5_TRUE@man_MAGIC = magic.5
man_MANS = file.1 $(man_MAGIC) libmagic.3
EXTRA_DIST = file.man magic.man libmagic.man
CLEANFILES = $(man_MANS)
all: all-am all: all-am
.SUFFIXES: .SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \ @for dep in $?; do \
case '$(am__configure_deps)' in \ case '$(am__configure_deps)' in \
*$$dep*) \ *$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& exit 0; \ && { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \ exit 1;; \
esac; \ esac; \
done; \ done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
cd $(top_srcdir) && \ $(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu doc/Makefile $(AUTOMAKE) --gnu doc/Makefile
.PRECIOUS: Makefile .PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \ @case '$?' in \
@ -196,196 +199,17 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps) $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
mostlyclean-libtool: mostlyclean-libtool:
-rm -f *.lo -rm -f *.lo
clean-libtool: clean-libtool:
-rm -rf .libs _libs -rm -rf .libs _libs
install-man1: $(man1_MANS) $(man_MANS)
@$(NORMAL_INSTALL)
test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
for i in $$l2; do \
case "$$i" in \
*.1*) list="$$list $$i" ;; \
esac; \
done; \
for i in $$list; do \
if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
else file=$$i; fi; \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
case "$$ext" in \
1*) ;; \
*) ext='1' ;; \
esac; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
inst=`echo $$inst | sed -e 's/^.*\///'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \
done
uninstall-man1:
@$(NORMAL_UNINSTALL)
@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
for i in $$l2; do \
case "$$i" in \
*.1*) list="$$list $$i" ;; \
esac; \
done; \
for i in $$list; do \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
case "$$ext" in \
1*) ;; \
*) ext='1' ;; \
esac; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
inst=`echo $$inst | sed -e 's/^.*\///'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \
rm -f "$(DESTDIR)$(man1dir)/$$inst"; \
done
install-man3: $(man3_MANS) $(man_MANS)
@$(NORMAL_INSTALL)
test -z "$(man3dir)" || $(MKDIR_P) "$(DESTDIR)$(man3dir)"
@list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
for i in $$l2; do \
case "$$i" in \
*.3*) list="$$list $$i" ;; \
esac; \
done; \
for i in $$list; do \
if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
else file=$$i; fi; \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
case "$$ext" in \
3*) ;; \
*) ext='3' ;; \
esac; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
inst=`echo $$inst | sed -e 's/^.*\///'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst"; \
done
uninstall-man3:
@$(NORMAL_UNINSTALL)
@list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
for i in $$l2; do \
case "$$i" in \
*.3*) list="$$list $$i" ;; \
esac; \
done; \
for i in $$list; do \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
case "$$ext" in \
3*) ;; \
*) ext='3' ;; \
esac; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
inst=`echo $$inst | sed -e 's/^.*\///'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " rm -f '$(DESTDIR)$(man3dir)/$$inst'"; \
rm -f "$(DESTDIR)$(man3dir)/$$inst"; \
done
install-man4: $(man4_MANS) $(man_MANS)
@$(NORMAL_INSTALL)
test -z "$(man4dir)" || $(MKDIR_P) "$(DESTDIR)$(man4dir)"
@list='$(man4_MANS) $(dist_man4_MANS) $(nodist_man4_MANS)'; \
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
for i in $$l2; do \
case "$$i" in \
*.4*) list="$$list $$i" ;; \
esac; \
done; \
for i in $$list; do \
if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
else file=$$i; fi; \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
case "$$ext" in \
4*) ;; \
*) ext='4' ;; \
esac; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
inst=`echo $$inst | sed -e 's/^.*\///'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man4dir)/$$inst'"; \
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man4dir)/$$inst"; \
done
uninstall-man4:
@$(NORMAL_UNINSTALL)
@list='$(man4_MANS) $(dist_man4_MANS) $(nodist_man4_MANS)'; \
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
for i in $$l2; do \
case "$$i" in \
*.4*) list="$$list $$i" ;; \
esac; \
done; \
for i in $$list; do \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
case "$$ext" in \
4*) ;; \
*) ext='4' ;; \
esac; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
inst=`echo $$inst | sed -e 's/^.*\///'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " rm -f '$(DESTDIR)$(man4dir)/$$inst'"; \
rm -f "$(DESTDIR)$(man4dir)/$$inst"; \
done
install-man5: $(man5_MANS) $(man_MANS)
@$(NORMAL_INSTALL)
test -z "$(man5dir)" || $(MKDIR_P) "$(DESTDIR)$(man5dir)"
@list='$(man5_MANS) $(dist_man5_MANS) $(nodist_man5_MANS)'; \
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
for i in $$l2; do \
case "$$i" in \
*.5*) list="$$list $$i" ;; \
esac; \
done; \
for i in $$list; do \
if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
else file=$$i; fi; \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
case "$$ext" in \
5*) ;; \
*) ext='5' ;; \
esac; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
inst=`echo $$inst | sed -e 's/^.*\///'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man5dir)/$$inst'"; \
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man5dir)/$$inst"; \
done
uninstall-man5:
@$(NORMAL_UNINSTALL)
@list='$(man5_MANS) $(dist_man5_MANS) $(nodist_man5_MANS)'; \
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
for i in $$l2; do \
case "$$i" in \
*.5*) list="$$list $$i" ;; \
esac; \
done; \
for i in $$list; do \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
case "$$ext" in \
5*) ;; \
*) ext='5' ;; \
esac; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
inst=`echo $$inst | sed -e 's/^.*\///'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " rm -f '$(DESTDIR)$(man5dir)/$$inst'"; \
rm -f "$(DESTDIR)$(man5dir)/$$inst"; \
done
tags: TAGS tags: TAGS
TAGS: TAGS:
@ -409,23 +233,24 @@ distdir: $(DISTFILES)
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \ if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ if test -d "$(distdir)/$$file"; then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \ fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ 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 \ else \
test -f $(distdir)/$$file \ test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file $(distdir)/$$file \ || cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \ || exit 1; \
fi; \ fi; \
done done
check-am: all-am check-am: all-am
check: check-am check: check-am
all-am: Makefile $(MANS) all-am: Makefile
installdirs: installdirs:
for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man4dir)" "$(DESTDIR)$(man5dir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am install: install-am
install-exec: install-exec-am install-exec: install-exec-am
install-data: install-data-am install-data: install-data-am
@ -443,10 +268,10 @@ install-strip:
mostlyclean-generic: mostlyclean-generic:
clean-generic: clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic: distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -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: maintainer-clean-generic:
@echo "This command is intended for maintainers to use" @echo "This command is intended for maintainers to use"
@ -465,26 +290,38 @@ dvi-am:
html: html-am html: html-am
html-am:
info: info-am info: info-am
info-am: info-am:
install-data-am: install-man install-data-am:
install-dvi: install-dvi-am install-dvi: install-dvi-am
install-dvi-am:
install-exec-am: install-exec-am:
install-html: install-html-am install-html: install-html-am
install-html-am:
install-info: install-info-am install-info: install-info-am
install-man: install-man1 install-man3 install-man4 install-man5 install-info-am:
install-man:
install-pdf: install-pdf-am install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am install-ps: install-ps-am
install-ps-am:
installcheck-am: installcheck-am:
maintainer-clean: maintainer-clean-am maintainer-clean: maintainer-clean-am
@ -503,10 +340,7 @@ ps: ps-am
ps-am: ps-am:
uninstall-am: uninstall-man uninstall-am:
uninstall-man: uninstall-man1 uninstall-man3 uninstall-man4 \
uninstall-man5
.MAKE: install-am install-strip .MAKE: install-am install-strip
@ -515,36 +349,43 @@ uninstall-man: uninstall-man1 uninstall-man3 uninstall-man4 \
dvi-am html html-am info info-am install install-am \ dvi-am html html-am info info-am install install-am \
install-data install-data-am install-dvi install-dvi-am \ install-data install-data-am install-dvi install-dvi-am \
install-exec install-exec-am install-html install-html-am \ install-exec install-exec-am install-html install-html-am \
install-info install-info-am install-man install-man1 \ install-info install-info-am install-man install-pdf \
install-man3 install-man4 install-man5 install-pdf \
install-pdf-am install-ps install-ps-am install-strip \ install-pdf-am install-ps install-ps-am install-strip \
installcheck installcheck-am installdirs maintainer-clean \ installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \ maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
uninstall-man uninstall-man1 uninstall-man3 uninstall-man4 \
uninstall-man5
file.1: Makefile file.man #MAGIC = $(pkgdatadir)/magic
@rm -f $@ #man_MAGIC = magic.5
sed -e s@__CSECTION__@1@g \ #man_MAGIC = magic.4
-e s@__FSECTION__@${fsect}@g \ #fsect = @fsect@
-e s@__VERSION__@${VERSION}@g \ #man_MANS = file.1 $(man_MAGIC) libmagic.3
-e s@__MAGIC__@${MAGIC}@g $(srcdir)/file.man > $@
magic.${fsect}: Makefile magic.man #EXTRA_DIST = file.man magic.man libmagic.man
@rm -f $@ #CLEANFILES = $(man_MANS)
sed -e s@__CSECTION__@1@g \
-e s@__FSECTION__@${fsect}@g \ #file.1: Makefile file.man
-e s@__VERSION__@${VERSION}@g \ # @rm -f $@
-e s@__MAGIC__@${MAGIC}@g $(srcdir)/magic.man > $@ # sed -e s@__CSECTION__@1@g \
# -e s@__FSECTION__@${fsect}@g \
# -e s@__VERSION__@${VERSION}@g \
# -e s@__MAGIC__@${MAGIC}@g $(srcdir)/file.man > $@
#magic.${fsect}: Makefile magic.man
# @rm -f $@
# sed -e s@__CSECTION__@1@g \
# -e s@__FSECTION__@${fsect}@g \
# -e s@__VERSION__@${VERSION}@g \
# -e s@__MAGIC__@${MAGIC}@g $(srcdir)/magic.man > $@
#libmagic.3: Makefile libmagic.man
# @rm -f $@
# sed -e s@__CSECTION__@1@g \
# -e s@__FSECTION__@${fsect}@g \
# -e s@__VERSION__@${VERSION}@g \
# -e s@__MAGIC__@${MAGIC}@g $(srcdir)/libmagic.man > $@
libmagic.3: Makefile libmagic.man
@rm -f $@
sed -e s@__CSECTION__@1@g \
-e s@__FSECTION__@${fsect}@g \
-e s@__VERSION__@${VERSION}@g \
-e s@__MAGIC__@${MAGIC}@g $(srcdir)/libmagic.man > $@
# Tell versions [3.59,3.63) of GNU make to not export all variables. # 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. # Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT: .NOEXPORT:

View file

@ -1,7 +1,7 @@
.\" $NetBSD: file.1,v 1.5 2010/05/14 16:51:32 joerg Exp $ .\" $NetBSD: file.1,v 1.8 2011/09/16 21:06:25 christos Exp $
.\" .\"
.\" $File: file.man,v 1.79 2008/11/06 22:49:08 rrt Exp $ .\" $File: file.man,v 1.96 2011/07/12 11:23:38 rrt Exp $
.Dd October 9, 2008 .Dd April 20, 2011
.Dt FILE 1 .Dt FILE 1
.Os .Os
.Sh NAME .Sh NAME
@ -9,20 +9,24 @@
.Nd determine file type .Nd determine file type
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm .Nm
.Op Fl 0bchikLNnprsvz .Bk -words
.Op Fl bchiklLNnprsvz0
.Op Fl Fl apple
.Op Fl Fl mime-encoding
.Op Fl Fl mime-type
.Op Fl e Ar testname
.Op Fl F Ar separator .Op Fl F Ar separator
.Op Fl f Ar namefile .Op Fl f Ar namefile
.Op Fl m Ar magicfiles .Op Fl m Ar magicfiles
.Op Fl Fl mime-encoding .Ar
.Op Fl Fl mime-type .Ek
.Ar file
.Nm .Nm
.Fl C .Fl C
.Op Fl m Ar magicfile .Op Fl m Ar magicfiles
.Nm .Nm
.Op Fl Fl help .Op Fl Fl help
.Sh DESCRIPTION .Sh DESCRIPTION
This manual page documents version 5.03 of the This manual page documents version 5.09 of the
.Nm .Nm
command. command.
.Pp .Pp
@ -162,25 +166,17 @@ in any of the character sets listed above is simply said to be
.Dq data . .Dq data .
.Sh OPTIONS .Sh OPTIONS
.Bl -tag -width indent .Bl -tag -width indent
.It Fl 0 , -print0
Output a null character
.Sq \e0
after the end of the filename.
Nice to
.Xr cut 1
the output.
This does not affect the separator which is still printed.
.It Fl b , Fl Fl brief .It Fl b , Fl Fl brief
Do not prepend filenames to output lines (brief mode). Do not prepend filenames to output lines (brief mode).
.It Fl C , Fl Fl compile
Write a
.Pa magic.mgc
output file that contains a pre-parsed version of the magic file or directory.
.It Fl c , Fl Fl checking-printout .It Fl c , Fl Fl checking-printout
Cause a checking printout of the parsed form of the magic file. Cause a checking printout of the parsed form of the magic file.
This is usually used in conjunction with the This is usually used in conjunction with the
.Fl m .Fl m
flag to debug a new magic file before installing it. flag to debug a new magic file before installing it.
.It Fl C , Fl Fl compile
Write a
.Pa magic.mgc
output file that contains a pre-parsed version of the magic file or directory.
.It Fl e , Fl Fl exclude Ar testname .It Fl e , Fl Fl exclude Ar testname
Exclude the test named in Exclude the test named in
.Ar testname .Ar testname
@ -190,10 +186,10 @@ Valid test names are:
.It apptype .It apptype
.Dv EMX .Dv EMX
application type (only on EMX). application type (only on EMX).
.It text .It ascii
Various types of text files (this test will try to guess the text Various types of text files (this test will try to guess the text
encoding, irrespective of the setting of the encoding, irrespective of the setting of the
.Dq encoding .Sq encoding
option). option).
.It encoding .It encoding
Different text encodings for soft magic tests. Different text encodings for soft magic tests.
@ -227,52 +223,43 @@ to test the standard input, use
.Sq - .Sq -
as a filename argument. as a filename argument.
.It Fl h , Fl Fl no-dereference .It Fl h , Fl Fl no-dereference
Do not follow symlinks option causes symlinks not to be followed
(on systems that support symbolic links). (on systems that support symbolic links).
This is the default if the environment variable This is the default if the environment variable
.Ev POSIXLY_CORRECT .Dv POSIXLY_CORRECT
is not defined. is not defined.
.It Fl Fl help
Print a help message and exit.
.It Fl i , Fl Fl mime .It Fl i , Fl Fl mime
Output mime type strings rather than the more Causes the file command to output mime type strings rather than the more
traditional human readable ones. traditional human readable ones.
Thus Thus it may say
.Nm .Sq text/plain; charset=us-ascii
may say
.Dq text/plain; charset=us-ascii
rather than rather than
.Dq ASCII text . .Dq ASCII text .
In order for this option to work,
.Nm
changes the way
it handles files recognized by the command itself (such as many of the
text file types, directories etc), and makes use of an alternative
.Dq magic
file.
(See the
.Sx FILES
section, below).
.It Fl Fl mime-type , Fl Fl mime-encoding .It Fl Fl mime-type , Fl Fl mime-encoding
Like Like
.Fl i , .Fl i ,
but print only the specified element(s). but print only the specified element(s).
.It Fl k , Fl Fl keep-going .It Fl k , Fl Fl keep-going
Don't stop at the first match, keep going. Don't stop at the first match, keep going.
Subsequent matches will have the string Subsequent matches will be
.Dq "\[rs]012\- " have the string
.Sq "\[rs]012\- "
prepended. prepended.
(If you want a newline, see the (If you want a newline, see the
.Fl r .Fl r
option.) option.)
.It Fl l , Fl Fl list
Print information about the strength of each magic pattern.
.It Fl L , Fl Fl dereference .It Fl L , Fl Fl dereference
Follow symlinks, as the like-named option in option causes symlinks to be followed, as the like-named option in
.Xr ls 1 .Xr ls 1
(on systems that support symbolic links). (on systems that support symbolic links).
This is the default if the environment variable This is the default if the environment variable
.Ev POSIXLY_CORRECT .Ev POSIXLY_CORRECT
is defined. is defined.
.It Fl m , Fl Fl magic-file Ar list .It Fl l
Shows sorted patterns list in the order which is used for the matching.
.It Fl m , Fl Fl magic-file Ar magicfiles
Specify an alternate list of files and directories containing magic. Specify an alternate list of files and directories containing magic.
This can be a single item, or a colon-separated list. This can be a single item, or a colon-separated list.
If a compiled magic file is found alongside a file or directory, If a compiled magic file is found alongside a file or directory,
@ -320,6 +307,23 @@ since on some systems it reports a zero size for raw disk partitions.
Print the version of the program and exit. Print the version of the program and exit.
.It Fl z , Fl Fl uncompress .It Fl z , Fl Fl uncompress
Try to look inside compressed files. Try to look inside compressed files.
.It Fl 0 , Fl Fl print0
Output a null character
.Sq \e0
after the end of the filename.
Nice to
.Xr cut 1
the output.
This does not affect the separator which is still printed.
.It Fl -help
Print a help message and exit.
.El
.Sh FILES
.Bl -tag -width /usr/share/misc/magic.mgc -compact
.It Pa /usr/share/misc/magic.mgc
Default compiled list of magic.
.It Pa /usr/share/misc/magic
Directory containing default magic files.
.El .El
.Sh ENVIRONMENT .Sh ENVIRONMENT
The environment variable The environment variable
@ -333,6 +337,11 @@ will not attempt to open
adds adds
.Dq Pa .mgc .Dq Pa .mgc
to the value of this variable as appropriate. to the value of this variable as appropriate.
However,
.Pa file
has to exist in order for
.Pa file.mime
to be considered.
The environment variable The environment variable
.Ev POSIXLY_CORRECT .Ev POSIXLY_CORRECT
controls (on systems that support symbolic links), whether controls (on systems that support symbolic links), whether
@ -346,54 +355,12 @@ This is also controlled by the
and and
.Fl h .Fl h
options. options.
.Sh FILES
.Bl -tag -width /usr/share/misc/magic.mgc -compact
.It Pa /usr/share/misc/magic.mgc
Default compiled list of magic.
.It Pa /usr/share/misc/magic
Directory containing default magic files.
.El
.Sh EXIT STATUS
.Ex -std
.Sh EXAMPLES
.Bd -literal -offset indent
$ file file.c file /dev/{wd0a,hda}
file.c: C program text
file: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),
dynamically linked (uses shared libs), stripped
/dev/wd0a: block special (0/0)
/dev/hda: block special (3/0)
$ file -s /dev/wd0{b,d}
/dev/wd0b: data
/dev/wd0d: x86 boot sector
$ file -s /dev/hda{,1,2,3,4,5,6,7,8,9,10}
/dev/hda: x86 boot sector
/dev/hda1: Linux/i386 ext2 filesystem
/dev/hda2: x86 boot sector
/dev/hda3: x86 boot sector, extended partition table
/dev/hda4: Linux/i386 ext2 filesystem
/dev/hda5: Linux/i386 swap file
/dev/hda6: Linux/i386 swap file
/dev/hda7: Linux/i386 swap file
/dev/hda8: Linux/i386 swap file
/dev/hda9: empty
/dev/hda10: empty
$ file -i file.c file /dev/{wd0a,hda}
file.c: text/x-c
file: application/x-executable
/dev/hda: application/x-not-regular-file
/dev/wd0a: application/x-not-regular-file
.Ed
.Sh SEE ALSO .Sh SEE ALSO
.Xr magic 5 ,
.Xr hexdump 1 , .Xr hexdump 1 ,
.Xr od 1 , .Xr od 1 ,
.Xr strings 1 , .Xr strings 1 ,
.Xr magic 5 .Sh STANDARDS CONFORMANCE
.Sh STANDARDS
This program is believed to exceed the System V Interface Definition This program is believed to exceed the System V Interface Definition
of FILE(CMD), as near as one can determine from the vague language of FILE(CMD), as near as one can determine from the vague language
contained therein. contained therein.
@ -456,6 +423,39 @@ command uses a magic file,
keep the old magic file around for comparison purposes keep the old magic file around for comparison purposes
(rename it to (rename it to
.Pa /usr/share/misc/magic.orig ) . .Pa /usr/share/misc/magic.orig ) .
.Sh EXAMPLES
.Bd -literal -offset indent
$ file file.c file /dev/{wd0a,hda}
file.c: C program text
file: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),
dynamically linked (uses shared libs), stripped
/dev/wd0a: block special (0/0)
/dev/hda: block special (3/0)
$ file -s /dev/wd0{b,d}
/dev/wd0b: data
/dev/wd0d: x86 boot sector
$ file -s /dev/hda{,1,2,3,4,5,6,7,8,9,10}
/dev/hda: x86 boot sector
/dev/hda1: Linux/i386 ext2 filesystem
/dev/hda2: x86 boot sector
/dev/hda3: x86 boot sector, extended partition table
/dev/hda4: Linux/i386 ext2 filesystem
/dev/hda5: Linux/i386 swap file
/dev/hda6: Linux/i386 swap file
/dev/hda7: Linux/i386 swap file
/dev/hda8: Linux/i386 swap file
/dev/hda9: empty
/dev/hda10: empty
$ file -i file.c file /dev/{wd0a,hda}
file.c: text/x-c
file: application/x-executable
/dev/hda: application/x-not-regular-file
/dev/wd0a: application/x-not-regular-file
.Ed
.Sh HISTORY .Sh HISTORY
There has been a There has been a
.Nm .Nm
@ -477,16 +477,22 @@ Geoff Collyer found several inadequacies
and provided some magic file entries. and provided some magic file entries.
Contributions by the Contributions by the
.Sq \*[Am] .Sq \*[Am]
operator by Rob McMahon, cudcv@warwick.ac.uk, 1989. operator by Rob McMahon,
.Aq cudcv@warwick.ac.uk ,
1989.
.Pp .Pp
Guy Harris, guy@netapp.com, made many changes from 1993 to the present. Guy Harris,
.Aq guy@netapp.com ,
made many changes from 1993 to the present.
1989.
.Pp .Pp
Primary development and maintenance from 1990 to the present by Primary development and maintenance from 1990 to the present by
Christos Zoulas Christos Zoulas
.Aq christos@astron.com . .Aq christos@astron.com .
.Pp .Pp
Altered by Chris Lowth, chris@lowth.com, 2000: Altered by Chris Lowth
Handle the .Aq chris@lowth.com ,
2000: handle the
.Fl i .Fl i
option to output mime type strings, using an alternative option to output mime type strings, using an alternative
magic file and internal logic. magic file and internal logic.
@ -499,9 +505,10 @@ of non-ASCII files.
.Pp .Pp
Altered by Reuben Thomas Altered by Reuben Thomas
.Aq rrt@sc3d.org , .Aq rrt@sc3d.org ,
2007 to 2008, to improve MIME 2007-2011, to improve MIME support, merge MIME and non-MIME magic,
support and merge MIME and non-MIME magic, support directories as well support directories as well as files of magic, apply many bug fixes,
as files of magic, apply many bug fixes and improve the build system. update and fix a lot of magic, improve the build system, improve the
documentation, and rewrite the Python bindings in pure Python.
.Pp .Pp
The list of contributors to the The list of contributors to the
.Sq magic .Sq magic
@ -512,7 +519,7 @@ Many contributors are listed in the source files.
.Sh LEGAL NOTICE .Sh LEGAL NOTICE
Copyright (c) Ian F. Darwin, Toronto, Canada, 1986-1999. Copyright (c) Ian F. Darwin, Toronto, Canada, 1986-1999.
Covered by the standard Berkeley Software Distribution copyright; see the file Covered by the standard Berkeley Software Distribution copyright; see the file
LEGAL.NOTICE in the source distribution. COPYING in the source distribution.
.Pp .Pp
The files The files
.Pa tar.h .Pa tar.h
@ -521,43 +528,37 @@ and
were written by John Gilmore from his public-domain were written by John Gilmore from his public-domain
.Xr tar 1 .Xr tar 1
program, and are not covered by the above license. program, and are not covered by the above license.
.Sh BUGS .Sh RETURN CODE
There must be a better way to automate the construction of the Magic
file from all the glop in Magdir.
What is it?
.Pp
.Nm .Nm
uses several algorithms that favor speed over accuracy, returns 0 on success, and non-zero on error.
thus it can be misled about the contents of text files. .Sh BUGS
.Pp .Pp
The support for text files (primarily for programming languages) Please report bugs and send patches to the bug tracker at
is simplistic, inefficient and requires recompilation to update. .Pa http://bugs.gw.com/
or the mailing list at
.Aq file@mx.gw.com .
.Sh TODO
.Pp .Pp
The list of keywords in Fix output so that tests for MIME and APPLE flags are not needed all
.Dv ascmagic over the place, and actual output is only done in one place. This
probably belongs in the Magic file. needs a design. Suggestion: push possible outputs on to a list, then
This could be done by using some keyword like pick the last-pushed (most specific, one hopes) value at the end, or
.Sq * use a default if the list is empty. This should not slow down evaluation.
for the offset value.
.Pp .Pp
Complain about conflicts in the magic file entries. Continue to squash all magic bugs. See Debian BTS for a good source.
Make a rule that the magic entries sort based on file offset rather
than position within the magic file?
.Pp .Pp
The program should provide a way to give an estimate of Store arbitrarily long strings, for example for %s patterns, so that
.Sq how good they can be printed out. Fixes Debian bug #271672. Would require more
a guess is. complex store/load code in apprentice.
We end up removing guesses (e.g.
.Sq From\
as first 5 chars of file) because
they are not as good as other guesses (e.g.
.Sq Newsgroups:
versus
.Sq Return-Path: ) .
Still, if the others don't pan out, it should be possible to use the
first guess.
.Pp .Pp
This manual page, and particularly this section, is too long. Add syntax for relative offsets after current level (Debian bug #466037).
.Pp
Make file -ki work, i.e. give multiple MIME types.
.Pp
Add a zip library so we can peek inside Office2007 documents to
figure out what they are.
.Pp
Add an option to print URLs for the sources of the file descriptions.
.Sh AVAILABILITY .Sh AVAILABILITY
You can obtain the original author's latest version by anonymous FTP You can obtain the original author's latest version by anonymous FTP
on on

View file

@ -1,6 +1,6 @@
.\" $NetBSD: libmagic.3,v 1.5 2010/05/14 03:14:41 joerg Exp $ .\" $NetBSD: libmagic.3,v 1.9 2011/11/10 13:41:00 christos Exp $
.\" .\"
.\" $File: libmagic.man,v 1.19 2008/10/06 20:16:04 christos Exp $ .\" $File: libmagic.man,v 1.24 2011/05/13 22:11:44 christos Exp $
.\" .\"
.\" Copyright (c) Christos Zoulas 2003. .\" Copyright (c) Christos Zoulas 2003.
.\" All Rights Reserved. .\" All Rights Reserved.
@ -27,14 +27,14 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE. .\" SUCH DAMAGE.
.\" .\"
.Dd October 6, 2008 .Dd January 14, 2011
.Dt LIBMAGIC 3 .Dt LIBMAGIC 3
.Os .Os
.Sh NAME .Sh NAME
.Nm magic_open , .Nm magic_open ,
.Nm magic_close , .Nm magic_close ,
.Nm magic_error , .Nm magic_error ,
.Nm magic_file , .Nm magic_descriptor ,
.Nm magic_buffer , .Nm magic_buffer ,
.Nm magic_setflags , .Nm magic_setflags ,
.Nm magic_check , .Nm magic_check ,
@ -54,6 +54,8 @@
.Ft int .Ft int
.Fn magic_errno "magic_t cookie" .Fn magic_errno "magic_t cookie"
.Ft const char * .Ft const char *
.Fn magic_descriptor "magic_t cookie" "int fd"
.Ft const char *
.Fn magic_file "magic_t cookie" "const char *filename" .Fn magic_file "magic_t cookie" "const char *filename"
.Ft const char * .Ft const char *
.Fn magic_buffer "magic_t cookie" "const void *buffer" "size_t length" .Fn magic_buffer "magic_t cookie" "const void *buffer" "size_t length"
@ -97,6 +99,8 @@ and try to look in its contents.
Return a MIME type string, instead of a textual description. Return a MIME type string, instead of a textual description.
.It Dv MAGIC_MIME_ENCODING .It Dv MAGIC_MIME_ENCODING
Return a MIME encoding, instead of a textual description. Return a MIME encoding, instead of a textual description.
.It Dv MAGIC_MIME
A shorthand for MAGIC_MIME_TYPE | MAGIC_MIME_ENCODING.
.It Dv MAGIC_CONTINUE .It Dv MAGIC_CONTINUE
Return all matches, not just the first. Return all matches, not just the first.
.It Dv MAGIC_CHECK .It Dv MAGIC_CHECK
@ -106,32 +110,34 @@ On systems that support
.Xr utime 3 .Xr utime 3
or or
.Xr utimes 2 , .Xr utimes 2 ,
attempt to preserve the access time of files analyzed. attempt to preserve the access time of files analysed.
.It Dv MAGIC_RAW .It Dv MAGIC_RAW
Don't translate unprintable characters to a \eooo octal representation. Don't translate unprintable characters to a \eooo octal representation.
.It Dv MAGIC_ERROR .It Dv MAGIC_ERROR
Treat operating system errors while trying to open files and follow symlinks Treat operating system errors while trying to open files and follow symlinks
as real errors, instead of printing them in the magic buffer. as real errors, instead of printing them in the magic buffer.
.It Dv MAGIC_APPLE
Return the Apple creator and type.
.It Dv MAGIC_NO_CHECK_APPTYPE .It Dv MAGIC_NO_CHECK_APPTYPE
Check for Don't check for
.Dv EMX .Dv EMX
application type (only on EMX). application type (only on EMX).
.It Dv MAGIC_NO_CHECK_ASCII .It Dv MAGIC_NO_CHECK_CDF
Check for various types of ascii files. Don't get extra information on MS Composite Document Files.
.It Dv MAGIC_NO_CHECK_COMPRESS .It Dv MAGIC_NO_CHECK_COMPRESS
Don't look for, or inside compressed files. Don't look inside compressed files.
.It Dv MAGIC_NO_CHECK_ELF .It Dv MAGIC_NO_CHECK_ELF
Don't print elf details. Don't print ELF details.
.It Dv MAGIC_NO_CHECK_FORTRAN .It Dv MAGIC_NO_CHECK_ENCODING
Don't look for fortran sequences inside ascii files. Don't check text encodings.
.It Dv MAGIC_NO_CHECK_SOFT .It Dv MAGIC_NO_CHECK_SOFT
Don't consult magic files. Don't consult magic files.
.It Dv MAGIC_NO_CHECK_TAR .It Dv MAGIC_NO_CHECK_TAR
Don't examine tar files. Don't examine tar files.
.It Dv MAGIC_NO_CHECK_TEXT
Don't check for various types of text files.
.It Dv MAGIC_NO_CHECK_TOKENS .It Dv MAGIC_NO_CHECK_TOKENS
Don't look for known tokens inside ascii files. Don't look for known tokens inside ascii files.
.It Dv MAGIC_NO_CHECK_TROFF
Don't look for troff sequences inside ascii files.
.El .El
.Pp .Pp
The The
@ -166,6 +172,14 @@ is
then stdin is used. then stdin is used.
.Pp .Pp
The The
.Fn magic_descriptor
function returns a textual description of the contents of the
.Ar fd
argument, or
.Dv NULL
if an error occurred.
.Pp
The
.Fn magic_buffer .Fn magic_buffer
function returns a textual description of the contents of the function returns a textual description of the contents of the
.Ar buffer .Ar buffer

View file

@ -1,7 +1,7 @@
.\" $NetBSD: magic.5,v 1.4 2009/05/08 20:20:39 wiz Exp $ .\" $NetBSD: magic.5,v 1.6 2011/09/16 21:06:25 christos Exp $
.\" .\"
.\" $File: magic.man,v 1.59 2008/11/06 23:22:53 christos Exp $ .\" $File: magic.man,v 1.69 2011/05/13 22:11:44 christos Exp $
.Dd August 30, 2008 .Dd April 20, 2011
.Dt MAGIC 5 .Dt MAGIC 5
.Os .Os
.\" install as magic.4 on USG, magic.5 on V7, Berkeley and Linux systems. .\" install as magic.4 on USG, magic.5 on V7, Berkeley and Linux systems.
@ -12,7 +12,7 @@
This manual page documents the format of the magic file as This manual page documents the format of the magic file as
used by the used by the
.Xr file 1 .Xr file 1
command, version 5.03. command, version 5.09.
The The
.Xr file 1 .Xr file 1
command identifies the type of a file using, command identifies the type of a file using,
@ -53,9 +53,9 @@ A 64-bit double precision IEEE floating point number in this machine's native by
.It Dv string .It Dv string
A string of bytes. A string of bytes.
The string type specification can be optionally followed The string type specification can be optionally followed
by /[Bbc]*. by /[WwcCtb]*.
The The
.Dq B .Dq W
flag compacts whitespace in the target, which must flag compacts whitespace in the target, which must
contain at least one whitespace character. contain at least one whitespace character.
If the magic has If the magic has
@ -64,18 +64,55 @@ consecutive blanks, the target needs at least
.Dv n .Dv n
consecutive blanks to match. consecutive blanks to match.
The The
.Dq b .Dq w
flag treats every blank in the target as an optional blank. flag treats every blank in the target as an optional blank.
Finally the The
.Dq c .Dq c
flag, specifies case insensitive matching: lowercase flag, specifies case insensitive matching: lower case
characters in the magic match both lower and upper case characters in the characters in the magic match both lower and upper case characters in the
target, whereas upper case characters in the magic only match uppercase target, whereas upper case characters in the magic only match upper case
characters in the target. characters in the target.
The
.Dq C
flag, specifies case insensitive matching: upper case
characters in the magic match both lower and upper case characters in the
target, whereas lower case characters in the magic only match upper case
characters in the target.
To do a complete case insensitive match, specify both
.Dq c
and
.Dq C .
The
.Dq t
flag, forces the test to be done for text files, while the
.Dq b
flag, forces the test to be done for binary files.
.It Dv pstring .It Dv pstring
A Pascal-style string where the first byte is interpreted as the an A Pascal-style string where the first byte/short/int is interpreted as the an
unsigned length. unsigned length.
The length defaults to byte and can be specified as a modifier.
The following modifiers are supported:
.Bl -tag -compact -width B
.It B
A byte length (default).
.It H
A 2 byte big endian length.
.It h
A 2 byte big little length.
.It L
A 4 byte big endian length.
.It l
A 4 byte big little length.
.It J
The length includes itself in its count.
.El
The string is not NUL terminated. The string is not NUL terminated.
.Dq J
is used rather than the more
valuable
.Dq I
because this type of length is a feature of the JPEG
format.
.It Dv date .It Dv date
A four-byte value interpreted as a UNIX date. A four-byte value interpreted as a UNIX date.
.It Dv qdate .It Dv qdate
@ -292,7 +329,7 @@ then print the string), with
The special test The special test
.Em x .Em x
always evaluates to true. always evaluates to true.
.Dv message .It Dv message
The message to be printed if the comparison succeeds. The message to be printed if the comparison succeeds.
If the string contains a If the string contains a
.Xr printf 3 .Xr printf 3
@ -353,11 +390,11 @@ on the line indicates the level of the test; a line with no
.Em \*[Gt] .Em \*[Gt]
at the beginning is considered to be at level 0. at the beginning is considered to be at level 0.
Tests are arranged in a tree-like hierarchy: Tests are arranged in a tree-like hierarchy:
If a the test on a line at level if the test on a line at level
.Em n .Em n
succeeds, all following tests at level succeeds, all following tests at level
.Em n+1 .Em n+1
are performed, and the messages printed if the tests succeed, untile a line are performed, and the messages printed if the tests succeed, until a line
with level with level
.Em n .Em n
(or less) appears. (or less) appears.
@ -374,7 +411,7 @@ being examined.
If the first character following the last If the first character following the last
.Em \*[Gt] .Em \*[Gt]
is a is a
.Em ( .Em \&(
then the string after the parenthesis is interpreted as an indirect offset. then the string after the parenthesis is interpreted as an indirect offset.
That means that the number after the parenthesis is used as an offset in That means that the number after the parenthesis is used as an offset in
the file. the file.

View file

@ -1,38 +1,23 @@
#!/bin/sh #!/bin/sh
#
# $NetBSD: install-sh,v 1.4 2011/09/25 18:18:44 christos Exp $
# This script now also installs multiple files, but might choke on installing
# multiple files with spaces in the file names.
#
# install - install a program, script, or datafile # install - install a program, script, or datafile
# This comes from X11R5 (mit/util/scripts/install.sh).
scriptversion=2006-10-14.15
# 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 # Copyright 1991 by the Massachusetts Institute of Technology
# #
# Permission is hereby granted, free of charge, to any person obtaining a copy # Permission to use, copy, modify, distribute, and sell this software and its
# of this software and associated documentation files (the "Software"), to # documentation for any purpose is hereby granted without fee, provided that
# deal in the Software without restriction, including without limitation the # the above copyright notice appear in all copies and that both that
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # copyright notice and this permission notice appear in supporting
# sell copies of the Software, and to permit persons to whom the Software is # documentation, and that the name of M.I.T. not be used in advertising or
# furnished to do so, subject to the following conditions: # publicity pertaining to distribution of the software without specific,
# # written prior permission. M.I.T. makes no representations about the
# The above copyright notice and this permission notice shall be included in # suitability of this software for any purpose. It is provided "as is"
# all copies or substantial portions of the Software. # without express or implied warranty.
#
# 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 # Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it # `make' implicit rules from creating a file called install from it
@ -41,23 +26,15 @@ scriptversion=2006-10-14.15
# This script is compatible with the BSD install script, but was written # This script is compatible with the BSD install script, but was written
# from scratch. # from scratch.
nl='
'
IFS=" "" $nl"
# set DOITPROG to echo to test this script # set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it. # Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}" doit="${DOITPROG-}"
if test -z "$doit"; then
doit_exec=exec
else
doit_exec=$doit
fi
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
# put in absolute paths if you don't have them in your path; or use env. vars.
awkprog="${AWKPROG-awk}"
mvprog="${MVPROG-mv}" mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}" cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}" chmodprog="${CHMODPROG-chmod}"
@ -67,441 +44,248 @@ stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}" rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}" mkdirprog="${MKDIRPROG-mkdir}"
posix_glob= instcmd="$mvprog"
posix_mkdir= pathcompchmodcmd="$chmodprog 755"
chmodcmd="$chmodprog 755"
# Desired mode of installed file. chowncmd=""
mode=0755 chgrpcmd=""
stripcmd=""
chmodcmd=$chmodprog stripflags=""
chowncmd=
chgrpcmd=
stripcmd=
rmcmd="$rmprog -f" rmcmd="$rmprog -f"
mvcmd="$mvprog" mvcmd="$mvprog"
src= src=""
dst= msrc=""
dir_arg= dst=""
dstarg= dir_arg=""
no_target_directory= suffix=""
suffixfmt=""
usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE while [ x"$1" != x ]; do
or: $0 [OPTION]... SRCFILES... DIRECTORY case $1 in
or: $0 [OPTION]... -t DIRECTORY SRCFILES... -b) suffix=".old"
or: $0 [OPTION]... -d DIRECTORIES... shift
continue;;
In the 1st form, copy SRCFILE to DSTFILE. -B) suffixfmt="$2"
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. shift
In the 4th, create DIRECTORIES. shift
continue;;
Options: -c) instcmd="$cpprog"
-c (ignored) shift
-d create directories instead of installing files. continue;;
-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: -d) dir_arg=true
CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG shift
" continue;;
while test $# -ne 0; do -m) chmodcmd="$chmodprog $2"
case $1 in shift
-c) shift shift
continue;; continue;;
-d) dir_arg=true -o) chowncmd="$chownprog $2"
shift shift
continue;; shift
continue;;
-g) chgrpcmd="$chgrpprog $2" -g) chgrpcmd="$chgrpprog $2"
shift shift
shift shift
continue;; continue;;
--help) echo "$usage"; exit $?;; -s) stripcmd="$stripprog"
shift
continue;;
-m) mode=$2 -S) stripcmd="$stripprog"
shift stripflags="-S $2 $stripflags"
shift shift
case $mode in shift
*' '* | *' '* | *' continue;;
'* | *'*'* | *'?'* | *'['*)
echo "$0: invalid mode: $mode" >&2
exit 1;;
esac
continue;;
-o) chowncmd="$chownprog $2" *) if [ x"$msrc" = x ]
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 $?;;
--) shift
break;;
-*) echo "$0: invalid option: $1" >&2
exit 1;;
*) break;;
esac
done
if test $# -ne 0 && test -z "$dir_arg$dstarg"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
# 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
fi
if test $# -eq 0; 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
if test -z "$dir_arg"; then
trap '(exit $?); exit' 1 2 13 15
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
case $mode in
# Optimize common cases.
*644) cp_umask=133;;
*755) cp_umask=22;;
*[0-7])
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
fi
for src
do
# Protect names starting with `-'.
case $src in
-*) src=./$src ;;
esac
if test -n "$dir_arg"; then
dst=$src
dstdir=$dst
test -d "$dstdir"
dstdir_status=$?
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
dstdir=$dst
dst=$dstdir/`basename "$src"`
dstdir_status=0
else
# Prefer dirname, but fall back on a substitute if dirname fails.
dstdir=`
(dirname "$dst") 2>/dev/null ||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$dst" : 'X\(//\)[^/]' \| \
X"$dst" : 'X\(//\)$' \| \
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$dst" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'
`
test -d "$dstdir"
dstdir_status=$?
fi
fi
obsolete_mkdir_used=false
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
# Create intermediate dirs using mode 755 as modified by the umask.
# This is like FreeBSD 'install' as of 1997-10-28.
umask=`umask`
case $stripcmd.$umask in
# Optimize common cases.
*[2367][2367]) mkdir_umask=$umask;;
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
*[0-7])
mkdir_umask=`expr $umask + 22 \
- $umask % 100 % 40 + $umask % 20 \
- $umask % 10 % 4 + $umask % 2
`;;
*) mkdir_umask=$umask,go-w;;
esac
# With -d, create the new directory with the user-specified mode.
# Otherwise, rely on $mkdir_umask.
if test -n "$dir_arg"; then
mkdir_mode=-m$mode
else
mkdir_mode=
fi
posix_mkdir=false
case $umask in
*[123567][0-7][0-7])
# POSIX mkdir -p sets u+wx bits regardless of umask, which
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
if (umask $mkdir_umask &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
then then
if test -z "$dir_arg" || { msrc="$dst"
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writeable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
ls_ld_tmpdir=`ls -ld "$tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/d" "$tmpdir"
else else
# Remove any dirs left behind by ancient mkdir implementations. msrc="$msrc $dst"
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
fi fi
trap '' 0;; src="$dst"
esac;; dst="$1"
shift
continue;;
esac esac
if
$posix_mkdir && (
umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
# The umask is ridiculous, or mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
/*) prefix=/ ;;
-*) prefix=./ ;;
*) prefix= ;;
esac
case $posix_glob in
'')
if (set -f) 2>/dev/null; then
posix_glob=true
else
posix_glob=false
fi ;;
esac
oIFS=$IFS
IFS=/
$posix_glob && set -f
set fnord $dstdir
shift
$posix_glob && set +f
IFS=$oIFS
prefixes=
for d
do
test -z "$d" && continue
prefix=$prefix$d
if test -d "$prefix"; then
prefixes=
else
if $posix_mkdir; then
(umask=$mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1
else
case $prefix in
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
*) qprefix=$prefix;;
esac
prefixes="$prefixes '$qprefix'"
fi
fi
prefix=$prefix/
done
if test -n "$prefixes"; then
# Don't fail if two instances are running concurrently.
(umask $mkdir_umask &&
eval "\$doit_exec \$mkdirprog $prefixes") ||
test -d "$dstdir" || exit 1
obsolete_mkdir_used=true
fi
fi
fi
if test -n "$dir_arg"; then
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
else
# 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 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
# Copy the file name to the temp name.
(umask $cp_umask && $doit_exec $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 $mode "$dsttmp"; } &&
# Now rename the file to the real destination.
{ $doit $mvcmd -f "$dsttmp" "$dst" 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 "$dst"; then
$doit $rmcmd -f "$dst" 2>/dev/null \
|| { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \
&& { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\
|| {
echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1
}
else
:
fi
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst"
}
} || exit 1
trap '' 0
fi
done done
# Local variables: if [ x"$dir_arg" = x ]
# eval: (add-hook 'write-file-hooks 'time-stamp) then
# time-stamp-start: "scriptversion=" dstisfile=""
# time-stamp-format: "%:y-%02m-%02d.%02H" if [ ! -d "$dst" ]
# time-stamp-end: "$" then
# End: if [ x"$msrc" = x"$src" ]
then
dstisfile=true
else
echo "install: destination is not a directory"
exit 1
fi
fi
else
msrc="$msrc $dst"
fi
if [ x"$msrc" = x ]
then
echo "install: no destination specified"
exit 1
fi
for srcarg in $msrc; do
if [ x"$dir_arg" != x ]; then
dstarg="$srcarg"
else
dstarg="$dst"
# Waiting for this to be detected by the "$instcmd $srcarg $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if [ -f "$srcarg" ]
then
doinst="$instcmd"
elif [ -d "$srcarg" ]
then
echo "install: $srcarg: not a regular file"
exit 1
elif [ "$srcarg" = "/dev/null" ]
then
doinst="$cpprog"
else
echo "install: $srcarg does not exist"
exit 1
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
if [ -d "$dstarg" ]
then
dstarg="$dstarg"/`basename "$srcarg"`
fi
fi
## this sed command emulates the dirname command
dstdir=`echo "$dstarg" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
# Skip lots of stat calls in the usual case.
if [ ! -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 [ $# -ne 0 ] ; do
pathcomp="${pathcomp}${1}"
shift
if [ ! -d "${pathcomp}" ] ;
then
$doit $mkdirprog "${pathcomp}"
if [ x"$chowncmd" != x ]; then $doit $chowncmd "${pathcomp}"; else true ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "${pathcomp}"; else true ; fi &&
if [ x"$pathcompchmodcmd" != x ]; then $doit $pathcompchmodcmd "${pathcomp}"; else true ; fi
else
true
fi
pathcomp="${pathcomp}/"
done
fi
if [ x"$dir_arg" != x ]
then
if [ -d "$dstarg" ]; then
true
else
$doit $mkdirprog "$dstarg" &&
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dstarg"; else true ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dstarg"; else true ; fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dstarg"; else true ; fi
fi
else
if [ x"$dstisfile" = x ]
then
file=$srcarg
else
file=$dst
fi
dstfile=`basename "$file"`
dstfinal="$dstdir/$dstfile"
# Make a temp file name in the proper directory.
dsttmp=$dstdir/#inst.$$#
# Make a backup file name in the proper directory.
case x$suffixfmt in
*%*) suffix=`echo x |
$awkprog -v bname="$dstfinal" -v fmt="$suffixfmt" '
{ cnt = 0;
do {
sfx = sprintf(fmt, cnt++);
name = bname sfx;
} while (system("test -f " name) == 0);
print sfx; }' -`;;
x) ;;
*) suffix="$suffixfmt";;
esac
dstbackup="$dstfinal$suffix"
# Move or copy the file name to the temp name
$doit $doinst $srcarg "$dsttmp" &&
trap "rm -f ${dsttmp}" 0 &&
# 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 $instcmd $src $dsttmp" command.
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else true;fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else true;fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $stripflags "$dsttmp"; else true;fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else true;fi &&
# Now rename the file to the real destination.
if [ x"$suffix" != x ] && [ -f "$dstfinal" ]
then
$doit $mvcmd "$dstfinal" "$dstbackup"
else
$doit $rmcmd -f "$dstfinal"
fi &&
$doit $mvcmd "$dsttmp" "$dstfinal"
fi
done &&
exit 0

File diff suppressed because it is too large Load diff

7357
external/bsd/file/dist/m4/libtool.m4 vendored Normal file

File diff suppressed because it is too large Load diff

368
external/bsd/file/dist/m4/ltoptions.m4 vendored Normal file
View file

@ -0,0 +1,368 @@
# Helper functions for option handling. -*- Autoconf -*-
#
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
# Written by Gary V. Vaughan, 2004
#
# 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 ltoptions.m4
# This is to help aclocal find these macros, as it can't see m4_define.
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
# ------------------------------------------
m4_define([_LT_MANGLE_OPTION],
[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
# ---------------------------------------
# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
# matching handler defined, dispatch to it. Other OPTION-NAMEs are
# saved as a flag.
m4_define([_LT_SET_OPTION],
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
_LT_MANGLE_DEFUN([$1], [$2]),
[m4_warning([Unknown $1 option `$2'])])[]dnl
])
# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
# ------------------------------------------------------------
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
m4_define([_LT_IF_OPTION],
[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
# -------------------------------------------------------
# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
# are set.
m4_define([_LT_UNLESS_OPTIONS],
[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
[m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
[m4_define([$0_found])])])[]dnl
m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
])[]dnl
])
# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
# ----------------------------------------
# OPTION-LIST is a space-separated list of Libtool options associated
# with MACRO-NAME. If any OPTION has a matching handler declared with
# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
# the unknown option and exit.
m4_defun([_LT_SET_OPTIONS],
[# Set options
m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
[_LT_SET_OPTION([$1], _LT_Option)])
m4_if([$1],[LT_INIT],[
dnl
dnl Simply set some default values (i.e off) if boolean options were not
dnl specified:
_LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
])
_LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
])
dnl
dnl If no reference was made to various pairs of opposing options, then
dnl we run the default mode handler for the pair. For example, if neither
dnl `shared' nor `disable-shared' was passed, we enable building of shared
dnl archives by default:
_LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
_LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
_LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
_LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
[_LT_ENABLE_FAST_INSTALL])
])
])# _LT_SET_OPTIONS
## --------------------------------- ##
## Macros to handle LT_INIT options. ##
## --------------------------------- ##
# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
# -----------------------------------------
m4_define([_LT_MANGLE_DEFUN],
[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
# -----------------------------------------------
m4_define([LT_OPTION_DEFINE],
[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
])# LT_OPTION_DEFINE
# dlopen
# ------
LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
])
AU_DEFUN([AC_LIBTOOL_DLOPEN],
[_LT_SET_OPTION([LT_INIT], [dlopen])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you
put the `dlopen' option into LT_INIT's first parameter.])
])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
# win32-dll
# ---------
# Declare package support for building win32 dll's.
LT_OPTION_DEFINE([LT_INIT], [win32-dll],
[enable_win32_dll=yes
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
AC_CHECK_TOOL(AS, as, false)
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
AC_CHECK_TOOL(OBJDUMP, objdump, false)
;;
esac
test -z "$AS" && AS=as
_LT_DECL([], [AS], [0], [Assembler program])dnl
test -z "$DLLTOOL" && DLLTOOL=dlltool
_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
test -z "$OBJDUMP" && OBJDUMP=objdump
_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
])# win32-dll
AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
_LT_SET_OPTION([LT_INIT], [win32-dll])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you
put the `win32-dll' option into LT_INIT's first parameter.])
])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
# _LT_ENABLE_SHARED([DEFAULT])
# ----------------------------
# implement the --enable-shared flag, and supports the `shared' and
# `disable-shared' LT_INIT options.
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
m4_define([_LT_ENABLE_SHARED],
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
AC_ARG_ENABLE([shared],
[AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
[p=${PACKAGE-default}
case $enableval in
yes) enable_shared=yes ;;
no) enable_shared=no ;;
*)
enable_shared=no
# Look at the argument we got. We use all the common list separators.
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
for pkg in $enableval; do
IFS="$lt_save_ifs"
if test "X$pkg" = "X$p"; then
enable_shared=yes
fi
done
IFS="$lt_save_ifs"
;;
esac],
[enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
_LT_DECL([build_libtool_libs], [enable_shared], [0],
[Whether or not to build shared libraries])
])# _LT_ENABLE_SHARED
LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
# Old names:
AC_DEFUN([AC_ENABLE_SHARED],
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
])
AC_DEFUN([AC_DISABLE_SHARED],
[_LT_SET_OPTION([LT_INIT], [disable-shared])
])
AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AM_ENABLE_SHARED], [])
dnl AC_DEFUN([AM_DISABLE_SHARED], [])
# _LT_ENABLE_STATIC([DEFAULT])
# ----------------------------
# implement the --enable-static flag, and support the `static' and
# `disable-static' LT_INIT options.
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
m4_define([_LT_ENABLE_STATIC],
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
AC_ARG_ENABLE([static],
[AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
[p=${PACKAGE-default}
case $enableval in
yes) enable_static=yes ;;
no) enable_static=no ;;
*)
enable_static=no
# Look at the argument we got. We use all the common list separators.
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
for pkg in $enableval; do
IFS="$lt_save_ifs"
if test "X$pkg" = "X$p"; then
enable_static=yes
fi
done
IFS="$lt_save_ifs"
;;
esac],
[enable_static=]_LT_ENABLE_STATIC_DEFAULT)
_LT_DECL([build_old_libs], [enable_static], [0],
[Whether or not to build static libraries])
])# _LT_ENABLE_STATIC
LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
# Old names:
AC_DEFUN([AC_ENABLE_STATIC],
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
])
AC_DEFUN([AC_DISABLE_STATIC],
[_LT_SET_OPTION([LT_INIT], [disable-static])
])
AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AM_ENABLE_STATIC], [])
dnl AC_DEFUN([AM_DISABLE_STATIC], [])
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
# ----------------------------------
# implement the --enable-fast-install flag, and support the `fast-install'
# and `disable-fast-install' LT_INIT options.
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
m4_define([_LT_ENABLE_FAST_INSTALL],
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
AC_ARG_ENABLE([fast-install],
[AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
[optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
[p=${PACKAGE-default}
case $enableval in
yes) enable_fast_install=yes ;;
no) enable_fast_install=no ;;
*)
enable_fast_install=no
# Look at the argument we got. We use all the common list separators.
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
for pkg in $enableval; do
IFS="$lt_save_ifs"
if test "X$pkg" = "X$p"; then
enable_fast_install=yes
fi
done
IFS="$lt_save_ifs"
;;
esac],
[enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
_LT_DECL([fast_install], [enable_fast_install], [0],
[Whether or not to optimize for fast installation])dnl
])# _LT_ENABLE_FAST_INSTALL
LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
# Old names:
AU_DEFUN([AC_ENABLE_FAST_INSTALL],
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
the `fast-install' option into LT_INIT's first parameter.])
])
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
the `disable-fast-install' option into LT_INIT's first parameter.])
])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
# _LT_WITH_PIC([MODE])
# --------------------
# implement the --with-pic flag, and support the `pic-only' and `no-pic'
# LT_INIT options.
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
m4_define([_LT_WITH_PIC],
[AC_ARG_WITH([pic],
[AS_HELP_STRING([--with-pic],
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
[pic_mode="$withval"],
[pic_mode=default])
test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
])# _LT_WITH_PIC
LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
# Old name:
AU_DEFUN([AC_LIBTOOL_PICMODE],
[_LT_SET_OPTION([LT_INIT], [pic-only])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you
put the `pic-only' option into LT_INIT's first parameter.])
])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
## ----------------- ##
## LTDL_INIT Options ##
## ----------------- ##
m4_define([_LTDL_MODE], [])
LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
[m4_define([_LTDL_MODE], [nonrecursive])])
LT_OPTION_DEFINE([LTDL_INIT], [recursive],
[m4_define([_LTDL_MODE], [recursive])])
LT_OPTION_DEFINE([LTDL_INIT], [subproject],
[m4_define([_LTDL_MODE], [subproject])])
m4_define([_LTDL_TYPE], [])
LT_OPTION_DEFINE([LTDL_INIT], [installable],
[m4_define([_LTDL_TYPE], [installable])])
LT_OPTION_DEFINE([LTDL_INIT], [convenience],
[m4_define([_LTDL_TYPE], [convenience])])

123
external/bsd/file/dist/m4/ltsugar.m4 vendored Normal file
View file

@ -0,0 +1,123 @@
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
#
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
# Written by Gary V. Vaughan, 2004
#
# 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 ltsugar.m4
# This is to help aclocal find these macros, as it can't see m4_define.
AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
# lt_join(SEP, ARG1, [ARG2...])
# -----------------------------
# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
# associated separator.
# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
# versions in m4sugar had bugs.
m4_define([lt_join],
[m4_if([$#], [1], [],
[$#], [2], [[$2]],
[m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
m4_define([_lt_join],
[m4_if([$#$2], [2], [],
[m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
# lt_car(LIST)
# lt_cdr(LIST)
# ------------
# Manipulate m4 lists.
# These macros are necessary as long as will still need to support
# Autoconf-2.59 which quotes differently.
m4_define([lt_car], [[$1]])
m4_define([lt_cdr],
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
[$#], 1, [],
[m4_dquote(m4_shift($@))])])
m4_define([lt_unquote], $1)
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
# ------------------------------------------
# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
# Note that neither SEPARATOR nor STRING are expanded; they are appended
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
# than defined and empty).
#
# This macro is needed until we can rely on Autoconf 2.62, since earlier
# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
m4_define([lt_append],
[m4_define([$1],
m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
# ----------------------------------------------------------
# Produce a SEP delimited list of all paired combinations of elements of
# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
# has the form PREFIXmINFIXSUFFIXn.
# Needed until we can rely on m4_combine added in Autoconf 2.62.
m4_define([lt_combine],
[m4_if(m4_eval([$# > 3]), [1],
[m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
[[m4_foreach([_Lt_prefix], [$2],
[m4_foreach([_Lt_suffix],
]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
# -----------------------------------------------------------------------
# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
m4_define([lt_if_append_uniq],
[m4_ifdef([$1],
[m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
[lt_append([$1], [$2], [$3])$4],
[$5])],
[lt_append([$1], [$2], [$3])$4])])
# lt_dict_add(DICT, KEY, VALUE)
# -----------------------------
m4_define([lt_dict_add],
[m4_define([$1($2)], [$3])])
# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
# --------------------------------------------
m4_define([lt_dict_add_subkey],
[m4_define([$1($2:$3)], [$4])])
# lt_dict_fetch(DICT, KEY, [SUBKEY])
# ----------------------------------
m4_define([lt_dict_fetch],
[m4_ifval([$3],
m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
# -----------------------------------------------------------------
m4_define([lt_if_dict_fetch],
[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
[$5],
[$6])])
# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
# --------------------------------------------------------------
m4_define([lt_dict_filter],
[m4_if([$5], [], [],
[lt_join(m4_quote(m4_default([$4], [[, ]])),
lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
[lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
])

23
external/bsd/file/dist/m4/ltversion.m4 vendored Normal file
View file

@ -0,0 +1,23 @@
# ltversion.m4 -- version numbers -*- Autoconf -*-
#
# Copyright (C) 2004 Free Software Foundation, Inc.
# Written by Scott James Remnant, 2004
#
# 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.
# Generated from ltversion.in.
# serial 3017 ltversion.m4
# This file is part of GNU Libtool
m4_define([LT_PACKAGE_VERSION], [2.2.6b])
m4_define([LT_PACKAGE_REVISION], [1.3017])
AC_DEFUN([LTVERSION_VERSION],
[macro_version='2.2.6b'
macro_revision='1.3017'
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
_LT_DECL(, macro_revision, 0)
])

View file

@ -0,0 +1,92 @@
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
#
# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
# Written by Scott James Remnant, 2004.
#
# 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 lt~obsolete.m4
# These exist entirely to fool aclocal when bootstrapping libtool.
#
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
# which have later been changed to m4_define as they aren't part of the
# exported API, or moved to Autoconf or Automake where they belong.
#
# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
# using a macro with the same name in our local m4/libtool.m4 it'll
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
# and doesn't know about Autoconf macros at all.)
#
# So we provide this file, which has a silly filename so it's always
# included after everything else. This provides aclocal with the
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
# because those macros already exist, or will be overwritten later.
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
#
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
# Yes, that means every name once taken will need to remain here until
# we give up compatibility with versions before 1.7, at which point
# we need to keep only those names which we still refer to.
# This is to help aclocal find these macros, as it can't see m4_define.
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])])
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])

View file

@ -1,5 +1,5 @@
# Magic
# Magic data for file(1) command. # Magic data for file(1) command.
# Machine-generated from src/cmd/file/magdir/*; edit there only!
# Format is described in magic(files), where: # Format is described in magic(files), where:
# files is 5 on V7 and BSD, 4 on SV, and ?? in the SVID. # files is 5 on V7 and BSD, 4 on SV, and ?? on SVID.
# Don't edit this file, edit /etc/magic or send your magic improvements
# to the maintainers, at file@mx.gw.com

View file

@ -1,18 +1,20 @@
# #
# $File: Makefile.am,v 1.45 2009/03/05 22:40:59 christos Exp $ # $File: Makefile.am,v 1.73 2011/09/08 21:58:42 christos Exp $
# #
MAGIC_FRAGMENT_BASE = magdir MAGIC_FRAGMENT_BASE = magdir
MAGIC_FRAGMENT_DIR = $(top_srcdir)/magic/$(MAGIC_FRAGMENT_BASE) MAGIC_DIR = $(top_srcdir)/magic
MAGIC_FRAGMENT_DIR = $(MAGIC_DIR)/$(MAGIC_FRAGMENT_BASE)
pkgdata_DATA = magic.mgc pkgdata_DATA = magic.mgc
EXTRA_DIST = Header Localstuff \ EXTRA_DIST = \
$(MAGIC_DIR)/Header \
$(MAGIC_DIR)/Localstuff \
$(MAGIC_FRAGMENT_DIR)/acorn \ $(MAGIC_FRAGMENT_DIR)/acorn \
$(MAGIC_FRAGMENT_DIR)/adi \ $(MAGIC_FRAGMENT_DIR)/adi \
$(MAGIC_FRAGMENT_DIR)/adventure \ $(MAGIC_FRAGMENT_DIR)/adventure \
$(MAGIC_FRAGMENT_DIR)/allegro \ $(MAGIC_FRAGMENT_DIR)/allegro \
$(MAGIC_FRAGMENT_DIR)/alliant \ $(MAGIC_FRAGMENT_DIR)/alliant \
$(MAGIC_FRAGMENT_DIR)/alpha \
$(MAGIC_FRAGMENT_DIR)/amanda \ $(MAGIC_FRAGMENT_DIR)/amanda \
$(MAGIC_FRAGMENT_DIR)/amigaos \ $(MAGIC_FRAGMENT_DIR)/amigaos \
$(MAGIC_FRAGMENT_DIR)/animation \ $(MAGIC_FRAGMENT_DIR)/animation \
@ -25,10 +27,12 @@ $(MAGIC_FRAGMENT_DIR)/att3b \
$(MAGIC_FRAGMENT_DIR)/audio \ $(MAGIC_FRAGMENT_DIR)/audio \
$(MAGIC_FRAGMENT_DIR)/basis \ $(MAGIC_FRAGMENT_DIR)/basis \
$(MAGIC_FRAGMENT_DIR)/bflt \ $(MAGIC_FRAGMENT_DIR)/bflt \
$(MAGIC_FRAGMENT_DIR)/blcr \
$(MAGIC_FRAGMENT_DIR)/blender \ $(MAGIC_FRAGMENT_DIR)/blender \
$(MAGIC_FRAGMENT_DIR)/blit \ $(MAGIC_FRAGMENT_DIR)/blit \
$(MAGIC_FRAGMENT_DIR)/bout \ $(MAGIC_FRAGMENT_DIR)/bout \
$(MAGIC_FRAGMENT_DIR)/bsdi \ $(MAGIC_FRAGMENT_DIR)/bsdi \
$(MAGIC_FRAGMENT_DIR)/bsi \
$(MAGIC_FRAGMENT_DIR)/btsnoop \ $(MAGIC_FRAGMENT_DIR)/btsnoop \
$(MAGIC_FRAGMENT_DIR)/c-lang \ $(MAGIC_FRAGMENT_DIR)/c-lang \
$(MAGIC_FRAGMENT_DIR)/c64 \ $(MAGIC_FRAGMENT_DIR)/c64 \
@ -56,6 +60,7 @@ $(MAGIC_FRAGMENT_DIR)/digital \
$(MAGIC_FRAGMENT_DIR)/dolby \ $(MAGIC_FRAGMENT_DIR)/dolby \
$(MAGIC_FRAGMENT_DIR)/dump \ $(MAGIC_FRAGMENT_DIR)/dump \
$(MAGIC_FRAGMENT_DIR)/dyadic \ $(MAGIC_FRAGMENT_DIR)/dyadic \
$(MAGIC_FRAGMENT_DIR)/ebml \
$(MAGIC_FRAGMENT_DIR)/editors \ $(MAGIC_FRAGMENT_DIR)/editors \
$(MAGIC_FRAGMENT_DIR)/efi \ $(MAGIC_FRAGMENT_DIR)/efi \
$(MAGIC_FRAGMENT_DIR)/elf \ $(MAGIC_FRAGMENT_DIR)/elf \
@ -71,8 +76,10 @@ $(MAGIC_FRAGMENT_DIR)/fortran \
$(MAGIC_FRAGMENT_DIR)/frame \ $(MAGIC_FRAGMENT_DIR)/frame \
$(MAGIC_FRAGMENT_DIR)/freebsd \ $(MAGIC_FRAGMENT_DIR)/freebsd \
$(MAGIC_FRAGMENT_DIR)/fsav \ $(MAGIC_FRAGMENT_DIR)/fsav \
$(MAGIC_FRAGMENT_DIR)/fusecompress \
$(MAGIC_FRAGMENT_DIR)/games \ $(MAGIC_FRAGMENT_DIR)/games \
$(MAGIC_FRAGMENT_DIR)/gcc \ $(MAGIC_FRAGMENT_DIR)/gcc \
$(MAGIC_FRAGMENT_DIR)/geo \
$(MAGIC_FRAGMENT_DIR)/geos \ $(MAGIC_FRAGMENT_DIR)/geos \
$(MAGIC_FRAGMENT_DIR)/gimp \ $(MAGIC_FRAGMENT_DIR)/gimp \
$(MAGIC_FRAGMENT_DIR)/gnome-keyring \ $(MAGIC_FRAGMENT_DIR)/gnome-keyring \
@ -93,6 +100,7 @@ $(MAGIC_FRAGMENT_DIR)/intel \
$(MAGIC_FRAGMENT_DIR)/interleaf \ $(MAGIC_FRAGMENT_DIR)/interleaf \
$(MAGIC_FRAGMENT_DIR)/island \ $(MAGIC_FRAGMENT_DIR)/island \
$(MAGIC_FRAGMENT_DIR)/ispell \ $(MAGIC_FRAGMENT_DIR)/ispell \
$(MAGIC_FRAGMENT_DIR)/isz \
$(MAGIC_FRAGMENT_DIR)/java \ $(MAGIC_FRAGMENT_DIR)/java \
$(MAGIC_FRAGMENT_DIR)/jpeg \ $(MAGIC_FRAGMENT_DIR)/jpeg \
$(MAGIC_FRAGMENT_DIR)/karma \ $(MAGIC_FRAGMENT_DIR)/karma \
@ -111,11 +119,13 @@ $(MAGIC_FRAGMENT_DIR)/macintosh \
$(MAGIC_FRAGMENT_DIR)/magic \ $(MAGIC_FRAGMENT_DIR)/magic \
$(MAGIC_FRAGMENT_DIR)/mail.news \ $(MAGIC_FRAGMENT_DIR)/mail.news \
$(MAGIC_FRAGMENT_DIR)/maple \ $(MAGIC_FRAGMENT_DIR)/maple \
$(MAGIC_FRAGMENT_DIR)/marc21 \
$(MAGIC_FRAGMENT_DIR)/mathcad \ $(MAGIC_FRAGMENT_DIR)/mathcad \
$(MAGIC_FRAGMENT_DIR)/mathematica \ $(MAGIC_FRAGMENT_DIR)/mathematica \
$(MAGIC_FRAGMENT_DIR)/matroska \ $(MAGIC_FRAGMENT_DIR)/matroska \
$(MAGIC_FRAGMENT_DIR)/mcrypt \ $(MAGIC_FRAGMENT_DIR)/mcrypt \
$(MAGIC_FRAGMENT_DIR)/mercurial \ $(MAGIC_FRAGMENT_DIR)/mercurial \
$(MAGIC_FRAGMENT_DIR)/metastore \
$(MAGIC_FRAGMENT_DIR)/mime \ $(MAGIC_FRAGMENT_DIR)/mime \
$(MAGIC_FRAGMENT_DIR)/mips \ $(MAGIC_FRAGMENT_DIR)/mips \
$(MAGIC_FRAGMENT_DIR)/mirage \ $(MAGIC_FRAGMENT_DIR)/mirage \
@ -127,6 +137,7 @@ $(MAGIC_FRAGMENT_DIR)/modem \
$(MAGIC_FRAGMENT_DIR)/motorola \ $(MAGIC_FRAGMENT_DIR)/motorola \
$(MAGIC_FRAGMENT_DIR)/mozilla \ $(MAGIC_FRAGMENT_DIR)/mozilla \
$(MAGIC_FRAGMENT_DIR)/msdos \ $(MAGIC_FRAGMENT_DIR)/msdos \
$(MAGIC_FRAGMENT_DIR)/msooxml \
$(MAGIC_FRAGMENT_DIR)/msvc \ $(MAGIC_FRAGMENT_DIR)/msvc \
$(MAGIC_FRAGMENT_DIR)/mup \ $(MAGIC_FRAGMENT_DIR)/mup \
$(MAGIC_FRAGMENT_DIR)/natinst \ $(MAGIC_FRAGMENT_DIR)/natinst \
@ -136,6 +147,7 @@ $(MAGIC_FRAGMENT_DIR)/netscape \
$(MAGIC_FRAGMENT_DIR)/netware \ $(MAGIC_FRAGMENT_DIR)/netware \
$(MAGIC_FRAGMENT_DIR)/news \ $(MAGIC_FRAGMENT_DIR)/news \
$(MAGIC_FRAGMENT_DIR)/nitpicker \ $(MAGIC_FRAGMENT_DIR)/nitpicker \
$(MAGIC_FRAGMENT_DIR)/oasis \
$(MAGIC_FRAGMENT_DIR)/ocaml \ $(MAGIC_FRAGMENT_DIR)/ocaml \
$(MAGIC_FRAGMENT_DIR)/octave \ $(MAGIC_FRAGMENT_DIR)/octave \
$(MAGIC_FRAGMENT_DIR)/ole2compounddocs \ $(MAGIC_FRAGMENT_DIR)/ole2compounddocs \
@ -146,6 +158,7 @@ $(MAGIC_FRAGMENT_DIR)/os9 \
$(MAGIC_FRAGMENT_DIR)/osf1 \ $(MAGIC_FRAGMENT_DIR)/osf1 \
$(MAGIC_FRAGMENT_DIR)/palm \ $(MAGIC_FRAGMENT_DIR)/palm \
$(MAGIC_FRAGMENT_DIR)/parix \ $(MAGIC_FRAGMENT_DIR)/parix \
$(MAGIC_FRAGMENT_DIR)/parrot \
$(MAGIC_FRAGMENT_DIR)/pbm \ $(MAGIC_FRAGMENT_DIR)/pbm \
$(MAGIC_FRAGMENT_DIR)/pdf \ $(MAGIC_FRAGMENT_DIR)/pdf \
$(MAGIC_FRAGMENT_DIR)/pdp \ $(MAGIC_FRAGMENT_DIR)/pdp \
@ -157,12 +170,12 @@ $(MAGIC_FRAGMENT_DIR)/plus5 \
$(MAGIC_FRAGMENT_DIR)/printer \ $(MAGIC_FRAGMENT_DIR)/printer \
$(MAGIC_FRAGMENT_DIR)/project \ $(MAGIC_FRAGMENT_DIR)/project \
$(MAGIC_FRAGMENT_DIR)/psdbms \ $(MAGIC_FRAGMENT_DIR)/psdbms \
$(MAGIC_FRAGMENT_DIR)/psion \
$(MAGIC_FRAGMENT_DIR)/pulsar \ $(MAGIC_FRAGMENT_DIR)/pulsar \
$(MAGIC_FRAGMENT_DIR)/pyramid \ $(MAGIC_FRAGMENT_DIR)/pyramid \
$(MAGIC_FRAGMENT_DIR)/python \ $(MAGIC_FRAGMENT_DIR)/python \
$(MAGIC_FRAGMENT_DIR)/revision \ $(MAGIC_FRAGMENT_DIR)/revision \
$(MAGIC_FRAGMENT_DIR)/riff \ $(MAGIC_FRAGMENT_DIR)/riff \
$(MAGIC_FRAGMENT_DIR)/rinex \
$(MAGIC_FRAGMENT_DIR)/rpm \ $(MAGIC_FRAGMENT_DIR)/rpm \
$(MAGIC_FRAGMENT_DIR)/rtf \ $(MAGIC_FRAGMENT_DIR)/rtf \
$(MAGIC_FRAGMENT_DIR)/ruby \ $(MAGIC_FRAGMENT_DIR)/ruby \
@ -170,21 +183,27 @@ $(MAGIC_FRAGMENT_DIR)/sc \
$(MAGIC_FRAGMENT_DIR)/sccs \ $(MAGIC_FRAGMENT_DIR)/sccs \
$(MAGIC_FRAGMENT_DIR)/scientific \ $(MAGIC_FRAGMENT_DIR)/scientific \
$(MAGIC_FRAGMENT_DIR)/securitycerts \ $(MAGIC_FRAGMENT_DIR)/securitycerts \
$(MAGIC_FRAGMENT_DIR)/selinux \
$(MAGIC_FRAGMENT_DIR)/sendmail \ $(MAGIC_FRAGMENT_DIR)/sendmail \
$(MAGIC_FRAGMENT_DIR)/sequent \ $(MAGIC_FRAGMENT_DIR)/sequent \
$(MAGIC_FRAGMENT_DIR)/sgi \ $(MAGIC_FRAGMENT_DIR)/sgi \
$(MAGIC_FRAGMENT_DIR)/sgml \ $(MAGIC_FRAGMENT_DIR)/sgml \
$(MAGIC_FRAGMENT_DIR)/sharc \ $(MAGIC_FRAGMENT_DIR)/sharc \
$(MAGIC_FRAGMENT_DIR)/sinclair \ $(MAGIC_FRAGMENT_DIR)/sinclair \
$(MAGIC_FRAGMENT_DIR)/sisu \
$(MAGIC_FRAGMENT_DIR)/sketch \ $(MAGIC_FRAGMENT_DIR)/sketch \
$(MAGIC_FRAGMENT_DIR)/smalltalk \ $(MAGIC_FRAGMENT_DIR)/smalltalk \
$(MAGIC_FRAGMENT_DIR)/smile \
$(MAGIC_FRAGMENT_DIR)/sniffer \ $(MAGIC_FRAGMENT_DIR)/sniffer \
$(MAGIC_FRAGMENT_DIR)/softquad \ $(MAGIC_FRAGMENT_DIR)/softquad \
$(MAGIC_FRAGMENT_DIR)/spec \ $(MAGIC_FRAGMENT_DIR)/spec \
$(MAGIC_FRAGMENT_DIR)/spectrum \ $(MAGIC_FRAGMENT_DIR)/spectrum \
$(MAGIC_FRAGMENT_DIR)/sql \ $(MAGIC_FRAGMENT_DIR)/sql \
$(MAGIC_FRAGMENT_DIR)/ssh \
$(MAGIC_FRAGMENT_DIR)/ssl \
$(MAGIC_FRAGMENT_DIR)/sun \ $(MAGIC_FRAGMENT_DIR)/sun \
$(MAGIC_FRAGMENT_DIR)/sysex \ $(MAGIC_FRAGMENT_DIR)/sysex \
$(MAGIC_FRAGMENT_DIR)/tcl \
$(MAGIC_FRAGMENT_DIR)/teapot \ $(MAGIC_FRAGMENT_DIR)/teapot \
$(MAGIC_FRAGMENT_DIR)/terminfo \ $(MAGIC_FRAGMENT_DIR)/terminfo \
$(MAGIC_FRAGMENT_DIR)/tex \ $(MAGIC_FRAGMENT_DIR)/tex \
@ -201,6 +220,7 @@ $(MAGIC_FRAGMENT_DIR)/varied.out \
$(MAGIC_FRAGMENT_DIR)/varied.script \ $(MAGIC_FRAGMENT_DIR)/varied.script \
$(MAGIC_FRAGMENT_DIR)/vax \ $(MAGIC_FRAGMENT_DIR)/vax \
$(MAGIC_FRAGMENT_DIR)/vicar \ $(MAGIC_FRAGMENT_DIR)/vicar \
$(MAGIC_FRAGMENT_DIR)/virtual \
$(MAGIC_FRAGMENT_DIR)/virtutech \ $(MAGIC_FRAGMENT_DIR)/virtutech \
$(MAGIC_FRAGMENT_DIR)/visx \ $(MAGIC_FRAGMENT_DIR)/visx \
$(MAGIC_FRAGMENT_DIR)/vms \ $(MAGIC_FRAGMENT_DIR)/vms \
@ -212,6 +232,7 @@ $(MAGIC_FRAGMENT_DIR)/weak \
$(MAGIC_FRAGMENT_DIR)/windows \ $(MAGIC_FRAGMENT_DIR)/windows \
$(MAGIC_FRAGMENT_DIR)/wireless \ $(MAGIC_FRAGMENT_DIR)/wireless \
$(MAGIC_FRAGMENT_DIR)/wordprocessors \ $(MAGIC_FRAGMENT_DIR)/wordprocessors \
$(MAGIC_FRAGMENT_DIR)/wsdl \
$(MAGIC_FRAGMENT_DIR)/xdelta \ $(MAGIC_FRAGMENT_DIR)/xdelta \
$(MAGIC_FRAGMENT_DIR)/xenix \ $(MAGIC_FRAGMENT_DIR)/xenix \
$(MAGIC_FRAGMENT_DIR)/xilinx \ $(MAGIC_FRAGMENT_DIR)/xilinx \
@ -221,10 +242,10 @@ $(MAGIC_FRAGMENT_DIR)/zilog \
$(MAGIC_FRAGMENT_DIR)/zyxel $(MAGIC_FRAGMENT_DIR)/zyxel
MAGIC = magic.mgc MAGIC = magic.mgc
CLEANFILES = ${MAGIC} CLEANFILES = ${MAGIC} $(MAGIC_FRAGMENT_DIR)/Localstuff
# FIXME: Build file natively as well so that it can be used to compile # FIXME: Build file natively as well so that it can be used to compile
# the target's magic file # the target's magic file; for now we bail if the local version does not match
if IS_CROSS_COMPILE if IS_CROSS_COMPILE
FILE_COMPILE = file FILE_COMPILE = file
FILE_COMPILE_DEP = FILE_COMPILE_DEP =
@ -234,5 +255,18 @@ FILE_COMPILE_DEP = $(FILE_COMPILE)
endif endif
${MAGIC}: $(EXTRA_DIST) $(FILE_COMPILE_DEP) ${MAGIC}: $(EXTRA_DIST) $(FILE_COMPILE_DEP)
$(FILE_COMPILE) -C -m $(MAGIC_FRAGMENT_DIR) @rm -fr magic
@mv $(MAGIC_FRAGMENT_BASE).mgc $@ @mkdir magic && cp -p $(EXTRA_DIST) magic
@(if expr "${FILE_COMPILE}" : '.*/.*' > /dev/null; then \
echo "Using ${FILE_COMPILE} to generate ${MAGIC}" > /dev/null; \
else \
v=$$(file --version | sed -e s/file-// -e q); \
if [ "$$v" != "${PACKAGE_VERSION}" ]; then \
echo "Cannot use the installed version of file ($$v) to"; \
echo "cross-compile file ${PACKAGE_VERSION}"; \
echo "Please install file ${PACKAGE_VERSION} locally first"; \
exit 1; \
fi; \
fi)
$(FILE_COMPILE) -C -m magic
@rm -fr magic

View file

@ -1,8 +1,9 @@
# Makefile.in generated by automake 1.10 from Makefile.am. # Makefile.in generated by automake 1.11 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved. # with or without modifications, as long as this notice is preserved.
@ -15,8 +16,9 @@
@SET_MAKE@ @SET_MAKE@
VPATH = @srcdir@ VPATH = @srcdir@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644 install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c install_sh_PROGRAM = $(install_sh) -c
@ -34,13 +36,22 @@ host_triplet = @host@
subdir = magic subdir = magic
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/configure.ac $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4) $(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_GEN = $(am__v_GEN_$(V))
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
am__v_GEN_0 = @echo " GEN " $@;
AM_V_at = $(am__v_at_$(V))
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
am__v_at_0 = @
SOURCES = SOURCES =
DIST_SOURCES = DIST_SOURCES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@ -48,14 +59,29 @@ am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \ *) f=$$p;; \
esac; esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; 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)" am__installdirs = "$(DESTDIR)$(pkgdatadir)"
pkgdataDATA_INSTALL = $(INSTALL_DATA)
DATA = $(pkgdata_DATA) DATA = $(pkgdata_DATA)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
pkgdatadir = @pkgdatadir@ pkgdatadir = @pkgdatadir@
ACLOCAL = @ACLOCAL@ ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@ AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@ AR = @AR@
AUTOCONF = @AUTOCONF@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@ AUTOHEADER = @AUTOHEADER@
@ -66,43 +92,47 @@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
CPP = @CPP@ CPP = @CPP@
CPPFLAGS = @CPPFLAGS@ CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@ CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@ DEFS = @DEFS@
DEPDIR = @DEPDIR@ DEPDIR = @DEPDIR@
DSYMUTIL = @DSYMUTIL@ DSYMUTIL = @DSYMUTIL@
ECHO = @ECHO@ DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@ ECHO_T = @ECHO_T@
EGREP = @EGREP@ EGREP = @EGREP@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
F77 = @F77@ FGREP = @FGREP@
FFLAGS = @FFLAGS@
GREP = @GREP@ GREP = @GREP@
INSTALL = @INSTALL@ INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@ LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@ LIBS = @LIBS@
LIBTOOL = @LIBTOOL@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MINGW = @MINGW@
MKDIR_P = @MKDIR_P@ MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@ OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
@ -117,8 +147,7 @@ abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@ abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@ abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@ ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
ac_ct_F77 = @ac_ct_F77@
am__include = @am__include@ am__include = @am__include@
am__leading_dot = @am__leading_dot@ am__leading_dot = @am__leading_dot@
am__quote = @am__quote@ am__quote = @am__quote@
@ -150,6 +179,7 @@ libdir = @libdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
localedir = @localedir@ localedir = @localedir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@ mandir = @mandir@
mkdir_p = @mkdir_p@ mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@ oldincludedir = @oldincludedir@
@ -162,22 +192,25 @@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@ srcdir = @srcdir@
sysconfdir = @sysconfdir@ sysconfdir = @sysconfdir@
target_alias = @target_alias@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@ top_srcdir = @top_srcdir@
# #
# $File: Makefile.am,v 1.45 2009/03/05 22:40:59 christos Exp $ # $File: Makefile.am,v 1.73 2011/09/08 21:58:42 christos Exp $
# #
MAGIC_FRAGMENT_BASE = magdir MAGIC_FRAGMENT_BASE = magdir
MAGIC_FRAGMENT_DIR = $(top_srcdir)/magic/$(MAGIC_FRAGMENT_BASE) MAGIC_DIR = $(top_srcdir)/magic
MAGIC_FRAGMENT_DIR = $(MAGIC_DIR)/$(MAGIC_FRAGMENT_BASE)
pkgdata_DATA = magic.mgc pkgdata_DATA = magic.mgc
EXTRA_DIST = Header Localstuff \ EXTRA_DIST = \
$(MAGIC_DIR)/Header \
$(MAGIC_DIR)/Localstuff \
$(MAGIC_FRAGMENT_DIR)/acorn \ $(MAGIC_FRAGMENT_DIR)/acorn \
$(MAGIC_FRAGMENT_DIR)/adi \ $(MAGIC_FRAGMENT_DIR)/adi \
$(MAGIC_FRAGMENT_DIR)/adventure \ $(MAGIC_FRAGMENT_DIR)/adventure \
$(MAGIC_FRAGMENT_DIR)/allegro \ $(MAGIC_FRAGMENT_DIR)/allegro \
$(MAGIC_FRAGMENT_DIR)/alliant \ $(MAGIC_FRAGMENT_DIR)/alliant \
$(MAGIC_FRAGMENT_DIR)/alpha \
$(MAGIC_FRAGMENT_DIR)/amanda \ $(MAGIC_FRAGMENT_DIR)/amanda \
$(MAGIC_FRAGMENT_DIR)/amigaos \ $(MAGIC_FRAGMENT_DIR)/amigaos \
$(MAGIC_FRAGMENT_DIR)/animation \ $(MAGIC_FRAGMENT_DIR)/animation \
@ -190,10 +223,12 @@ $(MAGIC_FRAGMENT_DIR)/att3b \
$(MAGIC_FRAGMENT_DIR)/audio \ $(MAGIC_FRAGMENT_DIR)/audio \
$(MAGIC_FRAGMENT_DIR)/basis \ $(MAGIC_FRAGMENT_DIR)/basis \
$(MAGIC_FRAGMENT_DIR)/bflt \ $(MAGIC_FRAGMENT_DIR)/bflt \
$(MAGIC_FRAGMENT_DIR)/blcr \
$(MAGIC_FRAGMENT_DIR)/blender \ $(MAGIC_FRAGMENT_DIR)/blender \
$(MAGIC_FRAGMENT_DIR)/blit \ $(MAGIC_FRAGMENT_DIR)/blit \
$(MAGIC_FRAGMENT_DIR)/bout \ $(MAGIC_FRAGMENT_DIR)/bout \
$(MAGIC_FRAGMENT_DIR)/bsdi \ $(MAGIC_FRAGMENT_DIR)/bsdi \
$(MAGIC_FRAGMENT_DIR)/bsi \
$(MAGIC_FRAGMENT_DIR)/btsnoop \ $(MAGIC_FRAGMENT_DIR)/btsnoop \
$(MAGIC_FRAGMENT_DIR)/c-lang \ $(MAGIC_FRAGMENT_DIR)/c-lang \
$(MAGIC_FRAGMENT_DIR)/c64 \ $(MAGIC_FRAGMENT_DIR)/c64 \
@ -221,6 +256,7 @@ $(MAGIC_FRAGMENT_DIR)/digital \
$(MAGIC_FRAGMENT_DIR)/dolby \ $(MAGIC_FRAGMENT_DIR)/dolby \
$(MAGIC_FRAGMENT_DIR)/dump \ $(MAGIC_FRAGMENT_DIR)/dump \
$(MAGIC_FRAGMENT_DIR)/dyadic \ $(MAGIC_FRAGMENT_DIR)/dyadic \
$(MAGIC_FRAGMENT_DIR)/ebml \
$(MAGIC_FRAGMENT_DIR)/editors \ $(MAGIC_FRAGMENT_DIR)/editors \
$(MAGIC_FRAGMENT_DIR)/efi \ $(MAGIC_FRAGMENT_DIR)/efi \
$(MAGIC_FRAGMENT_DIR)/elf \ $(MAGIC_FRAGMENT_DIR)/elf \
@ -236,8 +272,10 @@ $(MAGIC_FRAGMENT_DIR)/fortran \
$(MAGIC_FRAGMENT_DIR)/frame \ $(MAGIC_FRAGMENT_DIR)/frame \
$(MAGIC_FRAGMENT_DIR)/freebsd \ $(MAGIC_FRAGMENT_DIR)/freebsd \
$(MAGIC_FRAGMENT_DIR)/fsav \ $(MAGIC_FRAGMENT_DIR)/fsav \
$(MAGIC_FRAGMENT_DIR)/fusecompress \
$(MAGIC_FRAGMENT_DIR)/games \ $(MAGIC_FRAGMENT_DIR)/games \
$(MAGIC_FRAGMENT_DIR)/gcc \ $(MAGIC_FRAGMENT_DIR)/gcc \
$(MAGIC_FRAGMENT_DIR)/geo \
$(MAGIC_FRAGMENT_DIR)/geos \ $(MAGIC_FRAGMENT_DIR)/geos \
$(MAGIC_FRAGMENT_DIR)/gimp \ $(MAGIC_FRAGMENT_DIR)/gimp \
$(MAGIC_FRAGMENT_DIR)/gnome-keyring \ $(MAGIC_FRAGMENT_DIR)/gnome-keyring \
@ -258,6 +296,7 @@ $(MAGIC_FRAGMENT_DIR)/intel \
$(MAGIC_FRAGMENT_DIR)/interleaf \ $(MAGIC_FRAGMENT_DIR)/interleaf \
$(MAGIC_FRAGMENT_DIR)/island \ $(MAGIC_FRAGMENT_DIR)/island \
$(MAGIC_FRAGMENT_DIR)/ispell \ $(MAGIC_FRAGMENT_DIR)/ispell \
$(MAGIC_FRAGMENT_DIR)/isz \
$(MAGIC_FRAGMENT_DIR)/java \ $(MAGIC_FRAGMENT_DIR)/java \
$(MAGIC_FRAGMENT_DIR)/jpeg \ $(MAGIC_FRAGMENT_DIR)/jpeg \
$(MAGIC_FRAGMENT_DIR)/karma \ $(MAGIC_FRAGMENT_DIR)/karma \
@ -276,11 +315,13 @@ $(MAGIC_FRAGMENT_DIR)/macintosh \
$(MAGIC_FRAGMENT_DIR)/magic \ $(MAGIC_FRAGMENT_DIR)/magic \
$(MAGIC_FRAGMENT_DIR)/mail.news \ $(MAGIC_FRAGMENT_DIR)/mail.news \
$(MAGIC_FRAGMENT_DIR)/maple \ $(MAGIC_FRAGMENT_DIR)/maple \
$(MAGIC_FRAGMENT_DIR)/marc21 \
$(MAGIC_FRAGMENT_DIR)/mathcad \ $(MAGIC_FRAGMENT_DIR)/mathcad \
$(MAGIC_FRAGMENT_DIR)/mathematica \ $(MAGIC_FRAGMENT_DIR)/mathematica \
$(MAGIC_FRAGMENT_DIR)/matroska \ $(MAGIC_FRAGMENT_DIR)/matroska \
$(MAGIC_FRAGMENT_DIR)/mcrypt \ $(MAGIC_FRAGMENT_DIR)/mcrypt \
$(MAGIC_FRAGMENT_DIR)/mercurial \ $(MAGIC_FRAGMENT_DIR)/mercurial \
$(MAGIC_FRAGMENT_DIR)/metastore \
$(MAGIC_FRAGMENT_DIR)/mime \ $(MAGIC_FRAGMENT_DIR)/mime \
$(MAGIC_FRAGMENT_DIR)/mips \ $(MAGIC_FRAGMENT_DIR)/mips \
$(MAGIC_FRAGMENT_DIR)/mirage \ $(MAGIC_FRAGMENT_DIR)/mirage \
@ -292,6 +333,7 @@ $(MAGIC_FRAGMENT_DIR)/modem \
$(MAGIC_FRAGMENT_DIR)/motorola \ $(MAGIC_FRAGMENT_DIR)/motorola \
$(MAGIC_FRAGMENT_DIR)/mozilla \ $(MAGIC_FRAGMENT_DIR)/mozilla \
$(MAGIC_FRAGMENT_DIR)/msdos \ $(MAGIC_FRAGMENT_DIR)/msdos \
$(MAGIC_FRAGMENT_DIR)/msooxml \
$(MAGIC_FRAGMENT_DIR)/msvc \ $(MAGIC_FRAGMENT_DIR)/msvc \
$(MAGIC_FRAGMENT_DIR)/mup \ $(MAGIC_FRAGMENT_DIR)/mup \
$(MAGIC_FRAGMENT_DIR)/natinst \ $(MAGIC_FRAGMENT_DIR)/natinst \
@ -301,6 +343,7 @@ $(MAGIC_FRAGMENT_DIR)/netscape \
$(MAGIC_FRAGMENT_DIR)/netware \ $(MAGIC_FRAGMENT_DIR)/netware \
$(MAGIC_FRAGMENT_DIR)/news \ $(MAGIC_FRAGMENT_DIR)/news \
$(MAGIC_FRAGMENT_DIR)/nitpicker \ $(MAGIC_FRAGMENT_DIR)/nitpicker \
$(MAGIC_FRAGMENT_DIR)/oasis \
$(MAGIC_FRAGMENT_DIR)/ocaml \ $(MAGIC_FRAGMENT_DIR)/ocaml \
$(MAGIC_FRAGMENT_DIR)/octave \ $(MAGIC_FRAGMENT_DIR)/octave \
$(MAGIC_FRAGMENT_DIR)/ole2compounddocs \ $(MAGIC_FRAGMENT_DIR)/ole2compounddocs \
@ -311,6 +354,7 @@ $(MAGIC_FRAGMENT_DIR)/os9 \
$(MAGIC_FRAGMENT_DIR)/osf1 \ $(MAGIC_FRAGMENT_DIR)/osf1 \
$(MAGIC_FRAGMENT_DIR)/palm \ $(MAGIC_FRAGMENT_DIR)/palm \
$(MAGIC_FRAGMENT_DIR)/parix \ $(MAGIC_FRAGMENT_DIR)/parix \
$(MAGIC_FRAGMENT_DIR)/parrot \
$(MAGIC_FRAGMENT_DIR)/pbm \ $(MAGIC_FRAGMENT_DIR)/pbm \
$(MAGIC_FRAGMENT_DIR)/pdf \ $(MAGIC_FRAGMENT_DIR)/pdf \
$(MAGIC_FRAGMENT_DIR)/pdp \ $(MAGIC_FRAGMENT_DIR)/pdp \
@ -322,12 +366,12 @@ $(MAGIC_FRAGMENT_DIR)/plus5 \
$(MAGIC_FRAGMENT_DIR)/printer \ $(MAGIC_FRAGMENT_DIR)/printer \
$(MAGIC_FRAGMENT_DIR)/project \ $(MAGIC_FRAGMENT_DIR)/project \
$(MAGIC_FRAGMENT_DIR)/psdbms \ $(MAGIC_FRAGMENT_DIR)/psdbms \
$(MAGIC_FRAGMENT_DIR)/psion \
$(MAGIC_FRAGMENT_DIR)/pulsar \ $(MAGIC_FRAGMENT_DIR)/pulsar \
$(MAGIC_FRAGMENT_DIR)/pyramid \ $(MAGIC_FRAGMENT_DIR)/pyramid \
$(MAGIC_FRAGMENT_DIR)/python \ $(MAGIC_FRAGMENT_DIR)/python \
$(MAGIC_FRAGMENT_DIR)/revision \ $(MAGIC_FRAGMENT_DIR)/revision \
$(MAGIC_FRAGMENT_DIR)/riff \ $(MAGIC_FRAGMENT_DIR)/riff \
$(MAGIC_FRAGMENT_DIR)/rinex \
$(MAGIC_FRAGMENT_DIR)/rpm \ $(MAGIC_FRAGMENT_DIR)/rpm \
$(MAGIC_FRAGMENT_DIR)/rtf \ $(MAGIC_FRAGMENT_DIR)/rtf \
$(MAGIC_FRAGMENT_DIR)/ruby \ $(MAGIC_FRAGMENT_DIR)/ruby \
@ -335,21 +379,27 @@ $(MAGIC_FRAGMENT_DIR)/sc \
$(MAGIC_FRAGMENT_DIR)/sccs \ $(MAGIC_FRAGMENT_DIR)/sccs \
$(MAGIC_FRAGMENT_DIR)/scientific \ $(MAGIC_FRAGMENT_DIR)/scientific \
$(MAGIC_FRAGMENT_DIR)/securitycerts \ $(MAGIC_FRAGMENT_DIR)/securitycerts \
$(MAGIC_FRAGMENT_DIR)/selinux \
$(MAGIC_FRAGMENT_DIR)/sendmail \ $(MAGIC_FRAGMENT_DIR)/sendmail \
$(MAGIC_FRAGMENT_DIR)/sequent \ $(MAGIC_FRAGMENT_DIR)/sequent \
$(MAGIC_FRAGMENT_DIR)/sgi \ $(MAGIC_FRAGMENT_DIR)/sgi \
$(MAGIC_FRAGMENT_DIR)/sgml \ $(MAGIC_FRAGMENT_DIR)/sgml \
$(MAGIC_FRAGMENT_DIR)/sharc \ $(MAGIC_FRAGMENT_DIR)/sharc \
$(MAGIC_FRAGMENT_DIR)/sinclair \ $(MAGIC_FRAGMENT_DIR)/sinclair \
$(MAGIC_FRAGMENT_DIR)/sisu \
$(MAGIC_FRAGMENT_DIR)/sketch \ $(MAGIC_FRAGMENT_DIR)/sketch \
$(MAGIC_FRAGMENT_DIR)/smalltalk \ $(MAGIC_FRAGMENT_DIR)/smalltalk \
$(MAGIC_FRAGMENT_DIR)/smile \
$(MAGIC_FRAGMENT_DIR)/sniffer \ $(MAGIC_FRAGMENT_DIR)/sniffer \
$(MAGIC_FRAGMENT_DIR)/softquad \ $(MAGIC_FRAGMENT_DIR)/softquad \
$(MAGIC_FRAGMENT_DIR)/spec \ $(MAGIC_FRAGMENT_DIR)/spec \
$(MAGIC_FRAGMENT_DIR)/spectrum \ $(MAGIC_FRAGMENT_DIR)/spectrum \
$(MAGIC_FRAGMENT_DIR)/sql \ $(MAGIC_FRAGMENT_DIR)/sql \
$(MAGIC_FRAGMENT_DIR)/ssh \
$(MAGIC_FRAGMENT_DIR)/ssl \
$(MAGIC_FRAGMENT_DIR)/sun \ $(MAGIC_FRAGMENT_DIR)/sun \
$(MAGIC_FRAGMENT_DIR)/sysex \ $(MAGIC_FRAGMENT_DIR)/sysex \
$(MAGIC_FRAGMENT_DIR)/tcl \
$(MAGIC_FRAGMENT_DIR)/teapot \ $(MAGIC_FRAGMENT_DIR)/teapot \
$(MAGIC_FRAGMENT_DIR)/terminfo \ $(MAGIC_FRAGMENT_DIR)/terminfo \
$(MAGIC_FRAGMENT_DIR)/tex \ $(MAGIC_FRAGMENT_DIR)/tex \
@ -366,6 +416,7 @@ $(MAGIC_FRAGMENT_DIR)/varied.out \
$(MAGIC_FRAGMENT_DIR)/varied.script \ $(MAGIC_FRAGMENT_DIR)/varied.script \
$(MAGIC_FRAGMENT_DIR)/vax \ $(MAGIC_FRAGMENT_DIR)/vax \
$(MAGIC_FRAGMENT_DIR)/vicar \ $(MAGIC_FRAGMENT_DIR)/vicar \
$(MAGIC_FRAGMENT_DIR)/virtual \
$(MAGIC_FRAGMENT_DIR)/virtutech \ $(MAGIC_FRAGMENT_DIR)/virtutech \
$(MAGIC_FRAGMENT_DIR)/visx \ $(MAGIC_FRAGMENT_DIR)/visx \
$(MAGIC_FRAGMENT_DIR)/vms \ $(MAGIC_FRAGMENT_DIR)/vms \
@ -377,6 +428,7 @@ $(MAGIC_FRAGMENT_DIR)/weak \
$(MAGIC_FRAGMENT_DIR)/windows \ $(MAGIC_FRAGMENT_DIR)/windows \
$(MAGIC_FRAGMENT_DIR)/wireless \ $(MAGIC_FRAGMENT_DIR)/wireless \
$(MAGIC_FRAGMENT_DIR)/wordprocessors \ $(MAGIC_FRAGMENT_DIR)/wordprocessors \
$(MAGIC_FRAGMENT_DIR)/wsdl \
$(MAGIC_FRAGMENT_DIR)/xdelta \ $(MAGIC_FRAGMENT_DIR)/xdelta \
$(MAGIC_FRAGMENT_DIR)/xenix \ $(MAGIC_FRAGMENT_DIR)/xenix \
$(MAGIC_FRAGMENT_DIR)/xilinx \ $(MAGIC_FRAGMENT_DIR)/xilinx \
@ -386,29 +438,29 @@ $(MAGIC_FRAGMENT_DIR)/zilog \
$(MAGIC_FRAGMENT_DIR)/zyxel $(MAGIC_FRAGMENT_DIR)/zyxel
MAGIC = magic.mgc MAGIC = magic.mgc
CLEANFILES = ${MAGIC} CLEANFILES = ${MAGIC} $(MAGIC_FRAGMENT_DIR)/Localstuff
@IS_CROSS_COMPILE_FALSE@FILE_COMPILE = $(top_builddir)/src/file @IS_CROSS_COMPILE_FALSE@FILE_COMPILE = $(top_builddir)/src/file
# FIXME: Build file natively as well so that it can be used to compile # FIXME: Build file natively as well so that it can be used to compile
# the target's magic file # the target's magic file; for now we bail if the local version does not match
@IS_CROSS_COMPILE_TRUE@FILE_COMPILE = file @IS_CROSS_COMPILE_TRUE@FILE_COMPILE = file
@IS_CROSS_COMPILE_FALSE@FILE_COMPILE_DEP = $(FILE_COMPILE) @IS_CROSS_COMPILE_FALSE@FILE_COMPILE_DEP = $(FILE_COMPILE)
@IS_CROSS_COMPILE_TRUE@FILE_COMPILE_DEP = @IS_CROSS_COMPILE_TRUE@FILE_COMPILE_DEP =
all: all-am all: all-am
.SUFFIXES: .SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \ @for dep in $?; do \
case '$(am__configure_deps)' in \ case '$(am__configure_deps)' in \
*$$dep*) \ *$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& exit 0; \ && { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \ exit 1;; \
esac; \ esac; \
done; \ done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu magic/Makefile'; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu magic/Makefile'; \
cd $(top_srcdir) && \ $(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu magic/Makefile $(AUTOMAKE) --gnu magic/Makefile
.PRECIOUS: Makefile .PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \ @case '$?' in \
@ -422,10 +474,11 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps) $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
mostlyclean-libtool: mostlyclean-libtool:
-rm -f *.lo -rm -f *.lo
@ -435,20 +488,23 @@ clean-libtool:
install-pkgdataDATA: $(pkgdata_DATA) install-pkgdataDATA: $(pkgdata_DATA)
@$(NORMAL_INSTALL) @$(NORMAL_INSTALL)
test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)" test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)"
@list='$(pkgdata_DATA)'; for p in $$list; do \ @list='$(pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \ echo "$$d$$p"; \
echo " $(pkgdataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgdatadir)/$$f'"; \ done | $(am__base_list) | \
$(pkgdataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgdatadir)/$$f"; \ while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgdatadir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(pkgdatadir)" || exit $$?; \
done done
uninstall-pkgdataDATA: uninstall-pkgdataDATA:
@$(NORMAL_UNINSTALL) @$(NORMAL_UNINSTALL)
@list='$(pkgdata_DATA)'; for p in $$list; do \ @list='$(pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \
f=$(am__strip_dir) \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \ test -n "$$files" || exit 0; \
rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \ echo " ( cd '$(DESTDIR)$(pkgdatadir)' && rm -f" $$files ")"; \
done cd "$(DESTDIR)$(pkgdatadir)" && rm -f $$files
tags: TAGS tags: TAGS
TAGS: TAGS:
@ -472,13 +528,17 @@ distdir: $(DISTFILES)
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \ if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ if test -d "$(distdir)/$$file"; then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \ fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ 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 \ else \
test -f $(distdir)/$$file \ test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file $(distdir)/$$file \ || cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \ || exit 1; \
fi; \ fi; \
done done
@ -510,6 +570,7 @@ clean-generic:
distclean-generic: distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -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: maintainer-clean-generic:
@echo "This command is intended for maintainers to use" @echo "This command is intended for maintainers to use"
@ -528,6 +589,8 @@ dvi-am:
html: html-am html: html-am
html-am:
info: info-am info: info-am
info-am: info-am:
@ -536,18 +599,28 @@ install-data-am: install-pkgdataDATA
install-dvi: install-dvi-am install-dvi: install-dvi-am
install-dvi-am:
install-exec-am: install-exec-am:
install-html: install-html-am install-html: install-html-am
install-html-am:
install-info: install-info-am install-info: install-info-am
install-info-am:
install-man: install-man:
install-pdf: install-pdf-am install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am install-ps: install-ps-am
install-ps-am:
installcheck-am: installcheck-am:
maintainer-clean: maintainer-clean-am maintainer-clean: maintainer-clean-am
@ -584,8 +657,22 @@ uninstall-am: uninstall-pkgdataDATA
${MAGIC}: $(EXTRA_DIST) $(FILE_COMPILE_DEP) ${MAGIC}: $(EXTRA_DIST) $(FILE_COMPILE_DEP)
$(FILE_COMPILE) -C -m $(MAGIC_FRAGMENT_DIR) @rm -fr magic
@mv $(MAGIC_FRAGMENT_BASE).mgc $@ @mkdir magic && cp -p $(EXTRA_DIST) magic
@(if expr "${FILE_COMPILE}" : '.*/.*' > /dev/null; then \
echo "Using ${FILE_COMPILE} to generate ${MAGIC}" > /dev/null; \
else \
v=$$(file --version | sed -e s/file-// -e q); \
if [ "$$v" != "${PACKAGE_VERSION}" ]; then \
echo "Cannot use the installed version of file ($$v) to"; \
echo "cross-compile file ${PACKAGE_VERSION}"; \
echo "Please install file ${PACKAGE_VERSION} locally first"; \
exit 1; \
fi; \
fi)
$(FILE_COMPILE) -C -m magic
@rm -fr magic
# Tell versions [3.59,3.63) of GNU make to not export all variables. # 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. # Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT: .NOEXPORT:

View file

@ -1,4 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: acorn,v 1.5 2009/09/19 16:28:07 christos Exp $
# acorn: file(1) magic for files found on Acorn systems # acorn: file(1) magic for files found on Acorn systems
# #

View file

@ -1,5 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: adi,v 1.4 2009/09/19 16:28:07 christos Exp $
# adi: file(1) magic for ADi's objects # adi: file(1) magic for ADi's objects
# From Gregory McGarry <g.mcgarry@ieee.org> # From Gregory McGarry <g.mcgarry@ieee.org>
# #

View file

@ -1,5 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: adventure,v 1.13 2010/12/31 16:32:54 christos Exp $
# adventure: file(1) magic for Adventure game files # adventure: file(1) magic for Adventure game files
# #
# from Allen Garvin <earendil@faeryland.tamu-commerce.edu> # from Allen Garvin <earendil@faeryland.tamu-commerce.edu>
@ -16,18 +17,26 @@
# Infocom (see z-machine) # Infocom (see z-machine)
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Z-machine: file(1) magic for Z-machine binaries. # Z-machine: file(1) magic for Z-machine binaries.
# Updated by Adam Buchbinder <adam.buchbinder@gmail.com>
# #
# This will match ${TEX_BASE}/texmf/omega/ocp/char2uni/inbig5.ocp which #http://www.gnelson.demon.co.uk/zspec/sect11.html
# appears to be a version-0 Z-machine binary. #http://www.jczorkmid.net/~jpenney/ZSpec11-latest.txt
#http://en.wikipedia.org/wiki/Z-machine
# The first byte is the Z-machine revision; it is always between 1 and 8. We
# had false matches (for instance, inbig5.ocp from the Omega TeX extension as
# well as an occasional MP3 file), so we sanity-check the version number.
# #
# The (false match) message is to correct that behavior. Perhaps it is # It might be possible to sanity-check the release number as well, as it seems
# not needed. # (at least in classic Infocom games) to always be a relatively small number,
# always under 150 or so, but as this isn't rigorous, we'll wait on that until
# it becomes clear that it's needed.
# #
16 belong&0xfe00f0f0 0x3030 Infocom game data 0 ubyte >0
>0 ubyte 0 (false match) >0 ubyte <9
>0 ubyte >0 (Z-machine %d, >>16 belong&0xfe00f0f0 0x3030 Infocom game data
>>2 ubeshort x Release %d / >>>0 ubyte x (Z-machine %d,
>>18 string >\0 Serial %.6s) >>>>2 ubeshort x Release %d /
>>>>18 string >\0 Serial %.6s)
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Glulx: file(1) magic for Glulx binaries. # Glulx: file(1) magic for Glulx binaries.
@ -45,10 +54,9 @@
# For Quetzal and blorb magic see iff # For Quetzal and blorb magic see iff
# TADS (Text Adventure Development System) # TADS (Text Adventure Development System) version 2
# All files are machine-independent (games compile to byte-code) and are tagged # All files are machine-independent (games compile to byte-code) and are tagged
# with a version string of the form "V2.<digit>.<digit>\0" (but TADS 3 is # with a version string of the form "V2.<digit>.<digit>\0".
# on the way).
# Game files start with "TADS2 bin\n\r\032\0" then the compiler version. # Game files start with "TADS2 bin\n\r\032\0" then the compiler version.
0 string TADS2\ bin TADS 0 string TADS2\ bin TADS
>9 belong !0x0A0D1A00 game data, CORRUPTED >9 belong !0x0A0D1A00 game data, CORRUPTED
@ -73,6 +81,19 @@
>10 belong 0x0A0D1A00 >10 belong 0x0A0D1A00
>>14 string >\0 %s saved game data >>14 string >\0 %s saved game data
# TADS (Text Adventure Development System) version 3
# Game files start with "T3-image\015\012\032"
0 string T3-image\015\012\032
>11 leshort x TADS 3 game data (format version %d)
# Saved game files start with "T3-state-v####\015\012\032"
# where #### is a format version number
0 string T3-state-v
>14 string \015\012\032 TADS 3 saved game data (format version
>>10 byte x %c
>>11 byte x \b%c
>>12 byte x \b%c
>>13 byte x \b%c)
# Danny Milosavljevic <danny.milo@gmx.net> # Danny Milosavljevic <danny.milo@gmx.net>
# this are adrift (adventure game standard) game files, extension .taf # this are adrift (adventure game standard) game files, extension .taf
# depending on version magic continues with 0x93453E6139FA (V 4.0) # depending on version magic continues with 0x93453E6139FA (V 4.0)

View file

@ -1,4 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: allegro,v 1.4 2009/09/19 16:28:07 christos Exp $
# allegro: file(1) magic for Allegro datafiles # allegro: file(1) magic for Allegro datafiles
# Toby Deshane <hac@shoelace.digivill.net> # Toby Deshane <hac@shoelace.digivill.net>
# #

View file

@ -1,5 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: alliant,v 1.7 2009/09/19 16:28:07 christos Exp $
# alliant: file(1) magic for Alliant FX series a.out files # alliant: file(1) magic for Alliant FX series a.out files
# #
# If the FX series is the one that had a processor with a 68K-derived # If the FX series is the one that had a processor with a 68K-derived

View file

@ -1,30 +0,0 @@
#------------------------------------------------------------------------------
# alpha architecture description
#
0 leshort 0603 COFF format alpha
>22 leshort&030000 !020000 executable
>24 leshort 0410 pure
>24 leshort 0413 paged
>22 leshort&020000 !0 dynamically linked
>16 lelong !0 not stripped
>16 lelong 0 stripped
>22 leshort&030000 020000 shared library
>24 leshort 0407 object
>27 byte x - version %d
>26 byte x .%d
>28 byte x -%d
# Basic recognition of Digital UNIX core dumps - Mike Bremford <mike@opac.bl.uk>
#
# The actual magic number is just "Core", followed by a 2-byte version
# number; however, treating any file that begins with "Core" as a Digital
# UNIX core dump file may produce too many false hits, so we include one
# byte of the version number as well; DU 5.0 appears only to be up to
# version 2.
#
0 string Core\001 Alpha COFF format core dump (Digital UNIX)
>24 string >\0 \b, from '%s'
0 string Core\002 Alpha COFF format core dump (Digital UNIX)
>24 string >\0 \b, from '%s'

View file

@ -1,4 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: amanda,v 1.5 2009/09/19 16:28:07 christos Exp $
# amanda: file(1) magic for amanda file format # amanda: file(1) magic for amanda file format
# #
0 string AMANDA:\ AMANDA 0 string AMANDA:\ AMANDA

View file

@ -1,4 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: amigaos,v 1.14 2009/09/19 16:28:07 christos Exp $
# amigaos: file(1) magic for AmigaOS binary formats: # amigaos: file(1) magic for AmigaOS binary formats:
# #

View file

@ -1,5 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: animation,v 1.45 2011/09/06 11:00:06 christos Exp $
# animation: file(1) magic for animation/movie formats # animation: file(1) magic for animation/movie formats
# #
# animation formats # animation formats
@ -29,7 +30,7 @@
#!:mime image/x-quicktime #!:mime image/x-quicktime
4 string pckg Apple QuickTime compressed archive 4 string pckg Apple QuickTime compressed archive
!:mime application/x-quicktime-player !:mime application/x-quicktime-player
4 string/B jP JPEG 2000 image 4 string/W jP JPEG 2000 image
!:mime image/jp2 !:mime image/jp2
4 string ftyp ISO Media 4 string ftyp ISO Media
>8 string isom \b, MPEG v4 system, version 1 >8 string isom \b, MPEG v4 system, version 1
@ -41,10 +42,18 @@
!:mime video/mp4 !:mime video/mp4
>8 string mp7t \b, MPEG v4 system, MPEG v7 XML >8 string mp7t \b, MPEG v4 system, MPEG v7 XML
>8 string mp7b \b, MPEG v4 system, MPEG v7 binary XML >8 string mp7b \b, MPEG v4 system, MPEG v7 binary XML
>8 string/B jp2 \b, JPEG 2000 >8 string/W jp2 \b, JPEG 2000
!:mime image/jp2 !:mime image/jp2
>8 string 3ge \b, MPEG v4 system, 3GPP
!:mime video/3gpp
>8 string 3gg \b, MPEG v4 system, 3GPP
!:mime video/3gpp
>8 string 3gp \b, MPEG v4 system, 3GPP >8 string 3gp \b, MPEG v4 system, 3GPP
!:mime video/3gpp !:mime video/3gpp
>8 string 3gs \b, MPEG v4 system, 3GPP
!:mime video/3gpp
>8 string 3g2 \b, MPEG v4 system, 3GPP2
!:mime video/3gpp2
>>11 byte 4 \b v4 (H.263/AMR GSM 6.10) >>11 byte 4 \b v4 (H.263/AMR GSM 6.10)
>>11 byte 5 \b v5 (H.263/AMR GSM 6.10) >>11 byte 5 \b v5 (H.263/AMR GSM 6.10)
>>11 byte 6 \b v6 (ITU H.264/AMR GSM 6.10) >>11 byte 6 \b v6 (ITU H.264/AMR GSM 6.10)
@ -52,13 +61,13 @@
!:mime video/mp4 !:mime video/mp4
>8 string avc1 \b, MPEG v4 system, 3GPP JVT AVC >8 string avc1 \b, MPEG v4 system, 3GPP JVT AVC
!:mime video/3gpp !:mime video/3gpp
>8 string/B M4A \b, MPEG v4 system, iTunes AAC-LC >8 string/W M4A \b, MPEG v4 system, iTunes AAC-LC
!:mime audio/mp4 !:mime audio/mp4
>8 string/B M4V \b, MPEG v4 system, iTunes AVC-LC >8 string/W M4V \b, MPEG v4 system, iTunes AVC-LC
!:mime video/mp4 !:mime video/mp4
>8 string/B M4P \b, MPEG v4 system, iTunes AES encrypted >8 string/W M4P \b, MPEG v4 system, iTunes AES encrypted
>8 string/B M4B \b, MPEG v4 system, iTunes bookmarked >8 string/W M4B \b, MPEG v4 system, iTunes bookmarked
>8 string/B qt \b, Apple QuickTime movie >8 string/W qt \b, Apple QuickTime movie
!:mime video/quicktime !:mime video/quicktime
# MPEG sequences # MPEG sequences
@ -71,6 +80,7 @@
>>7 byte x \b @ L %u >>7 byte x \b @ L %u
0 belong&0xFFFFFF00 0x00000100 0 belong&0xFFFFFF00 0x00000100
>3 byte 0xBA MPEG sequence >3 byte 0xBA MPEG sequence
!:mime video/mpeg
>>4 byte &0x40 \b, v2, program multiplex >>4 byte &0x40 \b, v2, program multiplex
>>4 byte ^0x40 \b, v1, system multiplex >>4 byte ^0x40 \b, v1, system multiplex
>3 byte 0xBB MPEG sequence, v1/2, multiplex (missing pack header) >3 byte 0xBB MPEG sequence, v1/2, multiplex (missing pack header)
@ -80,6 +90,7 @@
>>4 byte 88 \b, extended >>4 byte 88 \b, extended
>>6 byte x \b @ L %u >>6 byte x \b @ L %u
>3 byte 0xB0 MPEG sequence, v4 >3 byte 0xB0 MPEG sequence, v4
!:mime video/mpeg4-generic
>>5 belong 0x000001B5 >>5 belong 0x000001B5
>>>9 byte &0x80 >>>9 byte &0x80
>>>>10 byte&0xF0 16 \b, video >>>>10 byte&0xF0 16 \b, video
@ -149,6 +160,7 @@
>>4 byte 252 \b, FGS @ L4 >>4 byte 252 \b, FGS @ L4
>>4 byte 253 \b, FGS @ L5 >>4 byte 253 \b, FGS @ L5
>3 byte 0xB5 MPEG sequence, v4 >3 byte 0xB5 MPEG sequence, v4
!:mime video/mpeg4-generic
>>4 byte &0x80 >>4 byte &0x80
>>>5 byte&0xF0 16 \b, video (missing profile header) >>>5 byte&0xF0 16 \b, video (missing profile header)
>>>5 byte&0xF0 32 \b, still texture (missing profile header) >>>5 byte&0xF0 32 \b, still texture (missing profile header)
@ -159,6 +171,7 @@
>>4 byte&0xF8 24 \b, mesh (missing profile header) >>4 byte&0xF8 24 \b, mesh (missing profile header)
>>4 byte&0xF8 32 \b, face (missing profile header) >>4 byte&0xF8 32 \b, face (missing profile header)
>3 byte 0xB3 MPEG sequence >3 byte 0xB3 MPEG sequence
!:mime video/mpeg
>>12 belong 0x000001B8 \b, v1, progressive Y'CbCr 4:2:0 video >>12 belong 0x000001B8 \b, v1, progressive Y'CbCr 4:2:0 video
>>12 belong 0x000001B2 \b, v1, progressive Y'CbCr 4:2:0 video >>12 belong 0x000001B2 \b, v1, progressive Y'CbCr 4:2:0 video
>>12 belong 0x000001B5 \b, v2, >>12 belong 0x000001B5 \b, v2,
@ -469,6 +482,7 @@
# MPA, M2A # MPA, M2A
0 beshort&0xFFFE 0xFFF6 MPEG ADTS, layer I, v2 0 beshort&0xFFFE 0xFFF6 MPEG ADTS, layer I, v2
!:mime audio/mpeg
# rate # rate
>2 byte&0xF0 0x10 \b, 32 kbps >2 byte&0xF0 0x10 \b, 32 kbps
>2 byte&0xF0 0x20 \b, 48 kbps >2 byte&0xF0 0x20 \b, 48 kbps
@ -503,6 +517,7 @@
# MP3, M25A # MP3, M25A
0 beshort&0xFFFE 0xFFE2 MPEG ADTS, layer III, v2.5 0 beshort&0xFFFE 0xFFE2 MPEG ADTS, layer III, v2.5
!:mime audio/mpeg
# rate # rate
>2 byte&0xF0 0x10 \b, 8 kbps >2 byte&0xF0 0x10 \b, 8 kbps
>2 byte&0xF0 0x20 \b, 16 kbps >2 byte&0xF0 0x20 \b, 16 kbps
@ -697,6 +712,7 @@
# Microsoft Advanced Streaming Format (ASF) <mpruett@sgi.com> # Microsoft Advanced Streaming Format (ASF) <mpruett@sgi.com>
0 belong 0x3026b275 Microsoft ASF 0 belong 0x3026b275 Microsoft ASF
!:mime video/x-ms-asf
# MNG Video Format, <URL:http://www.libpng.org/pub/mng/spec/> # MNG Video Format, <URL:http://www.libpng.org/pub/mng/spec/>
0 string \x8aMNG MNG video data, 0 string \x8aMNG MNG video data,
@ -718,16 +734,16 @@
3 string \x0D\x0AVersion:Vivo Vivo video data 3 string \x0D\x0AVersion:Vivo Vivo video data
# VRML (Virtual Reality Modelling Language) # VRML (Virtual Reality Modelling Language)
0 string/b #VRML\ V1.0\ ascii VRML 1 file 0 string/w #VRML\ V1.0\ ascii VRML 1 file
!:mime model/vrml !:mime model/vrml
0 string/b #VRML\ V2.0\ utf8 ISO/IEC 14772 VRML 97 file 0 string/w #VRML\ V2.0\ utf8 ISO/IEC 14772 VRML 97 file
!:mime model/vrml !:mime model/vrml
# X3D (Extensible 3D) [http://www.web3d.org/specifications/x3d-3.0.dtd] # X3D (Extensible 3D) [http://www.web3d.org/specifications/x3d-3.0.dtd]
# From Michel Briand <michelbriand@free.fr> # From Michel Briand <michelbriand@free.fr>
0 string \<?xml\ version=" 0 string/t \<?xml\ version="
!:strength +1 !:strength +1
>20 search/1000/cb \<!DOCTYPE\ X3D X3D (Extensible 3D) model xml text >20 search/1000/cw \<!DOCTYPE\ X3D X3D (Extensible 3D) model xml text
!:mime model/x3d !:mime model/x3d
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
@ -794,7 +810,8 @@
!:mime video/h264 !:mime video/h264
# Type: Bink Video # Type: Bink Video
# URL: http://wiki.multimedia.cx/index.php?title=3DBink_Container # Extension: .bik
# URL: http://wiki.multimedia.cx/index.php?title=Bink_Container
# From: <hoehle@users.sourceforge.net> 2008-07-18 # From: <hoehle@users.sourceforge.net> 2008-07-18
0 string BIK Bink Video 0 string BIK Bink Video
>3 regex =[a-z] rev.%s >3 regex =[a-z] rev.%s
@ -813,3 +830,66 @@
>>51 byte&0x20 !0 stereo >>51 byte&0x20 !0 stereo
#>>51 byte&0x10 0 FFT #>>51 byte&0x10 0 FFT
#>>51 byte&0x10 !0 DCT #>>51 byte&0x10 !0 DCT
# Type: NUT Container
# URL: http://wiki.multimedia.cx/index.php?title=NUT
# From: Adam Buchbinder <adam.buchbinder@gmail.com>
0 string nut/multimedia\ container\0 NUT multimedia container
# Type: Nullsoft Video (NSV)
# URL: http://wiki.multimedia.cx/index.php?title=Nullsoft_Video
# From: Mike Melanson <mike@multimedia.cx>
0 string NSVf Nullsoft Video
# Type: REDCode Video
# URL: http://www.red.com/ ; http://wiki.multimedia.cx/index.php?title=REDCode
# From: Mike Melanson <mike@multimedia.cx>
4 string RED1 REDCode Video
# Type: MTV Multimedia File
# URL: http://wiki.multimedia.cx/index.php?title=MTV
# From: Mike Melanson <mike@multimedia.cx>
0 string AMVS MTV Multimedia File
# Type: ARMovie
# URL: http://wiki.multimedia.cx/index.php?title=ARMovie
# From: Mike Melanson <mike@multimedia.cx>
0 string ARMovie\012 ARMovie
# Type: Interplay MVE Movie
# URL: http://wiki.multimedia.cx/index.php?title=Interplay_MVE
# From: Mike Melanson <mike@multimedia.cx>
0 string Interplay\040MVE\040File\032 Interplay MVE Movie
# Type: Windows Television DVR File
# URL: http://wiki.multimedia.cx/index.php?title=WTV
# From: Mike Melanson <mike@mutlimedia.cx>
# This takes the form of a Windows-style GUID
0 bequad 0xB7D800203749DA11
>8 bequad 0xA64E0007E95EAD8D Windows Television DVR Media
# Type: Sega FILM/CPK Multimedia
# URL: http://wiki.multimedia.cx/index.php?title=Sega_FILM
# From: Mike Melanson <mike@multimedia.cx>
0 string FILM Sega FILM/CPK Multimedia,
>32 belong x %d x
>28 belong x %d
# Type: Nintendo THP Multimedia
# URL: http://wiki.multimedia.cx/index.php?title=THP
# From: Mike Melanson <mike@multimedia.cx>
0 string THP\0 Nintendo THP Multimedia
# Type: BBC Dirac Video
# URL: http://wiki.multimedia.cx/index.php?title=Dirac
# From: Mike Melanson <mike@multimedia.cx>
0 string BBCD BBC Dirac Video
# Type: RAD Game Tools Smacker Multimedia
# URL: http://wiki.multimedia.cx/index.php?title=Smacker
# From: Mike Melanson <mike@multimedia.cx>
0 string SMK RAD Game Tools Smacker Multimedia
>3 byte x version %c,
>4 lelong x %d x
>8 lelong x %d,
>12 lelong x %d frames

View file

@ -1,5 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: apl,v 1.6 2009/09/19 16:28:07 christos Exp $
# apl: file(1) magic for APL (see also "pdp" and "vax" for other APL # apl: file(1) magic for APL (see also "pdp" and "vax" for other APL
# workspaces) # workspaces)
# #

View file

@ -1,7 +1,9 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: apple,v 1.24 2010/11/25 15:00:12 christos Exp $
# apple: file(1) magic for Apple file formats # apple: file(1) magic for Apple file formats
# #
0 search/1 FiLeStArTfIlEsTaRt binscii (apple ][) text 0 search/1/t FiLeStArTfIlEsTaRt binscii (apple ][) text
0 string \x0aGL Binary II (apple ][) data 0 string \x0aGL Binary II (apple ][) data
0 string \x76\xff Squeezed (apple ][) data 0 string \x76\xff Squeezed (apple ][) data
0 string NuFile NuFile archive (apple ][) data 0 string NuFile NuFile archive (apple ][) data

View file

@ -1,5 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: applix,v 1.5 2009/09/19 16:28:08 christos Exp $
# applix: file(1) magic for Applixware # applix: file(1) magic for Applixware
# From: Peter Soos <sp@osb.hu> # From: Peter Soos <sp@osb.hu>
# #

View file

@ -1,4 +1,5 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: archive,v 1.68 2011/09/07 15:47:51 christos Exp $
# archive: file(1) magic for archive formats (see also "msdos" for self- # archive: file(1) magic for archive formats (see also "msdos" for self-
# extracting compressed archives) # extracting compressed archives)
# #
@ -182,7 +183,7 @@
# MAR # MAR
2 string =-ah MAR archive data 2 string =-ah MAR archive data
# ACB # ACB
0 belong&0x00f800ff 0x00800000 ACB archive data #0 belong&0x00f800ff 0x00800000 ACB archive data
# CPZ # CPZ
# TODO, this is what idarc says: 0 string \0\0\0 CPZ archive data # TODO, this is what idarc says: 0 string \0\0\0 CPZ archive data
# JRC # JRC
@ -243,13 +244,13 @@
# MS Compress # MS Compress
4 string \x88\xf0\x27 MS Compress archive data 4 string \x88\xf0\x27 MS Compress archive data
# updated by Joerg Jenderek # updated by Joerg Jenderek
>9 string \0 >9 string \0
>>0 string KWAJ >>0 string KWAJ
>>>7 string \321\003 MS Compress archive data >>>7 string \321\003 MS Compress archive data
>>>>14 ulong >0 \b, original size: %ld bytes >>>>14 ulong >0 \b, original size: %ld bytes
>>>>18 ubyte >0x65 >>>>18 ubyte >0x65
>>>>>18 string x \b, was %.8s >>>>>18 string x \b, was %.8s
>>>>>(10.b-4) string x \b.%.3s >>>>>(10.b-4) string x \b.%.3s
# MP3 (archiver, not lossy audio compression) # MP3 (archiver, not lossy audio compression)
0 string MP3\x1a MP3-Archiver archive data 0 string MP3\x1a MP3-Archiver archive data
# ZET # ZET
@ -274,7 +275,7 @@
# Splint # Splint
0 string \x93\xb9\x06 Splint archive data 0 string \x93\xb9\x06 Splint archive data
# InstallShield # InstallShield
0 string \x13\x5d\x65\x8c InstallShield Z archive Data 0 string \x13\x5d\x65\x8c InstallShield Z archive Data
# Gather # Gather
1 string GTH Gather archive data 1 string GTH Gather archive data
# BOA # BOA
@ -533,7 +534,7 @@
>20 byte x - header level %d >20 byte x - header level %d
# taken from idarc [JW] # taken from idarc [JW]
2 string -lZ PUT archive data 2 string -lZ PUT archive data
2 string -lz LZS archive data 2 string -lz LZS archive data
2 string -sw1- Swag archive data 2 string -sw1- Swag archive data
# RAR archiver (Greg Roelofs, newt@uchicago.edu) # RAR archiver (Greg Roelofs, newt@uchicago.edu)
@ -560,80 +561,140 @@
# [JW] see exe section for self-extracting version # [JW] see exe section for self-extracting version
0 string UC2\x1a UC2 archive data 0 string UC2\x1a UC2 archive data
# ZIP archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu) # PKZIP multi-volume archive
0 string PK\x07\x08PK\x03\x04 Zip multi-volume archive data, at least PKZIP v2.50 to extract
!:mime application/zip
# Zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu)
0 string PK\003\004 0 string PK\003\004
>4 byte 0x00 Zip archive data
!:mime application/zip
>4 byte 0x09 Zip archive data, at least v0.9 to extract
!:mime application/zip
>4 byte 0x0a Zip archive data, at least v1.0 to extract
!:mime application/zip
>4 byte 0x0b Zip archive data, at least v1.1 to extract
!:mime application/zip
>0x161 string WINZIP Zip archive data, WinZIP self-extracting
!:mime application/zip
>4 byte 0x14
>>30 ubelong !0x6d696d65 Zip archive data, at least v2.0 to extract
>0x161 string WINZIP Zip archive data, WinZIP self-extracting
!:mime application/zip
# OpenOffice.org / KOffice / StarOffice documents # Specialised zip formats which start with a member named 'mimetype'
# Listed here because they ARE zip files # (stored uncompressed, with no 'extra field') containing the file's MIME type.
# # Check for have 8-byte name, 0-byte extra field, name "mimetype", and
# From: Abel Cheung <abel@oaka.org> # contents starting with "application/":
>4 byte 0x14 >26 string \x8\0\0\0mimetypeapplication/
>>30 string mimetype
# KOffice (1.2 or above) formats # KOffice / OpenOffice & StarOffice / OpenDocument formats
>>>50 string vnd.kde. KOffice (>=1.2) # From: Abel Cheung <abel@oaka.org>
>>>>58 string karbon Karbon document
>>>>58 string kchart KChart document
>>>>58 string kformula KFormula document
>>>>58 string kivio Kivio document
>>>>58 string kontour Kontour document
>>>>58 string kpresenter KPresenter document
>>>>58 string kspread KSpread document
>>>>58 string kword KWord document
# OpenOffice formats (for OpenOffice 1.x / StarOffice 6/7) # KOffice (1.2 or above) formats
>>>50 string vnd.sun.xml. OpenOffice.org 1.x # (mimetype contains "application/vnd.kde.<SUBTYPE>")
>>>>62 string writer Writer >>50 string vnd.kde. KOffice (>=1.2)
>>>>>68 byte !0x2e document >>>58 string karbon Karbon document
>>>>>68 string .template template >>>58 string kchart KChart document
>>>>>68 string .global global document >>>58 string kformula KFormula document
>>>>62 string calc Calc >>>58 string kivio Kivio document
>>>>>66 byte !0x2e spreadsheet >>>58 string kontour Kontour document
>>>>>66 string .template template >>>58 string kpresenter KPresenter document
>>>>62 string draw Draw >>>58 string kspread KSpread document
>>>>>66 byte !0x2e document >>>58 string kword KWord document
>>>>>66 string .template template
>>>>62 string impress Impress
>>>>>69 byte !0x2e presentation
>>>>>69 string .template template
>>>>62 string math Math document
>>>>62 string base Database file
# OpenDocument formats (for OpenOffice 2.x / StarOffice >= 8) # OpenOffice formats (for OpenOffice 1.x / StarOffice 6/7)
# http://lists.oasis-open.org/archives/office/200505/msg00006.html # (mimetype contains "application/vnd.sun.xml.<SUBTYPE>")
>>>50 string vnd.oasis.opendocument. OpenDocument >>50 string vnd.sun.xml. OpenOffice.org 1.x
>>>>73 string text >>>62 string writer Writer
>>>>>77 byte !0x2d Text >>>>68 byte !0x2e document
>>>>68 string .template template
>>>>68 string .global global document
>>>62 string calc Calc
>>>>66 byte !0x2e spreadsheet
>>>>66 string .template template
>>>62 string draw Draw
>>>>66 byte !0x2e document
>>>>66 string .template template
>>>62 string impress Impress
>>>>69 byte !0x2e presentation
>>>>69 string .template template
>>>62 string math Math document
>>>62 string base Database file
# OpenDocument formats (for OpenOffice 2.x / StarOffice >= 8)
# http://lists.oasis-open.org/archives/office/200505/msg00006.html
# (mimetype contains "application/vnd.oasis.opendocument.<SUBTYPE>")
>>50 string vnd.oasis.opendocument. OpenDocument
>>>73 string text
>>>>77 byte !0x2d Text
!:mime application/vnd.oasis.opendocument.text !:mime application/vnd.oasis.opendocument.text
>>>>>77 string -template Text Template >>>>77 string -template Text Template
>>>>>77 string -web HTML Document Template !:mime application/vnd.oasis.opendocument.text-template
>>>>>77 string -master Master Document >>>>77 string -web HTML Document Template
>>>>73 string graphics Drawing !:mime application/vnd.oasis.opendocument.text-web
>>>>>81 string -template Template >>>>77 string -master Master Document
>>>>73 string presentation Presentation !:mime application/vnd.oasis.opendocument.text-master
>>>>>85 string -template Template >>>73 string graphics
>>>>73 string spreadsheet Spreadsheet >>>>81 byte !0x2d Drawing
>>>>>84 string -template Template !:mime application/vnd.oasis.opendocument.graphics
>>>>73 string chart Chart >>>>81 string -template Template
>>>>>78 string -template Template !:mime application/vnd.oasis.opendocument.graphics-template
>>>>73 string formula Formula >>>73 string presentation
>>>>>80 string -template Template >>>>85 byte !0x2d Presentation
>>>>73 string database Database !:mime application/vnd.oasis.opendocument.presentation
>>>>73 string image Image >>>>85 string -template Template
!:mime application/vnd.oasis.opendocument.presentation-template
>>>73 string spreadsheet
>>>>84 byte !0x2d Spreadsheet
!:mime application/vnd.oasis.opendocument.spreadsheet
>>>>84 string -template Template
!:mime application/vnd.oasis.opendocument.spreadsheet-template
>>>73 string chart
>>>>78 byte !0x2d Chart
!:mime application/vnd.oasis.opendocument.chart
>>>>78 string -template Template
!:mime application/vnd.oasis.opendocument.chart-template
>>>73 string formula
>>>>80 byte !0x2d Formula
!:mime application/vnd.oasis.opendocument.formula
>>>>80 string -template Template
!:mime application/vnd.oasis.opendocument.formula-template
>>>73 string database Database
!:mime application/vnd.oasis.opendocument.database
>>>73 string image
>>>>78 byte !0x2d Image
!:mime application/vnd.oasis.opendocument.image
>>>>78 string -template Template
!:mime application/vnd.oasis.opendocument.image-template
# EPUB (OEBPS) books using OCF (OEBPS Container Format)
# From: Adam Buchbinder <adam.buchbinder@gmail.com>
# http://www.idpf.org/ocf/ocf1.0/download/ocf10.htm, section 4.
# (mimetype contains "application/epub+zip")
>>50 string epub+zip EPUB ebook data
!:mime application/epub+zip
# Catch other ZIP-with-mimetype formats
# In a ZIP file, the bytes immediately after a member's contents are
# always "PK". The 2 regex rules here print the "mimetype" member's
# contents up to the first 'P'. Luckily, most MIME types don't contain
# any capital 'P's. This is a kludge.
# (mimetype contains "application/<OTHER>")
>>50 string !epub+zip
>>>50 string !vnd.oasis.opendocument.
>>>>50 string !vnd.sun.xml.
>>>>>50 string !vnd.kde.
>>>>>>38 regex [!-OQ-~]+ Zip data (MIME type "%s"?)
!:mime application/zip
# (mimetype contents other than "application/*")
>26 string \x8\0\0\0mimetype
>>38 string !application/
>>>38 regex [!-OQ-~]+ Zip data (MIME type "%s"?)
!:mime application/zip
# Generic zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu)
# Next line excludes specialized formats:
>26 string !\x8\0\0\0mimetype Zip archive data
!:mime application/zip
>>4 byte 0x09 \b, at least v0.9 to extract
>>4 byte 0x0a \b, at least v1.0 to extract
>>4 byte 0x0b \b, at least v1.1 to extract
>>4 byte 0x14 \b, at least v2.0 to extract
>>4 byte 0x2d \b, at least v3.0 to extract
>>0x161 string WINZIP \b, WinZIP self-extracting
# StarView Metafile
# From Pierre Ducroquet <pinaraf@pinaraf.info>
0 string VCLMTF StarView MetaFile
>6 beshort x \b, version %d
>8 belong x \b, size %d
# Zoo archiver # Zoo archiver
20 lelong 0xfdc4a7dc Zoo archive data 20 lelong 0xfdc4a7dc Zoo archive data
@ -652,7 +713,7 @@
!:mime application/octet-stream !:mime application/octet-stream
# #
# LBR. NB: May conflict with the questionable # LBR. NB: May conflict with the questionable
# "binary Computer Graphics Metafile" format. # "binary Computer Graphics Metafile" format.
# #
0 string \0\ \ \ \ \ \ \ \ \ \ \ \0\0 LBR archive data 0 string \0\ \ \ \ \ \ \ \ \ \ \ \0\0 LBR archive data
@ -668,10 +729,10 @@
# From Rafael Laboissiere <rafael@laboissiere.net> # From Rafael Laboissiere <rafael@laboissiere.net>
# The Project Revision Control System (see # The Project Revision Control System (see
# http://prcs.sourceforge.net) generates a packaged project # http://prcs.sourceforge.net) generates a packaged project
# file which is recognized by the following entry: # file which is recognized by the following entry:
0 leshort 0xeb81 PRCS packaged project 0 leshort 0xeb81 PRCS packaged project
# Microsoft cabinets # Microsoft cabinets
# by David Necas (Yeti) <yeti@physics.muni.cz> # by David Necas (Yeti) <yeti@physics.muni.cz>
#0 string MSCF\0\0\0\0 Microsoft cabinet file data, #0 string MSCF\0\0\0\0 Microsoft cabinet file data,
#>25 byte x v%d #>25 byte x v%d
@ -679,7 +740,7 @@
# MPi: All CABs have version 1.3, so this is pointless. # MPi: All CABs have version 1.3, so this is pointless.
# Better magic in debian-additions. # Better magic in debian-additions.
# GTKtalog catalogs # GTKtalog catalogs
# by David Necas (Yeti) <yeti@physics.muni.cz> # by David Necas (Yeti) <yeti@physics.muni.cz>
4 string gtktalog\ GTKtalog catalog data, 4 string gtktalog\ GTKtalog catalog data,
>13 string 3 version 3 >13 string 3 version 3
@ -698,12 +759,12 @@
!:mime application/x-bittorrent !:mime application/x-bittorrent
# Atari MSA archive - Teemu Hukkanen <tjhukkan@iki.fi> # Atari MSA archive - Teemu Hukkanen <tjhukkan@iki.fi>
0 beshort 0x0e0f Atari MSA archive data 0 beshort 0x0e0f Atari MSA archive data
>2 beshort x \b, %d sectors per track >2 beshort x \b, %d sectors per track
>4 beshort 0 \b, 1 sided >4 beshort 0 \b, 1 sided
>4 beshort 1 \b, 2 sided >4 beshort 1 \b, 2 sided
>6 beshort x \b, starting track: %d >6 beshort x \b, starting track: %d
>8 beshort x \b, ending track: %d >8 beshort x \b, ending track: %d
# Alternate ZIP string (amc@arwen.cs.berkeley.edu) # Alternate ZIP string (amc@arwen.cs.berkeley.edu)
0 string PK00PK\003\004 Zip archive data 0 string PK00PK\003\004 Zip archive data
@ -748,7 +809,7 @@
# DR-DOS 7.03 Packed File *.??_ # DR-DOS 7.03 Packed File *.??_
0 string Packed\ File\ Personal NetWare Packed File 0 string Packed\ File\ Personal NetWare Packed File
>12 string x \b, was "%.12s" >12 string x \b, was "%.12s"
# EET archive # EET archive
# From: Tilman Sauerbeck <tilman@code-monkey.de> # From: Tilman Sauerbeck <tilman@code-monkey.de>
@ -804,3 +865,38 @@
>24 belong 1 SHA-1 checksum >24 belong 1 SHA-1 checksum
>24 belong 2 MD5 checksum >24 belong 2 MD5 checksum
# Type: Parity Archive
# From: Daniel van Eeden <daniel_e@dds.nl>
0 string PAR2 Parity Archive Volume Set
# Bacula volume format. (Volumes always start with a block header.)
# URL: http://bacula.org/3.0.x-manuals/en/developers/developers/Block_Header.html
# From: Adam Buchbinder <adam.buchbinder@gmail.com>
12 string BB02 Bacula volume
>20 bedate x \b, started %s
# ePub is XHTML + XML inside a ZIP archive. The first member of the
# archive must be an uncompressed file called 'mimetype' with contents
# 'application/epub+zip'
# start by checking that this is a ZIP archive, then check for the
# proper mimetype file
# From: Ralf Brown <ralf.brown@gmail.com>
0 string PK\003\004
>0x1E string mimetypeapplication/epub+zip EPUB document
!:mime application/epub+zip
# From: "Michał Górny" <mgorny@gentoo.org>
# ZPAQ: http://mattmahoney.net/dc/zpaq.html
0 string zPQ ZPAQ stream
>3 byte x \b, level %d
# BBeB ebook, unencrypted (LRF format)
# URL: http://www.sven.de/librie/Librie/LrfFormat
# From: Adam Buchbinder <adam.buchbinder@gmail.com>
0 string L\0R\0F\0\0\0 BBeB ebook data, unencrypted
>8 beshort x \b, version %d
>36 byte 1 \b, front-to-back
>36 byte 16 \b, back-to-front
>42 beshort x \b, (%dx,
>44 beshort x %d)

View file

@ -1,5 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: asterix,v 1.5 2009/09/19 16:28:08 christos Exp $
# asterix: file(1) magic for Aster*x; SunOS 5.5.1 gave the 4-character # asterix: file(1) magic for Aster*x; SunOS 5.5.1 gave the 4-character
# strings as "long" - we assume they're just strings: # strings as "long" - we assume they're just strings:
# From: guy@netapp.com (Guy Harris) # From: guy@netapp.com (Guy Harris)

View file

@ -1,5 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: att3b,v 1.8 2009/09/19 16:28:08 christos Exp $
# att3b: file(1) magic for AT&T 3B machines # att3b: file(1) magic for AT&T 3B machines
# #
# The `versions' should be un-commented if they work for you. # The `versions' should be un-commented if they work for you.

View file

@ -1,4 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: audio,v 1.63 2011/09/06 11:00:06 christos Exp $
# audio: file(1) magic for sound formats (see also "iff") # audio: file(1) magic for sound formats (see also "iff")
# #
# Jan Nicolai Langfeldt (janl@ifi.uio.no), Dan Quinlan (quinlan@yggdrasil.com), # Jan Nicolai Langfeldt (janl@ifi.uio.no), Dan Quinlan (quinlan@yggdrasil.com),
@ -116,7 +118,7 @@
# Real Audio (Magic .ra\0375) # Real Audio (Magic .ra\0375)
0 belong 0x2e7261fd RealAudio sound file 0 belong 0x2e7261fd RealAudio sound file
!:mime audio/x-pn-realaudio !:mime audio/x-pn-realaudio
0 string .RMF RealMedia file 0 string .RMF\0\0\0 RealMedia file
!:mime application/vnd.rn-realmedia !:mime application/vnd.rn-realmedia
#video/x-pn-realvideo #video/x-pn-realvideo
#video/vnd.rn-realvideo #video/vnd.rn-realvideo
@ -250,12 +252,17 @@
>0x36 string >\0 author: "%s" >0x36 string >\0 author: "%s"
>0x56 string >\0 copyright: "%s" >0x56 string >\0 copyright: "%s"
# IRCAM <mpruett@sgi.com> # IRCAM sound files - Michael Pruett <michael@68k.org>
# VAX and MIPS files are little-endian; Sun and NeXT are big-endian # http://www-mmsp.ece.mcgill.ca/documents/AudioFormats/IRCAM/IRCAM.html
0 belong 0x64a30100 IRCAM file (VAX) 0 belong 0x64a30100 IRCAM file (VAX little-endian)
0 belong 0x64a30200 IRCAM file (Sun) 0 belong 0x0001a364 IRCAM file (VAX big-endian)
0 belong 0x64a30200 IRCAM file (Sun big-endian)
0 belong 0x0002a364 IRCAM file (Sun little-endian)
0 belong 0x64a30300 IRCAM file (MIPS little-endian) 0 belong 0x64a30300 IRCAM file (MIPS little-endian)
0 belong 0x64a30400 IRCAM file (NeXT) 0 belong 0x0003a364 IRCAM file (MIPS big-endian)
0 belong 0x64a30400 IRCAM file (NeXT big-endian)
0 belong 0x64a30400 IRCAM file (NeXT big-endian)
0 belong 0x0004a364 IRCAM file (NeXT little-endian)
# NIST SPHERE <mpruett@sgi.com> # NIST SPHERE <mpruett@sgi.com>
0 string NIST_1A\n\ \ \ 1024\n NIST SPHERE file 0 string NIST_1A\n\ \ \ 1024\n NIST SPHERE file
@ -276,8 +283,8 @@
>21 ubyte <128 note %d, >21 ubyte <128 note %d,
>22 byte =0 replay 5.485 KHz >22 byte =0 replay 5.485 KHz
>22 byte =1 replay 8.084 KHz >22 byte =1 replay 8.084 KHz
>22 byte =2 replay 10.971 Khz >22 byte =2 replay 10.971 KHz
>22 byte =3 replay 16.168 Khz >22 byte =3 replay 16.168 KHz
>22 byte =4 replay 21.942 KHz >22 byte =4 replay 21.942 KHz
>22 byte =5 replay 32.336 KHz >22 byte =5 replay 32.336 KHz
>22 byte =6 replay 43.885 KHz >22 byte =6 replay 43.885 KHz
@ -306,6 +313,15 @@
>122 byte&0x1 =1 PAL >122 byte&0x1 =1 PAL
>122 byte&0x1 =0 NTSC >122 byte&0x1 =0 NTSC
# Type: SNES SPC700 sound files
# From: Josh Triplett <josh@freedesktop.org>
0 string SNES-SPC700\ Sound\ File\ Data\ v SNES SPC700 sound file
>&0 string 0.30 \b, version %s
>>0x23 byte 0x1B \b, without ID666 tag
>>0x23 byte 0x1A \b, with ID666 tag
>>>0x2E string >\0 \b, song "%.32s"
>>>0x4E string >\0 \b, game "%.32s"
# Impulse tracker module (audio/x-it) # Impulse tracker module (audio/x-it)
0 string IMPM Impulse Tracker module sound data - 0 string IMPM Impulse Tracker module sound data -
!:mime audio/x-mod !:mime audio/x-mod
@ -604,3 +620,18 @@
# URL: http://filext.com/detaillist.php?extdetail=AMR # URL: http://filext.com/detaillist.php?extdetail=AMR
# From: Russell Coker <russell@coker.com.au> # From: Russell Coker <russell@coker.com.au>
0 string #!AMR Adaptive Multi-Rate Codec (GSM telephony) 0 string #!AMR Adaptive Multi-Rate Codec (GSM telephony)
# Type: SuperCollider 3 Synth Definition File Format
# From: Mario Lang <mlang@debian.org>
0 string SCgf SuperCollider3 Synth Definition file,
>4 belong x version %d
# Type: True Audio Lossless Audio
# URL: http://wiki.multimedia.cx/index.php?title=True_Audio
# From: Mike Melanson <mike@multimedia.cx>
0 string TTA1 True Audio Lossless Audio
# Type: WavPack Lossless Audio
# URL: http://wiki.multimedia.cx/index.php?title=WavPack
# From: Mike Melanson <mike@multimedia.cx>
0 string wvpk WavPack Lossless Audio

View file

@ -1,4 +1,6 @@
#---------------------------------------------------------------- #----------------------------------------------------------------
# $File: basis,v 1.4 2009/09/19 16:28:08 christos Exp $
# basis: file(1) magic for BBx/Pro5-files # basis: file(1) magic for BBx/Pro5-files
# Oliver Dammer <dammer@olida.de> 2005/11/07 # Oliver Dammer <dammer@olida.de> 2005/11/07
# http://www.basis.com business-basic-files. # http://www.basis.com business-basic-files.

View file

@ -1,4 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: bflt,v 1.4 2009/09/19 16:28:08 christos Exp $
# bFLT: file(1) magic for BFLT uclinux binary files # bFLT: file(1) magic for BFLT uclinux binary files
# #
# From Philippe De Muyter <phdm@macqel.be> # From Philippe De Muyter <phdm@macqel.be>

View file

@ -0,0 +1,25 @@
# Berkeley Lab Checkpoint Restart (BLCR) checkpoint context files
# http://ftg.lbl.gov/checkpoint
0 string C\0\0\0R\0\0\0 BLCR
>16 lelong 1 x86
>16 lelong 3 alpha
>16 lelong 5 x86-64
>16 lelong 7 ARM
>8 lelong x context data (little endian, version %d)
# Uncomment the following only of your "file" program supports "search"
#>0 search/1024 VMA\06 for kernel
#>>&1 byte x %d.
#>>&2 byte x %d.
#>>&3 byte x %d
0 string \0\0\0C\0\0\0R BLCR
>16 belong 2 SPARC
>16 belong 4 ppc
>16 belong 6 ppc64
>16 belong 7 ARMEB
>16 belong 8 SPARC64
>8 belong x context data (big endian, version %d)
# Uncomment the following only of your "file" program supports "search"
#>0 search/1024 VMA\06 for kernel
#>>&1 byte x %d.
#>>&2 byte x \b%d.
#>>&3 byte x \b%d

View file

@ -1,4 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: blender,v 1.5 2009/09/19 16:28:08 christos Exp $
# blender: file(1) magic for Blender 3D related files # blender: file(1) magic for Blender 3D related files
# #
# Native format rule v1.2. For questions use the developers list # Native format rule v1.2. For questions use the developers list

View file

@ -1,5 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: blit,v 1.8 2009/09/19 16:28:08 christos Exp $
# blit: file(1) magic for 68K Blit stuff as seen from 680x0 machine # blit: file(1) magic for 68K Blit stuff as seen from 680x0 machine
# #
# Note that this 0407 conflicts with several other a.out formats... # Note that this 0407 conflicts with several other a.out formats...

View file

@ -1,4 +1,6 @@
#
#------------------------------------------------------------------------------
# $File: bout,v 1.5 2009/09/19 16:28:08 christos Exp $
# i80960 b.out objects and archives # i80960 b.out objects and archives
# #
0 long 0x10d i960 b.out relocatable object 0 long 0x10d i960 b.out relocatable object

View file

@ -1,4 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: bsdi,v 1.5 2009/09/19 16:28:08 christos Exp $
# bsdi: file(1) magic for BSD/OS (from BSDI) objects # bsdi: file(1) magic for BSD/OS (from BSDI) objects
# #

View file

@ -0,0 +1,9 @@
# Chiasmus is a encryption standard developed by the German Federal
# Office for Information Security (Bundesamt fuer Sicherheit in der
# Informationstechnik).
# Extension: .xia
0 string XIA1 Chiasmus encrypted data
# Extension: .xis
0 string XIS Chiasmus key

View file

@ -1,4 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: btsnoop,v 1.5 2009/09/19 16:28:08 christos Exp $
# BTSnoop: file(1) magic for BTSnoop files # BTSnoop: file(1) magic for BTSnoop files
# #
# From <marcel@holtmann.org> # From <marcel@holtmann.org>

View file

@ -1,4 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: c-lang,v 1.14 2009/09/19 16:28:08 christos Exp $
# c-lang: file(1) magic for C programs (or REXX) # c-lang: file(1) magic for C programs (or REXX)
# #

View file

@ -1,4 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: c64,v 1.5 2009/09/19 16:28:08 christos Exp $
# c64: file(1) magic for various commodore 64 related files # c64: file(1) magic for various commodore 64 related files
# #
# From: Dirk Jagdmann <doj@cubic.org> # From: Dirk Jagdmann <doj@cubic.org>

View file

@ -1,5 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: cad,v 1.10 2010/12/25 14:33:43 christos Exp $
# autocad: file(1) magic for cad files # autocad: file(1) magic for cad files
# #
@ -50,9 +51,54 @@
# AutoCad, from Nahuel Greco # AutoCad, from Nahuel Greco
# AutoCAD DWG versions R12/R13/R14 (www.autodesk.com) # AutoCAD DWG versions R12/R13/R14 (www.autodesk.com)
0 string AC1012 AutoCad (release 12) 0 string AC1012 DWG AutoDesk AutoCad (release 12)
0 string AC1013 AutoCad (release 13) 0 string AC1013 DWG AutoDesk AutoCad (release 13)
0 string AC1014 AutoCad (release 14) 0 string AC1014 DWG AutoDesk AutoCad (release 14)
# A new version of AutoCAD DWG
# Sergey Zaykov (mail_of_sergey@mail.ru, sergey_zaikov@rambler.ru,
# ICQ 358572321)
# From various sources like:
# http://autodesk.blogs.com/between_the_lines/autocad-release-history.html
0 string AC1018 DWG AutoDesk AutoCAD 2004/2005/2006
0 string AC1021 DWG AutoDesk AutoCAD 2007/2008/2009
0 string AC1024 DWG AutoDesk AutoCAD 2010/2011
# KOMPAS 2D drawing from ASCON
# This is KOMPAS 2D drawing or fragment of drawing but is not detailed nor
# gathered nor specification
# ASCON http://ascon.net/main/ in English,
# http://ascon.ru/ main site in Russian
# Extension is CDW for drawing and FRW for fragment of drawing
# Sergey Zaykov (mail_of_sergey@mail.ru, sergey_zaikov@rambler.ru,
# ICQ 358572321, http://vkontakte.ru/id16076543)
# From:
# http://sd.ascon.ru/otrs/customer.pl?Action=CustomerFAQ&CategoryID=4&ItemID=292
# (in russian) and my experiments
0 string KF
>2 belong 0x4E00000C Kompas drawing 12.0 SP1
>2 belong 0x4D00000C Kompas drawing 12.0
>2 belong 0x3200000B Kompas drawing 11.0 SP1
>2 belong 0x3100000B Kompas drawing 11.0
>2 belong 0x2310000A Kompas drawing 10.0 SP1
>2 belong 0x2110000A Kompas drawing 10.0
>2 belong 0x08000009 Kompas drawing 9.0 SP1
>2 belong 0x05000009 Kompas drawing 9.0
>2 belong 0x33010008 Kompas drawing 8+
>2 belong 0x1A000008 Kompas drawing 8.0
>2 belong 0x2C010107 Kompas drawing 7+
>2 belong 0x05000007 Kompas drawing 7.0
>2 belong 0x32000006 Kompas drawing 6+
>2 belong 0x09000006 Kompas drawing 6.0
>2 belong 0x5C009005 Kompas drawing 5.11R03
>2 belong 0x54009005 Kompas drawing 5.11R02
>2 belong 0x51009005 Kompas drawing 5.11R01
>2 belong 0x22009005 Kompas drawing 5.10R03
>2 belong 0x22009005 Kompas drawing 5.10R02 mar
>2 belong 0x21009005 Kompas drawing 5.10R02 febr
>2 belong 0x19009005 Kompas drawing 5.10R01
>2 belong 0xF4008005 Kompas drawing 5.9R01.003
>2 belong 0x1C008005 Kompas drawing 5.9R01.002
>2 belong 0x11008005 Kompas drawing 5.8R01.003
# CAD: file(1) magic for computer aided design files # CAD: file(1) magic for computer aided design files
# Phillip Griffith <phillip dot griffith at gmail dot com> # Phillip Griffith <phillip dot griffith at gmail dot com>

View file

@ -1,4 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: cafebabe,v 1.8 2009/09/19 16:28:08 christos Exp $
# Cafe Babes unite! # Cafe Babes unite!
# #
# Since Java bytecode and Mach-O fat-files have the same magic number, the test # Since Java bytecode and Mach-O fat-files have the same magic number, the test

View file

@ -1,4 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: cddb,v 1.4 2009/09/19 16:28:08 christos Exp $
# CDDB: file(1) magic for CDDB(tm) format CD text data files # CDDB: file(1) magic for CDDB(tm) format CD text data files
# #
# From <steve@gracenote.com> # From <steve@gracenote.com>
@ -7,4 +9,4 @@
# CDDB-enabled CD player applications. # CDDB-enabled CD player applications.
# #
0 search/1/b #\040xmcd CDDB(tm) format CD text data 0 search/1/w #\040xmcd CDDB(tm) format CD text data

View file

@ -1,5 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: chord,v 1.5 2010/09/20 19:19:16 rrt Exp $
# chord: file(1) magic for Chord music sheet typesetting utility input files # chord: file(1) magic for Chord music sheet typesetting utility input files
# #
# From Philippe De Muyter <phdm@macqel.be> # From Philippe De Muyter <phdm@macqel.be>
@ -7,3 +8,8 @@
# #
0 string {title Chord text file 0 string {title Chord text file
# Type: PowerTab file format
# URL: http://www.power-tab.net/
# From: Jelmer Vernooij <jelmer@samba.org>
0 string ptab\003\000 Power-Tab v3 Tablature File
0 string ptab\004\000 Power-Tab v4 Tablature File

View file

@ -1,4 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: cisco,v 1.4 2009/09/19 16:28:08 christos Exp $
# cisco: file(1) magic for cisco Systems routers # cisco: file(1) magic for cisco Systems routers
# #
# Most cisco file-formats are covered by the generic elf code # Most cisco file-formats are covered by the generic elf code

View file

@ -1,4 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: citrus,v 1.4 2009/09/19 16:28:08 christos Exp $
# citrus locale declaration # citrus locale declaration
# #

View file

@ -1,5 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: clarion,v 1.4 2009/09/19 16:28:08 christos Exp $
# clarion: file(1) magic for # Clarion Personal/Professional Developer # clarion: file(1) magic for # Clarion Personal/Professional Developer
# (v2 and above) # (v2 and above)
# From: Julien Blache <jb@jblache.org> # From: Julien Blache <jb@jblache.org>

View file

@ -1,5 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: claris,v 1.5 2009/09/19 16:28:08 christos Exp $
# claris: file(1) magic for claris # claris: file(1) magic for claris
# "H. Nanosecond" <aldomel@ix.netcom.com> # "H. Nanosecond" <aldomel@ix.netcom.com>
# Claris Works a word processor, etc. # Claris Works a word processor, etc.

View file

@ -1,5 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: clipper,v 1.6 2009/09/19 16:28:08 christos Exp $
# clipper: file(1) magic for Intergraph (formerly Fairchild) Clipper. # clipper: file(1) magic for Intergraph (formerly Fairchild) Clipper.
# #
# XXX - what byte order does the Clipper use? # XXX - what byte order does the Clipper use?

View file

@ -1,69 +1,74 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: commands,v 1.41 2011/05/02 12:36:41 christos Exp $
# commands: file(1) magic for various shells and interpreters # commands: file(1) magic for various shells and interpreters
# #
#0 string : shell archive or script for antique kernel text #0 string/w : shell archive or script for antique kernel text
0 string/b #!\ /bin/sh POSIX shell script text executable 0 string/wt #!\ /bin/sh POSIX shell script text executable
!:mime text/x-shellscript !:mime text/x-shellscript
0 string/b #!\ /bin/csh C shell script text executable 0 string/wt #!\ /bin/csh C shell script text executable
!:mime text/x-shellscript !:mime text/x-shellscript
# korn shell magic, sent by George Wu, gwu@clyde.att.com # korn shell magic, sent by George Wu, gwu@clyde.att.com
0 string/b #!\ /bin/ksh Korn shell script text executable 0 string/wt #!\ /bin/ksh Korn shell script text executable
!:mime text/x-shellscript !:mime text/x-shellscript
0 string/b #!\ /bin/tcsh Tenex C shell script text executable 0 string/wt #!\ /bin/tcsh Tenex C shell script text executable
!:mime text/x-shellscript !:mime text/x-shellscript
0 string/b #!\ /usr/local/tcsh Tenex C shell script text executable 0 string/wt #!\ /usr/bin/tcsh Tenex C shell script text executable
!:mime text/x-shellscript !:mime text/x-shellscript
0 string/b #!\ /usr/local/bin/tcsh Tenex C shell script text executable 0 string/wt #!\ /usr/local/tcsh Tenex C shell script text executable
!:mime text/x-shellscript
0 string/wt #!\ /usr/local/bin/tcsh Tenex C shell script text executable
!:mime text/x-shellscript !:mime text/x-shellscript
# #
# zsh/ash/ae/nawk/gawk magic from cameron@cs.unsw.oz.au (Cameron Simpson) # zsh/ash/ae/nawk/gawk magic from cameron@cs.unsw.oz.au (Cameron Simpson)
0 string/b #!\ /bin/zsh Paul Falstad's zsh script text executable 0 string/wt #!\ /bin/zsh Paul Falstad's zsh script text executable
!:mime text/x-shellscript !:mime text/x-shellscript
0 string/b #!\ /usr/bin/zsh Paul Falstad's zsh script text executable 0 string/wt #!\ /usr/bin/zsh Paul Falstad's zsh script text executable
!:mime text/x-shellscript !:mime text/x-shellscript
0 string/b #!\ /usr/local/bin/zsh Paul Falstad's zsh script text executable 0 string/wt #!\ /usr/local/bin/zsh Paul Falstad's zsh script text executable
!:mime text/x-shellscript !:mime text/x-shellscript
0 string/b #!\ /usr/local/bin/ash Neil Brown's ash script text executable 0 string/wt #!\ /usr/local/bin/ash Neil Brown's ash script text executable
!:mime text/x-shellscript !:mime text/x-shellscript
0 string/b #!\ /usr/local/bin/ae Neil Brown's ae script text executable 0 string/wt #!\ /usr/local/bin/ae Neil Brown's ae script text executable
!:mime text/x-shellscript !:mime text/x-shellscript
0 string/b #!\ /bin/nawk new awk script text executable 0 string/wt #!\ /bin/nawk new awk script text executable
!:mime text/x-nawk !:mime text/x-nawk
0 string/b #!\ /usr/bin/nawk new awk script text executable 0 string/wt #!\ /usr/bin/nawk new awk script text executable
!:mime text/x-nawk !:mime text/x-nawk
0 string/b #!\ /usr/local/bin/nawk new awk script text executable 0 string/wt #!\ /usr/local/bin/nawk new awk script text executable
!:mime text/x-nawk !:mime text/x-nawk
0 string/b #!\ /bin/gawk GNU awk script text executable 0 string/wt #!\ /bin/gawk GNU awk script text executable
!:mime text/x-gawk !:mime text/x-gawk
0 string/b #!\ /usr/bin/gawk GNU awk script text executable 0 string/wt #!\ /usr/bin/gawk GNU awk script text executable
!:mime text/x-gawk !:mime text/x-gawk
0 string/b #!\ /usr/local/bin/gawk GNU awk script text executable 0 string/wt #!\ /usr/local/bin/gawk GNU awk script text executable
!:mime text/x-gawk !:mime text/x-gawk
# #
0 string/b #!\ /bin/awk awk script text executable 0 string/wt #!\ /bin/awk awk script text executable
!:mime text/x-awk !:mime text/x-awk
0 string/b #!\ /usr/bin/awk awk script text executable 0 string/wt #!\ /usr/bin/awk awk script text executable
!:mime text/x-awk !:mime text/x-awk
# update to distinguish from *.vcf files 0 regex =^\\s*BEGIN\\s*[{] awk script text
# this is broken because postscript has /EBEGIN{ for example.
#0 search/Bb BEGIN { awk script text
# AT&T Bell Labs' Plan 9 shell # AT&T Bell Labs' Plan 9 shell
0 string/b #!\ /bin/rc Plan 9 rc shell script text executable 0 string/wt #!\ /bin/rc Plan 9 rc shell script text executable
# bash shell magic, from Peter Tobias (tobias@server.et-inf.fho-emden.de) # bash shell magic, from Peter Tobias (tobias@server.et-inf.fho-emden.de)
0 string/b #!\ /bin/bash Bourne-Again shell script text executable 0 string/wt #!\ /bin/bash Bourne-Again shell script text executable
!:mime text/x-shellscript !:mime text/x-shellscript
0 string/b #!\ /usr/local/bin/bash Bourne-Again shell script text executable 0 string/wt #!\ /usr/bin/bash Bourne-Again shell script text executable
!:mime text/x-shellscript
0 string/wt #!\ /usr/local/bash Bourne-Again shell script text executable
!:mime text/x-shellscript
0 string/wt #!\ /usr/local/bin/bash Bourne-Again shell script text executable
!:mime text/x-shellscript !:mime text/x-shellscript
# using env # using env
0 string #!/usr/bin/env a 0 string/t #!/usr/bin/env a
>15 string >\0 %s script text executable >15 string/t >\0 %s script text executable
0 string #!\ /usr/bin/env a 0 string/t #!\ /usr/bin/env a
>16 string >\0 %s script text executable >16 string/t >\0 %s script text executable
# PHP scripts # PHP scripts
# Ulf Harnhammar <ulfh@update.uu.se> # Ulf Harnhammar <ulfh@update.uu.se>
@ -73,11 +78,21 @@
!:mime text/x-php !:mime text/x-php
0 search/1 =<?\r PHP script text 0 search/1 =<?\r PHP script text
!:mime text/x-php !:mime text/x-php
0 search/1/b #!\ /usr/local/bin/php PHP script text executable 0 search/1/w #!\ /usr/local/bin/php PHP script text executable
!:mime text/x-php !:mime text/x-php
0 search/1/b #!\ /usr/bin/php PHP script text executable 0 search/1/w #!\ /usr/bin/php PHP script text executable
!:mime text/x-php
# Smarty compiled template, http://www.smarty.net/
# Elan Ruusamäe <glen@delfi.ee>
0 string =<?php\ /*\ Smarty\ version Smarty compiled template
>24 regex [0-9.]+ \b, version %s
!:mime text/x-php !:mime text/x-php
0 string Zend\x00 PHP script Zend Optimizer data 0 string Zend\x00 PHP script Zend Optimizer data
0 string $! DCL command file 0 string/t $! DCL command file
# Type: Pdmenu
# URL: http://packages.debian.org/pdmenu
# From: Edward Betts <edward@debian.org>
0 string #!/usr/bin/pdmenu Pdmenu configuration file text

View file

@ -1,5 +1,6 @@
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
# $File: communications,v 1.5 2009/09/19 16:28:08 christos Exp $
# communication # communication
# TTCN is the Tree and Tabular Combined Notation described in ISO 9646-3. # TTCN is the Tree and Tabular Combined Notation described in ISO 9646-3.

View file

@ -1,5 +1,5 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: compress,v 1.47 2011/03/08 00:39:46 christos Exp $
# compress: file(1) magic for pure-compression formats (no archives) # compress: file(1) magic for pure-compression formats (no archives)
# #
# compress, gzip, pack, compact, huf, squeeze, crunch, freeze, yabba, etc. # compress, gzip, pack, compact, huf, squeeze, crunch, freeze, yabba, etc.
@ -19,7 +19,7 @@
# Edited by Chris Chittleborough <cchittleborough@yahoo.com.au>, March 2002 # Edited by Chris Chittleborough <cchittleborough@yahoo.com.au>, March 2002
# * Original filename is only at offset 10 if "extra field" absent # * Original filename is only at offset 10 if "extra field" absent
# * Produce shorter output - notably, only report compression methods # * Produce shorter output - notably, only report compression methods
# other than 8 ("deflate", the only method defined in RFC 1952). # other than 8 ("deflate", the only method defined in RFC 1952).
0 string \037\213 gzip compressed data 0 string \037\213 gzip compressed data
!:mime application/x-gzip !:mime application/x-gzip
>2 byte <8 \b, reserved method >2 byte <8 \b, reserved method
@ -182,23 +182,29 @@
>4 belong 0x090A0C0D best compression >4 belong 0x090A0C0D best compression
# 7-zip archiver, from Thomas Klausner (wiz@danbala.tuwien.ac.at) # 7-zip archiver, from Thomas Klausner (wiz@danbala.tuwien.ac.at)
# http://www.7-zip.org or DOC/7zFormat.txt # http://www.7-zip.org or DOC/7zFormat.txt
# #
0 string 7z\274\257\047\034 7-zip archive data, 0 string 7z\274\257\047\034 7-zip archive data,
>6 byte x version %d >6 byte x version %d
>7 byte x \b.%d >7 byte x \b.%d
!:mime application/x-7z-compressed
# Type: LZMA # Type: LZMA
# URL: http://www.7-zip.org/sdk.html 0 lelong 0x8000005d LZMA compressed data,
# From: Robert Millan <rmh@aybabtu.com> and Reuben Thomas <rrt@sc3d.org> >5 lequad =0xffffffffffffffff streamed
# Commented out because apparently not reliable (according to Debian >5 lequad !0xffffffffffffffff non-streamed, size %lld
# bug #364260) !:mime application/x-lzma
#0 string ]\000\000\200\000 LZMA compressed data
# http://tukaani.org/xz/xz-file-format.txt # http://tukaani.org/xz/xz-file-format.txt
0 ustring \xFD7zXZ\x00 xz compressed data 0 ustring \xFD7zXZ\x00 XZ compressed data
!:mime application/x-xz !:mime application/x-xz
# https://github.com/ckolivas/lrzip/blob/master/doc/magic.header.txt
0 string LRZI LRZIP compressed data
>4 byte x - version %d
>5 byte x \b.%d
!:mime application/x-lrzip
# AFX compressed files (Wolfram Kleff) # AFX compressed files (Wolfram Kleff)
2 string -afx- AFX compressed file data 2 string -afx- AFX compressed file data
@ -213,7 +219,12 @@
>5 byte x \b.%d >5 byte x \b.%d
>6 belong x (%d bytes) >6 belong x (%d bytes)
# Type: XZ 0 string ArC\x01 FreeArc archive <http://freearc.org>
# URL: http://tukaani.org/xz/
0 string \xfd\x37\x7a\x58\x5a\x00 XZ compressed data # Type: DACT compressed files
!:mime application/x-xz 0 long 0x444354C3 DACT compressed data
>4 byte >-1 (version %i.
>5 byte >-1 %i.
>6 byte >-1 %i)
>7 long >0 , original size: %i bytes
>15 long >30 , block size: %i bytes

View file

@ -1,4 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: console,v 1.18 2010/09/20 19:19:17 rrt Exp $
# Console game magic # Console game magic
# Toby Deshane <hac@shoelace.digivill.net> # Toby Deshane <hac@shoelace.digivill.net>
# ines: file(1) magic for Marat's iNES Nintendo Entertainment System # ines: file(1) magic for Marat's iNES Nintendo Entertainment System
@ -163,9 +165,13 @@
# Atari Lynx cartridge dump (EXE/BLL header) # Atari Lynx cartridge dump (EXE/BLL header)
# From: "Stefan A. Haubenthal" <polluks@web.de> # From: "Stefan A. Haubenthal" <polluks@web.de>
0 beshort 0x8008 Lynx cartridge, # Double-check that the image type matches too, 0x8008 conflicts with
>2 beshort x RAM start $%04x # 8 character OMF-86 object file headers.
>6 string BS93 0 beshort 0x8008
>6 string BS93 Lynx homebrew cartridge
>>2 beshort x \b, RAM start $%04x
>6 string LYNX Lynx cartridge
>>2 beshort x \b, RAM start $%04x
# Opera file system that is used on the 3DO console # Opera file system that is used on the 3DO console
# From: Serge van den Boom <svdb@stack.nl> # From: Serge van den Boom <svdb@stack.nl>
@ -252,3 +258,7 @@
>>>(0x18.l-26) lelong x CRC32 0x%08x >>>(0x18.l-26) lelong x CRC32 0x%08x
>>>(0x18.l-23) string x "%s" >>>(0x18.l-23) string x "%s"
# Type: scummVM savegame files
# From: Sven Hartge <debian@ds9.argh.org>
0 string SCVM ScummVM savegame
>12 string >\0 "%s"

View file

@ -1,4 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: convex,v 1.7 2009/09/19 16:28:08 christos Exp $
# convex: file(1) magic for Convex boxes # convex: file(1) magic for Convex boxes
# #
# Convexes are big-endian. # Convexes are big-endian.

View file

@ -1,5 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: cracklib,v 1.7 2009/09/19 16:28:08 christos Exp $
# cracklib: file (1) magic for cracklib v2.7 # cracklib: file (1) magic for cracklib v2.7
0 lelong 0x70775631 Cracklib password index, little endian 0 lelong 0x70775631 Cracklib password index, little endian

View file

@ -1,4 +1,6 @@
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
# $File: ctags,v 1.6 2009/09/19 16:28:08 christos Exp $
# ctags: file (1) magic for Exuberant Ctags files # ctags: file (1) magic for Exuberant Ctags files
# From: Alexander Mai <mai@migdal.ikp.physik.tu-darmstadt.de> # From: Alexander Mai <mai@migdal.ikp.physik.tu-darmstadt.de>
0 search/1 =!_TAG Exuberant Ctags tag file text 0 search/1 =!_TAG Exuberant Ctags tag file text

View file

@ -1,5 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: dact,v 1.4 2009/09/19 16:28:08 christos Exp $
# dact: file(1) magic for DACT compressed files # dact: file(1) magic for DACT compressed files
# #
0 long 0x444354C3 DACT compressed data 0 long 0x444354C3 DACT compressed data

View file

@ -1,5 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: database,v 1.28 2011/09/16 19:40:40 christos Exp $
# database: file(1) magic for various databases # database: file(1) magic for various databases
# #
# extracted from header/code files by Graeme Wilford (eep2gw@ee.surrey.ac.uk) # extracted from header/code files by Graeme Wilford (eep2gw@ee.surrey.ac.uk)
@ -267,3 +268,28 @@
>40 lequad x \b, bnum=%lld >40 lequad x \b, bnum=%lld
>48 lequad x \b, rnum=%lld >48 lequad x \b, rnum=%lld
>56 lequad x \b, fsiz=%lld >56 lequad x \b, fsiz=%lld
# G-IR database made by gobject-introspect toolset,
# http://live.gnome.org/GObjectIntrospection
0 string GOBJ\nMETADATA\r\n\032 G-IR binary database
>16 byte x \b, v%d
>17 byte x \b.%d
>20 leshort x \b, %d entries
>22 leshort x \b/%d local
# Type: QDBM Quick Database Manager
# From: Benoit Sibaud <bsibaud@april.org>
0 string \\[depot\\]\n\f Quick Database Manager, little endian
0 string \\[DEPOT\\]\n\f Quick Database Manager, big endian
# Type: TokyoCabinet database
# URL: http://tokyocabinet.sourceforge.net/
# From: Benoit Sibaud <bsibaud@april.org>
0 string ToKyO\ CaBiNeT\n TokyoCabinet database
>14 string x (version %s)
# From: Stéphane Blondon http://www.yaal.fr
# Database file for Zope (done by FileStorage)
0 string FS21 Zope Object Database File Storage (data)
# Cache file for the database of Zope (done by ClientStorage)
0 string ZEC3 Zope Object Database Client Cache File (data)

View file

@ -1,5 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: diamond,v 1.7 2009/09/19 16:28:08 christos Exp $
# diamond: file(1) magic for Diamond system # diamond: file(1) magic for Diamond system
# #
# ... diamond is a multi-media mail and electronic conferencing system.... # ... diamond is a multi-media mail and electronic conferencing system....

View file

@ -1,4 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: diff,v 1.12 2010/12/07 16:52:52 christos Exp $
# diff: file(1) magic for diff(1) output # diff: file(1) magic for diff(1) output
# #
0 search/1 diff\ diff output text 0 search/1 diff\ diff output text
@ -12,8 +14,16 @@
0 search/1 Index: RCS/CVS diff output text 0 search/1 Index: RCS/CVS diff output text
!:mime text/x-diff !:mime text/x-diff
#
#------------------------------------------------------------------------------
# bsdiff: file(1) magic for bsdiff(1) output # bsdiff: file(1) magic for bsdiff(1) output
# 0 string/t BSDIFF40 bsdiff(1) patch file
0 string BSDIFF40 bsdiff(1) patch file
# unified diff
0 search/4096 ---\
>&0 search/1024 \n
>>&0 search/1 +++\
>>>&0 search/1024 \n
>>>>&0 search/1 @@ unified diff output text
!:mime text/x-diff
!:strength + 90

View file

@ -1,23 +1,40 @@
#------------------------------------------------------------------------------
# $File: digital,v 1.10 2011/05/03 01:44:17 christos Exp $
# Digital UNIX - Info # Digital UNIX - Info
# #
0 string =!<arch>\n________64E Alpha archive 0 string =!<arch>\n________64E Alpha archive
>22 string X -- out of date >22 string X -- out of date
# #
# Alpha COFF Based Executables
# The stripped stuff really needs to be an 8 byte (64 bit) compare, 0 leshort 0603
# but this works >>24 leshort 0410 COFF format alpha pure
0 leshort 0x183 COFF format alpha >>24 leshort 0413 COFF format alpha demand paged
>22 leshort&020000 &010000 sharable library, >>>22 leshort&030000 !020000 executable
>22 leshort&020000 ^010000 dynamically linked, >>>22 leshort&020000 !0 dynamically linked
>24 leshort 0410 pure >>>16 lelong !0 not stripped
>24 leshort 0413 demand paged >>>16 lelong 0 stripped
>8 lelong >0 executable or object module, not stripped >>>27 byte x - version %d
>8 lelong 0 >>>26 byte x \b.%d
>>12 lelong 0 executable or object module, stripped >>>28 byte x \b-%d
>>12 lelong >0 executable or object module, not stripped >>24 leshort 0407 COFF format alpha object
>27 byte >0 - version %d. >>>22 leshort&030000 020000 shared library
>26 byte >0 %d- >>>27 byte x - version %d
>28 leshort >0 %d >>>26 byte x \b.%d
>>>28 byte x \b-%d
# Basic recognition of Digital UNIX core dumps - Mike Bremford <mike@opac.bl.uk>
#
# The actual magic number is just "Core", followed by a 2-byte version
# number; however, treating any file that begins with "Core" as a Digital
# UNIX core dump file may produce too many false hits, so we include one
# byte of the version number as well; DU 5.0 appears only to be up to
# version 2.
#
0 string Core\001 Alpha COFF format core dump (Digital UNIX)
>24 string >\0 \b, from '%s'
0 string Core\002 Alpha COFF format core dump (Digital UNIX)
>24 string >\0 \b, from '%s'
# #
# The next is incomplete, we could tell more about this format, # The next is incomplete, we could tell more about this format,
# but its not worth it. # but its not worth it.

View file

@ -1,3 +1,6 @@
#------------------------------------------------------------------------------
# $File: dolby,v 1.5 2009/09/19 16:28:08 christos Exp $
# ATSC A/53 aka AC-3 aka Dolby Digital <ashitaka@gmx.at> # ATSC A/53 aka AC-3 aka Dolby Digital <ashitaka@gmx.at>
# from http://www.atsc.org/standards/a_52a.pdf # from http://www.atsc.org/standards/a_52a.pdf
# corrections, additions, etc. are always welcome! # corrections, additions, etc. are always welcome!

View file

@ -1,5 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: dump,v 1.11 2009/09/19 16:28:09 christos Exp $
# dump: file(1) magic for dump file format--for new and old dump filesystems # dump: file(1) magic for dump file format--for new and old dump filesystems
# #
# We specify both byte orders in order to recognize byte-swapped dumps. # We specify both byte orders in order to recognize byte-swapped dumps.

View file

@ -1,8 +1,9 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: dyadic,v 1.5 2010/09/20 18:55:20 rrt Exp $
# Dyadic: file(1) magic for Dyalog APL. # Dyadic: file(1) magic for Dyalog APL.
# #
0 byte 0xaa 0 byte 0xaa
>1 byte <4 Dyalog APL >1 byte <4 Dyalog APL
>>1 byte 0x00 incomplete workspace >>1 byte 0x00 incomplete workspace
>>1 byte 0x01 component file >>1 byte 0x01 component file
@ -10,3 +11,36 @@
>>1 byte 0x03 workspace >>1 byte 0x03 workspace
>>2 byte x version %d >>2 byte x version %d
>>3 byte x .%d >>3 byte x .%d
0 beshort 0xaa03 Dyalog APL
>2 byte x workspace type %d
>3 byte x subtype %d
>7 byte&0x28 0x00 32-bit
>7 byte&0x28 0x20 64-bit
>7 byte&0x0c 0x00 classic
>7 byte&0x0c 0x04 unicode
>7 byte&0x88 0x00 big-endian
>7 byte&0x88 0x80 little-endian
0 byte 0xaa Dyalog APL
>1 byte 0x00 aplcore
>1 byte 0x01 component file 32-bit non-journaled non-checksummed
>1 byte 0x02 external variable exclusive
>1 byte 0x06 external variable shared
>1 byte 0x07 session
>1 byte 0x08 mapped file 32-bit
>1 byte 0x09 component file 64-bit non-journaled non-checksummed
>1 byte 0x0a mapped file 64-bit
>1 byte 0x0b component file 32-bit level 1 journaled non-checksummed
>1 byte 0x0c component file 64-bit level 1 journaled non-checksummed
>1 byte 0x0d component file 32-bit level 1 journaled checksummed
>1 byte 0x0e component file 64-bit level 1 journaled checksummed
>1 byte 0x0f component file 32-bit level 2 journaled checksummed
>1 byte 0x10 component file 64-bit level 2 journaled checksummed
>1 byte 0x11 component file 32-bit level 3 journaled checksummed
>1 byte 0x12 component file 64-bit level 3 journaled checksummed
>1 byte 0x13 component file 32-bit non-journaled checksummed
>1 byte 0x14 component file 64-bit non-journaled checksummed
>1 byte 0x80 DDB
0 short 0x6060 Dyalog APL transfer

View file

@ -0,0 +1,8 @@
#------------------------------------------------------------------------------
# $File: ebml,v 1.1 2010/07/02 00:07:03 christos Exp $
# ebml: file(1) magic for various Extensible Binary Meta Language
# http://www.matroska.org/technical/specs/index.html#track
0 belong 0x1a45dfa3 EBML file
>4 search/b/100 \102\202
>>&1 string x \b, creator %.8s

View file

@ -1,5 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: editors,v 1.8 2009/09/19 16:28:09 christos Exp $
# T602 editor documents # T602 editor documents
# by David Necas <yeti@physics.muni.cz> # by David Necas <yeti@physics.muni.cz>
0 string @CT\ T602 document data, 0 string @CT\ T602 document data,

View file

@ -1,5 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: efi,v 1.4 2009/09/19 16:28:09 christos Exp $
# efi: file(1) magic for Universal EFI binaries # efi: file(1) magic for Universal EFI binaries
0 lelong 0x0ef1fab9 0 lelong 0x0ef1fab9

View file

@ -1,5 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: elf,v 1.53 2009/09/19 16:28:09 christos Exp $
# elf: file(1) magic for ELF executables # elf: file(1) magic for ELF executables
# #
# We have to check the byte order flag to see what byte order all the # We have to check the byte order flag to see what byte order all the

View file

@ -1,5 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: encore,v 1.6 2009/09/19 16:28:09 christos Exp $
# encore: file(1) magic for Encore machines # encore: file(1) magic for Encore machines
# #
# XXX - needs to have the byte order specified (NS32K was little-endian, # XXX - needs to have the byte order specified (NS32K was little-endian,

View file

@ -1,11 +1,53 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: epoc,v 1.7 2009/09/19 16:28:09 christos Exp $
# EPOC : file(1) magic for EPOC documents [Psion Series 5/Osaris/Geofox 1] # EPOC : file(1) magic for EPOC documents [Psion Series 5/Osaris/Geofox 1]
# Stefan Praszalowicz (hpicollo@worldnet.fr) # Stefan Praszalowicz <hpicollo@worldnet.fr> and Peter Breitenlohner <peb@mppmu.mpg.de>
# Useful information for improving this file can be found at: # Useful information for improving this file can be found at:
# http://software.frodo.looijaard.name/psiconv/formats/Index.html # http://software.frodo.looijaard.name/psiconv/formats/Index.html
0 lelong 0x10000037 #------------------------------------------------------------------------------
0 lelong 0x10000037 Psion Series 5
>4 lelong 0x10000039 font file
>4 lelong 0x1000003A printer driver
>4 lelong 0x1000003B clipboard
>4 lelong 0x10000042 multi-bitmap image
!:mime image/x-epoc-mbm
>4 lelong 0x1000006A application information file
>4 lelong 0x1000006D >4 lelong 0x1000006D
>>8 lelong 0x1000007F Psion Word >>8 lelong 0x1000007D Sketch image
>>8 lelong 0x10000088 Psion Sheet !:mime image/x-epoc-sketch
>>8 lelong 0x1000007D Psion Sketch >>8 lelong 0x1000007E voice note
>>8 lelong 0x10000085 Psion TextEd >>8 lelong 0x1000007F Word file
!:mime application/x-epoc-word
>>8 lelong 0x10000085 OPL program (TextEd)
!:mime application/x-epoc-opl
>>8 lelong 0x10000088 Sheet file
!:mime application/x-epoc-sheet
>>8 lelong 0x100001C4 EasyFax initialisation file
>4 lelong 0x10000073 OPO module
!:mime application/x-epoc-opo
>4 lelong 0x10000074 OPL application
!:mime application/x-epoc-app
>4 lelong 0x1000008A exported multi-bitmap image
0 lelong 0x10000041 Psion Series 5 ROM multi-bitmap image
0 lelong 0x10000050 Psion Series 5
>4 lelong 0x1000006D database
>4 lelong 0x100000E4 ini file
0 lelong 0x10000079 Psion Series 5 binary:
>4 lelong 0x00000000 DLL
>4 lelong 0x10000049 comms hardware library
>4 lelong 0x1000004A comms protocol library
>4 lelong 0x1000005D OPX
>4 lelong 0x1000006C application
>4 lelong 0x1000008D DLL
>4 lelong 0x100000AC logical device driver
>4 lelong 0x100000AD physical device driver
>4 lelong 0x100000E5 file transfer protocol
>4 lelong 0x100000E5 file transfer protocol
>4 lelong 0x10000140 printer definition
>4 lelong 0x10000141 printer definition
0 lelong 0x1000007A Psion Series 5 executable

View file

@ -1,5 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: erlang,v 1.6 2010/09/20 19:19:17 rrt Exp $
# erlang: file(1) magic for Erlang JAM and BEAM files # erlang: file(1) magic for Erlang JAM and BEAM files
# URL: http://www.erlang.org/faq/x779.html#AEN812 # URL: http://www.erlang.org/faq/x779.html#AEN812
@ -16,3 +17,5 @@
79 string Tue\ Jan\ 22\ 14:32:44\ MET\ 1991 Erlang JAM file - version 4.2 79 string Tue\ Jan\ 22\ 14:32:44\ MET\ 1991 Erlang JAM file - version 4.2
4 string 1.0\ Fri\ Feb\ 3\ 09:55:56\ MET\ 1995 Erlang JAM file - version 4.3 4 string 1.0\ Fri\ Feb\ 3\ 09:55:56\ MET\ 1995 Erlang JAM file - version 4.3
0 bequad 0x0000000000ABCDEF Erlang DETS file

View file

@ -1,5 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: esri,v 1.4 2009/09/19 16:28:09 christos Exp $
# ESRI Shapefile format (.shp .shx .dbf=DBaseIII) # ESRI Shapefile format (.shp .shx .dbf=DBaseIII)
# Based on info from # Based on info from
# <URL:http://www.esri.com/library/whitepapers/pdfs/shapefile.pdf> # <URL:http://www.esri.com/library/whitepapers/pdfs/shapefile.pdf>

View file

@ -1,5 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: fcs,v 1.4 2009/09/19 16:28:09 christos Exp $
# fcs: file(1) magic for FCS (Flow Cytometry Standard) data files # fcs: file(1) magic for FCS (Flow Cytometry Standard) data files
# From Roger Leigh <roger@whinlatter.uklinux.net> # From Roger Leigh <roger@whinlatter.uklinux.net>
0 string FCS1.0 Flow Cytometry Standard (FCS) data, version 1.0 0 string FCS1.0 Flow Cytometry Standard (FCS) data, version 1.0

View file

@ -1,5 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: filesystems,v 1.61 2011/01/10 14:01:10 christos Exp $
# filesystems: file(1) magic for different filesystems # filesystems: file(1) magic for different filesystems
# #
0 string \366\366\366\366 PC formatted floppy with no filesystem 0 string \366\366\366\366 PC formatted floppy with no filesystem
@ -882,13 +883,41 @@
# Minix filesystems - Juan Cespedes <cespedes@debian.org> # Minix filesystems - Juan Cespedes <cespedes@debian.org>
0x410 leshort 0x137f Minix filesystem 0x410 leshort 0x137f
0x410 beshort 0x137f Minix filesystem (big endian) !:strength / 2
>0x402 beshort !0 \b, %d zones >0x402 beshort < 100 Minix filesystem, V1, %d zones
>0x1e string minix \b, bootable
0x410 beshort 0x137f
!:strength / 2
>0x402 beshort < 100 Minix filesystem, V1 (big endian), %d zones
>0x1e string minix \b, bootable
0x410 leshort 0x138f
!:strength / 2
>0x402 beshort < 100 Minix filesystem, V1, 30 char names, %d zones
>0x1e string minix \b, bootable
0x410 beshort 0x138f
!:strength / 2
>0x402 beshort < 100 Minix filesystem, V1, 30 char names (big endian), %d zones
>0x1e string minix \b, bootable
0x410 leshort 0x2468
>0x402 beshort < 100 Minix filesystem, V2, %d zones
>0x1e string minix \b, bootable
0x410 beshort 0x2468
>0x402 beshort < 100 Minix filesystem, V2 (big endian), %d zones
>0x1e string minix \b, bootable
0x410 leshort 0x2478
>0x402 beshort < 100 Minix filesystem, V2, 30 char names, %d zones
>0x1e string minix \b, bootable
0x410 leshort 0x2478
>0x402 beshort < 100 Minix filesystem, V2, 30 char names, %d zones
>0x1e string minix \b, bootable
0x410 beshort 0x2478
>0x402 beshort !0 Minix filesystem, V2, 30 char names (big endian), %d zones
>0x1e string minix \b, bootable
0x410 leshort 0x4d5a
>0x402 beshort !0 Minix filesystem, V3, %d zones
>0x1e string minix \b, bootable >0x1e string minix \b, bootable
0x410 leshort 0x138f Minix filesystem, 30 char names
0x410 leshort 0x2468 Minix filesystem, version 2
0x410 leshort 0x2478 Minix filesystem, version 2, 30 char names
# romfs filesystems - Juan Cespedes <cespedes@debian.org> # romfs filesystems - Juan Cespedes <cespedes@debian.org>
0 string -rom1fs- romfs filesystem, version 1 0 string -rom1fs- romfs filesystem, version 1
@ -1084,6 +1113,8 @@
# ext2/ext3 filesystems - Andreas Dilger <adilger@dilger.ca> # ext2/ext3 filesystems - Andreas Dilger <adilger@dilger.ca>
# ext4 filesystem - Eric Sandeen <sandeen@sandeen.net> # ext4 filesystem - Eric Sandeen <sandeen@sandeen.net>
# volume label and UUID Russell Coker
# http://etbe.coker.com.au/2008/07/08/label-vs-uuid-vs-device/
0x438 leshort 0xEF53 Linux 0x438 leshort 0xEF53 Linux
>0x44c lelong x rev %d >0x44c lelong x rev %d
>0x43e leshort x \b.%d >0x43e leshort x \b.%d
@ -1099,25 +1130,32 @@
# else large RO_COMPAT? # else large RO_COMPAT?
>>>0x464 lelong >0x0000007 ext4 filesystem data >>>0x464 lelong >0x0000007 ext4 filesystem data
# else large INCOMPAT? # else large INCOMPAT?
>>0x460 lelong >0x000003f ext4 filesystem data >>0x460 lelong >0x000003f ext4 filesystem data
>0x468 belong x \b, UUID=%08x
>0x46c beshort x \b-%04x
>0x46e beshort x \b-%04x
>0x470 beshort x \b-%04x
>0x472 belong x \b-%08x
>0x476 beshort x \b%04x
>0x478 string >0 \b, volume name "%s"
# General flags for any ext* fs # General flags for any ext* fs
>0x460 lelong &0x0000004 (needs journal recovery) >0x460 lelong &0x0000004 (needs journal recovery)
>0x43a leshort &0x0000002 (errors) >0x43a leshort &0x0000002 (errors)
# INCOMPAT flags # INCOMPAT flags
>0x460 lelong &0x0000001 (compressed) >0x460 lelong &0x0000001 (compressed)
#>0x460 lelong &0x0000002 (filetype) #>0x460 lelong &0x0000002 (filetype)
#>0x460 lelong &0x0000010 (meta bg) #>0x460 lelong &0x0000010 (meta bg)
>0x460 lelong &0x0000040 (extents) >0x460 lelong &0x0000040 (extents)
>0x460 lelong &0x0000080 (64bit) >0x460 lelong &0x0000080 (64bit)
#>0x460 lelong &0x0000100 (mmp) #>0x460 lelong &0x0000100 (mmp)
#>0x460 lelong &0x0000200 (flex bg) #>0x460 lelong &0x0000200 (flex bg)
# RO_INCOMPAT flags # RO_INCOMPAT flags
#>0x464 lelong &0x0000001 (sparse super) #>0x464 lelong &0x0000001 (sparse super)
>0x464 lelong &0x0000002 (large files) >0x464 lelong &0x0000002 (large files)
>0x464 lelong &0x0000008 (huge files) >0x464 lelong &0x0000008 (huge files)
#>0x464 lelong &0x0000010 (gdt checksum) #>0x464 lelong &0x0000010 (gdt checksum)
#>0x464 lelong &0x0000020 (many subdirs) #>0x464 lelong &0x0000020 (many subdirs)
#>0x463 lelong &0x0000040 (extra isize) #>0x463 lelong &0x0000040 (extra isize)
# SGI disk labels - Nathan Scott <nathans@debian.org> # SGI disk labels - Nathan Scott <nathans@debian.org>
0 belong 0x0BE5A941 SGI disk label (volume header) 0 belong 0x0BE5A941 SGI disk label (volume header)
@ -1195,7 +1233,7 @@
# CDROM Filesystems # CDROM Filesystems
# Modified for UDF by gerardo.cacciari@gmail.com # Modified for UDF by gerardo.cacciari@gmail.com
32769 string CD001 32769 string CD001 #
!:mime application/x-iso9660-image !:mime application/x-iso9660-image
>38913 string !NSR0 ISO 9660 CD-ROM filesystem data >38913 string !NSR0 ISO 9660 CD-ROM filesystem data
>38913 string NSR0 UDF filesystem data >38913 string NSR0 UDF filesystem data
@ -1238,6 +1276,7 @@
# reiserfs - russell@coker.com.au # reiserfs - russell@coker.com.au
0x10034 string ReIsErFs ReiserFS V3.5 0x10034 string ReIsErFs ReiserFS V3.5
0x10034 string ReIsEr2Fs ReiserFS V3.6 0x10034 string ReIsEr2Fs ReiserFS V3.6
0x10034 string ReIsEr3Fs ReiserFS V3.6.19
>0x1002c leshort x block size %d >0x1002c leshort x block size %d
>0x10032 leshort &2 (mounted or unclean) >0x10032 leshort &2 (mounted or unclean)
>0x10000 lelong x num blocks %d >0x10000 lelong x num blocks %d
@ -1258,11 +1297,70 @@
0 string VoIP\ Startup\ and Aculab VoIP firmware 0 string VoIP\ Startup\ and Aculab VoIP firmware
>35 string x format %s >35 string x format %s
# u-boot/PPCBoot image file # From: Mark Brown <broonie@sirena.org.uk> [old]
# From: Mark Brown <broonie@sirena.org.uk> # From: Behan Webster <behanw@websterwood.com>
0 belong 0x27051956 u-boot/PPCBoot image 0 belong 0x27051956 u-boot legacy uImage,
>4 string PPCBoot >32 string x %s,
>>12 string x version %s >28 byte 0 Invalid os/
>28 byte 1 OpenBSD/
>28 byte 2 NetBSD/
>28 byte 3 FreeBSD/
>28 byte 4 4.4BSD/
>28 byte 5 Linux/
>28 byte 6 SVR4/
>28 byte 7 Esix/
>28 byte 8 Solaris/
>28 byte 9 Irix/
>28 byte 10 SCO/
>28 byte 11 Dell/
>28 byte 12 NCR/
>28 byte 13 LynxOS/
>28 byte 14 VxWorks/
>28 byte 15 pSOS/
>28 byte 16 QNX/
>28 byte 17 Firmware/
>28 byte 18 RTEMS/
>28 byte 19 ARTOS/
>28 byte 20 Unity OS/
>28 byte 21 INTEGRITY/
>29 byte 0 \bInvalid CPU,
>29 byte 1 \bAlpha,
>29 byte 2 \bARM,
>29 byte 3 \bIntel x86,
>29 byte 4 \bIA64,
>29 byte 5 \bMIPS,
>29 byte 6 \bMIPS 64-bit,
>29 byte 7 \bPowerPC,
>29 byte 8 \bIBM S390,
>29 byte 9 \bSuperH,
>29 byte 10 \bSparc,
>29 byte 11 \bSparc 64-bit,
>29 byte 12 \bM68K,
>29 byte 13 \bNios-32,
>29 byte 14 \bMicroBlaze,
>29 byte 15 \bNios-II,
>29 byte 16 \bBlackfin,
>29 byte 17 \bAVR32,
>29 byte 18 \bSTMicroelectronics ST200,
>30 byte 0 Invalid Image
>30 byte 1 Standalone Program
>30 byte 2 OS Kernel Image
>30 byte 3 RAMDisk Image
>30 byte 4 Multi-File Image
>30 byte 5 Firmware Image
>30 byte 6 Script File
>30 byte 7 Filesystem Image (any type)
>30 byte 8 Binary Flat Device Tree BLOB
>31 byte 0 (Not compressed),
>31 byte 1 (gzip),
>31 byte 2 (bzip2),
>31 byte 3 (lzma),
>12 belong x %d bytes,
>8 bedate x %s,
>16 belong x Load Address: 0x%08X,
>20 belong x Entry Point: 0x%08X,
>4 belong x Header CRC: 0x%08X,
>24 belong x Data CRC: 0x%08X
# JFFS2 file system # JFFS2 file system
0 leshort 0x1984 Linux old jffs2 filesystem data little endian 0 leshort 0x1984 Linux old jffs2 filesystem data little endian
@ -1275,28 +1373,46 @@
>28 beshort <3 >28 beshort <3
>>8 belong x %d bytes, >>8 belong x %d bytes,
>28 beshort >2 >28 beshort >2
>>63 bequad x %lld bytes, >>28 beshort <4
>>>63 bequad x %lld bytes,
>>28 beshort >3
>>>40 bequad x %lld bytes,
#>>67 belong x %d bytes, #>>67 belong x %d bytes,
>4 belong x %d inodes, >4 belong x %d inodes,
>28 beshort <2 >28 beshort <2
>>32 beshort x blocksize: %d bytes, >>32 beshort x blocksize: %d bytes,
>28 beshort >1 >28 beshort >1
>>51 belong x blocksize: %d bytes, >>28 beshort <4
>39 bedate x created: %s >>>51 belong x blocksize: %d bytes,
>>28 beshort >3
>>>12 belong x blocksize: %d bytes,
>28 beshort <4
>>39 bedate x created: %s
>28 beshort >3
>>8 bedate x created: %s
0 string hsqs Squashfs filesystem, little endian, 0 string hsqs Squashfs filesystem, little endian,
>28 leshort x version %d. >28 leshort x version %d.
>30 leshort x \b%d, >30 leshort x \b%d,
>28 leshort <3 >28 leshort <3
>>8 lelong x %d bytes, >>8 lelong x %d bytes,
>28 leshort >2 >28 leshort >2
>>63 lequad x %lld bytes, >>28 leshort <4
>>>63 lequad x %lld bytes,
>>28 leshort >3
>>>40 lequad x %lld bytes,
#>>63 lelong x %d bytes, #>>63 lelong x %d bytes,
>4 lelong x %d inodes, >4 lelong x %d inodes,
>28 leshort <2 >28 leshort <2
>>32 leshort x blocksize: %d bytes, >>32 leshort x blocksize: %d bytes,
>28 leshort >1 >28 leshort >1
>>51 lelong x blocksize: %d bytes, >>28 leshort <4
>39 ledate x created: %s >>>51 lelong x blocksize: %d bytes,
>>28 leshort >3
>>>12 lelong x blocksize: %d bytes,
>28 leshort <4
>>39 ledate x created: %s
>28 leshort >3
>>8 ledate x created: %s
0 string td\000 floppy image data (TeleDisk) 0 string td\000 floppy image data (TeleDisk)
@ -1315,6 +1431,10 @@
>>>>>>>>&0 bedate !0 incremental since: %s >>>>>>>>&0 bedate !0 incremental since: %s
#---------------------------------------------------------- #----------------------------------------------------------
#delta ISO Daniel Novotny (dnovotny@redhat.com)
0 string DISO Delta ISO data
>4 belong x version %d
# VMS backup savesets - gerardo.cacciari@gmail.com # VMS backup savesets - gerardo.cacciari@gmail.com
# #
4 string \x01\x00\x01\x00\x01\x00 4 string \x01\x00\x01\x00\x01\x00
@ -1359,13 +1479,17 @@
0 string CPQRFBLO Compaq/HP RILOE floppy image 0 string CPQRFBLO Compaq/HP RILOE floppy image
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Files-11 On-Disk Structure (OpenVMS file system) - gerardo.cacciari@gmail.com # Files-11 On-Disk Structure (File system for various RSX-11 and VMS flavours).
# These bits come from LBN 1 (home block) of ODS-2 and ODS-5 volumes, which is # These bits come from LBN 1 (home block) of ODS-1, ODS-2 and ODS-5 volumes,
# mapped to VBN 2 of [000000]INDEXF.SYS;1 # which is mapped to VBN 2 of [000000]INDEXF.SYS;1 - gerardo.cacciari@gmail.com
# #
1008 string DECFILE11B Files-11 On-Disk Structure 1008 string DECFILE11 Files-11 On-Disk Structure
>525 byte x Level %d >525 byte x Level %d
>525 byte x (ODS-%d OpenVMS file system), >525 byte x (ODS-%d);
>1017 string A RSX-11, VAX/VMS or OpenVMS VAX file system;
>1017 string B
>>525 byte 2 VAX/VMS or OpenVMS file system;
>>525 byte 5 OpenVMS Alpha or Itanium file system;
>984 string x volume label is '%-12.12s' >984 string x volume label is '%-12.12s'
# From: Thomas Klausner <wiz@NetBSD.org> # From: Thomas Klausner <wiz@NetBSD.org>
@ -1380,9 +1504,13 @@
# From Eric Sandeen # From Eric Sandeen
# GFS2 # GFS2
0x10000 belong 0x01161970 GFS2 Filesystem 0x10000 belong 0x01161970
>0x10024 belong x (blocksize %d, >0x10018 belong 0x0000051d GFS1 Filesystem
>0x10060 string >\0 lockproto %s) >>0x10024 belong x (blocksize %d,
>>0x10060 string >\0 lockproto %s)
>0x10018 belong 0x00000709 GFS2 Filesystem
>>0x10024 belong x (blocksize %d,
>>0x10060 string >\0 lockproto %s)
# BTRFS # BTRFS
0x10040 string _BHRfS_M BTRFS Filesystem 0x10040 string _BHRfS_M BTRFS Filesystem
@ -1395,3 +1523,49 @@
# dvdisaster's .ecc # dvdisaster's .ecc
# From: "Nelson A. de Oliveira" <naoliv@gmail.com> # From: "Nelson A. de Oliveira" <naoliv@gmail.com>
0 string *dvdisaster* dvdisaster error correction file 0 string *dvdisaster* dvdisaster error correction file
# xfs metadump image
# mb_magic XFSM at 0; superblock magic XFSB at 1 << mb_blocklog
# but can we do the << ? For now it's always 512 (0x200) anyway.
0 string XFSM
>0x200 string XFSB XFS filesystem metadump image
# Type: CROM filesystem
# From: Werner Fink <werner@suse.de>
0 string CROMFS CROMFS
>6 string >\0 \b version %2.2s,
>8 ulequad >0 \b block data at %lld,
>16 ulequad >0 \b fblock table at %lld,
>24 ulequad >0 \b inode table at %lld,
>32 ulequad >0 \b root at %lld,
>40 ulelong >0 \b fblock size = %ld,
>44 ulelong >0 \b block size = %ld,
>48 ulequad >0 \b bytes = %lld
# Type: xfs metadump image
# From: Daniel Novotny <dnovotny@redhat.com>
# mb_magic XFSM at 0; superblock magic XFSB at 1 << mb_blocklog
# but can we do the << ? For now it's always 512 (0x200) anyway.
0 string XFSM
>0x200 string XFSB XFS filesystem metadump image
# Type: delta ISO
# From: Daniel Novotny <dnovotny@redhat.com>
0 string DISO Delta ISO data,
>4 belong x version %d
# JFS2 (Journaling File System) image. (Old JFS1 has superblock at 0x1000.)
# See linux/fs/jfs/jfs_superblock.h for layout; see jfs_filsys.h for flags.
# From: Adam Buchbinder <adam.buchbinder@gmail.com>
0x8000 string JFS1
# Because it's text-only magic, check a binary value (version) to be sure.
# Should always be 2, but mkfs.jfs writes it as 1. Needs to be 2 or 1 to be
# mountable.
>&0 lelong <3 JFS2 filesystem image
# Label is followed by a UUID; we have to limit string length to avoid
# appending the UUID in the case of a 16-byte label.
>>&144 regex [\x20-\x7E]{1,16} (label "%s")
>>&0 lequad x \b, %lld blocks
>>&8 lelong x \b, blocksize %d
>>&32 lelong&0x00000006 >0 (dirty)
>>&36 lelong >0 (compressed)

View file

@ -1,5 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: flash,v 1.9 2009/11/08 01:30:01 christos Exp $
# flash: file(1) magic for Macromedia Flash file format # flash: file(1) magic for Macromedia Flash file format
# #
# See # See
@ -17,5 +18,8 @@
!:mime video/x-flv !:mime video/x-flv
# #
# Yosu Gomez
0 string AGD2\xbe\xb8\xbb\xcd\x00 Macromedia Freehand 7 Document
0 string AGD3\xbe\xb8\xbb\xcc\x00 Macromedia Freehand 8 Document
# From Dave Wilson # From Dave Wilson
0 string AGD4\xbe\xb8\xbb\xcb\x00 Macromedia Freehand 9 Document 0 string AGD4\xbe\xb8\xbb\xcb\x00 Macromedia Freehand 9 Document

View file

@ -1,4 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: fonts,v 1.23 2010/09/20 18:55:20 rrt Exp $
# fonts: file(1) magic for font data # fonts: file(1) magic for font data
# #
0 search/1 FONT ASCII vfont text 0 search/1 FONT ASCII vfont text
@ -9,6 +11,9 @@
0 string %!PS-AdobeFont-1. PostScript Type 1 font text 0 string %!PS-AdobeFont-1. PostScript Type 1 font text
>20 string >\0 (%s) >20 string >\0 (%s)
6 string %!PS-AdobeFont-1. PostScript Type 1 font program data 6 string %!PS-AdobeFont-1. PostScript Type 1 font program data
0 string %!FontType1 PostScript Type 1 font program data
6 string %!FontType1 PostScript Type 1 font program data
0 string %!PS-Adobe-3.0\ Resource-Font PostScript Type 1 font text
# X11 font files in SNF (Server Natural Format) format # X11 font files in SNF (Server Natural Format) format
0 belong 00000004 X11 SNF font data, MSB first 0 belong 00000004 X11 SNF font data, MSB first
@ -51,15 +56,30 @@
# True Type fonts # True Type fonts
0 string \000\001\000\000\000 TrueType font data 0 string \000\001\000\000\000 TrueType font data
!:mime application/x-font-ttf
0 string \007\001\001\000Copyright\ (c)\ 199 Adobe Multiple Master font 0 string \007\001\001\000Copyright\ (c)\ 199 Adobe Multiple Master font
0 string \012\001\001\000Copyright\ (c)\ 199 Adobe Multiple Master font 0 string \012\001\001\000Copyright\ (c)\ 199 Adobe Multiple Master font
# TrueType/OpenType font collections (.ttc)
# http://www.microsoft.com/typography/otspec/otff.htm
0 string ttcf TrueType font collection data 0 string ttcf TrueType font collection data
>4 belong 0x00010000 \b, 1.0
>>8 belong >0 \b, %d fonts
>4 belong 0x00020000 \b, 2.0
>>8 belong >0 \b, %d fonts
# 0x44454947 = 'DSIG'
>>>16 belong 0x44534947 \b, digitally signed
# Opentype font data from Avi Bercovich # Opentype font data from Avi Bercovich
0 string OTTO OpenType font data 0 string OTTO OpenType font data
!:mime application/vnd.ms-opentype
# Gürkan Sengün <gurkan@linuks.mine.nu>, www.linuks.mine.nu # Gürkan Sengün <gurkan@linuks.mine.nu>, www.linuks.mine.nu
0 string SplineFontDB: Spline Font Database 0 string SplineFontDB: Spline Font Database
!:mime application/vnd.font-fontforge-sfd
>14 string x version %s >14 string x version %s
# EOT
34 string LP Embedded OpenType (EOT)
!:mime application/vnd.ms-fontobject

View file

@ -1,3 +1,6 @@
#------------------------------------------------------------------------------
# $File: fortran,v 1.6 2009/09/19 16:28:09 christos Exp $
# FORTRAN source # FORTRAN source
0 regex/100 \^[Cc][\ \t] FORTRAN program 0 regex/100 \^[Cc][\ \t] FORTRAN program
!:mime text/x-fortran !:mime text/x-fortran

View file

@ -1,4 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: frame,v 1.12 2009/09/19 16:28:09 christos Exp $
# frame: file(1) magic for FrameMaker files # frame: file(1) magic for FrameMaker files
# #
# This stuff came on a FrameMaker demo tape, most of which is # This stuff came on a FrameMaker demo tape, most of which is

View file

@ -1,5 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: freebsd,v 1.7 2009/09/19 16:28:09 christos Exp $
# freebsd: file(1) magic for FreeBSD objects # freebsd: file(1) magic for FreeBSD objects
# #
# All new-style FreeBSD magic numbers are in host byte order (i.e., # All new-style FreeBSD magic numbers are in host byte order (i.e.,

View file

@ -1,5 +1,6 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# $File: fsav,v 1.11 2009/09/19 16:28:09 christos Exp $
# fsav: file(1) magic for datafellows fsav virus definition files # fsav: file(1) magic for datafellows fsav virus definition files
# Anthon van der Neut (anthon@mnt.org) # Anthon van der Neut (anthon@mnt.org)

View file

@ -0,0 +1,12 @@
#------------------------------------------------------------------------------
# $File: fusecompress,v 1.2 2011/08/08 09:05:55 christos Exp $
# fusecompress: file(1) magic for fusecompress
0 string \037\135\211 FuseCompress(ed) data
>3 byte 0x00 (none format)
>3 byte 0x01 (bz2 format)
>3 byte 0x02 (gz format)
>3 byte 0x03 (lzo format)
>3 byte 0x04 (xor format)
>3 byte >0x04 (unknown format)
>4 long x uncompressed size: %d

Some files were not shown because too many files have changed in this diff Show more