On Wed, Feb 07, 2001 at 11:32:43AM -0700, Tom Tromey wrote:
> >>>>> "Per" == Per Bothner <[EMAIL PROTECTED]> writes:
>
> Per> The Autotools book, the automake-1.4 manual, and the
> Per> automake-1.4/NEWS all imply that "include" is part of automake
> Per> 1.4. So how come it doesn't work, but when I try automake from
> Per> cvs it does work?
>
> Maybe it is a bug in the book. It's hard to remember 1.4 :-(
Wow. I almost sent a message to say that I had definitely used
`include' in some old (circa-1997) projects. But I dug out the code,
and it seems I was relying on make's own include implementation. I am
still using automake-1.4 (so that I can be certain that the upcoming
libtool releases will work correctly with it) and had never noticed
this before...
Tom, would you commit an errata to the autobook pages to describe this
bug please?
FYI, I attach the macro I dug out, which allows you to add this to
your Makefile.am:
@MAKEINCLUDE@ @MAKEQUOTE@$(top_builddir)/config/MakeRules@MAKEQUOTE@
This works with the `include file' and `.include "file"' syntaxes.
Cheers,
Gary.
--
___ _ ___ __ _ mailto: [EMAIL PROTECTED]
/ __|__ _ _ ___ _| | / / | / /_ _ _ _ __ _| |_ __ _ ___ [EMAIL PROTECTED]
| (_ / _` | '_|// / |/ /| |/ / _` | || / _` | ' \/ _` | _ \
\___\__,_|_|\_, /|___(_)___/\__,_|\_,_\__, |_||_\__,_|//_/
home page: /___/ /___/ gpg public key:
http://www.oranda.demon.co.uk http://www.oranda.demon.co.uk/key.asc
dnl -*- Mode: M4 -*-
dnl --------------------------------------------------------------------
dnl make.m4 --- determine correct make include syntax.
dnl
dnl Author: Gary V. Vaughan <[EMAIL PROTECTED]>
dnl Maintainer: Gary V. Vaughan <[EMAIL PROTECTED]>
dnl Created: Mon Jul 20 01:23:02 1998
dnl Last Modified: Wed Jul 22 01:52:32 1998
dnl by: Gary V. Vaughan <[EMAIL PROTECTED]>
dnl --------------------------------------------------------------------
dnl @(#) $Id$
dnl --------------------------------------------------------------------
dnl
dnl Copyright (C) 1998 Gary V. Vaughan
dnl
dnl This file is distributed freely, but without warranty. No author or
dnl distributer accepts responsibility to anyone for any damage caused
dnl to hardware or software through the use or misuse of this file in
dnl any form, or for whether it serves any particular purpose or works
dnl at all, regardless of further modifications made to it by any
dnl subsequent distributers.
dnl
dnl Permission is granted to copy, use, modify or redistribute this file
dnl provided the copyright notice and this notice remains intact in its
dnl entirety in any and all subsequent copies.
dnl
dnl Code:
# Find the include syntax used by the make program, define MAKEINCLUDE
# and MAKEQUOTE so that using the following in a Makefile.in should work
# most anywhere:
# @MAKEINCLUDE@ @MAKEQUOTE@makefragment@MAKEQUOTE@
# serial 1
dnl LILAC_PROG_MAKE_INCLUDE
dnl Some make programs require includes to be
dnl .include "file"
dnl others...
dnl include file
dnl Checks the MAKE environment variable for the name of the make command
dnl to use.
AC_DEFUN(LILAC_PROG_MAKE_INCLUDE,
[AC_MSG_CHECKING([how make handles includes])
AC_CACHE_VAL(lilac_cv_prog_make_include,
[cat > confmakeinc <<EOF
EOF
cat > confmakefile <<EOF
include confmakeinc
all:
EOF
if ${MAKE-make} -f confmakefile >/dev/null 2>&1; then
lilac_cv_make_include="include"
lilac_cv_make_quote=''
else
lilac_cv_make_include=".include"
lilac_cv_make_quote='"'
fi
rm confmakefile confmakeinc])
AC_MSG_RESULT([$lilac_cv_make_include
${lilac_cv_make_quote}file${lilac_cv_make_quote}])
MAKEINCLUDE=$lilac_cv_make_include
MAKEQUOTE=$lilac_cv_make_quote
AC_SUBST(MAKEINCLUDE)
AC_SUBST(MAKEQUOTE)])
dnl make.m4 ends here