automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RFC: deprecating mkinstalldirs


From: Alexandre Duret-Lutz
Subject: Re: RFC: deprecating mkinstalldirs
Date: Mon, 10 Nov 2003 21:55:03 +0100
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux)

>>> "Bruno" == Bruno Haible <address@hidden> writes:

[...]

 Bruno> About (1), I'm not sure it's needed, because you already make the
 Bruno> distinction between
 Bruno> MKINSTALLDIRS - the pathname to the 'mkinstalldirs' script
 Bruno> mkinstalldirs - the command
 Bruno> and this distinction gives other maintainers enough freedom.

I've seen that Gettext does make that distinction, but Automake
doesn't.  It only defines mkinstalldirs (it's not an AC_SUBST,
BTW, just a simple variable computed at automake-time).

 Bruno> Anyway, all fine.

Ok.

 >> As far as Gettext is concerned ...

 Bruno> Future versions of gettext will incorporate the mkdirp.m4 macro file
 Bruno> (because gettext's macros assume autoconf, not automake). 

mkdirp.m4 in turn needs auxdir.m4.  I've changed the call to
AM_PROG_MKDIR_P into an AC_REQUIRE so that it's OK if both
AM_INIT_AUTOMAKE and AM_GNU_GETTEXT require it.

However if gettextize/autopoint install these two files in an
Automake package this might cause interference with any future
version of Automake that upgrade these macros (aclocal should
always prefer the local macros over the system-wide macros).
This is why I initially suggested you write your own.  But
perhaps is simpler if gettextize/autopoint install
mkdirp.m4/auxdir.m4 in non-Automake packages and do not install
them in Automake packages.

Anyway as I don't expect any important change in any of these
macros, this seems to be a minor point.


Here is the updated version of the patch that I'm installing.

        * automake.in (handle_configure): Distribute and define mkinstalldirs
        only if it is already present in the package.
        (scan_autoconf_files): Do not require mkinstalldirs.
        (require_build_directory): Use $(mkdir_p), not $(mkinstalldirs).
        * lib/am/data.am, lib/am/distdir.am, lib/am/install.am,
        lib/am/java.am, lib/am/libs.am, lib/am/lisp.am, lib/am/mans.am,
        lib/am/progs.am, lib/am/python.am, lib/am/scripts.am,
        lib/am/texinfos.am: Use $(mkdir_p) instead of $(mkinstalldirs).
        * m4/mkdirp.m4: New file.
        * m4/Makefile.am (dist_m4data_DATA): Add mkdirp.m4.
        * m4/init.m4 (AM_INIT_AUTOMAKE): Call AM_PROG_MKDIR_P.
        * tests/Makefile.am (TESTS): Remove insh.test.
        * tests/insh.test: Delete.
        * tests/defs.in, tests/instsh.test: Do not install mkinstalldirs.
        * tests/auxdir.test: Install mkinstalldirs.
        * tests/distdir.test, tests/instman.test, tests/pr2.test: Use
        $(mkdir_p), not $(mkinstalldirs).
        * tests/empty.test: Run configure, do not substitute things by hand.
        * doc/automake.texi (Optional) <AC_CONFIG_FILES>: Take install-sh
        as an example, not mkinstalldirs.
        (Auxiliary Programs) <mkinstalldirs>: Update.

Index: NEWS
===================================================================
RCS file: /cvs/automake/automake/NEWS,v
retrieving revision 1.240
diff -u -r1.240 NEWS
--- NEWS        9 Nov 2003 22:28:47 -0000       1.240
+++ NEWS        10 Nov 2003 20:14:28 -0000
@@ -110,7 +110,24 @@
     files even if emacs is not installed, while *_LISP do not
     install anything unless emacs is found.
 
+  - Makefiles will prefer `mkdir -p' over mkinstalldirs if it is
+    available.  This selection is achieved through the Makefile
+    variable $(mkdir_p) that is set by AM_INIT_AUTOMAKE to either
+    `mkdir -m 0755 -p --', `$(mkinstalldirs) -m 0755', or
+    `$(install_sh) -m 0755 -d'.
+
 * Obsolete features
+
+  - Because `mkdir -p' is available on most platforms, and we can use
+    `install-sh -d' when it is not, the use of the mkinstalldirs
+    script is deprecated.  `automake --add-missing' no longer installs
+    it, and if you remove mkinstalldirs from your package, automake
+    will define $(mkinstalldirs) as an alias for $(mkdir_p).
+
+    Gettext 1.12.1 still require mkinstalldirs.  Fortunately
+    gettextize and autopoint will install it when needed.  Automake
+    will continue to define the $(mkinstalldirs) and distribute
+    mkinstalldirs when this script is in the source tree.
 
   - AM_PROG_CC_STDC is now empty.  The content of this macro was
     merged in AC_PROG_CC.  If your code uses $am_cv_prog_cc_stdc, you
Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1512
diff -u -r1.1512 automake.in
--- automake.in 9 Nov 2003 11:55:36 -0000       1.1512
+++ automake.in 10 Nov 2003 20:14:32 -0000
@@ -3616,10 +3616,22 @@
                                  FILES => "@distclean_config")
     if @distclean_config;
 
