]> sourceware.org Git - automake.git/commitdiff
Use `_dirstamp' when the file-system doesn't support `.dirstamp'.
authorAlexandre Duret-Lutz <adl@gnu.org>
Mon, 13 Jan 2003 14:04:38 +0000 (14:04 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Mon, 13 Jan 2003 14:04:38 +0000 (14:04 +0000)
* 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.

ChangeLog
automake.in
m4/Makefile.am
m4/Makefile.in
m4/depend.m4
m4/init.m4
m4/lead-dot.m4 [new file with mode: 0644]
tests/subobj6.test

index 3b3a1b6202ed1b0757ca692c67ab737664a8f575..937b5652690e411bc32be554dd90a0b02c0dda48 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
 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.
index 65294e3c4b60f327b8cb438757f06373000e007a..64f088b51553e1306168a7b1f7d32fed98d295cb 100755 (executable)
@@ -605,7 +605,7 @@ my %object_compilation_map;
 
 
 # This keeps track of the directories for which we've already
-# created `.dirstamp' code.
+# created dirstamp code.
 my %directory_map;
 
 # All .P files.
@@ -8750,23 +8750,28 @@ sub require_conf_file_with_macro ($$$@)
 # 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)
index 79e2795afbbd7e4a741a62d9dec82c0d2de2b742..b1b7a80ee42dd949e789ba1647b18fc56b2b00b7 100644 (file)
@@ -2,7 +2,8 @@
 
 ## 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
@@ -33,6 +34,7 @@ gcj.m4 \
 header.m4 \
 init.m4 \
 install-sh.m4 \
+lead-dot.m4 \
 lex.m4 \
 lispdir.m4 \
 maintainer.m4 \
index 82b829033e12a76a0821f88f02f50c21a60ffb62..772f1998704f12b207101e5ff6d8ba5d86898d80 100644 (file)
@@ -107,6 +107,7 @@ gcj.m4 \
 header.m4 \
 init.m4 \
 install-sh.m4 \
+lead-dot.m4 \
 lex.m4 \
 lispdir.m4 \
 maintainer.m4 \
index 23a48d8e6ff7066cc4cf0dc00750631e277a8fb6..4d6ff228e18b4efb0527f8329fddb547732adf69 100644 (file)
@@ -1,6 +1,6 @@
-# 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
@@ -118,16 +118,8 @@ AM_CONDITIONAL([am__fastdep$1], [
 # 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
 ])
 
 
index d58a6f472f92028fa1a01ffc50e89dc40533a28c..47c94729ef16c5906288eec6259fa157fd82d231 100644 (file)
@@ -3,7 +3,7 @@
 # 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
@@ -21,7 +21,7 @@
 # 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,
@@ -95,6 +95,7 @@ AM_PROG_INSTALL_STRIP
 # 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],
diff --git a/m4/lead-dot.m4 b/m4/lead-dot.m4
new file mode 100644 (file)
index 0000000..c8789fb
--- /dev/null
@@ -0,0 +1,32 @@
+#                                                          -*- 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])])
index 6a4f4c9c6a7eca70081e6f4271d3001b5d300b61..f74b6362371f07f60136d3a6967a66b8b35ff156 100755 (executable)
@@ -1,5 +1,5 @@
 #! /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.
@@ -61,13 +66,9 @@ mkdir build
 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 ..
 
This page took 0.054918 seconds and 5 git commands to generate.