2001-04-11 23:15:20 +08:00
|
|
|
## Process this file with automake to create Makefile.in. -*-Makefile-*-
|
1999-10-31 09:54:28 +08:00
|
|
|
|
|
|
|
## Makefile for Autoconf.
|
2001-04-11 23:15:20 +08:00
|
|
|
## Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
|
1999-10-31 09:54:28 +08:00
|
|
|
|
|
|
|
## This program is free software; you can redistribute it and/or modify
|
|
|
|
## it under the terms of the GNU General Public License as published by
|
|
|
|
## the Free Software Foundation; either version 2, or (at your option)
|
|
|
|
## any later version.
|
|
|
|
|
|
|
|
## This program is distributed in the hope that it will be useful,
|
|
|
|
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
## GNU General Public License for more details.
|
|
|
|
|
|
|
|
## You should have received a copy of the GNU General Public License
|
|
|
|
## along with this program; if not, write to the Free Software
|
|
|
|
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
|
|
## 02111-1307, USA.
|
|
|
|
|
2000-02-10 01:05:21 +08:00
|
|
|
AUTOMAKE_OPTIONS = check-news 1.4 readme-alpha
|
1999-10-31 09:54:28 +08:00
|
|
|
|
2000-02-17 18:57:00 +08:00
|
|
|
SUBDIRS = . m4 man doc tests
|
1999-10-31 09:54:28 +08:00
|
|
|
|
2000-12-13 10:25:35 +08:00
|
|
|
SUFFIXES = .m4 .m4f
|
2000-01-29 18:30:15 +08:00
|
|
|
## There is currently no means with Automake not to run aclocal.
|
|
|
|
ACLOCAL_AMFLAGS = --version >/dev/null && touch aclocal.m4
|
2000-07-10 18:33:01 +08:00
|
|
|
WGET = wget
|
1999-10-31 09:54:28 +08:00
|
|
|
|
2001-03-27 20:02:15 +08:00
|
|
|
bin_SCRIPTS = autoconf autoheader autoreconf ifnames @PERLSCRIPTS@
|
|
|
|
EXTRA_SCRIPTS = autoscan autoupdate
|
1999-10-31 09:54:28 +08:00
|
|
|
|
1999-12-22 00:44:10 +08:00
|
|
|
# FIXME:
|
|
|
|
# s/distpackageDATA/dist_pkgdata_DATA/
|
|
|
|
# s/nodistpackageDATA/nodist_pkgdata_DATA/
|
|
|
|
# and adapt dependencies once we use a more recent Automake
|
|
|
|
|
* shell.m4: Rename as...
* m4sh.m4: this.
* tests/m4sugar.m4, tests/shell.m4, tests/torture.m4: Rename as...
* tests/m4sugar.at, tests/m4sh.at, tests/torture.at: these.
* tests/semantics.m4, tests/base.m4, tests/suite.m4: Rename as...
* tests/semantics.at, tests/base.at, tests/suite.at: these.
* tests/tools.m4, tests/update.m4, tests/syntax.m4: Rename as...
* tests/tools.at, tests/update.at, tests/syntax.at: these.
* tests/mktests.sh: Adjust the output file names.
2000-10-26 17:52:34 +08:00
|
|
|
m4sources = m4sugar.m4 m4sh.m4 \
|
Move the Autoconf independent shell macros into the file
`shell.m4' and the name space `AS_*'.
* acgeneral.m4 (AC_SHELL_IFELSE, _AC_SHELL_TMPDIR, AC_SHELL_UNSET)
(AC_SHELL_MKDIR_P, AC_SHELL_DIRNAME): Rename and move to...
* shell.m4 (AS_IFELSE, AS_TMPDIR, AS_UNSET, AS_MKDIR_P)
(AS_DIRNAME): here, a new file.
Adjust all dependencies.
* tests/base.m4 (m4_wrap): Eve out into...
* tests/shell.m4: here, new file.
* tests/base.m4 (AC_SHELL_MKDIR_P)
(AC_SHELL_DIRNAME & AC_SHELL_DIRNAME_SED): Eve out into...
* tests/m4sugar.m4 (AS_MKDIR_P, AS_DIRNAME & AS_DIRNAME_SED):
here, new file.
Adjust the test suite.
2000-10-26 01:51:10 +08:00
|
|
|
autoconf.m4 \
|
|
|
|
acgeneral.m4 acoldnames.m4 acspecific.m4 aclang.m4 acversion.m4 \
|
Create actypes.m4.
* acgeneral.m4 (AC_CHECK_SIZEOF, _AC_CHECK_TYPE_NEW)
(AC_CHECK_TYPES, _AC_CHECK_TYPE_OLD)
(_AC_CHECK_TYPE_REPLACEMENT_TYPE_P, _AC_CHECK_TYPE_MAYBE_TYPE_P)
(AC_CHECK_TYPE, AC_CHECK_MEMBER, AC_CHECK_MEMBERS): Move into...
* actypes.m4: here.
* acgeneral.m4 (AC_TYPE_GETGROUPS, AM_TYPE_PTRDIFF_T)
(AC_TYPE_UID_T, AC_TYPE_SIZE_T, AC_TYPE_PID_T, AC_TYPE_OFF_T)
(AC_TYPE_MODE_T, AC_INT_16_BITS, AC_LONG_64_BITS, AC_TYPE_SIGNAL)
(AC_STRUCT_TM, AC_STRUCT_TIMEZONE, AC_STRUCT_ST_BLKSIZE)
(AC_STRUCT_ST_BLOCKS, AC_STRUCT_ST_RDEV): Move into...
* actypes.m4: here.
Adjust the test suite.
2001-01-22 17:04:58 +08:00
|
|
|
acfunctions.m4 acheaders.m4 actypes.m4
|
Move the Autoconf independent shell macros into the file
`shell.m4' and the name space `AS_*'.
* acgeneral.m4 (AC_SHELL_IFELSE, _AC_SHELL_TMPDIR, AC_SHELL_UNSET)
(AC_SHELL_MKDIR_P, AC_SHELL_DIRNAME): Rename and move to...
* shell.m4 (AS_IFELSE, AS_TMPDIR, AS_UNSET, AS_MKDIR_P)
(AS_DIRNAME): here, a new file.
Adjust all dependencies.
* tests/base.m4 (m4_wrap): Eve out into...
* tests/shell.m4: here, new file.
* tests/base.m4 (AC_SHELL_MKDIR_P)
(AC_SHELL_DIRNAME & AC_SHELL_DIRNAME_SED): Eve out into...
* tests/m4sugar.m4 (AS_MKDIR_P, AS_DIRNAME & AS_DIRNAME_SED):
here, new file.
Adjust the test suite.
2000-10-26 01:51:10 +08:00
|
|
|
|
Create acfunctions.m4, in charge of the macros related to
functions.
* acgeneral.m4 (AC_CHECK_FUNC, AC_CHECK_FUNCS, AC_REPLACE_FUNCS):
Move to...
* acfunctions.m4: here, new file.
* acspecific.m4 (_AC_LIBOBJ_ALLOCA, AC_FUNC_ALLOCA, AC_FUNC_CHOWN,
AC_FUNC_CLOSEDIR_VOID, AC_FUNC_FNMATCH, AC_FUNC_GETGROUPS,
_AC_LIBOBJ_GETLOADAVG, AC_FUNC_GETLOADAVG, AC_FUNC_GETMNTENT,
AC_FUNC_GETPGRP, AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK,
AC_FUNC_MALLOC, AC_FUNC_MEMCMP, AC_FUNC_MKTIME, AC_FUNC_MMAP,
AC_FUNC_SELECT_ARGTYPES, AC_FUNC_SETPGRP, _AC_FUNC_STAT,
AC_FUNC_STAT, AC_FUNC_LSTAT, AC_FUNC_STRERROR_R, AC_FUNC_STRFTIME,
AC_FUNC_VFORK, AC_FUNC_VPRINTF, AC_FUNC_WAIT3, AC_FUNC_UTIME_NULL,
AC_FUNC_STRCOLL, AC_FUNC_SETVBUF_REVERSED): Likewise.
* Makefile.am: Adjust.
Move also the old definitions into acfunctions.m4, and adjust the
test suite.
* acgeneral.m4 (AU_ALIAS): New macro.
* acoldnames (AC_FUNC_CHECK, AC_HAVE_FUNCS, AC_ALLOCA,
AC_GETLOADAVG, AC_MMAP, AC_SETVBUF_REVERSED, AC_STRCOLL,
AC_UTIME_NULL, AC_VFORK, AC_VPRINTF, AC_WAIT3, AM_FUNC_FNMATCH,
AM_FUNC_MKTIME, fp_FUNC_FNMATCH): Move to...
* acfunctions.m4: here, using AU_ALIAS.
* acgeneral.m4 (AC_FD_CC, AC_CANONICAL_SYSTEM): Use AU_ALIAS to
define them.
* acoldnames.m4: Use AU_ALIAS instead of AU_DEFUN.
* tests/Makefile.am (MACRO_FILES): Adjust.
2000-08-01 18:13:14 +08:00
|
|
|
distpkgdataDATA = acfunctions acheaders acidentifiers acmakevars acprograms \
|
2000-11-14 21:25:35 +08:00
|
|
|
$(m4sources)
|
1999-12-21 19:46:41 +08:00
|
|
|
|
2000-05-11 23:45:34 +08:00
|
|
|
nodistpkgdataDATA = autoconf.m4f
|
1999-12-22 00:44:10 +08:00
|
|
|
|
|
|
|
pkgdata_DATA = $(distpkgdataDATA) $(nodistpkgdataDATA)
|
1999-10-31 09:54:28 +08:00
|
|
|
|
2000-11-14 21:25:35 +08:00
|
|
|
EXTRA_DIST = ChangeLog.0 ChangeLog.1 \
|
|
|
|
BUGS INSTALL.txt \
|
|
|
|
acversion.m4.in \
|
2001-02-21 16:59:24 +08:00
|
|
|
autoconf.sh autoheader.sh autoreconf.sh autoupdate.in ifnames.sh \
|
2000-11-14 21:25:35 +08:00
|
|
|
autoscan.pl \
|
|
|
|
$(distpkgdataDATA)
|
1999-10-31 09:54:28 +08:00
|
|
|
|
2000-02-17 18:57:00 +08:00
|
|
|
# Files that should be removed, but which Automake does not know:
|
|
|
|
# the frozen files and the scripts.
|
2000-05-11 23:45:34 +08:00
|
|
|
CLEANFILES = autoconf.m4f \
|
2000-02-17 18:57:00 +08:00
|
|
|
$(bin_SCRIPTS)
|
1999-10-31 10:17:01 +08:00
|
|
|
|
2000-10-17 15:55:44 +08:00
|
|
|
|
|
|
|
## ------------------ ##
|
|
|
|
## Maintainer rules. ##
|
|
|
|
## ------------------ ##
|
|
|
|
|
|
|
|
## acversion.m4. ##
|
|
|
|
|
|
|
|
# - acversion.m4 needs to be updated only once, since it depends on
|
|
|
|
# configure.in, not on the results of a 'configure' run.
|
|
|
|
# - It is guaranteed (with GNU Make) that when the version in configure.in
|
|
|
|
# is changed, acversion.m4 is built only after the new version number is
|
|
|
|
# propagated to the Makefile. (Libtool uses the same guarantee.)
|
|
|
|
|
|
|
|
acversion.m4: $(srcdir)/acversion.m4.in $(srcdir)/configure.in
|
2000-11-14 21:25:35 +08:00
|
|
|
sed 's,@VERSION\@,$(VERSION),g' $(srcdir)/acversion.m4.in >acversion.tm4
|
|
|
|
mv acversion.tm4 $(srcdir)/acversion.m4
|
2000-10-17 15:55:44 +08:00
|
|
|
|
2000-09-04 20:12:21 +08:00
|
|
|
## INSTALL. ##
|
|
|
|
|
1999-10-31 09:54:28 +08:00
|
|
|
# INSTALL is a special case. Automake seems to have a single name space
|
|
|
|
# for both targets and variables. If we just use INSTALL, then the var
|
|
|
|
# $(INSTALL) is not defined, and the install target fails.
|
|
|
|
|
2000-02-17 18:57:00 +08:00
|
|
|
INSTALL.txt: $(top_srcdir)/doc/install.texi
|
2000-02-29 16:49:17 +08:00
|
|
|
$(MAKEINFO) $< --no-headers --no-validate --no-split --output=$@
|
2000-10-17 15:55:44 +08:00
|
|
|
if test '$(srcdir)' != '.'; then cp $@ $(srcdir); rm -f $@; fi
|
|
|
|
|
|
|
|
MAINTAINERCLEANFILES = acversion.m4 INSTALL.txt
|
|
|
|
|
|
|
|
|
2001-01-12 17:39:26 +08:00
|
|
|
## maintainer-check ##
|
|
|
|
|
|
|
|
maintainer-check:
|
|
|
|
cd tests && make maintainer-check
|
|
|
|
|
2000-10-17 15:55:44 +08:00
|
|
|
## ----------------------------------- ##
|
|
|
|
## Special installation instructions. ##
|
|
|
|
## ----------------------------------- ##
|
1999-10-31 09:54:28 +08:00
|
|
|
|
|
|
|
install-data-hook: INSTALL.txt
|
|
|
|
@$(NORMAL_INSTALL)
|
|
|
|
@list='INSTALL'; for p in $$list; do \
|
|
|
|
if test -f "$$p.txt"; then d= ; else d="$(srcdir)/"; fi; \
|
|
|
|
f="`echo $$p | sed -e 's|^.*/||'`"; \
|
|
|
|
echo " $(INSTALL_DATA) $$d$$p.txt $(DESTDIR)$(pkgdatadir)/$$f"; \
|
|
|
|
$(INSTALL_DATA) $$d$$p.txt $(DESTDIR)$(pkgdatadir)/$$f; \
|
|
|
|
done
|
|
|
|
|
2000-07-20 00:43:04 +08:00
|
|
|
|
2000-09-04 20:12:21 +08:00
|
|
|
## ------------- ##
|
|
|
|
## The scripts. ##
|
|
|
|
## ------------- ##
|
|
|
|
|
2001-01-16 18:25:57 +08:00
|
|
|
edit = sed \
|
2000-07-28 15:37:50 +08:00
|
|
|
-e 's,@SHELL\@,$(SHELL),g' \
|
2001-01-16 18:25:57 +08:00
|
|
|
-e 's,@PERL\@,$(PERL),g' \
|
|
|
|
-e 's,@datadir\@,$(pkgdatadir),g' \
|
2000-08-09 14:19:36 +08:00
|
|
|
-e 's,@bindir\@,$(bindir),g' \
|
2000-07-28 15:37:50 +08:00
|
|
|
-e 's,@autoconf-name\@,'`echo autoconf | sed '$(transform)'`',g' \
|
2001-01-16 18:25:57 +08:00
|
|
|
-e 's,@autoheader-name\@,'`echo autoheader | sed '$(transform)'`',g' \
|
|
|
|
-e 's,@M4\@,$(M4),g' \
|
|
|
|
-e 's,@AWK\@,$(AWK),g' \
|
2000-07-28 15:37:50 +08:00
|
|
|
-e 's,@VERSION\@,$(VERSION),g' \
|
2001-01-16 18:25:57 +08:00
|
|
|
-e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g'
|
1999-10-31 09:54:28 +08:00
|
|
|
|
2000-12-18 15:19:02 +08:00
|
|
|
## All the scripts below depend on configure.in so that they are rebuilt
|
|
|
|
## when the Autoconf version changes. Unfortunately, suffix rules cannot
|
|
|
|
## have additional dependencies, so we have to use explicit rules for
|
|
|
|
## every script.
|
|
|
|
|
2000-12-13 10:25:35 +08:00
|
|
|
autoconf: $(srcdir)/autoconf.sh $(srcdir)/configure.in
|
|
|
|
rm -f autoconf autoconf.tmp
|
2001-01-16 18:25:57 +08:00
|
|
|
$(edit) $(srcdir)/autoconf.sh >autoconf.tmp
|
2000-12-13 10:25:35 +08:00
|
|
|
chmod +x autoconf.tmp
|
|
|
|
mv autoconf.tmp autoconf
|
|
|
|
|
|
|
|
autoheader: $(srcdir)/autoheader.sh $(srcdir)/configure.in
|
|
|
|
rm -f autoheader autoheader.tmp
|
2001-01-16 18:25:57 +08:00
|
|
|
$(edit) $(srcdir)/autoheader.sh >autoheader.tmp
|
2000-12-13 10:25:35 +08:00
|
|
|
chmod +x autoheader.tmp
|
|
|
|
mv autoheader.tmp autoheader
|
|
|
|
|
|
|
|
autoreconf: $(srcdir)/autoreconf.sh $(srcdir)/configure.in
|
|
|
|
rm -f autoreconf autoreconf.tmp
|
2001-01-16 18:25:57 +08:00
|
|
|
$(edit) $(srcdir)/autoreconf.sh >autoreconf.tmp
|
2000-12-13 10:25:35 +08:00
|
|
|
chmod +x autoreconf.tmp
|
|
|
|
mv autoreconf.tmp autoreconf
|
|
|
|
|
2001-02-21 16:59:24 +08:00
|
|
|
autoupdate: $(srcdir)/autoupdate.in $(srcdir)/configure.in
|
2000-12-13 10:25:35 +08:00
|
|
|
rm -f autoupdate autoupdate.tmp
|
2001-02-21 16:59:24 +08:00
|
|
|
$(edit) $(srcdir)/autoupdate.in >autoupdate.tmp
|
2000-12-13 10:25:35 +08:00
|
|
|
chmod +x autoupdate.tmp
|
|
|
|
mv autoupdate.tmp autoupdate
|
|
|
|
|
|
|
|
ifnames: $(srcdir)/ifnames.sh $(srcdir)/configure.in
|
|
|
|
rm -f ifnames ifnames.tmp
|
2001-01-16 18:25:57 +08:00
|
|
|
$(edit) $(srcdir)/ifnames.sh >ifnames.tmp
|
2000-12-13 10:25:35 +08:00
|
|
|
chmod +x ifnames.tmp
|
|
|
|
mv ifnames.tmp ifnames
|
|
|
|
|
|
|
|
autoscan: $(srcdir)/autoscan.pl $(srcdir)/configure.in
|
|
|
|
rm -f autoscan autoscan.tmp
|
2001-01-16 18:25:57 +08:00
|
|
|
$(edit) $(srcdir)/autoscan.pl >autoscan.tmp
|
2000-12-13 10:25:35 +08:00
|
|
|
chmod +x autoscan.tmp
|
|
|
|
mv autoscan.tmp autoscan
|
1999-10-31 09:54:28 +08:00
|
|
|
|
2000-09-04 20:12:21 +08:00
|
|
|
|
|
|
|
## ------------------ ##
|
|
|
|
## The frozen files. ##
|
|
|
|
## ------------------ ##
|
|
|
|
|
2000-11-03 22:01:58 +08:00
|
|
|
|
|
|
|
# When processing the file with diversion disabled, there must be no
|
|
|
|
# output but comments and empty lines.
|
|
|
|
# If freezing produces output, something went wrong: a bad `divert',
|
|
|
|
# or an improper paren etc.
|
|
|
|
# It may happen that the output does not end with a end of line, hence
|
|
|
|
# force an end of line when reporting errors.
|
1999-10-31 09:54:28 +08:00
|
|
|
.m4.m4f:
|
2000-11-03 22:01:58 +08:00
|
|
|
$(M4) -I $(srcdir) $(srcdir)/$*.m4 -D divert | \
|
|
|
|
sed 's/#.*//;/^$$/d' >process.log
|
|
|
|
if grep . process.log >/dev/null 2>&1; then \
|
|
|
|
echo "Processing $(srcdir)/$*.m4 produced output:" >&2; \
|
|
|
|
sed "s,^,$(srcdir)/$*.m4: ," < process.log >&2; \
|
|
|
|
echo >&2; \
|
|
|
|
exit 1; \
|
|
|
|
else \
|
|
|
|
rm -f process.log; \
|
|
|
|
fi
|
|
|
|
$(M4) -I $(srcdir) $(srcdir)/$*.m4 --freeze-state=$*.m4f >freeze.log
|
|
|
|
if grep . freeze.log >/dev/null 2>&1; then \
|
|
|
|
echo "Freezing $(srcdir)/$*.m4 produced output:" >&2; \
|
|
|
|
sed "s,^,$(srcdir)/$*.m4: ," < freeze.log >&2; \
|
|
|
|
echo >&2; \
|
|
|
|
exit 1; \
|
|
|
|
else \
|
|
|
|
rm -f freeze.log; \
|
|
|
|
fi
|
1999-10-31 09:54:28 +08:00
|
|
|
|
Move the Autoconf independent shell macros into the file
`shell.m4' and the name space `AS_*'.
* acgeneral.m4 (AC_SHELL_IFELSE, _AC_SHELL_TMPDIR, AC_SHELL_UNSET)
(AC_SHELL_MKDIR_P, AC_SHELL_DIRNAME): Rename and move to...
* shell.m4 (AS_IFELSE, AS_TMPDIR, AS_UNSET, AS_MKDIR_P)
(AS_DIRNAME): here, a new file.
Adjust all dependencies.
* tests/base.m4 (m4_wrap): Eve out into...
* tests/shell.m4: here, new file.
* tests/base.m4 (AC_SHELL_MKDIR_P)
(AC_SHELL_DIRNAME & AC_SHELL_DIRNAME_SED): Eve out into...
* tests/m4sugar.m4 (AS_MKDIR_P, AS_DIRNAME & AS_DIRNAME_SED):
here, new file.
Adjust the test suite.
2000-10-26 01:51:10 +08:00
|
|
|
autoconf.m4f: $(m4sources)
|
2000-07-10 18:33:01 +08:00
|
|
|
|
|
|
|
|
2000-09-04 20:12:21 +08:00
|
|
|
## ---------- ##
|
|
|
|
## Updating. ##
|
|
|
|
## ---------- ##
|
|
|
|
|
2000-07-10 18:33:01 +08:00
|
|
|
wget-update:
|
|
|
|
$(WGET) ftp://ftp.gnu.org/gnu/GNUinfo/standards.texi -O $(srcdir)/doc/standards.texi
|
|
|
|
$(WGET) ftp://ftp.gnu.org/gnu/GNUinfo/make-stds.texi -O $(srcdir)/doc/make-stds.texi
|
|
|
|
$(WGET) ftp://ftp.gnu.org/gnu/texinfo/texinfo.tex -O $(srcdir)/doc/texinfo.tex
|
|
|
|
$(WGET) ftp://ftp.gnu.org/gnu/config/config.guess -O $(srcdir)/config.guess
|
|
|
|
$(WGET) ftp://ftp.gnu.org/gnu/config/config.sub -O $(srcdir)/config.sub
|