* m4/lead-dot.m4: New file.
* m4/Makefile.am (dist_m4data_DATA): Add lead-dot.m4
* m4/init.m4 (AM_INIT_AUTOMAKE): Require AM_SET_LEADING_DOT.:
* m4/depend.m4 (AM_SET_DEPDIR): Require AM_SET_LEADING_DOT. Define
DEPDIR using am__leading_dot.
* automake.in (require_build_directory): Define am__dirstamp, a new
variable for the dirstamp basename, based on am__leading_dot.
* tests/subobj6.test: Move all `test -f' into Makefiles, so we can
use $(am__dirstamp).
Reported by Richard Dawe.
2003-01-13 Alexandre Duret-Lutz <adl@gnu.org>
+ Use `_dirstamp' when the file-system doesn't support `.dirstamp'.
+ * m4/lead-dot.m4: New file.
+ * m4/Makefile.am (dist_m4data_DATA): Add lead-dot.m4
+ * m4/init.m4 (AM_INIT_AUTOMAKE): Require AM_SET_LEADING_DOT.:
+ * m4/depend.m4 (AM_SET_DEPDIR): Require AM_SET_LEADING_DOT. Define
+ DEPDIR using am__leading_dot.
+ * automake.in (require_build_directory): Define am__dirstamp, a new
+ variable for the dirstamp basename, based on am__leading_dot.
+ * tests/subobj6.test: Move all `test -f' into Makefiles, so we can
+ use $(am__dirstamp).
+ Reported by Richard Dawe.
+
* tests/gnits2.test, tests/pr300-prog.test, tests/transform.test:
Move all `test -f' into Makefiles, so we can honor $(EXEEXT) when
testing for programs.
# This keeps track of the directories for which we've already
-# created `.dirstamp' code.
+# created dirstamp code.
my %directory_map;
# All .P files.
# dependent upon.
sub require_build_directory ($)
{
- my $directory = shift;
- my $dirstamp = "$directory/.dirstamp";
+ my $directory = shift;
+ my $dirstamp = "$directory/\$(am__dirstamp)";
- # Don't emit the rule twice.
- if (! defined $directory_map{$directory})
+ # Don't emit the rule twice.
+ if (! defined $directory_map{$directory})
{
- $directory_map{$directory} = 1;
+ $directory_map{$directory} = 1;
- # Directory must be removed by `make distclean'.
- $clean_files{$dirstamp} = DIST_CLEAN;
+ # Set a variable for the dirstamp basename.
+ define_pretty_variable ('am__dirstamp', TRUE, INTERNAL,
+ '$(am__leading_dot)dirstamp')
+ unless variable_defined ('am__dirstamp');
- $output_rules .= ("$dirstamp:\n"
- . "\t\@\$(mkinstalldirs) $directory\n"
- . "\t\@: > $dirstamp\n");
+ # Directory must be removed by `make distclean'.
+ $clean_files{$dirstamp} = DIST_CLEAN;
+
+ $output_rules .= ("$dirstamp:\n"
+ . "\t\@\$(mkinstalldirs) $directory\n"
+ . "\t\@: > $dirstamp\n");
}
- return $dirstamp;
+ return $dirstamp;
}
# &require_build_directory_maybe ($FILE)
## Makefile for Automake m4.
-## Copyright 1996, 1997, 1998, 1999, 2001, 2002 Free Software Foundation, Inc.
+## Copyright 1996, 1997, 1998, 1999, 2001, 2002, 2003
+## Free Software Foundation, Inc.
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
header.m4 \
init.m4 \
install-sh.m4 \
+lead-dot.m4 \
lex.m4 \
lispdir.m4 \
maintainer.m4 \
header.m4 \
init.m4 \
install-sh.m4 \
+lead-dot.m4 \
lex.m4 \
lispdir.m4 \
maintainer.m4 \
-# serial 4 -*- Autoconf -*-
+# serial 5 -*- Autoconf -*-
-# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# Choose a directory name for dependency files.
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
AC_DEFUN([AM_SET_DEPDIR],
-[rm -f .deps 2>/dev/null
-mkdir .deps 2>/dev/null
-if test -d .deps; then
- DEPDIR=.deps
-else
- # MS-DOS does not allow filenames that begin with a dot.
- DEPDIR=_deps
-fi
-rmdir .deps 2>/dev/null
-AC_SUBST([DEPDIR])
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
])
# This macro actually does too much some checks are only needed if
# your package does certain things. But this isn't really a big deal.
-# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
-# serial 8
+# serial 9
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
# written in clear, in which case automake, when reading aclocal.m4,
# some platforms.
AC_REQUIRE([AC_PROG_AWK])dnl
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
_AM_IF_OPTION([no-dependencies],,
[AC_PROVIDE_IFELSE([AC_PROG_CC],
--- /dev/null
+# -*- Autoconf -*-
+# Copyright (C) 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 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.
+
+# serial 1
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
#! /bin/sh
-# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
required=gcc
. ./defs || exit 1
-cat > configure.in << 'END'
-AC_INIT(f)
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+cat >> configure.in << 'END'
AM_PROG_CC_C_O
AC_PROG_CC
-AC_OUTPUT(Makefile)
+AC_OUTPUT
END
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = subdir-objects
bin_PROGRAMS = wish
wish_SOURCES = generic/a.c
+
+test-all: all
+ test -f generic/$(am__dirstamp)
+test-mostlyclean: mostlyclean
+ test ! -f generic/a.o
+test-distclean: distclean
+ test ! -f generic/$(am__dirstamp)
END
# The ac-init file.
cd build
../configure
-$MAKE
-
-$MAKE mostlyclean
-test -f generic/a.o && exit 1
-
-$MAKE distclean
-test -f generic/.dirstamp && exit 1
+$MAKE test-all
+$MAKE test-mostlyclean
+$MAKE test-distclean
cd ..