mirror of
https://github.com/mirror/make.git
synced 2026-08-20 00:43:29 +08:00
Compare commits
33 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2de9513b20 | ||
|
|
8eb20e9d92 | ||
|
|
32979e8122 | ||
|
|
490f35dda4 | ||
|
|
a579af186b | ||
|
|
01d08292bc | ||
|
|
f9c4aae3bf | ||
|
|
74e456e107 | ||
|
|
f8b096b9fd | ||
|
|
527201342c | ||
|
|
5f1e98e59b | ||
|
|
f4020bfba8 | ||
|
|
4792e6f5c0 | ||
|
|
514eda2bda | ||
|
|
310f677b84 | ||
|
|
f323abd6b3 | ||
|
|
b07e961db1 | ||
|
|
5958f28900 | ||
|
|
fd504b4d84 | ||
|
|
1bb24cbbbb | ||
|
|
b255a75bab | ||
|
|
0569ceb303 | ||
|
|
8021c41954 | ||
|
|
edd7981e49 | ||
|
|
715363eb49 | ||
|
|
c36430699e | ||
|
|
5f99dee5b5 | ||
|
|
9521ecc573 | ||
|
|
cb69b06199 | ||
|
|
21fed1fbcc | ||
|
|
17aef36902 | ||
|
|
98f8d6286e | ||
|
|
d96d52d27d |
37
ChangeLog
37
ChangeLog
@@ -1,3 +1,40 @@
|
||||
Fri Mar 1 12:04:47 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
|
||||
|
||||
* remake.c (f_mtime): Move future modtime check before FILE is
|
||||
clobbered by :: loop.
|
||||
|
||||
* Version 3.74.3.
|
||||
|
||||
* dir.c: Use canonical code from autoconf manual for dirent include.
|
||||
[_D_NAMLEN]: Redefine NAMLEN using this.
|
||||
(dir_contents_file_exists_p): Use NAMLEN macro.
|
||||
(read_dirstream) [_DIRENT_HAVE_D_NAMLEN]: Only set d_namlen #if this.
|
||||
|
||||
* compatMakefile (objs): Add missing backslash.
|
||||
|
||||
Wed Feb 28 03:56:20 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
|
||||
|
||||
* default.c (default_terminal_rules): Remove + prefix from RCS cmds.
|
||||
(default_variables): Put + prefix in $(CHECKOUT,v) value instead.
|
||||
|
||||
* remake.c (f_mtime): Check for future timestamps; give error and mark
|
||||
file as "failed to update".
|
||||
|
||||
Fri Jan 12 18:09:36 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
|
||||
|
||||
* job.c: Don't declare unblock_sigs; job.h already does.
|
||||
|
||||
Sat Jan 6 16:24:44 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
|
||||
|
||||
* acconfig.h (HAVE_SYSCONF_OPEN_MAX): #undef removed.
|
||||
|
||||
* job.c (NGROUPS_MAX): Don't try to define this macro.
|
||||
|
||||
Fri Dec 22 18:44:44 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
|
||||
|
||||
* compatMakefile (GETOPT, GETOPT_SRC, GLOB): Variables removed.
|
||||
(objs, srcs): Include their values here instead of references.
|
||||
|
||||
Thu Dec 14 06:21:29 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
|
||||
|
||||
* Version 3.74.2.
|
||||
|
||||
@@ -151,15 +151,16 @@ $(prog): $(objs) $(globdep) #$(addprefix $(ARCH)/,gmalloc.o mcheck.o)
|
||||
$(CC) $(LDFLAGS) $^ $(globlib) $(LOADLIBES) -o $@.new
|
||||
mv -f $@.new $@
|
||||
|
||||
libc-srcdir = /home/gd/gnu/libc
|
||||
globfiles = $(addprefix glob/,COPYING.LIB configure.in configure Makefile.in \
|
||||
configure.bat glob.c fnmatch.c glob.h fnmatch.h)
|
||||
$(globfiles): stamp-glob ;
|
||||
stamp-glob: /home/gd/gnu/libc/posix/glob.tar
|
||||
stamp-glob: $(libc-srcdir)/posix/glob.tar
|
||||
-rm -f stamp-glob glob/*
|
||||
tar xvf $< glob
|
||||
cvs commit -m'Updated from libc' glob
|
||||
touch $@
|
||||
/home/gd/gnu/libc/posix/glob.tar: force
|
||||
$(libc-srcdir)/posix/glob.tar: force
|
||||
$(MAKE) -C $(@D) $(@F) no_deps=t
|
||||
.PHONY: force
|
||||
force:
|
||||
|
||||
41
Makefile.in
41
Makefile.in
@@ -1,9 +1,9 @@
|
||||
# NOTE: If you have no `make' program at all to process this makefile, run
|
||||
# `build.sh' instead.
|
||||
#
|
||||
# Copyright (C) 1988, 89, 91, 92, 93, 94, 1995 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1988,89,91,92,93,94,95,96 Free Software Foundation, Inc.
|
||||
# This file is part of GNU Make.
|
||||
#
|
||||
#
|
||||
# GNU Make is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
@@ -13,7 +13,7 @@
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNU Make; see the file COPYING. If not, write to
|
||||
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
@@ -48,19 +48,6 @@ defines = @DEFS@ -DLIBDIR=\"$(libdir)\" -DINCLUDEDIR=\"$(includedir)\"
|
||||
# The code is found in `remote-$(REMOTE).c'.
|
||||
REMOTE = @REMOTE@
|
||||
|
||||
# If you are using the GNU C library, or have the GNU getopt functions in
|
||||
# your C library, you can comment these out.
|
||||
GETOPT = getopt.o getopt1.o
|
||||
GETOPT_SRC = $(srcdir)/getopt.c $(srcdir)/getopt1.c $(srcdir)/getopt.h
|
||||
|
||||
# If you are using the GNU C library, or have the GNU glob functions in
|
||||
# your C library, you can comment this out. GNU make uses special hooks
|
||||
# into the glob functions to be more efficient (by using make's directory
|
||||
# cache for globbing), so you must use the GNU functions even if your
|
||||
# system's C library has the 1003.2 glob functions already. Also, the glob
|
||||
# functions in the AIX and HPUX C libraries are said to be buggy.
|
||||
GLOB = glob/libglob.a
|
||||
|
||||
# If your system doesn't have alloca, or the one provided is bad, define this.
|
||||
ALLOCA = @ALLOCA@
|
||||
ALLOCA_SRC = $(srcdir)/alloca.c
|
||||
@@ -123,7 +110,8 @@ CTAGS = ctags -w
|
||||
objs = commands.o job.o dir.o file.o misc.o main.o read.o remake.o \
|
||||
rule.o implicit.o default.o variable.o expand.o function.o \
|
||||
vpath.o version.o ar.o arscan.o signame.o remote-$(REMOTE).o \
|
||||
$(GLOB) $(GETOPT) $(ALLOCA) $(extras)
|
||||
getopt.o getopt1.o glob/libglob.a \
|
||||
$(ALLOCA) $(extras)
|
||||
srcs = $(srcdir)/commands.c $(srcdir)/job.c $(srcdir)/dir.c \
|
||||
$(srcdir)/file.c $(srcdir)/getloadavg.c $(srcdir)/misc.c \
|
||||
$(srcdir)/main.c $(srcdir)/read.c $(srcdir)/remake.c \
|
||||
@@ -132,7 +120,7 @@ srcs = $(srcdir)/commands.c $(srcdir)/job.c $(srcdir)/dir.c \
|
||||
$(srcdir)/vpath.c $(srcdir)/version.c \
|
||||
$(srcdir)/remote-$(REMOTE).c \
|
||||
$(srcdir)/ar.c $(srcdir)/arscan.c \
|
||||
$(srcdir)/signame.c $(srcdir)/signame.h $(GETOPT_SRC) \
|
||||
$(srcdir)/signame.c $(srcdir)/signame.h getopt.c getopt1.c \
|
||||
$(srcdir)/commands.h $(srcdir)/dep.h $(srcdir)/file.h \
|
||||
$(srcdir)/job.h $(srcdir)/make.h $(srcdir)/rule.h \
|
||||
$(srcdir)/variable.h $(ALLOCA_SRC) $(srcdir)/config.h.in
|
||||
@@ -287,21 +275,22 @@ job.o: job.c make.h commands.h job.h file.h variable.h
|
||||
dir.o: dir.c make.h
|
||||
file.o: file.c make.h commands.h dep.h file.h variable.h
|
||||
misc.o: misc.c make.h dep.h
|
||||
main.o: main.c make.h commands.h dep.h file.h variable.h job.h getopt.h
|
||||
main.o: main.c make.h commands.h dep.h file.h variable.h job.h \
|
||||
getopt.h
|
||||
read.o: read.c make.h commands.h dep.h file.h variable.h glob/glob.h
|
||||
remake.o: remake.c make.h commands.h job.h dep.h file.h
|
||||
rule.o : rule.c make.h config.h commands.h dep.h file.h variable.h rule.h
|
||||
implicit.o : implicit.c make.h rule.h dep.h file.h
|
||||
rule.o: rule.c make.h commands.h dep.h file.h variable.h rule.h
|
||||
implicit.o: implicit.c make.h rule.h dep.h file.h
|
||||
default.o: default.c make.h rule.h dep.h file.h commands.h variable.h
|
||||
variable.o : variable.c make.h commands.h variable.h dep.h file.h
|
||||
variable.o: variable.c make.h commands.h variable.h dep.h file.h
|
||||
expand.o: expand.c make.h commands.h file.h variable.h
|
||||
function.o: function.c make.h variable.h dep.h commands.h job.h
|
||||
vpath.o: vpath.c make.h file.h variable.h
|
||||
version.o: version.c
|
||||
ar.o : ar.c make.h file.h dep.h
|
||||
ar.o: ar.c make.h file.h dep.h
|
||||
arscan.o: arscan.c make.h
|
||||
signame.o: signame.c signame.h
|
||||
remote-stub.o : remote-stub.c make.h commands.h
|
||||
getopt.o: getopt.c getopt.h
|
||||
getopt1.o : getopt1.c getopt.h
|
||||
remote-stub.o: remote-stub.c make.h commands.h
|
||||
getopt.o: getopt.c
|
||||
getopt1.o: getopt1.c getopt.h
|
||||
getloadavg.o: getloadavg.c
|
||||
|
||||
12
NEWS
12
NEWS
@@ -1,6 +1,6 @@
|
||||
GNU make NEWS -- history of user-visible changes. 11 December 1995
|
||||
GNU make NEWS -- history of user-visible changes. 28 February 1996
|
||||
|
||||
Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
|
||||
See the end for copying conditions.
|
||||
|
||||
Please send GNU make bug reports to bug-gnu-utils@prep.ai.mit.edu.
|
||||
@@ -9,6 +9,12 @@ Version 3.75
|
||||
|
||||
* The directory messages printed by `-w' and implicitly in sub-makes,
|
||||
are now omitted if Make runs no commands and has no other messages to print.
|
||||
|
||||
* Make now detects files that for whatever reason have modification times
|
||||
in the future and gives an error. Files with such impossible timestamps
|
||||
can result from unsynchronized clocks, or archived distributions
|
||||
containing bogus timestamps; they confuse Make's dependency engine
|
||||
thoroughly.
|
||||
|
||||
Version 3.73
|
||||
|
||||
@@ -545,7 +551,7 @@ Version 3.05
|
||||
----------------------------------------------------------------------
|
||||
Copyright information:
|
||||
|
||||
Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to anyone to make or distribute verbatim copies
|
||||
of this document as received, in any medium, provided that the
|
||||
|
||||
2
README
2
README
@@ -1,4 +1,4 @@
|
||||
This directory contains the 3.74.2 test release of GNU Make.
|
||||
This directory contains the 3.74.3 test release of GNU Make.
|
||||
All bugs reported for previous test releases have been fixed.
|
||||
Some bugs surely remain.
|
||||
|
||||
|
||||
@@ -12,6 +12,3 @@
|
||||
|
||||
/* Define this if you have the `union wait' type in <sys/wait.h>. */
|
||||
#undef HAVE_UNION_WAIT
|
||||
|
||||
/* Define this if the POSIX.1 call `sysconf (_SC_OPEN_MAX)' works properly. */
|
||||
#undef HAVE_SYSCONF_OPEN_MAX
|
||||
|
||||
3
alloca.c
3
alloca.c
@@ -209,6 +209,9 @@ alloca (size)
|
||||
register pointer new = malloc (sizeof (header) + size);
|
||||
/* Address of header. */
|
||||
|
||||
if (new == 0)
|
||||
abort();
|
||||
|
||||
((header *) new)->h.next = last_alloca_header;
|
||||
((header *) new)->h.deep = depth;
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ includedir=${prefix}/include
|
||||
set -e
|
||||
|
||||
# These are all the objects we need to link together.
|
||||
objs="commands.o job.o dir.o file.o misc.o main.o read.o remake.o rule.o implicit.o default.o variable.o expand.o function.o vpath.o version.o ar.o arscan.o signame.o getopt.o getopt1.o glob/glob.o glob/fnmatch.o remote-${REMOTE}.o ${extras} ${ALLOCA}"
|
||||
objs="commands.o job.o dir.o file.o misc.o main.o read.o remake.o rule.o implicit.o default.o variable.o expand.o function.o vpath.o version.o ar.o arscan.o signame.o getopt.o getopt1.o glob/libglob.a glob/glob.o glob/fnmatch.o remote-${REMOTE}.o ${extras} ${ALLOCA}"
|
||||
|
||||
# Compile the source files into those objects.
|
||||
for file in `echo ${objs} | sed 's/\.o/.c/g'`; do
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# NOTE: If you have no `make' program at all to process this makefile, run
|
||||
# `build.sh' instead.
|
||||
#
|
||||
# Copyright (C) 1988, 89, 91, 92, 93, 94, 1995 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1988,89,91,92,93,94,95,96 Free Software Foundation, Inc.
|
||||
# This file is part of GNU Make.
|
||||
#
|
||||
#
|
||||
# GNU Make is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
@@ -13,7 +13,7 @@
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNU Make; see the file COPYING. If not, write to
|
||||
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
@@ -48,19 +48,6 @@ defines = @DEFS@ -DLIBDIR=\"$(libdir)\" -DINCLUDEDIR=\"$(includedir)\"
|
||||
# The code is found in `remote-$(REMOTE).c'.
|
||||
REMOTE = @REMOTE@
|
||||
|
||||
# If you are using the GNU C library, or have the GNU getopt functions in
|
||||
# your C library, you can comment these out.
|
||||
GETOPT = getopt.o getopt1.o
|
||||
GETOPT_SRC = $(srcdir)/getopt.c $(srcdir)/getopt1.c $(srcdir)/getopt.h
|
||||
|
||||
# If you are using the GNU C library, or have the GNU glob functions in
|
||||
# your C library, you can comment this out. GNU make uses special hooks
|
||||
# into the glob functions to be more efficient (by using make's directory
|
||||
# cache for globbing), so you must use the GNU functions even if your
|
||||
# system's C library has the 1003.2 glob functions already. Also, the glob
|
||||
# functions in the AIX and HPUX C libraries are said to be buggy.
|
||||
GLOB = glob/libglob.a
|
||||
|
||||
# If your system doesn't have alloca, or the one provided is bad, define this.
|
||||
ALLOCA = @ALLOCA@
|
||||
ALLOCA_SRC = $(srcdir)/alloca.c
|
||||
@@ -123,7 +110,8 @@ CTAGS = ctags -w
|
||||
objs = commands.o job.o dir.o file.o misc.o main.o read.o remake.o \
|
||||
rule.o implicit.o default.o variable.o expand.o function.o \
|
||||
vpath.o version.o ar.o arscan.o signame.o remote-$(REMOTE).o \
|
||||
$(GLOB) $(GETOPT) $(ALLOCA) $(extras)
|
||||
getopt.o getopt1.o glob/libglob.a \
|
||||
$(ALLOCA) $(extras)
|
||||
srcs = $(srcdir)/commands.c $(srcdir)/job.c $(srcdir)/dir.c \
|
||||
$(srcdir)/file.c $(srcdir)/getloadavg.c $(srcdir)/misc.c \
|
||||
$(srcdir)/main.c $(srcdir)/read.c $(srcdir)/remake.c \
|
||||
@@ -132,7 +120,7 @@ srcs = $(srcdir)/commands.c $(srcdir)/job.c $(srcdir)/dir.c \
|
||||
$(srcdir)/vpath.c $(srcdir)/version.c \
|
||||
$(srcdir)/remote-$(REMOTE).c \
|
||||
$(srcdir)/ar.c $(srcdir)/arscan.c \
|
||||
$(srcdir)/signame.c $(srcdir)/signame.h $(GETOPT_SRC) \
|
||||
$(srcdir)/signame.c $(srcdir)/signame.h getopt.c getopt1.c \
|
||||
$(srcdir)/commands.h $(srcdir)/dep.h $(srcdir)/file.h \
|
||||
$(srcdir)/job.h $(srcdir)/make.h $(srcdir)/rule.h \
|
||||
$(srcdir)/variable.h $(ALLOCA_SRC) $(srcdir)/config.h.in
|
||||
|
||||
@@ -173,9 +173,6 @@
|
||||
/* Define this if you have the `union wait' type in <sys/wait.h>. */
|
||||
#undef HAVE_UNION_WAIT
|
||||
|
||||
/* Define this if the POSIX.1 call `sysconf (_SC_OPEN_MAX)' works properly. */
|
||||
#undef HAVE_SYSCONF_OPEN_MAX
|
||||
|
||||
/* Define if you have the dup2 function. */
|
||||
#undef HAVE_DUP2
|
||||
|
||||
|
||||
215
configure
vendored
215
configure
vendored
@@ -2,7 +2,7 @@
|
||||
|
||||
# From configure.in Id: configure.in,v 1.50 1995/12/14 07:18:09 roland Exp
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated automatically using autoconf version 2.7
|
||||
# Generated automatically using autoconf version 2.5
|
||||
# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
|
||||
#
|
||||
# This configure script is free software; the Free Software Foundation
|
||||
@@ -151,11 +151,9 @@ Directory and file names:
|
||||
--bindir=DIR user executables in DIR [EPREFIX/bin]
|
||||
--sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
|
||||
--libexecdir=DIR program executables in DIR [EPREFIX/libexec]
|
||||
--datadir=DIR read-only architecture-independent data in DIR
|
||||
[PREFIX/share]
|
||||
--datadir=DIR read-only architecture-independent data in DIR [PREFIX/share]
|
||||
--sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
|
||||
--sharedstatedir=DIR modifiable architecture-independent data in DIR
|
||||
[PREFIX/com]
|
||||
--sharedstatedir=DIR modifiable architecture-independent data in DIR [PREFIX/com]
|
||||
--localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
|
||||
--libdir=DIR object code libraries in DIR [EPREFIX/lib]
|
||||
--includedir=DIR C header files in DIR [PREFIX/include]
|
||||
@@ -165,8 +163,7 @@ Directory and file names:
|
||||
--srcdir=DIR find the sources in DIR [configure dir or ..]
|
||||
--program-prefix=PREFIX prepend PREFIX to installed program names
|
||||
--program-suffix=SUFFIX append SUFFIX to installed program names
|
||||
--program-transform-name=PROGRAM
|
||||
run sed PROGRAM on installed program names
|
||||
--program-transform-name=PROGRAM run sed PROGRAM on installed program names
|
||||
EOF
|
||||
cat << EOF
|
||||
Host type:
|
||||
@@ -180,10 +177,8 @@ Features and packages:
|
||||
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
|
||||
--x-includes=DIR X include files are in DIR
|
||||
--x-libraries=DIR X library files are in DIR
|
||||
--enable and --with options recognized:$ac_help
|
||||
EOF
|
||||
if test -n "$ac_help"; then
|
||||
echo "--enable and --with options recognized:$ac_help"
|
||||
fi
|
||||
exit 0 ;;
|
||||
|
||||
-host | --host | --hos | --ho)
|
||||
@@ -333,7 +328,7 @@ EOF
|
||||
verbose=yes ;;
|
||||
|
||||
-version | --version | --versio | --versi | --vers)
|
||||
echo "configure generated by autoconf version 2.7"
|
||||
echo "configure generated by autoconf version 2.5"
|
||||
exit 0 ;;
|
||||
|
||||
-with-* | --with-*)
|
||||
@@ -714,7 +709,7 @@ else
|
||||
# On the NeXT, cc -E runs the code through the compiler's parser,
|
||||
# not just through cpp.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 718 "configure"
|
||||
#line 713 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <assert.h>
|
||||
Syntax Error
|
||||
@@ -728,7 +723,7 @@ else
|
||||
rm -rf conftest*
|
||||
CPP="${CC-cc} -E -traditional-cpp"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 732 "configure"
|
||||
#line 727 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <assert.h>
|
||||
Syntax Error
|
||||
@@ -754,7 +749,7 @@ fi
|
||||
echo "$ac_t""$CPP" 1>&6
|
||||
echo $ac_n "checking for AIX""... $ac_c" 1>&6
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 758 "configure"
|
||||
#line 753 "configure"
|
||||
#include "confdefs.h"
|
||||
#ifdef _AIX
|
||||
yes
|
||||
@@ -801,7 +796,7 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 805 "configure"
|
||||
#line 800 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <minix/config.h>
|
||||
EOF
|
||||
@@ -849,7 +844,7 @@ else
|
||||
ac_cv_c_cross=yes
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 853 "configure"
|
||||
#line 848 "configure"
|
||||
#include "confdefs.h"
|
||||
main(){return(0);}
|
||||
EOF
|
||||
@@ -871,7 +866,7 @@ if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 875 "configure"
|
||||
#line 870 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
@@ -893,7 +888,7 @@ rm -f conftest*
|
||||
if test $ac_cv_header_stdc = yes; then
|
||||
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 897 "configure"
|
||||
#line 892 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <string.h>
|
||||
EOF
|
||||
@@ -911,7 +906,7 @@ fi
|
||||
if test $ac_cv_header_stdc = yes; then
|
||||
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 915 "configure"
|
||||
#line 910 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <stdlib.h>
|
||||
EOF
|
||||
@@ -929,10 +924,10 @@ fi
|
||||
if test $ac_cv_header_stdc = yes; then
|
||||
# /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
|
||||
if test "$cross_compiling" = yes; then
|
||||
:
|
||||
ac_cv_header_stdc=no
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 936 "configure"
|
||||
#line 931 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <ctype.h>
|
||||
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
|
||||
@@ -971,7 +966,7 @@ if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 975 "configure"
|
||||
#line 970 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#include <$ac_hdr>
|
||||
@@ -1004,14 +999,14 @@ done
|
||||
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
|
||||
if test $ac_header_dirent = dirent.h; then
|
||||
echo $ac_n "checking for -ldir""... $ac_c" 1>&6
|
||||
ac_lib_var=`echo dir | tr '.-/+' '___p'`
|
||||
ac_lib_var=`echo dir | tr './+' '__p'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-ldir $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1015 "configure"
|
||||
#line 1010 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() { return 0; }
|
||||
@@ -1039,14 +1034,14 @@ fi
|
||||
|
||||
else
|
||||
echo $ac_n "checking for -lx""... $ac_c" 1>&6
|
||||
ac_lib_var=`echo x | tr '.-/+' '___p'`
|
||||
ac_lib_var=`echo x | tr './+' '__p'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-lx $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1050 "configure"
|
||||
#line 1045 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() { return 0; }
|
||||
@@ -1079,7 +1074,7 @@ if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1083 "configure"
|
||||
#line 1078 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
EOF
|
||||
@@ -1111,7 +1106,7 @@ if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1115 "configure"
|
||||
#line 1110 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#if STDC_HEADERS
|
||||
@@ -1142,7 +1137,7 @@ if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1146 "configure"
|
||||
#line 1141 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#include <signal.h>
|
||||
@@ -1150,11 +1145,9 @@ else
|
||||
#undef signal
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
extern "C" void (*signal (int, void (*)(int)))(int);
|
||||
#else
|
||||
void (*signal ()) ();
|
||||
extern "C"
|
||||
#endif
|
||||
|
||||
void (*signal ()) ();
|
||||
int main() { return 0; }
|
||||
int t() {
|
||||
int i;
|
||||
@@ -1186,7 +1179,7 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1190 "configure"
|
||||
#line 1183 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <$ac_hdr>
|
||||
EOF
|
||||
@@ -1219,36 +1212,33 @@ if test "x$CC" != xcc; then
|
||||
else
|
||||
echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
|
||||
fi
|
||||
set dummy $CC; ac_cc="`echo $2 |
|
||||
set dummy $CC; ac_cc="`echo $2 |
|
||||
sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
echo 'foo(){}' > conftest.c
|
||||
eval ac_cv_prog_cc_${ac_cc}_c_o=no
|
||||
echo 'foo(){}' > conftest.c
|
||||
# Make sure it works both with $CC and with simple cc.
|
||||
# We do the test twice because some compilers refuse to overwrite an
|
||||
# existing .o file with -o, though they will create one.
|
||||
if ${CC-cc} -c conftest.c -o conftest.o 1>&5 2>&5 &&
|
||||
test -f conftest.o && ${CC-cc} -c conftest.c -o conftest.o 1>&5 2>&5
|
||||
then
|
||||
eval ac_cv_prog_cc_${ac_cc}_c_o=yes
|
||||
if test "x$CC" != xcc; then
|
||||
# Test first that cc exists at all.
|
||||
if cc -c conftest.c 1>&5 2>&5; then
|
||||
if cc -c conftest.c 1>&5 2>&5
|
||||
then
|
||||
if cc -c conftest.c -o conftest2.o 1>&5 2>&5 &&
|
||||
test -f conftest2.o &&
|
||||
cc -c conftest.c -o conftest2.o 1>&5 2>&5
|
||||
test -f conftest2.o && cc -c conftest.c -o conftest2.o 1>&5 2>&5
|
||||
then
|
||||
# cc works too.
|
||||
:
|
||||
else
|
||||
# cc exists but doesn't like -o.
|
||||
eval ac_cv_prog_cc_${ac_cc}_c_o=no
|
||||
eval ac_cv_prog_cc_${ac_cc}_c_o=yes
|
||||
fi
|
||||
else
|
||||
# There is no cc, so we don't care about it.
|
||||
eval ac_cv_prog_cc_${ac_cc}_c_o=yes
|
||||
fi
|
||||
fi
|
||||
else
|
||||
eval ac_cv_prog_cc_${ac_cc}_c_o=no
|
||||
fi
|
||||
rm -f conftest*
|
||||
|
||||
@@ -1268,7 +1258,7 @@ if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1272 "configure"
|
||||
#line 1262 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() { return 0; }
|
||||
@@ -1281,7 +1271,7 @@ char const *const *ccp;
|
||||
char **p;
|
||||
/* NEC SVR4.0.2 mips cc rejects this. */
|
||||
struct point {int x, y;};
|
||||
static struct point const zero = {0,0};
|
||||
static struct point const zero;
|
||||
/* AIX XL C 1.02.0.0 rejects this.
|
||||
It does not let you subtract one const X* pointer from another in an arm
|
||||
of an if-expression whose if-part is not a constant expression */
|
||||
@@ -1341,7 +1331,7 @@ if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1345 "configure"
|
||||
#line 1335 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
@@ -1404,7 +1394,7 @@ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1408 "configure"
|
||||
#line 1398 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func(); below. */
|
||||
@@ -1453,7 +1443,7 @@ if eval "test \"`echo '$''{'ac_cv_check_symbol_sys_siglist'+set}'`\" = set"; the
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1457 "configure"
|
||||
#line 1447 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() { return 0; }
|
||||
@@ -1485,7 +1475,7 @@ if eval "test \"`echo '$''{'ac_cv_check_symbol__sys_siglist'+set}'`\" = set"; th
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1489 "configure"
|
||||
#line 1479 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() { return 0; }
|
||||
@@ -1519,7 +1509,7 @@ if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1523 "configure"
|
||||
#line 1513 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <alloca.h>
|
||||
int main() { return 0; }
|
||||
@@ -1551,7 +1541,7 @@ if eval "test \"`echo '$''{'ac_cv_func_alloca'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1555 "configure"
|
||||
#line 1545 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#ifdef __GNUC__
|
||||
@@ -1610,7 +1600,7 @@ if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1614 "configure"
|
||||
#line 1604 "configure"
|
||||
#include "confdefs.h"
|
||||
#if defined(CRAY) && ! defined(CRAY2)
|
||||
webecray
|
||||
@@ -1639,7 +1629,7 @@ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1643 "configure"
|
||||
#line 1633 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func(); below. */
|
||||
@@ -1693,7 +1683,7 @@ else
|
||||
ac_cv_c_stack_direction=0
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1697 "configure"
|
||||
#line 1687 "configure"
|
||||
#include "confdefs.h"
|
||||
find_stack_direction ()
|
||||
{
|
||||
@@ -1735,7 +1725,7 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1739 "configure"
|
||||
#line 1729 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <vfork.h>
|
||||
EOF
|
||||
@@ -1766,53 +1756,10 @@ if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
if test "$cross_compiling" = yes; then
|
||||
echo $ac_n "checking for vfork""... $ac_c" 1>&6
|
||||
if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1775 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char vfork(); below. */
|
||||
#include <assert.h>
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
char vfork();
|
||||
|
||||
int main() { return 0; }
|
||||
int t() {
|
||||
|
||||
/* The GNU C library defines this for functions which it implements
|
||||
to always fail with ENOSYS. Some functions are actually named
|
||||
something starting with __ and the normal name is an alias. */
|
||||
#if defined (__stub_vfork) || defined (__stub___vfork)
|
||||
choke me
|
||||
#else
|
||||
vfork();
|
||||
#endif
|
||||
|
||||
; return 0; }
|
||||
EOF
|
||||
if eval $ac_link; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_vfork=yes"
|
||||
else
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_vfork=no"
|
||||
fi
|
||||
rm -f conftest*
|
||||
|
||||
fi
|
||||
if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
|
||||
echo "$ac_t""yes" 1>&6
|
||||
:
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
fi
|
||||
|
||||
ac_cv_func_vfork=no
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1816 "configure"
|
||||
#line 1763 "configure"
|
||||
#include "confdefs.h"
|
||||
/* Thanks to Paul Eggert for this test. */
|
||||
#include <stdio.h>
|
||||
@@ -1931,7 +1878,7 @@ else
|
||||
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1935 "configure"
|
||||
#line 1882 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <stdio.h>
|
||||
/* If setvbuf has the reversed format, exit 0. */
|
||||
@@ -1970,14 +1917,14 @@ ac_have_func=no # yes means we've found a way to get the load average.
|
||||
# On Solaris, -lkvm requires nlist from -lelf, so check that first
|
||||
# to get the right answer into the cache.
|
||||
echo $ac_n "checking for -lelf""... $ac_c" 1>&6
|
||||
ac_lib_var=`echo elf | tr '.-/+' '___p'`
|
||||
ac_lib_var=`echo elf | tr './+' '__p'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-lelf $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1981 "configure"
|
||||
#line 1928 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() { return 0; }
|
||||
@@ -2004,14 +1951,14 @@ else
|
||||
fi
|
||||
|
||||
echo $ac_n "checking for -lkvm""... $ac_c" 1>&6
|
||||
ac_lib_var=`echo kvm | tr '.-/+' '___p'`
|
||||
ac_lib_var=`echo kvm | tr './+' '__p'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-lkvm $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2015 "configure"
|
||||
#line 1962 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() { return 0; }
|
||||
@@ -2039,14 +1986,14 @@ fi
|
||||
|
||||
# Check for the 4.4BSD definition of getloadavg.
|
||||
echo $ac_n "checking for -lutil""... $ac_c" 1>&6
|
||||
ac_lib_var=`echo util | tr '.-/+' '___p'`
|
||||
ac_lib_var=`echo util | tr './+' '__p'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-lutil $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2050 "configure"
|
||||
#line 1997 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() { return 0; }
|
||||
@@ -2078,14 +2025,14 @@ if test $ac_have_func = no; then
|
||||
# Since it is not a standard part of AIX, it might be installed locally.
|
||||
ac_save_LIBS="$LIBS" LIBS="-L/usr/local/lib $LIBS"
|
||||
echo $ac_n "checking for -lgetloadavg""... $ac_c" 1>&6
|
||||
ac_lib_var=`echo getloadavg | tr '.-/+' '___p'`
|
||||
ac_lib_var=`echo getloadavg | tr './+' '__p'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-lgetloadavg $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2089 "configure"
|
||||
#line 2036 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() { return 0; }
|
||||
@@ -2122,7 +2069,7 @@ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2126 "configure"
|
||||
#line 2073 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func(); below. */
|
||||
@@ -2180,7 +2127,7 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2184 "configure"
|
||||
#line 2131 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/dg_sys_info.h>
|
||||
EOF
|
||||
@@ -2203,14 +2150,14 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
|
||||
EOF
|
||||
|
||||
echo $ac_n "checking for -ldgc""... $ac_c" 1>&6
|
||||
ac_lib_var=`echo dgc | tr '.-/+' '___p'`
|
||||
ac_lib_var=`echo dgc | tr './+' '__p'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-ldgc $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2214 "configure"
|
||||
#line 2161 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() { return 0; }
|
||||
@@ -2264,7 +2211,7 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2268 "configure"
|
||||
#line 2215 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <inq_stats/cpustats.h>
|
||||
EOF
|
||||
@@ -2303,7 +2250,7 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2307 "configure"
|
||||
#line 2254 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/cpustats.h>
|
||||
EOF
|
||||
@@ -2340,7 +2287,7 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2344 "configure"
|
||||
#line 2291 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <$ac_hdr>
|
||||
EOF
|
||||
@@ -2376,7 +2323,7 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2380 "configure"
|
||||
#line 2327 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <nlist.h>
|
||||
EOF
|
||||
@@ -2403,7 +2350,7 @@ if eval "test \"`echo '$''{'ac_cv_struct_nlist_n_un'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2407 "configure"
|
||||
#line 2354 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <nlist.h>
|
||||
int main() { return 0; }
|
||||
@@ -2441,7 +2388,7 @@ if eval "test \"`echo '$''{'ac_cv_func_getloadavg_setgid'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2445 "configure"
|
||||
#line 2392 "configure"
|
||||
#include "confdefs.h"
|
||||
#include "$srcdir/getloadavg.c"
|
||||
#ifdef LDAV_PRIVILEGED
|
||||
@@ -2498,7 +2445,7 @@ else
|
||||
ac_cv_func_strcoll=no
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2502 "configure"
|
||||
#line 2449 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <string.h>
|
||||
main ()
|
||||
@@ -2536,7 +2483,7 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2540 "configure"
|
||||
#line 2487 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <$ac_hdr>
|
||||
EOF
|
||||
@@ -2570,7 +2517,7 @@ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2574 "configure"
|
||||
#line 2521 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func(); below. */
|
||||
@@ -2619,7 +2566,7 @@ if eval "test \"`echo '$''{'make_cv_union_wait'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2623 "configure"
|
||||
#line 2570 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
@@ -2667,7 +2614,7 @@ if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2671 "configure"
|
||||
#line 2618 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#include <signal.h>
|
||||
@@ -2703,14 +2650,14 @@ fi
|
||||
# The presence of the following is not meant to imply
|
||||
# that make necessarily works on those systems.
|
||||
echo $ac_n "checking for -lsun""... $ac_c" 1>&6
|
||||
ac_lib_var=`echo sun | tr '.-/+' '___p'`
|
||||
ac_lib_var=`echo sun | tr './+' '__p'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-lsun $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2714 "configure"
|
||||
#line 2661 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() { return 0; }
|
||||
@@ -2856,7 +2803,7 @@ do
|
||||
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
|
||||
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
|
||||
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
|
||||
echo "$CONFIG_STATUS generated by autoconf version 2.7"
|
||||
echo "$CONFIG_STATUS generated by autoconf version 2.5"
|
||||
exit 0 ;;
|
||||
-help | --help | --hel | --he | --h)
|
||||
echo "\$ac_cs_usage"; exit 0 ;;
|
||||
@@ -2868,12 +2815,10 @@ ac_given_srcdir=$srcdir
|
||||
ac_given_INSTALL="$INSTALL"
|
||||
|
||||
trap 'rm -fr `echo "Makefile build.sh config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
|
||||
EOF
|
||||
cat >> $CONFIG_STATUS <<EOF
|
||||
|
||||
# Protect against being on the right side of a sed subst in config.status.
|
||||
sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
|
||||
s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
|
||||
sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g;
|
||||
s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
|
||||
$ac_vpsub
|
||||
$extrasub
|
||||
s%@CFLAGS@%$CFLAGS%g
|
||||
|
||||
10
default.c
10
default.c
@@ -1,5 +1,5 @@
|
||||
/* Data base of default implicit rules for GNU Make.
|
||||
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 1995 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988,89,90,91,92,93,94,95,96 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
GNU Make is free software; you can redistribute it and/or modify
|
||||
@@ -63,9 +63,9 @@ static struct pspec default_terminal_rules[] =
|
||||
{
|
||||
/* RCS. */
|
||||
{ "%", "%,v",
|
||||
"+$(CHECKOUT,v)" },
|
||||
"$(CHECKOUT,v)" },
|
||||
{ "%", "RCS/%,v",
|
||||
"+$(CHECKOUT,v)" },
|
||||
"$(CHECKOUT,v)" },
|
||||
|
||||
/* SCCS. */
|
||||
{ "%", "s.%",
|
||||
@@ -214,8 +214,8 @@ static char *default_variables[] =
|
||||
/* This expands to $(CO) $(COFLAGS) $< $@ if $@ does not exist,
|
||||
and to the empty string if $@ does exist. */
|
||||
"CHECKOUT,v",
|
||||
"$(patsubst $@-noexist,$(CO) $(COFLAGS) $< $@,\
|
||||
$(filter-out $@,$(firstword $(wildcard $@) $@-noexist)))",
|
||||
"+$(patsubst $@-noexist,$(CO) $(COFLAGS) $< $@,\
|
||||
$(filter-out $@,$(firstword $(wildcard $@) $@-noexist)))",
|
||||
|
||||
"CO", "co",
|
||||
"CPP", "$(CC) -E",
|
||||
|
||||
53
dir.c
53
dir.c
@@ -1,5 +1,5 @@
|
||||
/* Directory hashing for GNU Make.
|
||||
Copyright (C) 1988, 89, 91, 92, 93, 94, 95 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988, 89, 91, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
GNU Make is free software; you can redistribute it and/or modify
|
||||
@@ -18,24 +18,28 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
#include "make.h"
|
||||
|
||||
#if defined (POSIX) || defined (HAVE_DIRENT_H) || defined (__GNU_LIBRARY__)
|
||||
#include <dirent.h>
|
||||
#if defined (__GNU_LIBRARY__) && __GNU_LIBRARY__ > 1
|
||||
#define HAVE_D_NAMLEN
|
||||
#endif /* GNU C library. */
|
||||
#else /* Not POSIX or HAVE_DIRENT_H. */
|
||||
#define direct dirent
|
||||
#define HAVE_D_NAMLEN
|
||||
#ifdef HAVE_SYS_NDIR_H
|
||||
#include <sys/ndir.h>
|
||||
#endif /* HAVE_SYS_NDIR_H */
|
||||
#ifdef HAVE_SYS_DIR_H
|
||||
#include <sys/dir.h>
|
||||
#endif /* HAVE_SYS_DIR_H */
|
||||
#ifdef HAVE_NDIR_H
|
||||
#include <ndir.h>
|
||||
#endif /* HAVE_NDIR_H */
|
||||
#endif /* POSIX or HAVE_DIRENT_H or __GNU_LIBRARY__. */
|
||||
#ifdef HAVE_DIRENT_H
|
||||
# include <dirent.h>
|
||||
# define NAMLEN(dirent) strlen((dirent)->d_name)
|
||||
#else
|
||||
# define dirent direct
|
||||
# define NAMLEN(dirent) (dirent)->d_namlen
|
||||
# ifdef HAVE_SYS_NDIR_H
|
||||
# include <sys/ndir.h>
|
||||
# endif
|
||||
# ifdef HAVE_SYS_DIR_H
|
||||
# include <sys/dir.h>
|
||||
# endif
|
||||
# ifdef HAVE_NDIR_H
|
||||
# include <ndir.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* In GNU systems, <dirent.h> defines this macro for us. */
|
||||
#ifdef _D_NAMLEN
|
||||
#undef NAMLEN
|
||||
#define NAMLEN(d) _D_NAMLEN(d)
|
||||
#endif
|
||||
|
||||
#if defined (POSIX) && !defined (__GNU_LIBRARY__)
|
||||
/* Posix does not require that the d_ino field be present, and some
|
||||
@@ -295,14 +299,7 @@ dir_contents_file_exists_p (dir, filename)
|
||||
if (!REAL_DIR_ENTRY (d))
|
||||
continue;
|
||||
|
||||
#ifdef HAVE_D_NAMLEN
|
||||
len = d->d_namlen;
|
||||
while (d->d_name[len - 1] == '\0')
|
||||
--len;
|
||||
#else
|
||||
len = strlen (d->d_name);
|
||||
#endif
|
||||
|
||||
len = NAMLEN (d);
|
||||
for (i = 0; i < len; ++i)
|
||||
HASH (newhash, d->d_name[i]);
|
||||
newhash %= DIRFILE_BUCKETS;
|
||||
@@ -619,7 +616,7 @@ read_dirstream (stream)
|
||||
}
|
||||
d = (struct dirent *) buf;
|
||||
FAKE_DIR_ENTRY (d);
|
||||
#ifdef HAVE_D_NAMLEN
|
||||
#ifdef _DIRENT_HAVE_D_NAMLEN
|
||||
d->d_namlen = len - 1;
|
||||
#endif
|
||||
memcpy (d->d_name, df->name, len);
|
||||
|
||||
13
getloadavg.c
13
getloadavg.c
@@ -14,7 +14,8 @@
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
USA. */
|
||||
|
||||
/* Compile-time symbols that this file uses:
|
||||
|
||||
@@ -732,6 +733,16 @@ getloadavg (loadavg, nelem)
|
||||
: (load_ave.tl_avenrun.l[0] / (double) load_ave.tl_lscale));
|
||||
#endif /* OSF_MIPS */
|
||||
|
||||
#if !defined (LDAV_DONE) && defined(MSDOS)
|
||||
#define LDAV_DONE
|
||||
|
||||
/* A faithful emulation is going to have to be saved for a rainy day. */
|
||||
for ( ; elem < nelem; elem++)
|
||||
{
|
||||
loadavg[elem] = 0.0;
|
||||
}
|
||||
#endif /* MSDOS */
|
||||
|
||||
#if !defined (LDAV_DONE) && defined (OSF_ALPHA)
|
||||
#define LDAV_DONE
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
|
||||
@@ -1,3 +1,25 @@
|
||||
Fri Mar 1 10:09:46 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
|
||||
|
||||
* posix/glob.c: Use canonical code from autoconf manual for dirent
|
||||
include.
|
||||
[_D_NAMLEN]: Redefine NAMLEN using this.
|
||||
(glob_in_dir): Use NAMLEN macro.
|
||||
|
||||
Fri Jan 19 13:28:59 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
|
||||
|
||||
* posix/glob.c (glob): Use prototype in getlogin decl.
|
||||
|
||||
Thu Jan 18 00:32:43 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
|
||||
|
||||
* posix/glob.c (_GNU_SOURCE): Define if undefined, so glob.h
|
||||
defines GNU extensions.
|
||||
* posix/fnmatch.c: Likewise.
|
||||
|
||||
Fri Jan 12 13:40:01 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
|
||||
|
||||
* posix/glob.c (glob): Add parens in glob call flags arg for
|
||||
GLOB_BRACE case.
|
||||
|
||||
Thu Dec 14 02:28:22 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
|
||||
|
||||
* posix/glob.c (glob_in_dir): Cast result of opendir to __ptr_t,
|
||||
|
||||
473
glob/configure
vendored
473
glob/configure
vendored
@@ -1,7 +1,7 @@
|
||||
#! /bin/sh
|
||||
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated automatically using autoconf version 2.1.2
|
||||
# Generated automatically using autoconf version 2.7
|
||||
# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
|
||||
#
|
||||
# This configure script is free software; the Free Software Foundation
|
||||
@@ -33,9 +33,22 @@ target=NONE
|
||||
verbose=
|
||||
x_includes=NONE
|
||||
x_libraries=NONE
|
||||
bindir='${exec_prefix}/bin'
|
||||
sbindir='${exec_prefix}/sbin'
|
||||
libexecdir='${exec_prefix}/libexec'
|
||||
datadir='${prefix}/share'
|
||||
sysconfdir='${prefix}/etc'
|
||||
sharedstatedir='${prefix}/com'
|
||||
localstatedir='${prefix}/var'
|
||||
libdir='${exec_prefix}/lib'
|
||||
includedir='${prefix}/include'
|
||||
oldincludedir='/usr/include'
|
||||
infodir='${prefix}/info'
|
||||
mandir='${prefix}/man'
|
||||
|
||||
# Initialize some other variables.
|
||||
subdirs=
|
||||
MFLAGS= MAKEFLAGS=
|
||||
|
||||
ac_prev=
|
||||
for ac_option
|
||||
@@ -57,9 +70,14 @@ do
|
||||
|
||||
case "$ac_option" in
|
||||
|
||||
-build | --build | --buil | --bui | --bu | --b)
|
||||
-bindir | --bindir | --bindi | --bind | --bin | --bi)
|
||||
ac_prev=bindir ;;
|
||||
-bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
|
||||
bindir="$ac_optarg" ;;
|
||||
|
||||
-build | --build | --buil | --bui | --bu)
|
||||
ac_prev=build ;;
|
||||
-build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
|
||||
-build=* | --build=* | --buil=* | --bui=* | --bu=*)
|
||||
build="$ac_optarg" ;;
|
||||
|
||||
-cache-file | --cache-file | --cache-fil | --cache-fi \
|
||||
@@ -69,6 +87,12 @@ do
|
||||
| --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
|
||||
cache_file="$ac_optarg" ;;
|
||||
|
||||
-datadir | --datadir | --datadi | --datad | --data | --dat | --da)
|
||||
ac_prev=datadir ;;
|
||||
-datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
|
||||
| --da=*)
|
||||
datadir="$ac_optarg" ;;
|
||||
|
||||
-disable-* | --disable-*)
|
||||
ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
|
||||
# Reject names that are not valid shell variable names.
|
||||
@@ -119,12 +143,29 @@ Configuration:
|
||||
Directory and file names:
|
||||
--prefix=PREFIX install architecture-independent files in PREFIX
|
||||
[$ac_default_prefix]
|
||||
--exec-prefix=PREFIX install architecture-dependent files in PREFIX
|
||||
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
|
||||
[same as prefix]
|
||||
--bindir=DIR user executables in DIR [EPREFIX/bin]
|
||||
--sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
|
||||
--libexecdir=DIR program executables in DIR [EPREFIX/libexec]
|
||||
--datadir=DIR read-only architecture-independent data in DIR
|
||||
[PREFIX/share]
|
||||
--sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
|
||||
--sharedstatedir=DIR modifiable architecture-independent data in DIR
|
||||
[PREFIX/com]
|
||||
--localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
|
||||
--libdir=DIR object code libraries in DIR [EPREFIX/lib]
|
||||
--includedir=DIR C header files in DIR [PREFIX/include]
|
||||
--oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
|
||||
--infodir=DIR info documentation in DIR [PREFIX/info]
|
||||
--mandir=DIR man documentation in DIR [PREFIX/man]
|
||||
--srcdir=DIR find the sources in DIR [configure dir or ..]
|
||||
--program-prefix=PREFIX prepend PREFIX to installed program names
|
||||
--program-suffix=SUFFIX append SUFFIX to installed program names
|
||||
--program-transform-name=PROGRAM run sed PROGRAM on installed program names
|
||||
--program-transform-name=PROGRAM
|
||||
run sed PROGRAM on installed program names
|
||||
EOF
|
||||
cat << EOF
|
||||
Host type:
|
||||
--build=BUILD configure for building on BUILD [BUILD=HOST]
|
||||
--host=HOST configure for HOST [guessed]
|
||||
@@ -136,8 +177,10 @@ Features and packages:
|
||||
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
|
||||
--x-includes=DIR X include files are in DIR
|
||||
--x-libraries=DIR X library files are in DIR
|
||||
--enable and --with options recognized:$ac_help
|
||||
EOF
|
||||
if test -n "$ac_help"; then
|
||||
echo "--enable and --with options recognized:$ac_help"
|
||||
fi
|
||||
exit 0 ;;
|
||||
|
||||
-host | --host | --hos | --ho)
|
||||
@@ -145,6 +188,44 @@ EOF
|
||||
-host=* | --host=* | --hos=* | --ho=*)
|
||||
host="$ac_optarg" ;;
|
||||
|
||||
-includedir | --includedir | --includedi | --included | --include \
|
||||
| --includ | --inclu | --incl | --inc)
|
||||
ac_prev=includedir ;;
|
||||
-includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
|
||||
| --includ=* | --inclu=* | --incl=* | --inc=*)
|
||||
includedir="$ac_optarg" ;;
|
||||
|
||||
-infodir | --infodir | --infodi | --infod | --info | --inf)
|
||||
ac_prev=infodir ;;
|
||||
-infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
|
||||
infodir="$ac_optarg" ;;
|
||||
|
||||
-libdir | --libdir | --libdi | --libd)
|
||||
ac_prev=libdir ;;
|
||||
-libdir=* | --libdir=* | --libdi=* | --libd=*)
|
||||
libdir="$ac_optarg" ;;
|
||||
|
||||
-libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
|
||||
| --libexe | --libex | --libe)
|
||||
ac_prev=libexecdir ;;
|
||||
-libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
|
||||
| --libexe=* | --libex=* | --libe=*)
|
||||
libexecdir="$ac_optarg" ;;
|
||||
|
||||
-localstatedir | --localstatedir | --localstatedi | --localstated \
|
||||
| --localstate | --localstat | --localsta | --localst \
|
||||
| --locals | --local | --loca | --loc | --lo)
|
||||
ac_prev=localstatedir ;;
|
||||
-localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
|
||||
| --localstate=* | --localstat=* | --localsta=* | --localst=* \
|
||||
| --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
|
||||
localstatedir="$ac_optarg" ;;
|
||||
|
||||
-mandir | --mandir | --mandi | --mand | --man | --ma | --m)
|
||||
ac_prev=mandir ;;
|
||||
-mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
|
||||
mandir="$ac_optarg" ;;
|
||||
|
||||
-nfp | --nfp | --nf)
|
||||
# Obsolete; use --without-fp.
|
||||
with_fp=no ;;
|
||||
@@ -157,6 +238,15 @@ EOF
|
||||
| --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
|
||||
no_recursion=yes ;;
|
||||
|
||||
-oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
|
||||
| --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
|
||||
| --oldin | --oldi | --old | --ol | --o)
|
||||
ac_prev=oldincludedir ;;
|
||||
-oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
|
||||
| --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
|
||||
| --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
|
||||
oldincludedir="$ac_optarg" ;;
|
||||
|
||||
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
|
||||
ac_prev=prefix ;;
|
||||
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
|
||||
@@ -197,6 +287,23 @@ EOF
|
||||
| -silent | --silent | --silen | --sile | --sil)
|
||||
silent=yes ;;
|
||||
|
||||
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
|
||||
ac_prev=sbindir ;;
|
||||
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
|
||||
| --sbi=* | --sb=*)
|
||||
sbindir="$ac_optarg" ;;
|
||||
|
||||
-sharedstatedir | --sharedstatedir | --sharedstatedi \
|
||||
| --sharedstated | --sharedstate | --sharedstat | --sharedsta \
|
||||
| --sharedst | --shareds | --shared | --share | --shar \
|
||||
| --sha | --sh)
|
||||
ac_prev=sharedstatedir ;;
|
||||
-sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
|
||||
| --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
|
||||
| --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
|
||||
| --sha=* | --sh=*)
|
||||
sharedstatedir="$ac_optarg" ;;
|
||||
|
||||
-site | --site | --sit)
|
||||
ac_prev=site ;;
|
||||
-site=* | --site=* | --sit=*)
|
||||
@@ -207,6 +314,13 @@ EOF
|
||||
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
|
||||
srcdir="$ac_optarg" ;;
|
||||
|
||||
-sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
|
||||
| --syscon | --sysco | --sysc | --sys | --sy)
|
||||
ac_prev=sysconfdir ;;
|
||||
-sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
|
||||
| --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
|
||||
sysconfdir="$ac_optarg" ;;
|
||||
|
||||
-target | --target | --targe | --targ | --tar | --ta | --t)
|
||||
ac_prev=target ;;
|
||||
-target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
|
||||
@@ -216,7 +330,7 @@ EOF
|
||||
verbose=yes ;;
|
||||
|
||||
-version | --version | --versio | --versi | --vers)
|
||||
echo "configure generated by autoconf version 2.1.2"
|
||||
echo "configure generated by autoconf version 2.7"
|
||||
exit 0 ;;
|
||||
|
||||
-with-* | --with-*)
|
||||
@@ -262,7 +376,7 @@ EOF
|
||||
-*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
|
||||
;;
|
||||
|
||||
*)
|
||||
*)
|
||||
if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
|
||||
echo "configure: warning: $ac_option: invalid host type" 1>&2
|
||||
fi
|
||||
@@ -382,8 +496,8 @@ fi
|
||||
ac_ext=c
|
||||
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
||||
ac_cpp='$CPP $CPPFLAGS'
|
||||
ac_compile='${CC-cc} conftest.$ac_ext $CFLAGS $CPPFLAGS -c 1>&5 2>&5'
|
||||
ac_link='${CC-cc} conftest.$ac_ext $CFLAGS $CPPFLAGS $LDFLAGS -o conftest $LIBS 1>&5 2>&5'
|
||||
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
|
||||
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
||||
|
||||
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
|
||||
# Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
|
||||
@@ -415,7 +529,6 @@ else
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
|
||||
fi
|
||||
fi
|
||||
CC="$ac_cv_prog_CC"
|
||||
@@ -425,6 +538,55 @@ else
|
||||
echo "$ac_t""no" 1>&6
|
||||
fi
|
||||
|
||||
if test -z "$CC"; then
|
||||
# Extract the first word of "cc", so it can be a program name with args.
|
||||
set dummy cc; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
if test -n "$CC"; then
|
||||
ac_cv_prog_CC="$CC" # Let the user override the test.
|
||||
else
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
||||
ac_prog_rejected=no
|
||||
for ac_dir in $PATH; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/$ac_word; then
|
||||
if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
|
||||
ac_prog_rejected=yes
|
||||
continue
|
||||
fi
|
||||
ac_cv_prog_CC="cc"
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
if test $ac_prog_rejected = yes; then
|
||||
# We found a bogon in the path, so make sure we never use it.
|
||||
set dummy $ac_cv_prog_CC
|
||||
shift
|
||||
if test $# -gt 0; then
|
||||
# We chose a different compiler from the bogus one.
|
||||
# However, it has the same basename, so the bogon will be chosen
|
||||
# first if we set CC to just the basename; use the full file name.
|
||||
shift
|
||||
set dummy "$ac_dir/$ac_word" "$@"
|
||||
shift
|
||||
ac_cv_prog_CC="$@"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
CC="$ac_cv_prog_CC"
|
||||
if test -n "$CC"; then
|
||||
echo "$ac_t""$CC" 1>&6
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
fi
|
||||
|
||||
test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
|
||||
fi
|
||||
|
||||
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
|
||||
@@ -435,12 +597,13 @@ else
|
||||
yes;
|
||||
#endif
|
||||
EOF
|
||||
if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
|
||||
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:601: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
|
||||
ac_cv_prog_gcc=yes
|
||||
else
|
||||
ac_cv_prog_gcc=no
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "$ac_t""$ac_cv_prog_gcc" 1>&6
|
||||
if test $ac_cv_prog_gcc = yes; then
|
||||
GCC=yes
|
||||
@@ -458,7 +621,8 @@ fi
|
||||
rm -f conftest*
|
||||
|
||||
fi
|
||||
echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
|
||||
|
||||
echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
|
||||
if test $ac_cv_prog_gcc_g = yes; then
|
||||
CFLAGS="-g -O"
|
||||
else
|
||||
@@ -541,12 +705,13 @@ else
|
||||
# On the NeXT, cc -E runs the code through the compiler's parser,
|
||||
# not just through cpp.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 545 "configure"
|
||||
#line 709 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <assert.h>
|
||||
Syntax Error
|
||||
EOF
|
||||
eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:715: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
:
|
||||
@@ -555,12 +720,13 @@ else
|
||||
rm -rf conftest*
|
||||
CPP="${CC-cc} -E -traditional-cpp"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 559 "configure"
|
||||
#line 724 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <assert.h>
|
||||
Syntax Error
|
||||
EOF
|
||||
eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:730: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
:
|
||||
@@ -574,12 +740,14 @@ fi
|
||||
rm -f conftest*
|
||||
ac_cv_prog_CPP="$CPP"
|
||||
fi
|
||||
CPP="$ac_cv_prog_CPP"
|
||||
else
|
||||
ac_cv_prog_CPP="$CPP"
|
||||
fi
|
||||
CPP="$ac_cv_prog_CPP"
|
||||
echo "$ac_t""$CPP" 1>&6
|
||||
echo $ac_n "checking for AIX""... $ac_c" 1>&6
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 583 "configure"
|
||||
#line 751 "configure"
|
||||
#include "confdefs.h"
|
||||
#ifdef _AIX
|
||||
yes
|
||||
@@ -606,11 +774,12 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 610 "configure"
|
||||
#line 778 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <minix/config.h>
|
||||
EOF
|
||||
eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:783: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
@@ -670,7 +839,7 @@ if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 674 "configure"
|
||||
#line 843 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() { return 0; }
|
||||
@@ -683,7 +852,7 @@ char const *const *ccp;
|
||||
char **p;
|
||||
/* NEC SVR4.0.2 mips cc rejects this. */
|
||||
struct point {int x, y;};
|
||||
static struct point const zero;
|
||||
static struct point const zero = {0,0};
|
||||
/* AIX XL C 1.02.0.0 rejects this.
|
||||
It does not let you subtract one const X* pointer from another in an arm
|
||||
of an if-expression whose if-part is not a constant expression */
|
||||
@@ -720,7 +889,7 @@ ccp = (char const *const *) p;
|
||||
|
||||
; return 0; }
|
||||
EOF
|
||||
if eval $ac_compile; then
|
||||
if { (eval echo configure:893: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ac_cv_c_const=yes
|
||||
else
|
||||
@@ -730,6 +899,7 @@ fi
|
||||
rm -f conftest*
|
||||
|
||||
fi
|
||||
|
||||
echo "$ac_t""$ac_cv_c_const" 1>&6
|
||||
if test $ac_cv_c_const = no; then
|
||||
cat >> confdefs.h <<\EOF
|
||||
@@ -747,11 +917,11 @@ else
|
||||
ac_cv_c_cross=yes
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 751 "configure"
|
||||
#line 921 "configure"
|
||||
#include "confdefs.h"
|
||||
main(){return(0);}
|
||||
EOF
|
||||
eval $ac_link
|
||||
{ (eval echo configure:925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
|
||||
if test -s conftest && (./conftest; exit) 2>/dev/null; then
|
||||
ac_cv_c_cross=no
|
||||
else
|
||||
@@ -760,22 +930,24 @@ fi
|
||||
fi
|
||||
rm -fr conftest*
|
||||
fi
|
||||
cross_compiling=$ac_cv_c_cross
|
||||
|
||||
echo "$ac_t""$ac_cv_c_cross" 1>&6
|
||||
cross_compiling=$ac_cv_c_cross
|
||||
|
||||
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
|
||||
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 772 "configure"
|
||||
#line 943 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <float.h>
|
||||
EOF
|
||||
eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:951: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
@@ -790,7 +962,7 @@ rm -f conftest*
|
||||
if test $ac_cv_header_stdc = yes; then
|
||||
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 794 "configure"
|
||||
#line 966 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <string.h>
|
||||
EOF
|
||||
@@ -808,7 +980,7 @@ fi
|
||||
if test $ac_cv_header_stdc = yes; then
|
||||
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 812 "configure"
|
||||
#line 984 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <stdlib.h>
|
||||
EOF
|
||||
@@ -826,10 +998,10 @@ fi
|
||||
if test $ac_cv_header_stdc = yes; then
|
||||
# /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
|
||||
if test "$cross_compiling" = yes; then
|
||||
ac_cv_header_stdc=no
|
||||
:
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 833 "configure"
|
||||
#line 1005 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <ctype.h>
|
||||
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
|
||||
@@ -840,7 +1012,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
|
||||
exit (0); }
|
||||
|
||||
EOF
|
||||
eval $ac_link
|
||||
{ (eval echo configure:1016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
|
||||
if test -s conftest && (./conftest; exit) 2>/dev/null; then
|
||||
:
|
||||
else
|
||||
@@ -850,6 +1022,7 @@ fi
|
||||
rm -fr conftest*
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "$ac_t""$ac_cv_header_stdc" 1>&6
|
||||
if test $ac_cv_header_stdc = yes; then
|
||||
cat >> confdefs.h <<\EOF
|
||||
@@ -866,11 +1039,12 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 870 "configure"
|
||||
#line 1043 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <$ac_hdr>
|
||||
EOF
|
||||
eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:1048: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
@@ -884,7 +1058,7 @@ rm -f conftest*
|
||||
fi
|
||||
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
|
||||
echo "$ac_t""yes" 1>&6
|
||||
ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
|
||||
ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
|
||||
cat >> confdefs.h <<EOF
|
||||
#define $ac_tr_hdr 1
|
||||
EOF
|
||||
@@ -903,7 +1077,7 @@ if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 907 "configure"
|
||||
#line 1081 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#include <$ac_hdr>
|
||||
@@ -912,7 +1086,7 @@ int t() {
|
||||
DIR *dirp = 0;
|
||||
; return 0; }
|
||||
EOF
|
||||
if eval $ac_compile; then
|
||||
if { (eval echo configure:1090: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_header_dirent_$ac_safe=yes"
|
||||
else
|
||||
@@ -924,7 +1098,7 @@ rm -f conftest*
|
||||
fi
|
||||
if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
|
||||
echo "$ac_t""yes" 1>&6
|
||||
ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
|
||||
ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdedfghijklmnopqrstuvwxyz./\055' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ___'`
|
||||
cat >> confdefs.h <<EOF
|
||||
#define $ac_tr_hdr 1
|
||||
EOF
|
||||
@@ -936,13 +1110,14 @@ done
|
||||
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
|
||||
if test $ac_header_dirent = dirent.h; then
|
||||
echo $ac_n "checking for -ldir""... $ac_c" 1>&6
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_dir'+set}'`\" = set"; then
|
||||
ac_lib_var=`echo dir | tr '.-/+' '___p'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-ldir $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 946 "configure"
|
||||
#line 1121 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() { return 0; }
|
||||
@@ -950,18 +1125,18 @@ int t() {
|
||||
opendir()
|
||||
; return 0; }
|
||||
EOF
|
||||
if eval $ac_link; then
|
||||
if { (eval echo configure:1129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_lib_dir=yes"
|
||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||
else
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_lib_dir=no"
|
||||
eval "ac_cv_lib_$ac_lib_var=no"
|
||||
fi
|
||||
rm -f conftest*
|
||||
LIBS="$ac_save_LIBS"
|
||||
|
||||
fi
|
||||
if eval "test \"`echo '$ac_cv_lib_'dir`\" = yes"; then
|
||||
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
|
||||
echo "$ac_t""yes" 1>&6
|
||||
LIBS="$LIBS -ldir"
|
||||
else
|
||||
@@ -970,13 +1145,14 @@ fi
|
||||
|
||||
else
|
||||
echo $ac_n "checking for -lx""... $ac_c" 1>&6
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_x'+set}'`\" = set"; then
|
||||
ac_lib_var=`echo x | tr '.-/+' '___p'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-lx $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 980 "configure"
|
||||
#line 1156 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() { return 0; }
|
||||
@@ -984,18 +1160,18 @@ int t() {
|
||||
opendir()
|
||||
; return 0; }
|
||||
EOF
|
||||
if eval $ac_link; then
|
||||
if { (eval echo configure:1164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_lib_x=yes"
|
||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||
else
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_lib_x=no"
|
||||
eval "ac_cv_lib_$ac_lib_var=no"
|
||||
fi
|
||||
rm -f conftest*
|
||||
LIBS="$ac_save_LIBS"
|
||||
|
||||
fi
|
||||
if eval "test \"`echo '$ac_cv_lib_'x`\" = yes"; then
|
||||
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
|
||||
echo "$ac_t""yes" 1>&6
|
||||
LIBS="$LIBS -lx"
|
||||
else
|
||||
@@ -1009,16 +1185,16 @@ if eval "test \"`echo '$''{'ac_cv_func_closedir_void'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
if test "$cross_compiling" = yes; then
|
||||
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
|
||||
ac_cv_func_closedir_void=yes
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1016 "configure"
|
||||
#line 1192 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#include <$ac_header_dirent>
|
||||
int closedir(); main() { exit(closedir(opendir(".")) != 0); }
|
||||
EOF
|
||||
eval $ac_link
|
||||
{ (eval echo configure:1198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
|
||||
if test -s conftest && (./conftest; exit) 2>/dev/null; then
|
||||
ac_cv_func_closedir_void=no
|
||||
else
|
||||
@@ -1027,6 +1203,7 @@ fi
|
||||
fi
|
||||
rm -fr conftest*
|
||||
fi
|
||||
|
||||
echo "$ac_t""$ac_cv_func_closedir_void" 1>&6
|
||||
if test $ac_cv_func_closedir_void = yes; then
|
||||
cat >> confdefs.h <<\EOF
|
||||
@@ -1042,7 +1219,7 @@ if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1046 "configure"
|
||||
#line 1223 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <alloca.h>
|
||||
int main() { return 0; }
|
||||
@@ -1050,7 +1227,7 @@ int t() {
|
||||
char *p = alloca(2 * sizeof(int));
|
||||
; return 0; }
|
||||
EOF
|
||||
if eval $ac_link; then
|
||||
if { (eval echo configure:1231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ac_cv_header_alloca_h=yes
|
||||
else
|
||||
@@ -1060,6 +1237,7 @@ fi
|
||||
rm -f conftest*
|
||||
|
||||
fi
|
||||
|
||||
echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
|
||||
if test $ac_cv_header_alloca_h = yes; then
|
||||
cat >> confdefs.h <<\EOF
|
||||
@@ -1073,7 +1251,7 @@ if eval "test \"`echo '$''{'ac_cv_func_alloca'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1077 "configure"
|
||||
#line 1255 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#ifdef __GNUC__
|
||||
@@ -1097,7 +1275,7 @@ int t() {
|
||||
char *p = (char *) alloca(1);
|
||||
; return 0; }
|
||||
EOF
|
||||
if eval $ac_link; then
|
||||
if { (eval echo configure:1279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ac_cv_func_alloca=yes
|
||||
else
|
||||
@@ -1107,6 +1285,7 @@ fi
|
||||
rm -f conftest*
|
||||
|
||||
fi
|
||||
|
||||
echo "$ac_t""$ac_cv_func_alloca" 1>&6
|
||||
if test $ac_cv_func_alloca = yes; then
|
||||
cat >> confdefs.h <<\EOF
|
||||
@@ -1131,7 +1310,7 @@ if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1135 "configure"
|
||||
#line 1314 "configure"
|
||||
#include "confdefs.h"
|
||||
#if defined(CRAY) && ! defined(CRAY2)
|
||||
webecray
|
||||
@@ -1151,18 +1330,22 @@ fi
|
||||
rm -f conftest*
|
||||
|
||||
fi
|
||||
|
||||
echo "$ac_t""$ac_cv_os_cray" 1>&6
|
||||
if test $ac_cv_os_cray = yes; then
|
||||
echo $ac_n "checking for _getb67""... $ac_c" 1>&6
|
||||
if eval "test \"`echo '$''{'ac_cv_func__getb67'+set}'`\" = set"; then
|
||||
for ac_func in _getb67 GETB67 getb67; do
|
||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1162 "configure"
|
||||
#line 1343 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <ctype.h> /* Arbitrary system header to define __stub macros. */
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func(); below. */
|
||||
#include <assert.h>
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
char _getb67();
|
||||
char $ac_func();
|
||||
|
||||
int main() { return 0; }
|
||||
int t() {
|
||||
@@ -1170,124 +1353,36 @@ int t() {
|
||||
/* The GNU C library defines this for functions which it implements
|
||||
to always fail with ENOSYS. Some functions are actually named
|
||||
something starting with __ and the normal name is an alias. */
|
||||
#if defined (__stub__getb67) || defined (__stub____getb67)
|
||||
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
|
||||
choke me
|
||||
#else
|
||||
_getb67();
|
||||
$ac_func();
|
||||
#endif
|
||||
|
||||
; return 0; }
|
||||
EOF
|
||||
if eval $ac_link; then
|
||||
if { (eval echo configure:1365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func__getb67=yes"
|
||||
eval "ac_cv_func_$ac_func=yes"
|
||||
else
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func__getb67=no"
|
||||
eval "ac_cv_func_$ac_func=no"
|
||||
fi
|
||||
rm -f conftest*
|
||||
|
||||
fi
|
||||
if eval "test \"`echo '$ac_cv_func_'_getb67`\" = yes"; then
|
||||
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
|
||||
echo "$ac_t""yes" 1>&6
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define CRAY_STACKSEG_END _getb67
|
||||
EOF
|
||||
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
echo $ac_n "checking for GETB67""... $ac_c" 1>&6
|
||||
if eval "test \"`echo '$''{'ac_cv_func_GETB67'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1205 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <ctype.h> /* Arbitrary system header to define __stub macros. */
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
char GETB67();
|
||||
|
||||
int main() { return 0; }
|
||||
int t() {
|
||||
|
||||
/* The GNU C library defines this for functions which it implements
|
||||
to always fail with ENOSYS. Some functions are actually named
|
||||
something starting with __ and the normal name is an alias. */
|
||||
#if defined (__stub_GETB67) || defined (__stub___GETB67)
|
||||
choke me
|
||||
#else
|
||||
GETB67();
|
||||
#endif
|
||||
|
||||
; return 0; }
|
||||
EOF
|
||||
if eval $ac_link; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_GETB67=yes"
|
||||
else
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_GETB67=no"
|
||||
fi
|
||||
rm -f conftest*
|
||||
|
||||
fi
|
||||
if eval "test \"`echo '$ac_cv_func_'GETB67`\" = yes"; then
|
||||
echo "$ac_t""yes" 1>&6
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define CRAY_STACKSEG_END GETB67
|
||||
EOF
|
||||
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
echo $ac_n "checking for getb67""... $ac_c" 1>&6
|
||||
if eval "test \"`echo '$''{'ac_cv_func_getb67'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1248 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <ctype.h> /* Arbitrary system header to define __stub macros. */
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
char getb67();
|
||||
|
||||
int main() { return 0; }
|
||||
int t() {
|
||||
|
||||
/* The GNU C library defines this for functions which it implements
|
||||
to always fail with ENOSYS. Some functions are actually named
|
||||
something starting with __ and the normal name is an alias. */
|
||||
#if defined (__stub_getb67) || defined (__stub___getb67)
|
||||
choke me
|
||||
#else
|
||||
getb67();
|
||||
#endif
|
||||
|
||||
; return 0; }
|
||||
EOF
|
||||
if eval $ac_link; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_getb67=yes"
|
||||
else
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_getb67=no"
|
||||
fi
|
||||
rm -f conftest*
|
||||
|
||||
fi
|
||||
if eval "test \"`echo '$ac_cv_func_'getb67`\" = yes"; then
|
||||
echo "$ac_t""yes" 1>&6
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define CRAY_STACKSEG_END getb67
|
||||
cat >> confdefs.h <<EOF
|
||||
#define CRAY_STACKSEG_END $ac_func
|
||||
EOF
|
||||
|
||||
break
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
done
|
||||
fi
|
||||
|
||||
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
|
||||
@@ -1298,7 +1393,7 @@ else
|
||||
ac_cv_c_stack_direction=0
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1302 "configure"
|
||||
#line 1397 "configure"
|
||||
#include "confdefs.h"
|
||||
find_stack_direction ()
|
||||
{
|
||||
@@ -1317,7 +1412,7 @@ main ()
|
||||
exit (find_stack_direction() < 0);
|
||||
}
|
||||
EOF
|
||||
eval $ac_link
|
||||
{ (eval echo configure:1416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
|
||||
if test -s conftest && (./conftest; exit) 2>/dev/null; then
|
||||
ac_cv_c_stack_direction=1
|
||||
else
|
||||
@@ -1326,6 +1421,7 @@ fi
|
||||
fi
|
||||
rm -fr conftest*
|
||||
fi
|
||||
|
||||
echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
|
||||
cat >> confdefs.h <<EOF
|
||||
#define STACK_DIRECTION $ac_cv_c_stack_direction
|
||||
@@ -1341,7 +1437,7 @@ else
|
||||
ac_cv_func_strcoll=no
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1345 "configure"
|
||||
#line 1441 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <string.h>
|
||||
main ()
|
||||
@@ -1351,7 +1447,7 @@ main ()
|
||||
strcoll ("123", "456") >= 0);
|
||||
}
|
||||
EOF
|
||||
eval $ac_link
|
||||
{ (eval echo configure:1451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
|
||||
if test -s conftest && (./conftest; exit) 2>/dev/null; then
|
||||
ac_cv_func_strcoll=yes
|
||||
else
|
||||
@@ -1360,6 +1456,7 @@ fi
|
||||
fi
|
||||
rm -fr conftest*
|
||||
fi
|
||||
|
||||
echo "$ac_t""$ac_cv_func_strcoll" 1>&6
|
||||
if test $ac_cv_func_strcoll = yes; then
|
||||
cat >> confdefs.h <<\EOF
|
||||
@@ -1369,9 +1466,7 @@ EOF
|
||||
fi
|
||||
|
||||
trap '' 1 2 15
|
||||
if test -w $cache_file; then
|
||||
echo "updating cache $cache_file"
|
||||
cat > $cache_file <<\EOF
|
||||
cat > confcache <<\EOF
|
||||
# This file is a shell script that caches the results of configure
|
||||
# tests run on this system so they can be shared between configure
|
||||
# scripts and configure runs. It is not useful on other systems.
|
||||
@@ -1391,10 +1486,18 @@ EOF
|
||||
# and sets the high bit in the cache file unless we assign to the vars.
|
||||
(set) 2>&1 |
|
||||
sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
|
||||
>> $cache_file
|
||||
>> confcache
|
||||
if cmp -s $cache_file confcache; then
|
||||
:
|
||||
else
|
||||
echo "not updating unwritable cache $cache_file"
|
||||
if test -w $cache_file; then
|
||||
echo "updating cache $cache_file"
|
||||
cat confcache > $cache_file
|
||||
else
|
||||
echo "not updating unwritable cache $cache_file"
|
||||
fi
|
||||
fi
|
||||
rm -f confcache
|
||||
|
||||
trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
|
||||
|
||||
@@ -1415,7 +1518,7 @@ trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
|
||||
# Protect against shell expansion while executing Makefile rules.
|
||||
# Protect against Makefile macro expansion.
|
||||
cat > conftest.defs <<\EOF
|
||||
s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%-D\1=\2%g
|
||||
s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
|
||||
s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
|
||||
s%\[%\\&%g
|
||||
s%\]%\\&%g
|
||||
@@ -1450,7 +1553,7 @@ do
|
||||
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
|
||||
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
|
||||
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
|
||||
echo "$CONFIG_STATUS generated by autoconf version 2.1.2"
|
||||
echo "$CONFIG_STATUS generated by autoconf version 2.7"
|
||||
exit 0 ;;
|
||||
-help | --help | --hel | --he | --h)
|
||||
echo "\$ac_cs_usage"; exit 0 ;;
|
||||
@@ -1460,11 +1563,13 @@ done
|
||||
|
||||
ac_given_srcdir=$srcdir
|
||||
|
||||
trap 'rm -f Makefile; exit 1' 1 2 15
|
||||
trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
|
||||
EOF
|
||||
cat >> $CONFIG_STATUS <<EOF
|
||||
|
||||
# Protect against being on the right side of a sed subst in config.status.
|
||||
sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g;
|
||||
s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
|
||||
# Protect against being on the right side of a sed subst in config.status.
|
||||
sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
|
||||
s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
|
||||
$ac_vpsub
|
||||
$extrasub
|
||||
s%@CFLAGS@%$CFLAGS%g
|
||||
@@ -1476,6 +1581,18 @@ s%@LIBS@%$LIBS%g
|
||||
s%@exec_prefix@%$exec_prefix%g
|
||||
s%@prefix@%$prefix%g
|
||||
s%@program_transform_name@%$program_transform_name%g
|
||||
s%@bindir@%$bindir%g
|
||||
s%@sbindir@%$sbindir%g
|
||||
s%@libexecdir@%$libexecdir%g
|
||||
s%@datadir@%$datadir%g
|
||||
s%@sysconfdir@%$sysconfdir%g
|
||||
s%@sharedstatedir@%$sharedstatedir%g
|
||||
s%@localstatedir@%$localstatedir%g
|
||||
s%@libdir@%$libdir%g
|
||||
s%@includedir@%$includedir%g
|
||||
s%@oldincludedir@%$oldincludedir%g
|
||||
s%@infodir@%$infodir%g
|
||||
s%@mandir@%$mandir%g
|
||||
s%@CC@%$CC%g
|
||||
s%@AR@%$AR%g
|
||||
s%@RANLIB@%$RANLIB%g
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991, 1992, 1993, 1996 Free Software Foundation, Inc.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
@@ -19,6 +19,11 @@ Cambridge, MA 02139, USA. */
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
/* Enable GNU extensions in fnmatch.h. */
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE 1
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <fnmatch.h>
|
||||
#include <ctype.h>
|
||||
|
||||
64
glob/glob.c
64
glob/glob.c
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
@@ -24,6 +24,11 @@ Cambridge, MA 02139, USA. */
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
/* Enable GNU extensions in glob.h. */
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE 1
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
@@ -71,26 +76,30 @@ extern int errno;
|
||||
#endif
|
||||
|
||||
|
||||
#if defined (POSIX) || defined (HAVE_DIRENT_H) || defined (__GNU_LIBRARY__)
|
||||
#include <dirent.h>
|
||||
#ifndef __GNU_LIBRARY__
|
||||
#define D_NAMLEN(d) strlen((d)->d_name)
|
||||
#else /* GNU C library. */
|
||||
#define D_NAMLEN(d) ((d)->d_namlen)
|
||||
#endif /* Not GNU C library. */
|
||||
#else /* Not POSIX or HAVE_DIRENT_H. */
|
||||
#define direct dirent
|
||||
#define D_NAMLEN(d) ((d)->d_namlen)
|
||||
#ifdef HAVE_SYS_NDIR_H
|
||||
#include <sys/ndir.h>
|
||||
#endif /* HAVE_SYS_NDIR_H */
|
||||
#ifdef HAVE_SYS_DIR_H
|
||||
#include <sys/dir.h>
|
||||
#endif /* HAVE_SYS_DIR_H */
|
||||
#ifdef HAVE_NDIR_H
|
||||
#include <ndir.h>
|
||||
#endif /* HAVE_NDIR_H */
|
||||
#endif /* POSIX or HAVE_DIRENT_H or __GNU_LIBRARY__. */
|
||||
#if defined (HAVE_DIRENT_H) || defined (__GNU_LIBRARY__)
|
||||
# include <dirent.h>
|
||||
# define NAMLEN(dirent) strlen((dirent)->d_name)
|
||||
#else
|
||||
# define dirent direct
|
||||
# define NAMLEN(dirent) (dirent)->d_namlen
|
||||
# ifdef HAVE_SYS_NDIR_H
|
||||
# include <sys/ndir.h>
|
||||
# endif
|
||||
# ifdef HAVE_SYS_DIR_H
|
||||
# include <sys/dir.h>
|
||||
# endif
|
||||
# ifdef HAVE_NDIR_H
|
||||
# include <ndir.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
/* In GNU systems, <dirent.h> defines this macro for us. */
|
||||
#ifdef _D_NAMLEN
|
||||
#undef NAMLEN
|
||||
#define NAMLEN(d) _D_NAMLEN(d)
|
||||
#endif
|
||||
|
||||
|
||||
#if defined (POSIX) && !defined (__GNU_LIBRARY__)
|
||||
/* Posix does not require that the d_ino field be present, and some
|
||||
@@ -290,7 +299,7 @@ glob (pattern, flags, errfunc, pglob)
|
||||
memcpy (buf, pattern, begin - pattern);
|
||||
memcpy (buf + (begin - pattern), p, comma - p);
|
||||
memcpy (buf + (begin - pattern) + (comma - p), end, restlen);
|
||||
result = glob (buf, (flags & ~(GLOB_NOCHECK|GLOB_NOMAGIC) |
|
||||
result = glob (buf, ((flags & ~(GLOB_NOCHECK|GLOB_NOMAGIC)) |
|
||||
GLOB_APPEND), errfunc, pglob);
|
||||
if (result && result != GLOB_NOMATCH)
|
||||
return result;
|
||||
@@ -353,7 +362,7 @@ glob (pattern, flags, errfunc, pglob)
|
||||
dirname = getenv ("HOME");
|
||||
if (dirname == NULL || dirname[0] == '\0')
|
||||
{
|
||||
extern char *getlogin ();
|
||||
extern char *getlogin __P ((void));
|
||||
char *name = getlogin ();
|
||||
if (name != NULL)
|
||||
{
|
||||
@@ -687,12 +696,8 @@ glob_in_dir (pattern, directory, flags, errfunc, pglob)
|
||||
break;
|
||||
if (! REAL_DIR_ENTRY (d))
|
||||
continue;
|
||||
|
||||
name = d->d_name;
|
||||
#ifdef HAVE_D_NAMLEN
|
||||
len = d->d_namlen;
|
||||
#else
|
||||
len = 0;
|
||||
#endif
|
||||
|
||||
if (fnmatch (pattern, name,
|
||||
(!(flags & GLOB_PERIOD) ? FNM_PERIOD : 0) |
|
||||
@@ -700,8 +705,7 @@ glob_in_dir (pattern, directory, flags, errfunc, pglob)
|
||||
{
|
||||
struct globlink *new
|
||||
= (struct globlink *) __alloca (sizeof (struct globlink));
|
||||
if (len == 0)
|
||||
len = strlen (name);
|
||||
len = NAMLEN (d);
|
||||
new->name
|
||||
= (char *) malloc (len + 1);
|
||||
if (new->name == NULL)
|
||||
|
||||
18
job.c
18
job.c
@@ -1,5 +1,6 @@
|
||||
/* Job execution and handling for GNU Make.
|
||||
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 1995 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96
|
||||
Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
GNU Make is free software; you can redistribute it and/or modify
|
||||
@@ -41,20 +42,6 @@ static int dos_batch_file;
|
||||
#include <sys/file.h>
|
||||
#endif
|
||||
|
||||
|
||||
/* If NGROUPS_MAX == 0 then try other methods for finding a real value. */
|
||||
#if defined (NGROUPS_MAX) && NGROUPS_MAX == 0
|
||||
#undef NGROUPS_MAX
|
||||
#endif /* NGROUPS_MAX == 0 */
|
||||
|
||||
#ifndef NGROUPS_MAX
|
||||
#ifdef POSIX
|
||||
#define GET_NGROUPS_MAX sysconf (_SC_NGROUPS_MAX)
|
||||
#else /* Not POSIX. */
|
||||
#define NGROUPS_MAX NGROUPS
|
||||
#endif /* POSIX. */
|
||||
#endif
|
||||
|
||||
#if defined (HAVE_SYS_WAIT_H) || defined (HAVE_UNION_WAIT)
|
||||
#include <sys/wait.h>
|
||||
#endif
|
||||
@@ -129,7 +116,6 @@ extern int start_remote_job_p ();
|
||||
extern int start_remote_job (), remote_status ();
|
||||
|
||||
RETSIGTYPE child_handler ();
|
||||
void unblock_sigs ();
|
||||
static void free_child (), start_job_command ();
|
||||
static int load_too_high (), job_next_command ();
|
||||
|
||||
|
||||
525
make-stds.texi
525
make-stds.texi
@@ -8,14 +8,26 @@
|
||||
@cindex conventions for makefiles
|
||||
@cindex standards for makefiles
|
||||
|
||||
This chapter describes conventions for writing the Makefiles for GNU programs.
|
||||
This
|
||||
@ifinfo
|
||||
node
|
||||
@end ifinfo
|
||||
@iftex
|
||||
@ifset CODESTD
|
||||
section
|
||||
@end ifset
|
||||
@ifclear CODESTD
|
||||
chapter
|
||||
@end ifclear
|
||||
@end iftex
|
||||
describes conventions for writing the Makefiles for GNU programs.
|
||||
|
||||
@menu
|
||||
* Makefile Basics::
|
||||
* Utilities in Makefiles::
|
||||
* Standard Targets::
|
||||
* Command Variables::
|
||||
* Directory Variables::
|
||||
* Makefile Basics:: General Conventions for Makefiles
|
||||
* Utilities in Makefiles:: Utilities in Makefiles
|
||||
* Command Variables:: Variables for Specifying Commands
|
||||
* Directory Variables:: Variables for Installation Directories
|
||||
* Standard Targets:: Standard Targets for Users
|
||||
@end menu
|
||||
|
||||
@node Makefile Basics
|
||||
@@ -69,9 +81,9 @@ directory.
|
||||
|
||||
When using GNU @code{make}, relying on @samp{VPATH} to find the source
|
||||
file will work in the case where there is a single dependency file,
|
||||
since the @file{make} automatic variable @samp{$<} will represent the
|
||||
since the @code{make} automatic variable @samp{$<} will represent the
|
||||
source file wherever it is. (Many versions of @code{make} set @samp{$<}
|
||||
only in implicit rules.) A makefile target like
|
||||
only in implicit rules.) A Makefile target like
|
||||
|
||||
@smallexample
|
||||
foo.o : bar.c
|
||||
@@ -97,6 +109,9 @@ foo.1 : foo.man sedscript
|
||||
sed -e $(srcdir)/sedscript $(srcdir)/foo.man > $@@
|
||||
@end smallexample
|
||||
|
||||
Try to make the build and installation targets, at least (and all their
|
||||
subtargets) work correctly with a parallel @code{make}.
|
||||
|
||||
@node Utilities in Makefiles
|
||||
@section Utilities in Makefiles
|
||||
|
||||
@@ -108,8 +123,8 @@ The @code{configure} script and the Makefile rules for building and
|
||||
installation should not use any utilities directly except these:
|
||||
|
||||
@example
|
||||
cat cmp cp echo egrep expr grep
|
||||
ln mkdir mv pwd rm rmdir sed test touch
|
||||
cat cmp cp echo egrep expr false grep
|
||||
ln mkdir mv pwd rm rmdir sed test touch true
|
||||
@end example
|
||||
|
||||
Stick to the generally supported options for these programs. For
|
||||
@@ -137,226 +152,15 @@ When you use @code{ranlib}, you should make sure nothing bad happens if
|
||||
the system does not have @code{ranlib}. Arrange to ignore an error
|
||||
from that command, and print a message before the command to tell the
|
||||
user that failure of the @code{ranlib} command does not mean a problem.
|
||||
(The Autoconf @samp{AC_PROG_RANLIB} macro can help with this.)
|
||||
|
||||
If you use symbolic links, you should implement a fallback for systems
|
||||
that don't have symbolic links.
|
||||
|
||||
It is ok to use other utilities in Makefile portions (or scripts)
|
||||
intended only for particular systems where you know those utilities to
|
||||
intended only for particular systems where you know those utilities
|
||||
exist.
|
||||
|
||||
@node Standard Targets
|
||||
@section Standard Targets for Users
|
||||
|
||||
All GNU programs should have the following targets in their Makefiles:
|
||||
|
||||
@table @samp
|
||||
@item all
|
||||
Compile the entire program. This should be the default target. This
|
||||
target need not rebuild any documentation files; Info files should
|
||||
normally be included in the distribution, and DVI files should be made
|
||||
only when explicitly asked for.
|
||||
|
||||
@item install
|
||||
Compile the program and copy the executables, libraries, and so on to
|
||||
the file names where they should reside for actual use. If there is a
|
||||
simple test to verify that a program is properly installed, this target
|
||||
should run that test.
|
||||
|
||||
If possible, write the @code{install} target rule so that it does not
|
||||
modify anything in the directory where the program was built, provided
|
||||
@samp{make all} has just been done. This is convenient for building the
|
||||
program under one user name and installing it under another.
|
||||
|
||||
The commands should create all the directories in which files are to be
|
||||
installed, if they don't already exist. This includes the directories
|
||||
specified as the values of the variables @code{prefix} and
|
||||
@code{exec_prefix}, as well as all subdirectories that are needed.
|
||||
One way to do this is by means of an @code{installdirs} target
|
||||
as described below.
|
||||
|
||||
Use @samp{-} before any command for installing a man page, so that
|
||||
@code{make} will ignore any errors. This is in case there are systems
|
||||
that don't have the Unix man page documentation system installed.
|
||||
|
||||
The way to install Info files is to copy them into @file{$(infodir)}
|
||||
with @code{$(INSTALL_DATA)} (@pxref{Command Variables}), and then run
|
||||
the @code{install-info} program if it is present. @code{install-info}
|
||||
is a script that edits the Info @file{dir} file to add or update the
|
||||
menu entry for the given Info file; it will be part of the Texinfo package.
|
||||
Here is a sample rule to install an Info file:
|
||||
|
||||
@comment This example has been carefully formatted for the Make manual.
|
||||
@comment Please do not reformat it without talking to roland@gnu.ai.mit.edu.
|
||||
@smallexample
|
||||
$(infodir)/foo.info: foo.info
|
||||
# There may be a newer info file in . than in srcdir.
|
||||
-if test -f foo.info; then d=.; \
|
||||
else d=$(srcdir); fi; \
|
||||
$(INSTALL_DATA) $$d/foo.info $@@; \
|
||||
# Run install-info only if it exists.
|
||||
# Use `if' instead of just prepending `-' to the
|
||||
# line so we notice real errors from install-info.
|
||||
# We use `$(SHELL) -c' because some shells do not
|
||||
# fail gracefully when there is an unknown command.
|
||||
if $(SHELL) -c 'install-info --version' \
|
||||
>/dev/null 2>&1; then \
|
||||
install-info --infodir=$(infodir) $$d/foo.info; \
|
||||
else true; fi
|
||||
@end smallexample
|
||||
|
||||
@item uninstall
|
||||
Delete all the installed files that the @samp{install} target would
|
||||
create (but not the noninstalled files such as @samp{make all} would
|
||||
create).
|
||||
|
||||
This rule should not modify the directories where compilation is done,
|
||||
only the directories where files are installed.
|
||||
|
||||
@comment The gratuitous blank line here is to make the table look better
|
||||
@comment in the printed Make manual. Please leave it in.
|
||||
@item clean
|
||||
|
||||
Delete all files from the current directory that are normally created by
|
||||
building the program. Don't delete the files that record the
|
||||
configuration. Also preserve files that could be made by building, but
|
||||
normally aren't because the distribution comes with them.
|
||||
|
||||
Delete @file{.dvi} files here if they are not part of the distribution.
|
||||
|
||||
@item distclean
|
||||
Delete all files from the current directory that are created by
|
||||
configuring or building the program. If you have unpacked the source
|
||||
and built the program without creating any other files, @samp{make
|
||||
distclean} should leave only the files that were in the distribution.
|
||||
|
||||
@item mostlyclean
|
||||
Like @samp{clean}, but may refrain from deleting a few files that people
|
||||
normally don't want to recompile. For example, the @samp{mostlyclean}
|
||||
target for GCC does not delete @file{libgcc.a}, because recompiling it
|
||||
is rarely necessary and takes a lot of time.
|
||||
|
||||
@item maintainer-clean
|
||||
Delete almost everything from the current directory that can be
|
||||
reconstructed with this Makefile. This typically includes everything
|
||||
deleted by @code{distclean}, plus more: C source files produced by
|
||||
Bison, tags tables, Info files, and so on.
|
||||
|
||||
The reason we say ``almost everything'' is that running the command
|
||||
@samp{make maintainer-clean} should not delete @file{configure} even if
|
||||
it can be remade using a rule in the Makefile. More generally,
|
||||
@samp{make maintainer-clean} should not delete anything that needs to
|
||||
exist in order to run @file{configure} and then begin to build the
|
||||
program. This is the only exception; @code{maintainer-clean} should
|
||||
delete everything else that can be rebuilt.
|
||||
|
||||
The @samp{maintainer-clean} is intended to be used by a maintainer of
|
||||
the package, not by ordinary users. You may need special tools to
|
||||
reconstruct some of the files that @samp{make maintainer-clean} deletes.
|
||||
Since these files are normally included in the distribution, we don't
|
||||
take care to make them easy to reconstruct. If you find you need to
|
||||
unpack the full distribution again, don't blame us.
|
||||
|
||||
To help make users aware of this, the commands for the special
|
||||
@code{maintainer-clean} target should start with these two:
|
||||
|
||||
@smallexample
|
||||
@@echo "This command is intended for maintainers to use; it"
|
||||
@@echo "deletes files that may require special tools to rebuild."
|
||||
@end smallexample
|
||||
|
||||
@item TAGS
|
||||
Update a tags table for this program.
|
||||
|
||||
@item info
|
||||
Generate any Info files needed. The best way to write the rules is as
|
||||
follows:
|
||||
|
||||
@smallexample
|
||||
info: foo.info
|
||||
|
||||
foo.info: foo.texi chap1.texi chap2.texi
|
||||
$(MAKEINFO) $(srcdir)/foo.texi
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
You must define the variable @code{MAKEINFO} in the Makefile. It should
|
||||
run the @code{makeinfo} program, which is part of the Texinfo
|
||||
distribution.
|
||||
|
||||
@item dvi
|
||||
Generate DVI files for all TeXinfo documentation.
|
||||
For example:
|
||||
|
||||
@smallexample
|
||||
dvi: foo.dvi
|
||||
|
||||
foo.dvi: foo.texi chap1.texi chap2.texi
|
||||
$(TEXI2DVI) $(srcdir)/foo.texi
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
You must define the variable @code{TEXI2DVI} in the Makefile. It should
|
||||
run the program @code{texi2dvi}, which is part of the Texinfo
|
||||
distribution. Alternatively, write just the dependencies, and allow GNU
|
||||
Make to provide the command.
|
||||
|
||||
@item dist
|
||||
Create a distribution tar file for this program. The tar file should be
|
||||
set up so that the file names in the tar file start with a subdirectory
|
||||
name which is the name of the package it is a distribution for. This
|
||||
name can include the version number.
|
||||
|
||||
For example, the distribution tar file of GCC version 1.40 unpacks into
|
||||
a subdirectory named @file{gcc-1.40}.
|
||||
|
||||
The easiest way to do this is to create a subdirectory appropriately
|
||||
named, use @code{ln} or @code{cp} to install the proper files in it, and
|
||||
then @code{tar} that subdirectory.
|
||||
|
||||
The @code{dist} target should explicitly depend on all non-source files
|
||||
that are in the distribution, to make sure they are up to date in the
|
||||
distribution.
|
||||
@xref{Releases, , Making Releases, standards, GNU Coding Standards}.
|
||||
|
||||
@item check
|
||||
Perform self-tests (if any). The user must build the program before
|
||||
running the tests, but need not install the program; you should write
|
||||
the self-tests so that they work when the program is built but not
|
||||
installed.
|
||||
@end table
|
||||
|
||||
The following targets are suggested as conventional names, for programs
|
||||
in which they are useful.
|
||||
|
||||
@table @code
|
||||
@item installcheck
|
||||
Perform installation tests (if any). The user must build and install
|
||||
the program before running the tests. You should not assume that
|
||||
@file{$(bindir)} is in the search path.
|
||||
|
||||
@item installdirs
|
||||
It's useful to add a target named @samp{installdirs} to create the
|
||||
directories where files are installed, and their parent directories.
|
||||
There is a script called @file{mkinstalldirs} which is convenient for
|
||||
this; find it in the Texinfo package.@c It's in /gd/gnu/lib/mkinstalldirs.
|
||||
You can use a rule like this:
|
||||
|
||||
@comment This has been carefully formatted to look decent in the Make manual.
|
||||
@comment Please be sure not to make it extend any further to the right.--roland
|
||||
@smallexample
|
||||
# Make sure all installation directories (e.g. $(bindir))
|
||||
# actually exist by making them if necessary.
|
||||
installdirs: mkinstalldirs
|
||||
$(srcdir)/mkinstalldirs $(bindir) $(datadir) \
|
||||
$(libdir) $(infodir) \
|
||||
$(mandir)
|
||||
@end smallexample
|
||||
|
||||
This rule should not modify the directories where compilation is done.
|
||||
It should do nothing but create installation directories.
|
||||
@end table
|
||||
|
||||
@node Command Variables
|
||||
@section Variables for Specifying Commands
|
||||
|
||||
@@ -443,11 +247,13 @@ A prefix used in constructing the default values of the variables listed
|
||||
below. The default value of @code{prefix} should be @file{/usr/local}.
|
||||
When building the complete GNU system, the prefix will be empty and
|
||||
@file{/usr} will be a symbolic link to @file{/}.
|
||||
(If you are using Autoconf, write it as @samp{@@prefix@@}.)
|
||||
|
||||
@item exec_prefix
|
||||
A prefix used in constructing the default values of some of the
|
||||
variables listed below. The default value of @code{exec_prefix} should
|
||||
be @code{$(prefix)}.
|
||||
(If you are using Autoconf, write it as @samp{@@exec_prefix@@}.)
|
||||
|
||||
Generally, @code{$(exec_prefix)} is used for directories that contain
|
||||
machine-specific files (such as executables and subroutine libraries),
|
||||
@@ -461,18 +267,21 @@ Executable programs are installed in one of the following directories.
|
||||
The directory for installing executable programs that users can run.
|
||||
This should normally be @file{/usr/local/bin}, but write it as
|
||||
@file{$(exec_prefix)/bin}.
|
||||
(If you are using Autoconf, write it as @samp{@@bindir@@}.)
|
||||
|
||||
@item sbindir
|
||||
The directory for installing executable programs that can be run from
|
||||
the shell, but are only generally useful to system administrators. This
|
||||
should normally be @file{/usr/local/sbin}, but write it as
|
||||
@file{$(exec_prefix)/sbin}.
|
||||
(If you are using Autoconf, write it as @samp{@@sbindir@@}.)
|
||||
|
||||
@item libexecdir
|
||||
@comment This paragraph adjusted to avoid overfull hbox --roland 5jul94
|
||||
The directory for installing executable programs to be run by other
|
||||
programs rather than by users. This directory should normally be
|
||||
@file{/usr/local/libexec}, but write it as @file{$(exec_prefix)/libexec}.
|
||||
(If you are using Autoconf, write it as @samp{@@libexecdir@@}.)
|
||||
@end table
|
||||
|
||||
Data files used by the program during its execution are divided into
|
||||
@@ -491,18 +300,20 @@ be shared between two machines.
|
||||
@end itemize
|
||||
|
||||
This makes for six different possibilities. However, we want to
|
||||
discourage the use of architecture-dependent files, aside from of object
|
||||
discourage the use of architecture-dependent files, aside from object
|
||||
files and libraries. It is much cleaner to make other data files
|
||||
architecture-independent, and it is generally not hard.
|
||||
|
||||
Therefore, here are the variables makefiles should use to specify
|
||||
Therefore, here are the variables Makefiles should use to specify
|
||||
directories:
|
||||
|
||||
@table @samp
|
||||
@item datadir
|
||||
The directory for installing read-only architecture independent data
|
||||
files. This should normally be @file{/usr/local/share}, but write it as
|
||||
@file{$(prefix)/share}. As a special exception, see @file{$(infodir)}
|
||||
@file{$(prefix)/share}.
|
||||
(If you are using Autoconf, write it as @samp{@@datadir@@}.)
|
||||
As a special exception, see @file{$(infodir)}
|
||||
and @file{$(includedir)} below.
|
||||
|
||||
@item sysconfdir
|
||||
@@ -512,12 +323,13 @@ and network configuration files, @file{/etc/passwd}, and so forth belong
|
||||
here. All the files in this directory should be ordinary ASCII text
|
||||
files. This directory should normally be @file{/usr/local/etc}, but
|
||||
write it as @file{$(prefix)/etc}.
|
||||
(If you are using Autoconf, write it as @samp{@@sysconfdir@@}.)
|
||||
|
||||
@c rewritten to avoid overfull hbox --tower
|
||||
Do not install executables
|
||||
@c here
|
||||
in this directory (they probably
|
||||
belong in @file{$(libexecdir)} or @file{$(sbindir))}. Also do not
|
||||
belong in @file{$(libexecdir)} or @file{$(sbindir)}). Also do not
|
||||
install files that are modified in the normal course of their use
|
||||
(programs whose purpose is to change the configuration of the system
|
||||
excluded). Those probably belong in @file{$(localstatedir)}.
|
||||
@@ -526,26 +338,30 @@ excluded). Those probably belong in @file{$(localstatedir)}.
|
||||
The directory for installing architecture-independent data files which
|
||||
the programs modify while they run. This should normally be
|
||||
@file{/usr/local/com}, but write it as @file{$(prefix)/com}.
|
||||
(If you are using Autoconf, write it as @samp{@@sharedstatedir@@}.)
|
||||
|
||||
@item localstatedir
|
||||
The directory for installing data files which the programs modify while
|
||||
they run, and that pertain to one specific machine. Users should never
|
||||
need to modify files in this directory to configure the package's
|
||||
operation; put such configuration information in separate files that go
|
||||
in @file{datadir} or @file{$(sysconfdir)}. @file{$(localstatedir)}
|
||||
in @file{$(datadir)} or @file{$(sysconfdir)}. @file{$(localstatedir)}
|
||||
should normally be @file{/usr/local/var}, but write it as
|
||||
@file{$(prefix)/var}.
|
||||
(If you are using Autoconf, write it as @samp{@@localstatedir@@}.)
|
||||
|
||||
@item libdir
|
||||
The directory for object files and libraries of object code. Do not
|
||||
install executables here, they probably belong in @file{$(libexecdir)}
|
||||
instead. The value of @code{libdir} should normally be
|
||||
@file{/usr/local/lib}, but write it as @file{$(exec_prefix)/lib}.
|
||||
(If you are using Autoconf, write it as @samp{@@libdir@@}.)
|
||||
|
||||
@item infodir
|
||||
The directory for installing the Info files for this package. By
|
||||
default, it should be @file{/usr/local/info}, but it should be written
|
||||
as @file{$(prefix)/info}.
|
||||
(If you are using Autoconf, write it as @samp{@@infodir@@}.)
|
||||
|
||||
@item includedir
|
||||
@c rewritten to avoid overfull hbox --roland
|
||||
@@ -553,6 +369,7 @@ The directory for installing header files to be included by user
|
||||
programs with the C @samp{#include} preprocessor directive. This
|
||||
should normally be @file{/usr/local/include}, but write it as
|
||||
@file{$(prefix)/include}.
|
||||
(If you are using Autoconf, write it as @samp{@@includedir@@}.)
|
||||
|
||||
Most compilers other than GCC do not look for header files in
|
||||
@file{/usr/local/include}. So installing the header files this way is
|
||||
@@ -565,6 +382,7 @@ specified by @code{oldincludedir}.
|
||||
@item oldincludedir
|
||||
The directory for installing @samp{#include} header files for use with
|
||||
compilers other than GCC. This should normally be @file{/usr/include}.
|
||||
(If you are using Autoconf, you can write it as @samp{@@oldincludedir@@}.)
|
||||
|
||||
The Makefile commands should check whether the value of
|
||||
@code{oldincludedir} is empty. If it is, they should not try to use
|
||||
@@ -578,7 +396,7 @@ file in the @code{oldincludedir} directory if either (1) there is no
|
||||
package.
|
||||
|
||||
To tell whether @file{foo.h} came from the Foo package, put a magic
|
||||
string in the file---part of a comment---and grep for that string.
|
||||
string in the file---part of a comment---and @code{grep} for that string.
|
||||
@end table
|
||||
|
||||
Unix-style man pages are installed in one of the following:
|
||||
@@ -587,14 +405,15 @@ Unix-style man pages are installed in one of the following:
|
||||
@item mandir
|
||||
The top-level directory for installing the man pages (if any) for this
|
||||
package. It will normally be @file{/usr/local/man}, but you should
|
||||
write it as @file{$(prefix)/man}.
|
||||
write it as @file{$(prefix)/man}.
|
||||
(If you are using Autoconf, write it as @samp{@@mandir@@}.)
|
||||
|
||||
@item man1dir
|
||||
The directory for installing section 1 man pages. Write it as
|
||||
@file{$(mandir)/man1}.
|
||||
@item man2dir
|
||||
The directory for installing section 2 man pages. Write it as
|
||||
@file{$(mandir)/man2}.
|
||||
@file{$(mandir)/man2}
|
||||
@item @dots{}
|
||||
|
||||
@strong{Don't make the primary documentation for any GNU software be a
|
||||
@@ -621,6 +440,7 @@ And finally, you should set the following variable:
|
||||
@item srcdir
|
||||
The directory for the sources being compiled. The value of this
|
||||
variable is normally inserted by the @code{configure} shell script.
|
||||
(If you are using Autconf, use @samp{srcdir = @@srcdir@@}.)
|
||||
@end table
|
||||
|
||||
For example:
|
||||
@@ -652,3 +472,246 @@ specify the exact same values for several different GNU packages. In
|
||||
order for this to be useful, all the packages must be designed so that
|
||||
they will work sensibly when the user does so.
|
||||
|
||||
@node Standard Targets
|
||||
@section Standard Targets for Users
|
||||
|
||||
All GNU programs should have the following targets in their Makefiles:
|
||||
|
||||
@table @samp
|
||||
@item all
|
||||
Compile the entire program. This should be the default target. This
|
||||
target need not rebuild any documentation files; Info files should
|
||||
normally be included in the distribution, and DVI files should be made
|
||||
only when explicitly asked for.
|
||||
|
||||
By default, the Make rules should compile and link with @samp{-g}, so
|
||||
that executable programs have debugging symbols. Users who don't mind
|
||||
being helpless can strip the executables later if they wish.
|
||||
|
||||
@item install
|
||||
Compile the program and copy the executables, libraries, and so on to
|
||||
the file names where they should reside for actual use. If there is a
|
||||
simple test to verify that a program is properly installed, this target
|
||||
should run that test.
|
||||
|
||||
Do not strip executables when installing them. Devil-may-care users can
|
||||
use the @code{install-strip} target to do that.
|
||||
|
||||
If possible, write the @code{install} target rule so that it does not
|
||||
modify anything in the directory where the program was built, provided
|
||||
@samp{make all} has just been done. This is convenient for building the
|
||||
program under one user name and installing it under another.
|
||||
|
||||
The commands should create all the directories in which files are to be
|
||||
installed, if they don't already exist. This includes the directories
|
||||
specified as the values of the variables @code{prefix} and
|
||||
@code{exec_prefix}, as well as all subdirectories that are needed.
|
||||
One way to do this is by means of an @code{installdirs} target
|
||||
as described below.
|
||||
|
||||
Use @samp{-} before any command for installing a man page, so that
|
||||
@code{make} will ignore any errors. This is in case there are systems
|
||||
that don't have the Unix man page documentation system installed.
|
||||
|
||||
The way to install Info files is to copy them into @file{$(infodir)}
|
||||
with @code{$(INSTALL_DATA)} (@pxref{Command Variables}), and then run
|
||||
the @code{install-info} program if it is present. @code{install-info}
|
||||
is a program that edits the Info @file{dir} file to add or update the
|
||||
menu entry for the given Info file; it is part of the Texinfo package.
|
||||
Here is a sample rule to install an Info file:
|
||||
|
||||
@comment This example has been carefully formatted for the Make manual.
|
||||
@comment Please do not reformat it without talking to roland@gnu.ai.mit.edu.
|
||||
@smallexample
|
||||
$(infodir)/foo.info: foo.info
|
||||
# There may be a newer info file in . than in srcdir.
|
||||
-if test -f foo.info; then d=.; \
|
||||
else d=$(srcdir); fi; \
|
||||
$(INSTALL_DATA) $$d/foo.info $@@; \
|
||||
# Run install-info only if it exists.
|
||||
# Use `if' instead of just prepending `-' to the
|
||||
# line so we notice real errors from install-info.
|
||||
# We use `$(SHELL) -c' because some shells do not
|
||||
# fail gracefully when there is an unknown command.
|
||||
if $(SHELL) -c 'install-info --version' \
|
||||
>/dev/null 2>&1; then \
|
||||
install-info --dir-file=$(infodir)/dir $(infodir)/foo.info; \
|
||||
else true; fi
|
||||
@end smallexample
|
||||
|
||||
@item uninstall
|
||||
Delete all the installed files that the @samp{install} target would
|
||||
create (but not the noninstalled files such as @samp{make all} would
|
||||
create).
|
||||
|
||||
This rule should not modify the directories where compilation is done,
|
||||
only the directories where files are installed.
|
||||
|
||||
@item install-strip
|
||||
Like @code{install}, but strip the executable files while installing
|
||||
them. The definition of this target can be very simple:
|
||||
|
||||
@example
|
||||
install-strip:
|
||||
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install
|
||||
@end example
|
||||
|
||||
Normally we do not recommend stripping an executable unless you are sure
|
||||
the program has no bugs. However, it can be reasonable to install a
|
||||
stripped executable for actual execution while saving the unstripped
|
||||
executable elsewhere in case there is a bug.
|
||||
|
||||
@comment The gratuitous blank line here is to make the table look better
|
||||
@comment in the printed Make manual. Please leave it in.
|
||||
@item clean
|
||||
|
||||
Delete all files from the current directory that are normally created by
|
||||
building the program. Don't delete the files that record the
|
||||
configuration. Also preserve files that could be made by building, but
|
||||
normally aren't because the distribution comes with them.
|
||||
|
||||
Delete @file{.dvi} files here if they are not part of the distribution.
|
||||
|
||||
@item distclean
|
||||
Delete all files from the current directory that are created by
|
||||
configuring or building the program. If you have unpacked the source
|
||||
and built the program without creating any other files, @samp{make
|
||||
distclean} should leave only the files that were in the distribution.
|
||||
|
||||
@item mostlyclean
|
||||
Like @samp{clean}, but may refrain from deleting a few files that people
|
||||
normally don't want to recompile. For example, the @samp{mostlyclean}
|
||||
target for GCC does not delete @file{libgcc.a}, because recompiling it
|
||||
is rarely necessary and takes a lot of time.
|
||||
|
||||
@item maintainer-clean
|
||||
Delete almost everything from the current directory that can be
|
||||
reconstructed with this Makefile. This typically includes everything
|
||||
deleted by @code{distclean}, plus more: C source files produced by
|
||||
Bison, tags tables, Info files, and so on.
|
||||
|
||||
The reason we say ``almost everything'' is that running the command
|
||||
@samp{make maintainer-clean} should not delete @file{configure} even if
|
||||
@file{configure} can be remade using a rule in the Makefile. More generally,
|
||||
@samp{make maintainer-clean} should not delete anything that needs to
|
||||
exist in order to run @file{configure} and then begin to build the
|
||||
program. This is the only exception; @code{maintainer-clean} should
|
||||
delete everything else that can be rebuilt.
|
||||
|
||||
The @samp{maintainer-clean} target is intended to be used by a maintainer of
|
||||
the package, not by ordinary users. You may need special tools to
|
||||
reconstruct some of the files that @samp{make maintainer-clean} deletes.
|
||||
Since these files are normally included in the distribution, we don't
|
||||
take care to make them easy to reconstruct. If you find you need to
|
||||
unpack the full distribution again, don't blame us.
|
||||
|
||||
To help make users aware of this, the commands for the special
|
||||
@code{maintainer-clean} target should start with these two:
|
||||
|
||||
@smallexample
|
||||
@@echo "This command is intended for maintainers to use; it"
|
||||
@@echo "deletes files that may require special tools to rebuild."
|
||||
@end smallexample
|
||||
|
||||
@item TAGS
|
||||
Update a tags table for this program.
|
||||
@c ADR: how?
|
||||
|
||||
@item info
|
||||
Generate any Info files needed. The best way to write the rules is as
|
||||
follows:
|
||||
|
||||
@smallexample
|
||||
info: foo.info
|
||||
|
||||
foo.info: foo.texi chap1.texi chap2.texi
|
||||
$(MAKEINFO) $(srcdir)/foo.texi
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
You must define the variable @code{MAKEINFO} in the Makefile. It should
|
||||
run the @code{makeinfo} program, which is part of the Texinfo
|
||||
distribution.
|
||||
|
||||
@item dvi
|
||||
Generate DVI files for all Texinfo documentation.
|
||||
For example:
|
||||
|
||||
@smallexample
|
||||
dvi: foo.dvi
|
||||
|
||||
foo.dvi: foo.texi chap1.texi chap2.texi
|
||||
$(TEXI2DVI) $(srcdir)/foo.texi
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
You must define the variable @code{TEXI2DVI} in the Makefile. It should
|
||||
run the program @code{texi2dvi}, which is part of the Texinfo
|
||||
distribution.@footnote{@code{texi2dvi} uses @TeX{} to do the real work
|
||||
of formatting. @TeX{} is not distributed with Texinfo.} Alternatively,
|
||||
write just the dependencies, and allow GNU Make to provide the command.
|
||||
|
||||
@item dist
|
||||
Create a distribution tar file for this program. The tar file should be
|
||||
set up so that the file names in the tar file start with a subdirectory
|
||||
name which is the name of the package it is a distribution for. This
|
||||
name can include the version number.
|
||||
|
||||
For example, the distribution tar file of GCC version 1.40 unpacks into
|
||||
a subdirectory named @file{gcc-1.40}.
|
||||
|
||||
The easiest way to do this is to create a subdirectory appropriately
|
||||
named, use @code{ln} or @code{cp} to install the proper files in it, and
|
||||
then @code{tar} that subdirectory.
|
||||
|
||||
Compress the tar file file with @code{gzip}. For example, the actual
|
||||
distribution file for GCC version 1.40 is called @file{gcc-1.40.tar.gz}.
|
||||
|
||||
The @code{dist} target should explicitly depend on all non-source files
|
||||
that are in the distribution, to make sure they are up to date in the
|
||||
distribution.
|
||||
@ifset CODESTD
|
||||
@xref{Releases, , Making Releases}.
|
||||
@end ifset
|
||||
@ifclear CODESTD
|
||||
@xref{Releases, , Making Releases, standards, GNU Coding Standards}.
|
||||
@end ifclear
|
||||
|
||||
@item check
|
||||
Perform self-tests (if any). The user must build the program before
|
||||
running the tests, but need not install the program; you should write
|
||||
the self-tests so that they work when the program is built but not
|
||||
installed.
|
||||
@end table
|
||||
|
||||
The following targets are suggested as conventional names, for programs
|
||||
in which they are useful.
|
||||
|
||||
@table @code
|
||||
@item installcheck
|
||||
Perform installation tests (if any). The user must build and install
|
||||
the program before running the tests. You should not assume that
|
||||
@file{$(bindir)} is in the search path.
|
||||
|
||||
@item installdirs
|
||||
It's useful to add a target named @samp{installdirs} to create the
|
||||
directories where files are installed, and their parent directories.
|
||||
There is a script called @file{mkinstalldirs} which is convenient for
|
||||
this; you can find it in the Texinfo package.
|
||||
@c It's in /gd/gnu/lib/mkinstalldirs.
|
||||
You can use a rule like this:
|
||||
|
||||
@comment This has been carefully formatted to look decent in the Make manual.
|
||||
@comment Please be sure not to make it extend any further to the right.--roland
|
||||
@smallexample
|
||||
# Make sure all installation directories (e.g. $(bindir))
|
||||
# actually exist by making them if necessary.
|
||||
installdirs: mkinstalldirs
|
||||
$(srcdir)/mkinstalldirs $(bindir) $(datadir) \
|
||||
$(libdir) $(infodir) \
|
||||
$(mandir)
|
||||
@end smallexample
|
||||
|
||||
This rule should not modify the directories where compilation is done.
|
||||
It should do nothing but create installation directories.
|
||||
@end table
|
||||
|
||||
294
make.texinfo
294
make.texinfo
@@ -1,5 +1,5 @@
|
||||
\input texinfo @c -*- Texinfo -*-
|
||||
@c %**start of header
|
||||
@c %**start of header
|
||||
@setfilename make.info
|
||||
@settitle GNU @code{make}
|
||||
@setchapternewpage odd
|
||||
@@ -8,10 +8,10 @@
|
||||
@c FSF publishers: format makebook.texi instead of using this file directly.
|
||||
|
||||
@set RCSID $Id$
|
||||
@set EDITION 0.49
|
||||
@set VERSION 3.74 Beta
|
||||
@set UPDATED 14 August 1995
|
||||
@set UPDATE-MONTH August 1995
|
||||
@set EDITION 0.50
|
||||
@set VERSION 3.75 Beta
|
||||
@set UPDATED 28 February 1996
|
||||
@set UPDATE-MONTH February 1996
|
||||
@comment The ISBN number might need to change on next publication.
|
||||
@set ISBN 1-882114-78-7
|
||||
|
||||
@@ -168,7 +168,7 @@ Writing Rules
|
||||
* Directory Search:: Searching other directories for source files.
|
||||
* Phony Targets:: Using a target that is not a real file's name.
|
||||
* Force Targets:: You can use a target without commands
|
||||
or dependencies to mark other
|
||||
or dependencies to mark other
|
||||
targets as phony.
|
||||
* Empty Targets:: When only the date matters and the
|
||||
files are empty.
|
||||
@@ -176,7 +176,7 @@ Writing Rules
|
||||
* Multiple Targets:: When to make use of several targets in a rule.
|
||||
* Multiple Rules:: How to use several rules with the same target.
|
||||
* Static Pattern:: Static pattern rules apply to multiple targets
|
||||
and can vary the dependencies according to
|
||||
and can vary the dependencies according to
|
||||
the target name.
|
||||
* Double-Colon:: How to use a special kind of rule to allow
|
||||
several independent rules for one target.
|
||||
@@ -192,9 +192,9 @@ Using Wildcard Characters in File Names
|
||||
|
||||
Searching Directories for Dependencies
|
||||
|
||||
* General Search:: Specifying a search path that applies
|
||||
* General Search:: Specifying a search path that applies
|
||||
to every dependency.
|
||||
* Selective Search:: Specifying a search path
|
||||
* Selective Search:: Specifying a search path
|
||||
for a specified class of names.
|
||||
* Commands/Search:: How to write shell commands that work together
|
||||
with search paths.
|
||||
@@ -211,7 +211,7 @@ Writing the Commands in Rules
|
||||
* Echoing:: How to control when commands are echoed.
|
||||
* Execution:: How commands are executed.
|
||||
* Parallel:: How commands can be executed in parallel.
|
||||
* Errors:: What happens after a command execution error.
|
||||
* Errors:: What happens after a command execution error.
|
||||
* Interrupts:: What happens when a command is interrupted.
|
||||
* Recursion:: Invoking @code{make} from makefiles.
|
||||
* Sequences:: Defining canned sequences of commands.
|
||||
@@ -236,13 +236,13 @@ How to Use Variables
|
||||
of a variable.
|
||||
* Override Directive:: How to set a variable in the makefile even if
|
||||
the user has set it with a command argument.
|
||||
* Defining:: An alternate way to set a variable
|
||||
* Defining:: An alternate way to set a variable
|
||||
to a verbatim string.
|
||||
* Environment:: Variable values can come from the environment.
|
||||
|
||||
Advanced Features for Reference to Variables
|
||||
|
||||
* Substitution Refs:: Referencing a variable with
|
||||
* Substitution Refs:: Referencing a variable with
|
||||
substitutions on the value.
|
||||
* Computed Names:: Computing the name of the variable to refer to.
|
||||
|
||||
@@ -264,16 +264,16 @@ Functions for Transforming Text
|
||||
How to Run @code{make}
|
||||
|
||||
* Makefile Arguments:: How to specify which makefile to use.
|
||||
* Goals:: How to use goal arguments to specify which
|
||||
* Goals:: How to use goal arguments to specify which
|
||||
parts of the makefile to use.
|
||||
* Instead of Execution:: How to use mode flags to specify what
|
||||
kind of thing to do with the commands
|
||||
in the makefile other than simply
|
||||
kind of thing to do with the commands
|
||||
in the makefile other than simply
|
||||
execute them.
|
||||
* Avoiding Compilation:: How to avoid recompiling certain files.
|
||||
* Overriding:: How to override a variable to specify
|
||||
* Overriding:: How to override a variable to specify
|
||||
an alternate compiler and other things.
|
||||
* Testing:: How to proceed past some errors, to
|
||||
* Testing:: How to proceed past some errors, to
|
||||
test compilation.
|
||||
* Options Summary:: Summary of Options
|
||||
|
||||
@@ -285,10 +285,10 @@ Using Implicit Rules
|
||||
* Implicit Variables:: How to change what predefined rules do.
|
||||
* Chained Rules:: How to use a chain of implicit rules.
|
||||
* Pattern Rules:: How to define new implicit rules.
|
||||
* Last Resort:: How to defining commands for rules
|
||||
* Last Resort:: How to defining commands for rules
|
||||
which cannot find any.
|
||||
* Suffix Rules:: The old-fashioned style of implicit rule.
|
||||
* Search Algorithm:: The precise algorithm for applying
|
||||
* Search Algorithm:: The precise algorithm for applying
|
||||
implicit rules.
|
||||
|
||||
Defining and Redefining Pattern Rules
|
||||
@@ -376,11 +376,11 @@ introduction, read the first few sections of each chapter, skipping the
|
||||
later sections. In each chapter, the first few sections contain
|
||||
introductory or general information and the later sections contain
|
||||
specialized or technical information.
|
||||
@ifinfo
|
||||
@ifinfo
|
||||
The exception is the second chapter, @ref{Introduction, ,An
|
||||
Introduction to Makefiles}, all of which is introductory.
|
||||
@end ifinfo
|
||||
@iftex
|
||||
@iftex
|
||||
The exception is @ref{Introduction, ,An Introduction to Makefiles},
|
||||
all of which is introductory.
|
||||
@end iftex
|
||||
@@ -435,7 +435,7 @@ get this information with the command @samp{make --version}.
|
||||
Be sure also to include the type of machine and operating system you are
|
||||
using. If possible, include the contents of the file @file{config.h}
|
||||
that is generated by the configuration process.
|
||||
|
||||
|
||||
@node Introduction, Makefiles, Overview, Top
|
||||
@comment node-name, next, previous, up
|
||||
@chapter An Introduction to Makefiles
|
||||
@@ -499,7 +499,7 @@ can also be the name of an action to carry out, such as @samp{clean}
|
||||
(@pxref{Phony Targets}).
|
||||
|
||||
A @dfn{dependency} is a file that is used as input to create the
|
||||
target. A target often depends on several files.
|
||||
target. A target often depends on several files.
|
||||
|
||||
@cindex tabs in rules
|
||||
A @dfn{command} is an action that @code{make} carries out.
|
||||
@@ -599,7 +599,7 @@ of its dependencies change. In addition, any dependencies that are
|
||||
themselves automatically generated should be updated first. In this
|
||||
example, @file{edit} depends on each of the eight object files; the
|
||||
object file @file{main.o} depends on the source file @file{main.c} and
|
||||
on the header file @file{defs.h}.
|
||||
on the header file @file{defs.h}.
|
||||
|
||||
A shell command follows each line that contains a target and
|
||||
dependencies. These shell commands say how to update the target file.
|
||||
@@ -612,7 +612,7 @@ you have specified when the target file needs to be updated.)
|
||||
@cindex shell command
|
||||
|
||||
The target @samp{clean} is not a file, but merely the name of an
|
||||
action. Since you
|
||||
action. Since you
|
||||
normally
|
||||
do not want to carry out the actions in this rule, @samp{clean} is not a dependency of any other rule.
|
||||
Consequently, @code{make} never does anything with it unless you tell
|
||||
@@ -733,7 +733,7 @@ objects = main.o kbd.o command.o display.o \
|
||||
@noindent
|
||||
Then, each place we want to put a list of the object file names, we can
|
||||
substitute the variable's value by writing @samp{$(objects)}
|
||||
(@pxref{Using Variables, ,How to Use Variables}).
|
||||
(@pxref{Using Variables, ,How to Use Variables}).
|
||||
|
||||
Here is how the complete simple makefile looks when you use a variable
|
||||
for the object files:
|
||||
@@ -1056,7 +1056,7 @@ comment starting with @samp{#} is allowed at the end of the line. If
|
||||
the file names contain any variable or function references, they are
|
||||
expanded. @xref{Using Variables, ,How to Use Variables}.
|
||||
|
||||
For example, if you have three @file{.mk} files, @file{a.mk},
|
||||
For example, if you have three @file{.mk} files, @file{a.mk},
|
||||
@file{b.mk}, and @file{c.mk}, and @code{$(bar)} expands to
|
||||
@code{bish bash}, then the following expression
|
||||
|
||||
@@ -1077,7 +1077,7 @@ makefile in which the directive appears.
|
||||
|
||||
One occasion for using @code{include} directives is when several programs,
|
||||
handled by individual makefiles in various directories, need to use a
|
||||
common set of variable definitions
|
||||
common set of variable definitions
|
||||
(@pxref{Setting, ,Setting Variables}) or pattern rules
|
||||
(@pxref{Pattern Rules, ,Defining and Redefining Pattern Rules}).
|
||||
|
||||
@@ -1102,10 +1102,10 @@ First, any directories you have specified with the @samp{-I} or
|
||||
@samp{--include-dir} option are searched
|
||||
(@pxref{Options Summary, ,Summary of Options}).
|
||||
Then the following directories (if they exist)
|
||||
are searched, in this order:
|
||||
are searched, in this order:
|
||||
@file{@var{prefix}/include} (normally @file{/usr/local/include})
|
||||
@file{/usr/gnu/include},
|
||||
@file{/usr/local/include}, @file{/usr/include}.
|
||||
@file{/usr/local/include}, @file{/usr/include}.
|
||||
|
||||
If an included makefile cannot be found in any of these directories, a
|
||||
warning message is generated, but it is not an immediately fatal error;
|
||||
@@ -1314,7 +1314,7 @@ the makefile (often with a target called @samp{all}).
|
||||
* Directory Search:: Searching other directories for source files.
|
||||
* Phony Targets:: Using a target that is not a real file's name.
|
||||
* Force Targets:: You can use a target without commands
|
||||
or dependencies to mark other
|
||||
or dependencies to mark other
|
||||
targets as phony.
|
||||
* Empty Targets:: When only the date matters and the
|
||||
files are empty.
|
||||
@@ -1322,7 +1322,7 @@ the makefile (often with a target called @samp{all}).
|
||||
* Multiple Targets:: When to make use of several targets in a rule.
|
||||
* Multiple Rules:: How to use several rules with the same target.
|
||||
* Static Pattern:: Static pattern rules apply to multiple targets
|
||||
and can vary the dependencies according to
|
||||
and can vary the dependencies according to
|
||||
the target name.
|
||||
* Double-Colon:: How to use a special kind of rule to allow
|
||||
several independent rules for one target.
|
||||
@@ -1388,8 +1388,8 @@ or like this:
|
||||
The @var{targets} are file names, separated by spaces. Wildcard
|
||||
characters may be used (@pxref{Wildcards, ,Using Wildcard Characters
|
||||
in File Names}) and a name of the form @file{@var{a}(@var{m})}
|
||||
represents member @var{m} in archive file @var{a}
|
||||
(@pxref{Archive Members, ,Archive Members as Targets}).
|
||||
represents member @var{m} in archive file @var{a}
|
||||
(@pxref{Archive Members, ,Archive Members as Targets}).
|
||||
Usually there is only one
|
||||
target per rule, but occasionally there is a reason to have more
|
||||
(@pxref{Multiple Targets, , Multiple Targets in a Rule}).@refill
|
||||
@@ -1406,7 +1406,7 @@ same. @xref{Commands, ,Writing the Commands in Rules}.
|
||||
@cindex rule, and @code{$}
|
||||
Because dollar signs are used to start variable references, if you really
|
||||
want a dollar sign in a rule you must write two of them, @samp{$$}
|
||||
(@pxref{Using Variables, ,How to Use Variables}).
|
||||
(@pxref{Using Variables, ,How to Use Variables}).
|
||||
You may split a long line by inserting a backslash
|
||||
followed by a newline, but this is not required, as @code{make} places no
|
||||
limit on the length of a line in a makefile.
|
||||
@@ -1627,7 +1627,7 @@ there is no need to write explicit rules for compiling the files.
|
||||
@section Searching Directories for Dependencies
|
||||
@vindex VPATH
|
||||
@findex vpath
|
||||
@cindex vpath
|
||||
@cindex vpath
|
||||
@cindex search path for dependencies (@code{VPATH})
|
||||
@cindex directory search (@code{VPATH})
|
||||
|
||||
@@ -1639,9 +1639,9 @@ among directories, you do not need to change the individual rules,
|
||||
just the search paths.
|
||||
|
||||
@menu
|
||||
* General Search:: Specifying a search path that applies
|
||||
* General Search:: Specifying a search path that applies
|
||||
to every dependency.
|
||||
* Selective Search:: Specifying a search path
|
||||
* Selective Search:: Specifying a search path
|
||||
for a specified class of names.
|
||||
* Commands/Search:: How to write shell commands that work together
|
||||
with search paths.
|
||||
@@ -1714,7 +1714,7 @@ There are three forms of the @code{vpath} directive:
|
||||
@table @code
|
||||
@item vpath @var{pattern} @var{directories}
|
||||
Specify the search path @var{directories} for file names that match
|
||||
@var{pattern}.
|
||||
@var{pattern}.
|
||||
|
||||
The search path, @var{directories}, is a list of directories to be
|
||||
searched, separated by colons or blanks, just like the search path used
|
||||
@@ -1752,7 +1752,7 @@ that are not in danger of quoting @samp{%} characters go unmolested.@refill
|
||||
When a dependency fails to exist in the current directory, if the
|
||||
@var{pattern} in a @code{vpath} directive matches the name of the
|
||||
dependency file, then the @var{directories} in that directive are searched
|
||||
just like (and before) the directories in the @code{VPATH} variable.
|
||||
just like (and before) the directories in the @code{VPATH} variable.
|
||||
|
||||
For example,
|
||||
|
||||
@@ -1773,7 +1773,7 @@ appear in the makefile; multiple directives with the same pattern are
|
||||
independent of each other.
|
||||
|
||||
@need 750
|
||||
Thus,
|
||||
Thus,
|
||||
|
||||
@example
|
||||
@group
|
||||
@@ -1809,7 +1809,7 @@ Therefore, you must write the commands with care so that they will look for
|
||||
the dependency in the directory where @code{make} finds it.
|
||||
|
||||
This is done with the @dfn{automatic variables} such as @samp{$^}
|
||||
(@pxref{Automatic, ,Automatic Variables}).
|
||||
(@pxref{Automatic, ,Automatic Variables}).
|
||||
For instance, the value of @samp{$^} is a
|
||||
list of all the dependencies of the rule, including the names of
|
||||
the directories in which they were found, and the value of
|
||||
@@ -1865,9 +1865,9 @@ directory search with no extra effort.
|
||||
@subsection Directory Search for Link Libraries
|
||||
@cindex link libraries, and directory search
|
||||
@cindex libraries for linking, directory search
|
||||
@cindex directory search (@code{VPATH}), and link libraries
|
||||
@cindex @code{VPATH}, and link libraries
|
||||
@cindex search path for dependencies (@code{VPATH}), and link libraries
|
||||
@cindex directory search (@code{VPATH}), and link libraries
|
||||
@cindex @code{VPATH}, and link libraries
|
||||
@cindex search path for dependencies (@code{VPATH}), and link libraries
|
||||
@cindex @code{-l} (library search)
|
||||
|
||||
Directory search applies in a special way to libraries used with the
|
||||
@@ -2036,7 +2036,7 @@ There is nothing special about the name @samp{FORCE}, but that is one name
|
||||
commonly used this way.
|
||||
|
||||
As you can see, using @samp{FORCE} this way has the same results as using
|
||||
@samp{.PHONY: clean}.
|
||||
@samp{.PHONY: clean}.
|
||||
|
||||
Using @samp{.PHONY} is more explicit and more efficient. However,
|
||||
other versions of @code{make} do not support @samp{.PHONY}; thus
|
||||
@@ -2100,7 +2100,7 @@ time is. @xref{Phony Targets, ,Phony Targets}.
|
||||
@item .SUFFIXES
|
||||
|
||||
The dependencies of the special target @code{.SUFFIXES} are the list
|
||||
of suffixes to be used in checking for suffix rules.
|
||||
of suffixes to be used in checking for suffix rules.
|
||||
@xref{Suffix Rules, , Old-Fashioned Suffix Rules}.
|
||||
|
||||
@findex .DEFAULT
|
||||
@@ -2256,11 +2256,11 @@ the target. If the target is older than any dependency from any rule,
|
||||
the commands are executed.
|
||||
|
||||
There can only be one set of commands to be executed for a file.
|
||||
If more than one rule gives commands for the same file,
|
||||
If more than one rule gives commands for the same file,
|
||||
@code{make} uses the last set given and prints an error message.
|
||||
(As a special case, if the file's name begins with a dot, no
|
||||
error message is printed. This odd behavior is only for
|
||||
compatibility with other implementations of @code{make}.)
|
||||
compatibility with other implementations of @code{make}.)
|
||||
There is no reason to
|
||||
write your makefiles this way; that is why @code{make} gives you
|
||||
an error message.@refill
|
||||
@@ -2502,7 +2502,7 @@ differs depending on which dependency files caused the update, and such
|
||||
cases are rare.
|
||||
|
||||
Each double-colon rule should specify commands; if it does not, an
|
||||
implicit rule will be used if one applies.
|
||||
implicit rule will be used if one applies.
|
||||
@xref{Implicit Rules, ,Using Implicit Rules}.
|
||||
|
||||
@node Automatic Dependencies, , Double-Colon, Rules
|
||||
@@ -2580,7 +2580,7 @@ called @file{@var{name}.d} from a C source file called @file{@var{name}.c}:
|
||||
@group
|
||||
%.d: %.c
|
||||
$(SHELL) -ec '$(CC) -M $(CPPFLAGS) $< \
|
||||
| sed '\''s/$*\\.o[ :]*/& $@@/g'\'' > $@@'
|
||||
| sed '\''s/\($*\)\.o[ :]*/\1 $@@/g'\'' > $@@'
|
||||
@end group
|
||||
@end smallexample
|
||||
|
||||
@@ -2596,7 +2596,7 @@ status from the compiler.
|
||||
@cindex @code{-MM} (to GNU compiler)
|
||||
With the GNU C compiler, you may wish to use the @samp{-MM} flag instead
|
||||
of @samp{-M}. This omits dependencies on system header files.
|
||||
@xref{Preprocessor Options, , Options Controlling the Preprocessor,
|
||||
@xref{Preprocessor Options, , Options Controlling the Preprocessor,
|
||||
gcc.info, Using GNU CC}, for details.
|
||||
|
||||
@cindex @code{sed} (shell command)
|
||||
@@ -2671,7 +2671,7 @@ Text on a line before a @samp{#} is not part of the comment.
|
||||
* Echoing:: How to control when commands are echoed.
|
||||
* Execution:: How commands are executed.
|
||||
* Parallel:: How commands can be executed in parallel.
|
||||
* Errors:: What happens after a command execution error.
|
||||
* Errors:: What happens after a command execution error.
|
||||
* Interrupts:: What happens when a command is interrupted.
|
||||
* Recursion:: Invoking @code{make} from makefiles.
|
||||
* Sequences:: Defining canned sequences of commands.
|
||||
@@ -2718,7 +2718,7 @@ actually doing them.
|
||||
The @samp{-s} or @samp{--silent}
|
||||
flag to @code{make} prevents all echoing, as if all commands
|
||||
started with @samp{@@}. A rule in the makefile for the special target
|
||||
@code{.SILENT} without dependencies has the same effect
|
||||
@code{.SILENT} without dependencies has the same effect
|
||||
(@pxref{Special Targets, ,Special Built-in Target Names}).
|
||||
@code{.SILENT} is essentially obsolete since @samp{@@} is more flexible.@refill
|
||||
|
||||
@@ -2832,7 +2832,7 @@ status), and errors are not ignored for that command
|
||||
the remaining command lines to remake the same target will not be run.
|
||||
If a command fails and the @samp{-k} or @samp{--keep-going}
|
||||
option was not given
|
||||
(@pxref{Options Summary, ,Summary of Options}),
|
||||
(@pxref{Options Summary, ,Summary of Options}),
|
||||
@code{make} aborts execution. If make
|
||||
terminates for any reason (including a signal) with child processes
|
||||
running, it waits for them to finish before actually exiting.@refill
|
||||
@@ -2875,7 +2875,7 @@ By default, there is no load limit.
|
||||
After each shell command returns, @code{make} looks at its exit status.
|
||||
If the command completed successfully, the next command line is executed
|
||||
in a new shell; after the last command line is finished, the rule is
|
||||
finished.
|
||||
finished.
|
||||
|
||||
If there is an error (the exit status is nonzero), @code{make} gives up on
|
||||
the current rule, and perhaps on all rules.
|
||||
@@ -2888,7 +2888,7 @@ report an error, but you probably want @code{make} to continue regardless.
|
||||
@cindex @code{-} (in commands)
|
||||
To ignore errors in a command line, write a @samp{-} at the beginning of
|
||||
the line's text (after the initial tab). The @samp{-} is discarded before
|
||||
the command is passed to the shell for execution.
|
||||
the command is passed to the shell for execution.
|
||||
|
||||
For example,
|
||||
|
||||
@@ -3318,14 +3318,6 @@ no more than one.@refill
|
||||
If you do not want to pass the other flags down, you must change the
|
||||
value of @code{MAKEFLAGS}, like this:
|
||||
|
||||
@example
|
||||
MAKEFLAGS=
|
||||
subsystem:
|
||||
cd subdir; $(MAKE)
|
||||
@end example
|
||||
|
||||
or like this:
|
||||
|
||||
@example
|
||||
subsystem:
|
||||
cd subdir; $(MAKE) MAKEFLAGS=
|
||||
@@ -3484,7 +3476,7 @@ always named @file{y.tab.c}. The second command moves the output to the
|
||||
rule's target file name.
|
||||
|
||||
To use the canned sequence, substitute the variable into the commands of a
|
||||
rule. You can substitute it like any other variable
|
||||
rule. You can substitute it like any other variable
|
||||
(@pxref{Reference, ,Basics of Variable References}).
|
||||
Because variables defined by @code{define} are recursively expanded
|
||||
variables, all the variable references you wrote inside the @code{define}
|
||||
@@ -3501,7 +3493,7 @@ foo.c : foo.y
|
||||
|
||||
This is a realistic example, but this particular one is not needed in
|
||||
practice because @code{make} has an implicit rule to figure out these
|
||||
commands based on the file names involved
|
||||
commands based on the file names involved
|
||||
(@pxref{Implicit Rules, ,Using Implicit Rules}).
|
||||
|
||||
@cindex @@, and @code{define}
|
||||
@@ -3561,7 +3553,7 @@ but this would be confusing because such a line looks empty.
|
||||
You may be wondering why you would want to define a command string that
|
||||
does nothing. The only reason this is useful is to prevent a target
|
||||
from getting implicit commands (from implicit rules or the
|
||||
@code{.DEFAULT} special target; @pxref{Implicit Rules} and
|
||||
@code{.DEFAULT} special target; @pxref{Implicit Rules} and
|
||||
@pxref{Last Resort, ,Defining Last-Resort Default Rules}).@refill
|
||||
|
||||
@c !!! another reason is for canonical stamp files:
|
||||
@@ -3606,7 +3598,7 @@ A variable name may be any sequence of characters not containing @samp{:},
|
||||
variable names containing characters other than letters, numbers, and
|
||||
underscores should be avoided, as they may be given special meanings in the
|
||||
future, and with some shells they cannot be passed through the environment to a
|
||||
sub-@code{make}
|
||||
sub-@code{make}
|
||||
(@pxref{Variables/Recursion, ,Communicating Variables to a Sub-@code{make}}).
|
||||
|
||||
Variable names are case-sensitive. The names @samp{foo}, @samp{FOO},
|
||||
@@ -3632,7 +3624,7 @@ they have particular specialized uses. @xref{Automatic, ,Automatic Variables}.
|
||||
of a variable.
|
||||
* Override Directive:: How to set a variable in the makefile even if
|
||||
the user has set it with a command argument.
|
||||
* Defining:: An alternate way to set a variable
|
||||
* Defining:: An alternate way to set a variable
|
||||
to a verbatim string.
|
||||
* Environment:: Variable values can come from the environment.
|
||||
* Automatic:: Some special variables have predefined
|
||||
@@ -3749,7 +3741,7 @@ because it will cause an infinite loop in the variable expansion.
|
||||
@cindex loops in variable expansion
|
||||
@cindex variables, loops in expansion
|
||||
|
||||
Another disadvantage is that any functions
|
||||
Another disadvantage is that any functions
|
||||
(@pxref{Functions, ,Functions for Transforming Text})
|
||||
referenced in the definition will be executed every time the variable is
|
||||
expanded. This makes @code{make} run slower; worse, it causes the
|
||||
@@ -3764,7 +3756,7 @@ variables, there is another flavor: simply expanded variables.
|
||||
@cindex variables, simply expanded
|
||||
@cindex :=
|
||||
@dfn{Simply expanded variables} are defined by lines using @samp{:=}
|
||||
(@pxref{Setting, ,Setting Variables}).
|
||||
(@pxref{Setting, ,Setting Variables}).
|
||||
The value of a simply expanded variable is scanned
|
||||
once and for all, expanding any references to other variables and
|
||||
functions, when the variable is defined. The actual value of the simply
|
||||
@@ -3810,7 +3802,7 @@ endif
|
||||
@end group
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
@noindent
|
||||
An advantage of this use of @samp{:=} is that a typical
|
||||
`descend into a directory' command then looks like this:
|
||||
|
||||
@@ -3825,7 +3817,7 @@ Simply expanded variables generally make complicated makefile programming
|
||||
more predictable because they work like variables in most programming
|
||||
languages. They allow you to redefine a variable using its own value (or
|
||||
its value processed in some way by one of the expansion functions) and to
|
||||
use the expansion functions much more efficiently
|
||||
use the expansion functions much more efficiently
|
||||
(@pxref{Functions, ,Functions for Transforming Text}).
|
||||
|
||||
@cindex spaces, in variable values
|
||||
@@ -3871,7 +3863,7 @@ This section describes some advanced features you can use to reference
|
||||
variables in more flexible ways.
|
||||
|
||||
@menu
|
||||
* Substitution Refs:: Referencing a variable with
|
||||
* Substitution Refs:: Referencing a variable with
|
||||
substitutions on the value.
|
||||
* Computed Names:: Computing the name of the variable to refer to.
|
||||
@end menu
|
||||
@@ -3997,7 +3989,7 @@ which becomes @samp{$(z)} which becomes @samp{Hello}.
|
||||
Nested variable references can also contain modified references and
|
||||
function invocations (@pxref{Functions, ,Functions for Transforming Text}),
|
||||
just like any other reference.
|
||||
For example, using the @code{subst} function
|
||||
For example, using the @code{subst} function
|
||||
(@pxref{Text Functions, ,Functions for String Substitution and Analysis}):
|
||||
|
||||
@example
|
||||
@@ -4191,7 +4183,7 @@ to read.
|
||||
Most variable names are considered to have the empty string as a value if
|
||||
you have never set them. Several variables have built-in initial values
|
||||
that are not empty, but you can set them in the usual ways
|
||||
(@pxref{Implicit Variables, ,Variables Used by Implicit Rules}).
|
||||
(@pxref{Implicit Variables, ,Variables Used by Implicit Rules}).
|
||||
Several special variables are set
|
||||
automatically to a new value for each rule; these are called the
|
||||
@dfn{automatic} variables (@pxref{Automatic, ,Automatic Variables}).
|
||||
@@ -4333,7 +4325,7 @@ value.
|
||||
@cindex overriding with @code{override}
|
||||
@cindex variables, overriding
|
||||
|
||||
If a variable has been set with a command argument
|
||||
If a variable has been set with a command argument
|
||||
(@pxref{Overriding, ,Overriding Variables}),
|
||||
then ordinary assignments in the makefile are ignored. If you want to set
|
||||
the variable in the makefile even though it was set with a command
|
||||
@@ -4401,7 +4393,7 @@ See the next section for information about @code{define}.
|
||||
Another way to set the value of a variable is to use the @code{define}
|
||||
directive. This directive has an unusual syntax which allows newline
|
||||
characters to be included in the value, which is convenient for defining
|
||||
canned sequences of commands
|
||||
canned sequences of commands
|
||||
(@pxref{Sequences, ,Defining Canned Command Sequences}).
|
||||
|
||||
The @code{define} directive is followed on the same line by the name of the
|
||||
@@ -4748,7 +4740,7 @@ not attempt to terminate the conditional inside the included file.
|
||||
|
||||
You can write a conditional that tests @code{make} command flags such as
|
||||
@samp{-t} by using the variable @code{MAKEFLAGS} together with the
|
||||
@code{findstring} function
|
||||
@code{findstring} function
|
||||
(@pxref{Text Functions, , Functions for String Substitution and Analysis}).
|
||||
This is useful when @code{touch} is not enough to make a file appear up
|
||||
to date.
|
||||
@@ -4921,11 +4913,11 @@ References}) are a simpler way to get the effect of the @code{patsubst}
|
||||
function:
|
||||
|
||||
@example
|
||||
$(@var{var}:@var{pattern}=@var{replacement})
|
||||
$(@var{var}:@var{pattern}=@var{replacement})
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
is equivalent to
|
||||
is equivalent to
|
||||
|
||||
@example
|
||||
$(patsubst @var{pattern},@var{replacement},$(@var{var}))
|
||||
@@ -4935,11 +4927,11 @@ The second shorthand simplifies one of the most common uses of
|
||||
@code{patsubst}: replacing the suffix at the end of file names.
|
||||
|
||||
@example
|
||||
$(@var{var}:@var{suffix}=@var{replacement})
|
||||
$(@var{var}:@var{suffix}=@var{replacement})
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
is equivalent to
|
||||
is equivalent to
|
||||
|
||||
@example
|
||||
$(patsubst %@var{suffix},%@var{replacement},$(@var{var}))
|
||||
@@ -5092,8 +5084,8 @@ it for this purpose even if you don't care about the sort order.
|
||||
Here is a realistic example of the use of @code{subst} and
|
||||
@code{patsubst}. Suppose that a makefile uses the @code{VPATH} variable
|
||||
to specify a list of directories that @code{make} should search for
|
||||
dependency files
|
||||
(@pxref{General Search, , @code{VPATH} Search Path for All Dependencies}).
|
||||
dependency files
|
||||
(@pxref{General Search, , @code{VPATH} Search Path for All Dependencies}).
|
||||
This example shows how to
|
||||
tell the C compiler to search for header files in the same list of
|
||||
directories.@refill
|
||||
@@ -5286,7 +5278,7 @@ returns @samp{bar}.
|
||||
@item $(words @var{text})
|
||||
@findex words
|
||||
@cindex words, finding number
|
||||
Returns the number of words in @var{text}.
|
||||
Returns the number of words in @var{text}.
|
||||
Thus, the last word of @var{text} is
|
||||
@w{@code{$(word $(words @var{text}),@var{text})}}.@refill
|
||||
|
||||
@@ -5523,7 +5515,7 @@ Here the redefinition takes place if @samp{$(origin bletch)} returns either
|
||||
@cindex shell command, function for
|
||||
|
||||
The @code{shell} function is unlike any other function except the
|
||||
@code{wildcard} function
|
||||
@code{wildcard} function
|
||||
(@pxref{Wildcard Function, ,The Function @code{wildcard}}) in that it
|
||||
communicates with the world outside of @code{make}.
|
||||
|
||||
@@ -5589,16 +5581,16 @@ determines that some target is not already up to date.
|
||||
|
||||
@menu
|
||||
* Makefile Arguments:: How to specify which makefile to use.
|
||||
* Goals:: How to use goal arguments to specify which
|
||||
* Goals:: How to use goal arguments to specify which
|
||||
parts of the makefile to use.
|
||||
* Instead of Execution:: How to use mode flags to specify what
|
||||
kind of thing to do with the commands
|
||||
in the makefile other than simply
|
||||
kind of thing to do with the commands
|
||||
in the makefile other than simply
|
||||
execute them.
|
||||
* Avoiding Compilation:: How to avoid recompiling certain files.
|
||||
* Overriding:: How to override a variable to specify
|
||||
* Overriding:: How to override a variable to specify
|
||||
an alternate compiler and other things.
|
||||
* Testing:: How to proceed past some errors, to
|
||||
* Testing:: How to proceed past some errors, to
|
||||
test compilation.
|
||||
* Options Summary:: Summary of Options
|
||||
@end menu
|
||||
@@ -5793,7 +5785,7 @@ words, neither compilation nor output will occur.
|
||||
|
||||
``What if''. Each @samp{-W} flag is followed by a file name. The given
|
||||
files' modification times are recorded by @code{make} as being the present
|
||||
time, although the actual modification times remain the same.
|
||||
time, although the actual modification times remain the same.
|
||||
You can use the @samp{-W} flag in conjunction with the @samp{-n} flag
|
||||
to see what would happen if you were to modify specific files.@refill
|
||||
@end table
|
||||
@@ -6294,10 +6286,10 @@ retained for compatibility.
|
||||
* Implicit Variables:: How to change what predefined rules do.
|
||||
* Chained Rules:: How to use a chain of implicit rules.
|
||||
* Pattern Rules:: How to define new implicit rules.
|
||||
* Last Resort:: How to defining commands for rules
|
||||
* Last Resort:: How to defining commands for rules
|
||||
which cannot find any.
|
||||
* Suffix Rules:: The old-fashioned style of implicit rule.
|
||||
* Search Algorithm:: The precise algorithm for applying
|
||||
* Search Algorithm:: The precise algorithm for applying
|
||||
implicit rules.
|
||||
@end menu
|
||||
|
||||
@@ -6579,8 +6571,8 @@ the list of implicit rule suffixes with:@refill
|
||||
@cindex @code{lint}, rule to run
|
||||
@pindex .ln
|
||||
@file{@var{n}.ln} is made from @file{@var{n}.c} by running @code{lint}.
|
||||
The precise command is @w{@samp{$(LINT) $(LINTFLAGS) $(CPPFLAGS) -i}}.
|
||||
The same command is used on the C code produced from
|
||||
The precise command is @w{@samp{$(LINT) $(LINTFLAGS) $(CPPFLAGS) -i}}.
|
||||
The same command is used on the C code produced from
|
||||
@file{@var{n}.y} or @file{@var{n}.l}.@refill
|
||||
|
||||
@item @TeX{} and Web
|
||||
@@ -6627,8 +6619,8 @@ Any file @file{@var{n}} is extracted if necessary from an RCS file
|
||||
named either @file{@var{n},v} or @file{RCS/@var{n},v}. The precise
|
||||
command used is @w{@samp{$(CO) $(COFLAGS)}}. @file{@var{n}} will not be
|
||||
extracted from RCS if it already exists, even if the RCS file is
|
||||
newer. The rules for RCS are terminal
|
||||
(@pxref{Match-Anything Rules, ,Match-Anything Pattern Rules}),
|
||||
newer. The rules for RCS are terminal
|
||||
(@pxref{Match-Anything Rules, ,Match-Anything Pattern Rules}),
|
||||
so RCS files cannot be generated from another source; they must
|
||||
actually exist.@refill
|
||||
|
||||
@@ -6912,7 +6904,7 @@ deletion is reported to you by printing a @samp{rm -f} command that
|
||||
shows what @code{make} is doing. (You can list the target pattern of an
|
||||
implicit rule (such as @samp{%.o}) as a dependency of the special
|
||||
target @code{.PRECIOUS} to preserve intermediate files made by implicit
|
||||
rules whose target patterns match that file's name;
|
||||
rules whose target patterns match that file's name;
|
||||
see @ref{Interrupts}.)@refill
|
||||
@cindex intermediate files, preserving
|
||||
@cindex preserving intermediate files
|
||||
@@ -7797,7 +7789,7 @@ named @file{file.o}. In connection with such usage, the automatic variables
|
||||
@cindex @code{__.SYMDEF}
|
||||
@cindex updating archive symbol directories
|
||||
@cindex archive symbol directory updating
|
||||
@cindex symbol directories, updating archive
|
||||
@cindex symbol directories, updating archive
|
||||
@cindex directories, updating archive symbol
|
||||
|
||||
An archive file that is used as a library usually contains a special member
|
||||
@@ -7913,8 +7905,8 @@ Many features come from the version of @code{make} in System V.
|
||||
|
||||
@itemize @bullet
|
||||
@item
|
||||
The @code{VPATH} variable and its special meaning.
|
||||
@xref{Directory Search, , Searching Directories for Dependencies}.
|
||||
The @code{VPATH} variable and its special meaning.
|
||||
@xref{Directory Search, , Searching Directories for Dependencies}.
|
||||
This feature exists in System V @code{make}, but is undocumented.
|
||||
It is documented in 4.3 BSD @code{make} (which says it mimics System V's
|
||||
@code{VPATH} feature).@refill
|
||||
@@ -7998,7 +7990,7 @@ did. @xref{Automatic, ,Automatic Variables}. The automatic variable
|
||||
|
||||
@item
|
||||
The ``what if'' flag (@samp{-W} in GNU @code{make}) was (as far as we know)
|
||||
invented by Andrew Hume in @code{mk}.
|
||||
invented by Andrew Hume in @code{mk}.
|
||||
@xref{Instead of Execution, ,Instead of Executing the Commands}.
|
||||
|
||||
@item
|
||||
@@ -8044,7 +8036,7 @@ The remaining features are inventions new in GNU @code{make}:
|
||||
Use the @samp{-v} or @samp{--version} option to print version and
|
||||
copyright information.
|
||||
|
||||
@item
|
||||
@item
|
||||
Use the @samp{-h} or @samp{--help} option to summarize the options to
|
||||
@code{make}.
|
||||
|
||||
@@ -8061,7 +8053,7 @@ Use the @samp{-C} or @samp{--directory} command option to change
|
||||
directory. @xref{Options Summary, ,Summary of Options}.
|
||||
|
||||
@item
|
||||
Make verbatim variable definitions with @code{define}.
|
||||
Make verbatim variable definitions with @code{define}.
|
||||
@xref{Defining, ,Defining Variables Verbatim}.
|
||||
|
||||
@item
|
||||
@@ -8072,7 +8064,7 @@ different syntax in his @code{mk} program. This seems to be a case of
|
||||
parallel discovery. @xref{Phony Targets, ,Phony Targets}.
|
||||
|
||||
@item
|
||||
Manipulate text by calling functions.
|
||||
Manipulate text by calling functions.
|
||||
@xref{Functions, ,Functions for Transforming Text}.
|
||||
|
||||
@item
|
||||
@@ -8103,11 +8095,11 @@ same file.@refill
|
||||
|
||||
@item
|
||||
Use a special search method for library dependencies written in the
|
||||
form @samp{-l@var{name}}.
|
||||
form @samp{-l@var{name}}.
|
||||
@xref{Libraries/Search, ,Directory Search for Link Libraries}.
|
||||
|
||||
@item
|
||||
Allow suffixes for suffix rules
|
||||
Allow suffixes for suffix rules
|
||||
(@pxref{Suffix Rules, ,Old-Fashioned Suffix Rules}) to contain any
|
||||
characters. In other versions of @code{make}, they must begin with
|
||||
@samp{.} and not contain any @samp{/} characters.
|
||||
@@ -8120,11 +8112,11 @@ variable @code{MAKELEVEL}. @xref{Recursion, ,Recursive Use of @code{make}}.
|
||||
Specify static pattern rules. @xref{Static Pattern, ,Static Pattern Rules}.
|
||||
|
||||
@item
|
||||
Provide selective @code{vpath} search.
|
||||
Provide selective @code{vpath} search.
|
||||
@xref{Directory Search, ,Searching Directories for Dependencies}.
|
||||
|
||||
@item
|
||||
Provide computed variable references.
|
||||
Provide computed variable references.
|
||||
@xref{Reference, ,Basics of Variable References}.
|
||||
|
||||
@item
|
||||
@@ -8133,7 +8125,7 @@ System V @code{make} has a very, very limited form of this
|
||||
functionality in that it will check out SCCS files for makefiles.
|
||||
|
||||
@item
|
||||
Various new built-in implicit rules.
|
||||
Various new built-in implicit rules.
|
||||
@xref{Catalogue of Rules, ,Catalogue of Implicit Rules}.
|
||||
|
||||
@item
|
||||
@@ -8143,7 +8135,7 @@ The built-in variable @samp{MAKE_VERSION} gives the version number of
|
||||
|
||||
@node Missing, Makefile Conventions, Features, Top
|
||||
@chapter Incompatibilities and Missing Features
|
||||
@cindex incompatibilities
|
||||
@cindex incompatibilities
|
||||
@cindex missing features
|
||||
@cindex features, missing
|
||||
|
||||
@@ -8160,22 +8152,22 @@ being an object file which defines the linker symbol @var{entry}.@refill
|
||||
|
||||
This feature was not put into GNU @code{make} because of the
|
||||
nonmodularity of putting knowledge into @code{make} of the internal
|
||||
format of archive file symbol tables.
|
||||
format of archive file symbol tables.
|
||||
@xref{Archive Symbols, ,Updating Archive Symbol Directories}.
|
||||
|
||||
@item
|
||||
Suffixes (used in suffix rules) that end with the character @samp{~}
|
||||
have a special meaning to System V @code{make};
|
||||
have a special meaning to System V @code{make};
|
||||
they refer to the SCCS file that corresponds
|
||||
to the file one would get without the @samp{~}. For example, the
|
||||
suffix rule @samp{.c~.o} would make the file @file{@var{n}.o} from
|
||||
the SCCS file @file{s.@var{n}.c}. For complete coverage, a whole
|
||||
series of such suffix rules is required.
|
||||
series of such suffix rules is required.
|
||||
@xref{Suffix Rules, ,Old-Fashioned Suffix Rules}.
|
||||
|
||||
In GNU @code{make}, this entire series of cases is handled by two
|
||||
pattern rules for extraction from SCCS, in combination with the
|
||||
general feature of rule chaining.
|
||||
general feature of rule chaining.
|
||||
@xref{Chained Rules, ,Chains of Implicit Rules}.
|
||||
|
||||
@item
|
||||
@@ -8187,7 +8179,7 @@ This is not defined in GNU @code{make} because @samp{$$} should always
|
||||
stand for an ordinary @samp{$}.
|
||||
|
||||
It is possible to get this functionality through the use of static pattern
|
||||
rules (@pxref{Static Pattern, ,Static Pattern Rules}).
|
||||
rules (@pxref{Static Pattern, ,Static Pattern Rules}).
|
||||
The System V @code{make} rule:
|
||||
|
||||
@example
|
||||
@@ -8469,7 +8461,7 @@ dependencies which are archive members, only the member named is used
|
||||
dependencies, while @code{$+} retains them and preserves their order.
|
||||
|
||||
@item $*
|
||||
The stem with which an implicit rule matches
|
||||
The stem with which an implicit rule matches
|
||||
(@pxref{Pattern Match, ,How Patterns Match}).
|
||||
|
||||
@item $(@@D)
|
||||
@@ -8512,7 +8504,7 @@ Makefiles to be read on every invocation of @code{make}.@*
|
||||
@item VPATH
|
||||
|
||||
Directory search path for files not found in the current directory.@*
|
||||
@xref{General Search, , @code{VPATH} Search Path for All Dependencies}.
|
||||
@xref{General Search, , @code{VPATH} Search Path for All Dependencies}.
|
||||
|
||||
@item SHELL
|
||||
|
||||
@@ -8615,60 +8607,60 @@ INSTALLDATA = /usr/local/bin/install -c -m 644
|
||||
# Things you might add to DEFS:
|
||||
# -DSTDC_HEADERS If you have ANSI C headers and
|
||||
# libraries.
|
||||
# -DPOSIX If you have POSIX.1 headers and
|
||||
# -DPOSIX If you have POSIX.1 headers and
|
||||
# libraries.
|
||||
# -DBSD42 If you have sys/dir.h (unless
|
||||
# you use -DPOSIX), sys/file.h,
|
||||
# -DBSD42 If you have sys/dir.h (unless
|
||||
# you use -DPOSIX), sys/file.h,
|
||||
# and st_blocks in `struct stat'.
|
||||
# -DUSG If you have System V/ANSI C
|
||||
# string and memory functions
|
||||
# and headers, sys/sysmacros.h,
|
||||
# fcntl.h, getcwd, no valloc,
|
||||
# and ndir.h (unless
|
||||
# -DUSG If you have System V/ANSI C
|
||||
# string and memory functions
|
||||
# and headers, sys/sysmacros.h,
|
||||
# fcntl.h, getcwd, no valloc,
|
||||
# and ndir.h (unless
|
||||
# you use -DDIRENT).
|
||||
# -DNO_MEMORY_H If USG or STDC_HEADERS but do not
|
||||
# -DNO_MEMORY_H If USG or STDC_HEADERS but do not
|
||||
# include memory.h.
|
||||
# -DDIRENT If USG and you have dirent.h
|
||||
# -DDIRENT If USG and you have dirent.h
|
||||
# instead of ndir.h.
|
||||
# -DSIGTYPE=int If your signal handlers
|
||||
# -DSIGTYPE=int If your signal handlers
|
||||
# return int, not void.
|
||||
# -DNO_MTIO If you lack sys/mtio.h
|
||||
# -DNO_MTIO If you lack sys/mtio.h
|
||||
# (magtape ioctls).
|
||||
# -DNO_REMOTE If you do not have a remote shell
|
||||
# -DNO_REMOTE If you do not have a remote shell
|
||||
# or rexec.
|
||||
# -DUSE_REXEC To use rexec for remote tape
|
||||
# operations instead of
|
||||
# operations instead of
|
||||
# forking rsh or remsh.
|
||||
# -DVPRINTF_MISSING If you lack vprintf function
|
||||
# -DVPRINTF_MISSING If you lack vprintf function
|
||||
# (but have _doprnt).
|
||||
# -DDOPRNT_MISSING If you lack _doprnt function.
|
||||
# Also need to define
|
||||
# -DDOPRNT_MISSING If you lack _doprnt function.
|
||||
# Also need to define
|
||||
# -DVPRINTF_MISSING.
|
||||
# -DFTIME_MISSING If you lack ftime system call.
|
||||
# -DSTRSTR_MISSING If you lack strstr function.
|
||||
# -DVALLOC_MISSING If you lack valloc function.
|
||||
# -DMKDIR_MISSING If you lack mkdir and
|
||||
# -DMKDIR_MISSING If you lack mkdir and
|
||||
# rmdir system calls.
|
||||
# -DRENAME_MISSING If you lack rename system call.
|
||||
# -DFTRUNCATE_MISSING If you lack ftruncate
|
||||
# -DFTRUNCATE_MISSING If you lack ftruncate
|
||||
# system call.
|
||||
# -DV7 On Version 7 Unix (not
|
||||
# -DV7 On Version 7 Unix (not
|
||||
# tested in a long time).
|
||||
# -DEMUL_OPEN3 If you lack a 3-argument version
|
||||
# of open, and want to emulate it
|
||||
# -DEMUL_OPEN3 If you lack a 3-argument version
|
||||
# of open, and want to emulate it
|
||||
# with system calls you do have.
|
||||
# -DNO_OPEN3 If you lack the 3-argument open
|
||||
# and want to disable the tar -k
|
||||
# and want to disable the tar -k
|
||||
# option instead of emulating open.
|
||||
# -DXENIX If you have sys/inode.h
|
||||
# -DXENIX If you have sys/inode.h
|
||||
# and need it 94 to be included.
|
||||
|
||||
DEFS = -DSIGTYPE=int -DDIRENT -DSTRSTR_MISSING \
|
||||
-DVPRINTF_MISSING -DBSD42
|
||||
# Set this to rtapelib.o unless you defined NO_REMOTE,
|
||||
# Set this to rtapelib.o unless you defined NO_REMOTE,
|
||||
# in which case make it empty.
|
||||
RTAPELIB = rtapelib.o
|
||||
LIBS =
|
||||
LIBS =
|
||||
DEF_AR_FILE = /dev/rmt8
|
||||
DEFBLOCKING = 20
|
||||
|
||||
@@ -8682,9 +8674,9 @@ LDFLAGS = -g
|
||||
|
||||
@group
|
||||
prefix = /usr/local
|
||||
# Prefix for each installed program,
|
||||
# Prefix for each installed program,
|
||||
# normally empty or `g'.
|
||||
binprefix =
|
||||
binprefix =
|
||||
|
||||
# The directory to install tar in.
|
||||
bindir = $(prefix)/bin
|
||||
@@ -8782,7 +8774,7 @@ shar: $(SRCS) $(AUX)
|
||||
shar $(SRCS) $(AUX) | compress \
|
||||
> tar-`sed -e '/version_string/!d' \
|
||||
-e 's/[^0-9.]*\([0-9.]*\).*/\1/' \
|
||||
-e q
|
||||
-e q
|
||||
version.c`.shar.Z
|
||||
@end group
|
||||
|
||||
@@ -8791,7 +8783,7 @@ dist: $(SRCS) $(AUX)
|
||||
echo tar-`sed \
|
||||
-e '/version_string/!d' \
|
||||
-e 's/[^0-9.]*\([0-9.]*\).*/\1/' \
|
||||
-e q
|
||||
-e q
|
||||
version.c` > .fname
|
||||
-rm -rf `cat .fname`
|
||||
mkdir `cat .fname`
|
||||
|
||||
23
remake.c
23
remake.c
@@ -1,5 +1,5 @@
|
||||
/* Basic dependency engine for GNU Make.
|
||||
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 1995 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988,89,90,91,92,93,94,95,96 Free Software Foundation, Inc.
|
||||
This file is part of GNU Make.
|
||||
|
||||
GNU Make is free software; you can redistribute it and/or modify
|
||||
@@ -979,6 +979,27 @@ f_mtime (file, search)
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
/* Files can have bogus timestamps that nothing newly made will be
|
||||
"newer" than. Updating their dependents could just result in loops.
|
||||
So notify the user of the anomaly by treating future files as
|
||||
unrecoverably absent. */
|
||||
|
||||
static time_t now;
|
||||
if (mtime > now && ! file->updated)
|
||||
{
|
||||
/* This file's time appears to be in the future.
|
||||
Update our concept of the present, and compare again. */
|
||||
extern time_t time ();
|
||||
if (mtime > time (&now))
|
||||
{
|
||||
error ("*** File `%s' has modification time in the future",
|
||||
file->name);
|
||||
file->update_status = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Store the mtime into all the entries for this file. */
|
||||
if (file->double_colon)
|
||||
file = file->double_colon;
|
||||
|
||||
Reference in New Issue
Block a user