-  # Set location of mkinstalldirs.
-  define_variable ('mkinstalldirs',
-                  '$(SHELL) ' . $config_aux_dir . '/mkinstalldirs',
-                  INTERNAL);
+  # Distribute and define mkinstalldirs only if it is already present
+  # in the package, for backward compatibility (some people my still
+  # use $(mkinstalldirs)).
+  my $mkidpath = $config_aux_path[0] . '/mkinstalldirs';
+  if (-f $mkidpath)
+    {
+      # Use require_file so that any existingscript gets updated
+      # by --force-missing.
+      require_conf_file ($mkidpath, FOREIGN, 'mkinstalldirs');
+      define_variable ('mkinstalldirs',
+                      "\$(SHELL) $config_aux_dir/mkinstalldirs", INTERNAL);
+    }
+  else
+    {
+      define_variable ('mkinstalldirs', '$(mkdir_p)', INTERNAL);
+    }
 
   reject_var ('CONFIG_HEADER',
              "`CONFIG_HEADER' is an anachronism; now determined "
@@ -4613,8 +4625,7 @@
   # FIXME: Is this broken because it needs dynamic scopes.
   # My tests seems to show it's not the case.
   $relative_dir = '.';
-  require_conf_file ($configure_ac, FOREIGN,
-                    'install-sh', 'mkinstalldirs', 'missing');
+  require_conf_file ($configure_ac, FOREIGN, 'install-sh', 'missing');
   err_am "`install.sh' is an anachronism; use `install-sh' instead"
     if -f $config_aux_path[0] . '/install.sh';
 
@@ -6608,7 +6619,7 @@
       $clean_files{$dirstamp} = DIST_CLEAN;
 
       $output_rules .= ("$dirstamp:\n"
-                       . "address@hidden(mkinstalldirs) $directory\n"
+                       . "address@hidden(mkdir_p) $directory\n"
                        . "\t\@: > $dirstamp\n");
     }
 
Index: doc/automake.texi
===================================================================
RCS file: /cvs/automake/automake/doc/automake.texi,v
retrieving revision 1.7
diff -u -r1.7 automake.texi
--- doc/automake.texi   9 Nov 2003 19:05:24 -0000       1.7
+++ doc/automake.texi   10 Nov 2003 20:14:40 -0000
@@ -567,7 +567,14 @@
 build can continue.
 
 @item mkinstalldirs
-This works around the fact that @code{mkdir -p} is not portable.
+This script used to be a wrapper around @code{mkdir -p}, which is not
+portable.  Now we use prefer to use @code{install-sh -d} when configure
+finds that @code{mkdir -p} does not work, this makes one less script to
+distribute.
+
+For backward compatibility @code{mkinstalldirs} is still used and
+distributed when @code{automake} finds it in a package.  But it is no
+longer installed automatically, and it should be safe to remove it.
 
 @item py-compile
 This is used to byte-compile Python scripts.
@@ -1159,8 +1166,8 @@
 
 @item AC_CONFIG_AUX_DIR
 Automake will look for various helper scripts, such as
