[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: automake 1.7.2 & DJGPP: .dirstamp not a valid DOS filename
From: |
Alexandre Duret-Lutz |
Subject: |
Re: automake 1.7.2 & DJGPP: .dirstamp not a valid DOS filename |
Date: |
Mon, 13 Jan 2003 15:03:54 +0100 |
User-agent: |
Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-pc-linux-gnu) |
>>> "Richard" == Richard Dawe <address@hidden> writes:
Richard> Hello.
Richard> automake uses .dirstamp as a directory
Richard> stamp. Unfortunately .dirstamp is not a valid DOS
Richard> filename. DOS filenames cannot start with a dot (a
Richard> period).
Thanks. I'm installing the following patch on HEAD and
branch-1-7. This uses _dirstamp only if we can't use .dirstamp
(factoring the code we use to chose between .deps and _deps).
2003-01-13 Alexandre Duret-Lutz <address@hidden>
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.
Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1365.2.28
diff -u -r1.1365.2.28 automake.in
--- automake.in 10 Jan 2003 17:19:38 -0000 1.1365.2.28
+++ automake.in 13 Jan 2003 13:45:32 -0000
@@ -594,7 +594,7 @@
# This keeps track of the directories for which we've already
-# created `.dirstamp' code.
+# created dirstamp code.
my %directory_map;
# All .P files.
@@ -9026,23 +9026,28 @@
# 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',
+ '$(am__leading_dot)dirstamp')
+ unless variable_defined ('am__dirstamp');
- $output_rules .= ("$dirstamp:\n"
- . "address@hidden(mkinstalldirs) $directory\n"
- . "\t\@: > $dirstamp\n");
+ # Directory must be removed by `make distclean'.
+ $clean_files{$dirstamp} = DIST_CLEAN;
+
+ $output_rules .= ("$dirstamp:\n"
+ . "address@hidden(mkinstalldirs) $directory\n"
+ . "\t\@: > $dirstamp\n");
}
- return $dirstamp;
+ return $dirstamp;
}
# &require_build_directory_maybe ($FILE)
Index: m4/Makefile.am
===================================================================
RCS file: /cvs/automake/automake/m4/Makefile.am,v
retrieving revision 1.44
diff -u -r1.44 Makefile.am
--- m4/Makefile.am 31 Jul 2002 19:58:25 -0000 1.44
+++ m4/Makefile.am 13 Jan 2003 13:45:33 -0000
@@ -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 @@
header.m4 \
init.m4 \
install-sh.m4 \
+lead-dot.m4 \
lex.m4 \
lispdir.m4 \
maintainer.m4 \
Index: m4/depend.m4
===================================================================
RCS file: /cvs/automake/automake/m4/depend.m4,v
retrieving revision 1.26.2.1
diff -u -r1.26.2.1 depend.m4
--- m4/depend.m4 10 Oct 2002 00:45:04 -0000 1.26.2.1
+++ m4/depend.m4 13 Jan 2003 13:45:35 -0000
@@ -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 @@
# 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: m4/init.m4
===================================================================
RCS file: /cvs/automake/automake/m4/init.m4,v
retrieving revision 1.50.2.1
diff -u -r1.50.2.1 init.m4
--- m4/init.m4 12 Dec 2002 13:41:47 -0000 1.50.2.1
+++ m4/init.m4 13 Jan 2003 13:45:35 -0000
@@ -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 @@
# 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],
Index: m4/lead-dot.m4
===================================================================
RCS file: m4/lead-dot.m4
diff -N m4/lead-dot.m4
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ m4/lead-dot.m4 13 Jan 2003 13:45:35 -0000
@@ -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: tests/subobj6.test
===================================================================
RCS file: /cvs/automake/automake/tests/subobj6.test,v
retrieving revision 1.6
diff -u -r1.6 subobj6.test
--- tests/subobj6.test 8 Sep 2002 13:07:56 -0000 1.6
+++ tests/subobj6.test 13 Jan 2003 13:45:35 -0000
@@ -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.
#
@@ -24,18 +24,23 @@
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 @@
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 ..
--
Alexandre Duret-Lutz