address@hidden, in the directory named in this macro invocation.
address@hidden This list is accurate relative to version 1.7.2
address@hidden, in the directory named in this macro invocation.
address@hidden This list is accurate relative to version 1.8
 (The full list of scripts is: @file{config.guess}, @file{config.sub},
 @file{depcomp}, @file{elisp-comp}, @file{compile}, @file{install-sh},
 @file{ltmain.sh}, @file{mdate-sh}, @file{missing}, @file{mkinstalldirs},
Index: lib/am/data.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/data.am,v
retrieving revision 1.40
diff -u -r1.40 data.am
--- lib/am/data.am      2 Jun 2003 07:08:40 -0000       1.40
+++ lib/am/data.am      10 Nov 2003 20:14:41 -0000
@@ -29,7 +29,7 @@
 ?!EXEC?.PHONY install-data-am: install-%DIR%%PRIMARY%
 install-%DIR%%PRIMARY%: $(%DIR%_%PRIMARY%)
        @$(NORMAL_INSTALL)
-       $(mkinstalldirs) $(DESTDIR)$(%NDIR%dir)
+       $(mkdir_p) $(DESTDIR)$(%NDIR%dir)
 ## Funny invocation because Makefile variable can be empty, leading to
 ## a syntax error in sh.
        @list='$(%DIR%_%PRIMARY%)'; for p in $$list; do \
Index: lib/am/distdir.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/distdir.am,v
retrieving revision 1.51
diff -u -r1.51 distdir.am
--- lib/am/distdir.am   25 Oct 2003 21:49:51 -0000      1.51
+++ lib/am/distdir.am   10 Nov 2003 20:14:41 -0000
@@ -54,7 +54,7 @@
 endif %?TOPDIR_P%
 ##
 ##
-?DISTDIRS?     $(mkinstalldirs) %DISTDIRS%
+?DISTDIRS?     $(mkdir_p) %DISTDIRS%
 ##
 ##
        @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
@@ -106,7 +106,7 @@
          dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
          if test "$$dir" != "$$file" && test "$$dir" != "."; then \
            dir="/$$dir"; \
-           $(mkinstalldirs) "$(distdir)$$dir"; \
+           $(mkdir_p) "$(distdir)$$dir"; \
          else \
            dir=''; \
          fi; \
@@ -344,7 +344,7 @@
          && ({ \
 ## Build the directory, so we can cd into it even if `make install'
 ## didn't create it.
-              (cd ../.. && $(mkinstalldirs) "$$dc_destdir") \
+              (cd ../.. && $(mkdir_p) "$$dc_destdir") \
               && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
               && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
               && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
Index: lib/am/install.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/install.am,v
retrieving revision 1.15
diff -u -r1.15 install.am
--- lib/am/install.am   21 Oct 2003 15:43:11 -0000      1.15
+++ lib/am/install.am   10 Nov 2003 20:14:41 -0000
@@ -26,11 +26,11 @@
 RECURSIVE_TARGETS += installdirs-recursive
 installdirs: installdirs-recursive
 installdirs-am:%installdirs-local%
-?am__installdirs?      $(mkinstalldirs) %am__installdirs%
+?am__installdirs?      $(mkdir_p) %am__installdirs%
 else !%?SUBDIRS%
 .PHONY: installdirs
 installdirs:%installdirs-local%
-?am__installdirs?      $(mkinstalldirs) %am__installdirs%
+?am__installdirs?      $(mkdir_p) %am__installdirs%
 endif !%?SUBDIRS%
 
 
Index: lib/am/java.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/java.am,v
retrieving revision 1.19
diff -u -r1.19 java.am
--- lib/am/java.am      8 Nov 2003 16:07:45 -0000       1.19
+++ lib/am/java.am      10 Nov 2003 20:14:41 -0000
@@ -44,7 +44,7 @@
 ?!EXEC?.PHONY install-data-am: install-%DIR%JAVA
 install-%DIR%JAVA: class%DIR%.stamp
        @$(NORMAL_INSTALL)
-       $(mkinstalldirs) $(DESTDIR)$(%NDIR%dir)
+       $(mkdir_p) $(DESTDIR)$(%NDIR%dir)
 ## A single .java file can be compiled into multiple .class files.  So
 ## we just install all the .class files that got built into this
 ## directory.  This is not optimal, but will have to do for now.
Index: lib/am/libs.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/libs.am,v
retrieving revision 1.24
diff -u -r1.24 libs.am
--- lib/am/libs.am      6 Apr 2003 18:31:12 -0000       1.24
+++ lib/am/libs.am      10 Nov 2003 20:14:41 -0000
@@ -41,7 +41,7 @@
 ?!EXEC?.PHONY install-data-am: install-%DIR%LIBRARIES
 install-%DIR%LIBRARIES: $(%DIR%_LIBRARIES)
        @$(NORMAL_INSTALL)
-       $(mkinstalldirs) $(DESTDIR)$(%NDIR%dir)
+       $(mkdir_p) $(DESTDIR)$(%NDIR%dir)
 ## Funny invocation because Makefile variable can be empty, leading to
 ## a syntax error in sh.
        @list='$(%DIR%_LIBRARIES)'; for p in $$list; do \
Index: lib/am/lisp.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/lisp.am,v
retrieving revision 1.37
diff -u -r1.37 lisp.am
--- lib/am/lisp.am      21 Oct 2003 16:29:03 -0000      1.37
+++ lib/am/lisp.am      10 Nov 2003 20:14:41 -0000
@@ -60,7 +60,7 @@
        @$(NORMAL_INSTALL)
 ## Do not install anything if EMACS was not found.
        @if test "$(EMACS)" != no; then \
-         $(mkinstalldirs) $(DESTDIR)$(%NDIR%dir); \
+         $(mkdir_p) $(DESTDIR)$(%NDIR%dir); \
 ## Funny invocation because Makefile variable can be empty, leading to
 ## a syntax error in sh.
          list='$(%DIR%_LISP)'; for p in $$list; do \
Index: lib/am/ltlib.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/ltlib.am,v
retrieving revision 1.27
diff -u -r1.27 ltlib.am
--- lib/am/ltlib.am     2 Jun 2003 07:08:40 -0000       1.27
+++ lib/am/ltlib.am     10 Nov 2003 20:14:41 -0000
@@ -29,7 +29,7 @@
 ?!EXEC?.PHONY install-data-am: install-%DIR%LTLIBRARIES
 install-%DIR%LTLIBRARIES: $(%DIR%_LTLIBRARIES)
        @$(NORMAL_INSTALL)
-       $(mkinstalldirs) $(DESTDIR)$(%NDIR%dir)
+       $(mkdir_p) $(DESTDIR)$(%NDIR%dir)
 ## Funny invocation because Makefile variable can be empty, leading to
 ## a syntax error in sh.
        @list='$(%DIR%_LTLIBRARIES)'; for p in $$list; do \
Index: lib/am/mans.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/mans.am,v
retrieving revision 1.27
diff -u -r1.27 mans.am
--- lib/am/mans.am      2 Jun 2003 07:08:40 -0000       1.27
+++ lib/am/mans.am      10 Nov 2003 20:14:41 -0000
@@ -31,7 +31,7 @@
 .PHONY install-man: install-man%SECTION%
 install-man%SECTION%: $(man%SECTION%_MANS) $(man_MANS)
        @$(NORMAL_INSTALL)
-       $(mkinstalldirs) $(DESTDIR)$(man%SECTION%dir)
+       $(mkdir_p) $(DESTDIR)$(man%SECTION%dir)
        @list='$(man%SECTION%_MANS) $(dist_man%SECTION%_MANS) 
$(nodist_man%SECTION%_MANS)'; \
 ## Extract all items from man_MANS that should go in this section.
 ## This must be done dynamically to support conditionals.
Index: lib/am/progs.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/progs.am,v
retrieving revision 1.42
diff -u -r1.42 progs.am
--- lib/am/progs.am     2 Jun 2003 07:08:40 -0000       1.42
+++ lib/am/progs.am     10 Nov 2003 20:14:41 -0000
@@ -30,7 +30,7 @@
 ?!EXEC?.PHONY install-data-am: install-%DIR%PROGRAMS
 install-%DIR%PROGRAMS: $(%DIR%_PROGRAMS)
        @$(NORMAL_INSTALL)
-       $(mkinstalldirs) $(DESTDIR)$(%NDIR%dir)
+       $(mkdir_p) $(DESTDIR)$(%NDIR%dir)
 ## Funny invocation because Makefile variable can be empty, leading to
 ## a syntax error in sh.
        @list='$(%DIR%_PROGRAMS)'; for p in $$list; do \
Index: lib/am/python.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/python.am,v
retrieving revision 1.17
diff -u -r1.17 python.am
--- lib/am/python.am    2 Jun 2003 07:08:40 -0000       1.17
+++ lib/am/python.am    10 Nov 2003 20:14:41 -0000
@@ -29,7 +29,7 @@
 ?!EXEC?.PHONY install-data-am: install-%DIR%PYTHON
 install-%DIR%PYTHON: $(%DIR%_PYTHON)
        @$(NORMAL_INSTALL)
-       $(mkinstalldirs) $(DESTDIR)$(%NDIR%dir)
+       $(mkdir_p) $(DESTDIR)$(%NDIR%dir)
        @list='$(%DIR%_PYTHON)'; dlist=''; for p in $$list; do\
 ## A file can be in the source directory or the build directory.
          if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
Index: lib/am/scripts.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/scripts.am,v
retrieving revision 1.50
diff -u -r1.50 scripts.am
--- lib/am/scripts.am   2 Jun 2003 07:08:40 -0000       1.50
+++ lib/am/scripts.am   10 Nov 2003 20:14:41 -0000
@@ -31,7 +31,7 @@
 ?!EXEC?.PHONY install-data-am: install-%DIR%SCRIPTS
 install-%DIR%SCRIPTS: $(%DIR%_SCRIPTS)
        @$(NORMAL_INSTALL)
-       $(mkinstalldirs) $(DESTDIR)$(%NDIR%dir)
+       $(mkdir_p) $(DESTDIR)$(%NDIR%dir)
 ## Funny invocation because Makefile variable can be empty, leading to
 ## a syntax error in sh.
        @list='$(%DIR%_SCRIPTS)'; for p in $$list; do \
Index: lib/am/texinfos.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/texinfos.am,v
retrieving revision 1.107
diff -u -r1.107 texinfos.am
--- lib/am/texinfos.am  8 Nov 2003 13:01:13 -0000       1.107
+++ lib/am/texinfos.am  10 Nov 2003 20:14:41 -0000
@@ -121,7 +121,7 @@
 if %?LOCAL-TEXIS%
 install-info-am: $(INFO_DEPS)
        @$(NORMAL_INSTALL)
-       $(mkinstalldirs) $(DESTDIR)$(infodir)
+       $(mkdir_p) $(DESTDIR)$(infodir)
        @list='$(INFO_DEPS)'; \
        for file in $$list; do \
          if test -f $$file; then d=.; else d=$(srcdir); fi; \
Index: m4/Makefile.am
===================================================================
RCS file: /cvs/automake/automake/m4/Makefile.am,v
retrieving revision 1.49
diff -u -r1.49 Makefile.am
--- m4/Makefile.am      27 Jun 2003 06:51:52 -0000      1.49
+++ m4/Makefile.am      10 Nov 2003 20:14:41 -0000
@@ -42,6 +42,7 @@
 make.m4 \
 minuso.m4 \
 missing.m4 \
+mkdirp.m4 \
 multi.m4 \
 obsol-gt.m4 \
 obsol-lt.m4 \
Index: m4/init.m4
===================================================================
RCS file: /cvs/automake/automake/m4/init.m4,v
retrieving revision 1.57
diff -u -r1.57 init.m4
--- m4/init.m4  5 Nov 2003 21:31:34 -0000       1.57
+++ m4/init.m4  10 Nov 2003 20:14:42 -0000
@@ -82,6 +82,7 @@
 AM_MISSING_PROG(AMTAR, tar)
 AM_PROG_INSTALL_SH
 AM_PROG_INSTALL_STRIP
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
 # We need awk for the "check" target.  The system "awk" is bad on
 # some platforms.
 AC_REQUIRE([AC_PROG_AWK])dnl
Index: m4/mkdirp.m4
===================================================================
RCS file: m4/mkdirp.m4
diff -N m4/mkdirp.m4
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ m4/mkdirp.m4        10 Nov 2003 20:14:42 -0000
@@ -0,0 +1,42 @@
+# AM_PROG_MKDIR_P
+# ---------------
+# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
+
+# 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.
+
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if mkdir -m 0755 -p -- . 2>/dev/null; then
+  mkdir_p='mkdir -m 0755 -p --'
+else
+  # On NextStep and OpenStep, the `mkdir' command does not
+  # recognize any option.  It will interpret all options as
+  # directories to create, and then abort because `.' already
+  # exists.
+  for d in ./-m ./0755 ./-p ./--;
+  do
+    test -d $d && rmdir $d
+  done
+  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+  if test -f "$am_aux_dir/mkinstalldirs"; then
+    mkdir_p='$(mkinstalldirs) -m 0755'
+  else
+    mkdir_p='$(install_sh) -m 0755 -d'
+  fi
+fi
+AC_SUBST([mkdir_p])])
Index: tests/Makefile.am
===================================================================
RCS file: /cvs/automake/automake/tests/Makefile.am,v
retrieving revision 1.524
diff -u -r1.524 Makefile.am
--- tests/Makefile.am   9 Nov 2003 11:55:36 -0000       1.524
+++ tests/Makefile.am   10 Nov 2003 20:14:42 -0000
@@ -230,7 +230,6 @@
 include.test \
 include2.test \
 info.test \
-insh.test \
 insh2.test \
 install2.test \
 installdir.test \
Index: tests/auxdir.test
===================================================================
RCS file: /cvs/automake/automake/tests/auxdir.test,v
retrieving revision 1.5
diff -u -r1.5 auxdir.test
--- tests/auxdir.test   8 Sep 2002 13:07:55 -0000       1.5
+++ tests/auxdir.test   10 Nov 2003 20:14:42 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -30,6 +30,8 @@
 cat > Makefile.am << 'END'
 pkgdata_DATA =
 END
+
+cp $testsrcdir/../lib/mkinstalldirs .
 
 # The "././" prefix confuses Automake into thinking it is doing a
 # subdir build.  Yes, this is hacky.
Index: tests/defs.in
===================================================================
RCS file: /cvs/automake/automake/tests/defs.in,v
retrieving revision 1.24
diff -u -r1.24 defs.in
--- tests/defs.in       10 Nov 2003 20:09:40 -0000      1.24
+++ tests/defs.in       10 Nov 2003 20:14:42 -0000
@@ -224,7 +224,7 @@
 mkdir testSubDir
 
 # Copy in some files we need.
-for file in install-sh mkinstalldirs missing depcomp; do
+for file in install-sh missing depcomp; do
    cp $srcdir/../lib/$file testSubDir/$file || exit 1
 done
 
Index: tests/distdir.test
===================================================================
RCS file: /cvs/automake/automake/tests/distdir.test,v
retrieving revision 1.5
diff -u -r1.5 distdir.test
--- tests/distdir.test  8 Sep 2002 13:07:55 -0000       1.5
+++ tests/distdir.test  10 Nov 2003 20:14:42 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -23,16 +23,18 @@
 
 . ./defs || exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 EXTRA_DIST = foo/bar ./joe
 END
 
-$ACLOCAL || exit 1
-$AUTOMAKE || exit 1
+$ACLOCAL
+$AUTOMAKE
 
-grep '\$(mkinstalldirs).*\.' Makefile.in && exit 1
-grep '\$(mkinstalldirs).*foo' Makefile.in || exit 1
+grep '\$(mkdir_p).*\.' Makefile.in && exit 1
+grep '\$(mkdir_p).*foo' Makefile.in
 
 # Check to make sure `foo' isn't made in build directory.
-grep 'mkinstalldirs.*foo.*foo' Makefile.in && exit 1
+grep 'mkdir_p.*foo.*foo' Makefile.in && exit 1
 exit 0
Index: tests/empty.test
===================================================================
RCS file: /cvs/automake/automake/tests/empty.test,v
retrieving revision 1.7
diff -u -r1.7 empty.test
--- tests/empty.test    8 Sep 2002 13:07:55 -0000       1.7
+++ tests/empty.test    10 Nov 2003 20:14:42 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002
+# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003
 # Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
@@ -24,28 +24,13 @@
 
 . ./defs || exit 1
 
-cat > Makefile.am << 'END'
-data_DATA =
-END
+set -e
 
-$ACLOCAL || exit 1
-$AUTOMAKE || exit 1
-
-# Create configure so Makefile doesn't look out-of-date.
-echo frob > configure
-echo frob > config.status
-
-# Need a mkinstalldirs we can actually execute.  make on my Linux box
-# won't execute this file if is empty, or has just a colon in it (but
-# it will run from the shell).
-cat > mkinstalldirs << 'END'
-#!/bin/sh
-END
-chmod +x mkinstalldirs
-
-# Substitute variables we need.
-sed -e 's,@SHELL@,/bin/sh,g' -e 's/@srcdir@/./g' \
-   -e 's/@top_srcdir@/./g' -e 's/@datadir@/./g' \
-   -e 's/@SET_MAKE@//g' < Makefile.in > Makefile
+echo AC_OUTPUT >>configure.in
+echo 'data_DATA =' >Makefile.am
 
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure --prefix `pwd`/inst
 $MAKE install
Index: tests/insh.test
===================================================================
RCS file: tests/insh.test
diff -N tests/insh.test
--- tests/insh.test     3 Jul 2003 18:58:50 -0000       1.5
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,34 +0,0 @@
-#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2003  Free Software Foundation, Inc.
-#
-# This file is part of GNU Automake.
-#
-# GNU Automake 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.
-#
-# GNU Automake 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 autoconf; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
-# Test for bug where missing mkinstalldirs give bogus error about
-# missing install-sh.
-
-. ./defs || exit 1
-
-set -e
-
-rm -f mkinstalldirs
-
-: > Makefile.am
-
-$ACLOCAL
-AUTOMAKE_fails
-grep 'required.*mkinstalldirs' stderr
Index: tests/instman.test
===================================================================
RCS file: /cvs/automake/automake/tests/instman.test,v
retrieving revision 1.5
diff -u -r1.5 instman.test
--- tests/instman.test  8 Sep 2002 13:07:55 -0000       1.5
+++ tests/instman.test  10 Nov 2003 20:14:42 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 1998, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 1998, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -18,7 +18,7 @@
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
-# Test to make sure mkinstalldirs invocation correct in install-man
+# Test to make sure mkdir_p invocation correct in install-man
 # target.  Bug reported by Gordon Irlam <address@hidden>.
 
 . ./defs || exit 1
@@ -32,5 +32,5 @@
 $ACLOCAL || exit 1
 $AUTOMAKE || exit 1
 
-grep '[^(/]mkinstalldirs' Makefile.in > out || exit 1
+grep '[^(/]mkdir_p' Makefile.in > out || exit 1
 test `wc -l < out` -eq 1
Index: tests/instsh.test
===================================================================
RCS file: /cvs/automake/automake/tests/instsh.test,v
retrieving revision 1.2
diff -u -r1.2 instsh.test
--- tests/instsh.test   7 Sep 2003 12:44:44 -0000       1.2
+++ tests/instsh.test   10 Nov 2003 20:14:42 -0000
@@ -32,7 +32,7 @@
 # Since the default path includes '../..', we must run this test in
 # yet another subdir.
 mkdir frob
-mv Makefile.am configure.in mkinstalldirs frob/
+mv Makefile.am configure.in frob/
 cd frob
 
 $ACLOCAL
Index: tests/pr2.test
===================================================================
RCS file: /cvs/automake/automake/tests/pr2.test,v
retrieving revision 1.10
diff -u -r1.10 pr2.test
--- tests/pr2.test      8 Sep 2002 13:07:55 -0000       1.10
+++ tests/pr2.test      10 Nov 2003 20:14:42 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2000, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -22,6 +22,8 @@
 
 . ./defs || exit 1
 
+set -e
+
 cat > configure.in << 'END'
 AC_INIT
 AM_INIT_AUTOMAKE(nonesuch, nonesuch)
@@ -33,9 +35,9 @@
 mkdir templ
 : > templ/README.foo.in
 
-$ACLOCAL || exit 1
-$AUTOMAKE || exit 1
+$ACLOCAL
+$AUTOMAKE
 
-# Look for mkinstalldirs invocation for the templ directory.
+# Look for mkdir_p invocation for the templ directory.
 # We use the `[^/]' to avoid matching `templ/README.foo.in'.
-$EGREP 'mkinstalldirs.*templ([^/]|$)' Makefile.in
+$EGREP 'mkdir_p.*templ([^/]|$)' Makefile.in

-- 
Alexandre Duret-Lutz





reply via email to

[Prev in Thread] Current Thread [Next in Thread]