bug-automake@gnu.org.
* lib/compile, lib/depcomp, lib/elisp-comp, lib/mdate-sh:
Likewise. Also add support for --help and --version.
* lib/py-compile, lib/ylwrap: Likewise, and reindent.
+2003-11-09 Alexandre Duret-Lutz <adl@gnu.org>
+
+ * lib/mkinstalldirs: Mention automake-patches@gnu.org and
+ bug-automake@gnu.org.
+ * lib/compile, lib/depcomp, lib/elisp-comp, lib/mdate-sh:
+ Likewise. Also add support for --help and --version.
+ * lib/py-compile, lib/ylwrap: Likewise, and reindent.
+
2003-11-08 Alexandre Duret-Lutz <adl@gnu.org>
* lib/am/tags.am (ETAGSFLAGS, CTAGSFLAGS): Remove.
- New option no-dist.
- - install-sh now understands --version and --help.
+ - compile, depcomp, elisp-comp, install-sh, mdate-sh, mkinstalldirs,
+ py-compile, and ylwrap, now all understand --version and --help.
- Automake will now recognize AC_CONFIG_LINKS so far as removing created
links as part of the distclean target and including source files in
#! /bin/sh
-
# Wrapper for compilers which do not understand `-c -o'.
-# Copyright 1999, 2000 Free Software Foundation, Inc.
+scriptversion=2003-11-09.00
+
+# Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
-# Usage:
-# compile PROGRAM [ARGS]...
-# `-o FOO.o' is removed from the args passed to the actual compile.
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+case $1 in
+ '')
+ echo "$0: No command. Try \`$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: compile [--help] [--version] PROGRAM [ARGS]
+
+Wrapper for compilers which do not understand `-c -o'.
+Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
+arguments, and rename the output as expected.
+
+If you are trying to build a whole package this is not the
+right script to run: please start by reading the file `INSTALL'.
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit 0
+ ;;
+ -v | --v*)
+ echo "compile $scriptversion"
+ exit 0
+ ;;
+esac
+
prog=$1
shift
cfile=
args=
while test $# -gt 0; do
- case "$1" in
+ case "$1" in
-o)
- # configure might choose to run compile as `compile cc -o foo foo.c'.
- # So we do something ugly here.
- ofile=$2
- shift
- case "$ofile" in
+ # configure might choose to run compile as `compile cc -o foo foo.c'.
+ # So we do something ugly here.
+ ofile=$2
+ shift
+ case "$ofile" in
*.o | *.obj)
- ;;
+ ;;
*)
- args="$args -o $ofile"
- ofile=
- ;;
- esac
+ args="$args -o $ofile"
+ ofile=
+ ;;
+ esac
;;
*.c)
- cfile=$1
- args="$args $1"
- ;;
+ cfile=$1
+ args="$args $1"
+ ;;
*)
- args="$args $1"
- ;;
- esac
- shift
+ args="$args $1"
+ ;;
+ esac
+ shift
done
if test -z "$ofile" || test -z "$cfile"; then
- # If no `-o' option was seen then we might have been invoked from a
- # pattern rule where we don't need one. That is ok -- this is a
- # normal compilation that the losing compiler can handle. If no
- # `.c' file was seen then we are probably linking. That is also
- # ok.
- exec "$prog" $args
+ # If no `-o' option was seen then we might have been invoked from a
+ # pattern rule where we don't need one. That is ok -- this is a
+ # normal compilation that the losing compiler can handle. If no
+ # `.c' file was seen then we are probably linking. That is also
+ # ok.
+ exec "$prog" $args
fi
# Name of file we expect compiler to create.
# object file name, since that is what matters with a parallel build.
lockdir=`echo $cofile | sed -e 's|[/.-]|_|g'`.d
while true; do
- if mkdir $lockdir > /dev/null 2>&1; then
- break
- fi
- sleep 1
+ if mkdir $lockdir > /dev/null 2>&1; then
+ break
+ fi
+ sleep 1
done
# FIXME: race condition here if user kills between mkdir and trap.
trap "rmdir $lockdir; exit 1" 1 2 15
status=$?
if test -f "$cofile"; then
- mv "$cofile" "$ofile"
+ mv "$cofile" "$ofile"
fi
rmdir $lockdir
exit $status
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
#! /bin/sh
-
# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2003-11-08.23
+
# Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
+case $1 in
+ '')
+ echo "$0: No command. Try \`$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+ depmode Dependency tracking mode.
+ source Source file read by `PROGRAMS ARGS'.
+ object Object file output by `PROGRAMS ARGS'.
+ depfile Dependency file to output.
+ tmpdepfile Temporary file to use when outputing dependencies.
+ libtool Whether libtool is used (yes/no).
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit 0
+ ;;
+ -v | --v*)
+ echo "depcomp $scriptversion"
+ exit 0
+ ;;
+esac
+
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1
esac
exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
#!/bin/sh
# Copyright (C) 1995, 2000, 2003 Free Software Foundation, Inc.
+
+scriptversion=2003-11-08.23
+
# Franc,ois Pinard <pinard@iro.umontreal.ca>, 1995.
#
# This program is free software; you can redistribute it and/or modify
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
-# This script byte-compiles all `.el' files which are part of its
-# arguments, using GNU Emacs, and put the resulting `.elc' files into
-# the current directory, so disregarding the original directories used
-# in `.el' arguments.
-#
-# This script manages in such a way that all Emacs LISP files to
-# be compiled are made visible between themselves, in the event
-# they require or load-library one another.
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
-if test $# = 0; then
- echo 1>&2 "No files given to $0"
- exit 1
-fi
+case $1 in
+ '')
+ echo "$0: No files. Try \`$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: elisp-comp [--help] [--version] FILES...
+
+This script byte-compiles all `.el' files listed as FILES using GNU
+Emacs, and put the resulting `.elc' files into the current directory,
+so disregarding the original directories used in `.el' arguments.
+
+This script manages in such a way that all Emacs LISP files to
+be compiled are made visible between themselves, in the event
+they require or load-library one another.
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit 0
+ ;;
+ -v | --v*)
+ echo "elisp-comp $scriptversion"
+ exit 0
+ ;;
+esac
if test -z "$EMACS" || test "$EMACS" = "t"; then
# Value of "t" means we are running in a shell under Emacs.
) || exit $?
(exit 0); exit
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
#!/bin/sh
# Get modification time of a file or directory and pretty-print it.
+
+scriptversion=2003-11-09.00
+
# Copyright (C) 1995, 1996, 1997, 2003 Free Software Foundation, Inc.
# written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, June 1995
#
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+case $1 in
+ '')
+ echo "$0: No file. Try \`$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: mdate-sh [--help] [--version] FILE
+
+Pretty-print the modification time of FILE.
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit 0
+ ;;
+ -v | --v*)
+ echo "mdate-sh $scriptversion"
+ exit 0
+ ;;
+esac
+
# Prevent date giving response in another language.
LANG=C
export LANG
# The result.
echo $day $month $year
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
+
+scriptversion=2003-11-08.23
+
# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain.
-
-scriptversion=2003-09-26.19
+#
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
errstatus=0
dirmode=""
Create each directory DIR (with mode MODE, if specified), including all
leading file name components.
-"
+
+Report bugs to <bug-automake@gnu.org>."
# process command line arguments
while test $# -gt 0 ; do
#!/bin/sh
-
# py-compile - Compile a Python program
-# Copyright 2000, 2001 Free Software Foundation, Inc.
+
+scriptversion=2003-11-09.01
+
+# Copyright (C) 2000, 2001, 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
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
-# called as "py-compile [--basedir DIR] PY_FILES ...
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
if [ -z "$PYTHON" ]; then
PYTHON=python
basedir=
case "$1" in
- --basedir)
- basedir=$2
- shift 2
- ;;
- --help)
- echo "Usage: py-compile [--basedir DIR] PY_FILES ..."
- echo "Byte compile some python scripts. This should be performed"
- echo "after they have been moved to the final installation location"
- exit 0
- ;;
- --version)
- echo "py-compile version 0.0"
- exit 0
- ;;
-esac
-
-if [ $# = 0 ]; then
- echo "No files given to $0" 1>&2
+ '')
+ echo "$0: No files given. Try \`$0 --help' for more information." 1>&2
exit 1
-fi
+ ;;
+ --basedir)
+ basedir=$2
+ shift 2
+ ;;
+ -h|--h*)
+ cat <<\EOF
+Usage: py-compile [--help] [--version] [--basedir DIR] FILES..."
+
+Byte compile some python scripts FILES. This should be performed
+after they have been moved to the final installation location
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit 0
+ ;;
+ -v|--v*)
+ echo "py-compile $scriptversion"
+ exit 0
+ ;;
+esac
# if basedir was given, then it should be prepended to filenames before
# byte compilation.
py_compile.compile(path)
print" 2>/dev/null || :
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
#! /bin/sh
# ylwrap - wrapper for lex/yacc invocations.
-#
-# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003 Free Software
-# Foundation, Inc.
+
+scriptversion=2003-11-09.00
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003
+# Free Software Foundation, Inc.
#
# Written by Tom Tromey <tromey@cygnus.com>.
#
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
-# Usage:
-# ylwrap INPUT [OUTPUT DESIRED]... -- PROGRAM [ARGS]...
-# * INPUT is the input file
-# * OUTPUT is file PROG generates
-# * DESIRED is file we actually want
-# * PROGRAM is program to run
-# * ARGS are passed to PROG
-# Any number of OUTPUT,DESIRED pairs may be used.
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+case "$1" in
+ '')
+ echo "$0: No files given. Try \`$0 --help' for more information." 1>&2
+ exit 1
+ ;;
+ --basedir)
+ basedir=$2
+ shift 2
+ ;;
+ -h|--h*)
+ cat <<\EOF
+Usage: ylwrap [--help|--version] INPUT [OUTPUT DESIRED]... -- PROGRAM [ARGS]...
+
+Wrapper for lex/yacc invocations, renaming files as desired.
+
+ INPUT is the input file
+ OUTPUT is one file PROG generates
+ DESIRED is the file we actually want instead of OUTPUT
+ PROGRAM is program to run
+ ARGS are passed to PROG
+
+Any number of OUTPUT,DESIRED pairs may be used.
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit 0
+ ;;
+ -v|--v*)
+ echo "ylwrap $scriptversion"
+ exit 0
+ ;;
+esac
+
# The input.
input="$1"
shift
case "$input" in
- [\\/]* | ?:[\\/]*)
+ [\\/]* | ?:[\\/]*)
# Absolute path; do nothing.
;;
- *)
+ *)
# Relative path. Make it absolute.
input="`pwd`/$input"
;;
pairlist=
while test "$#" -ne 0; do
- if test "$1" = "--"; then
- shift
- break
- fi
- pairlist="$pairlist $1"
- shift
+ if test "$1" = "--"; then
+ shift
+ break
+ fi
+ pairlist="$pairlist $1"
+ shift
done
# The program to run.
shift
# Make any relative path in $prog absolute.
case "$prog" in
- [\\/]* | ?:[\\/]*) ;;
- *[\\/]*) prog="`pwd`/$prog" ;;
+ [\\/]* | ?:[\\/]*) ;;
+ *[\\/]*) prog="`pwd`/$prog" ;;
esac
# FIXME: add hostname here for parallel makes that run commands on
cd $dirname
case $# in
- 0) $prog "$input" ;;
- *) $prog "$@" "$input" ;;
+ 0) $prog "$input" ;;
+ *) $prog "$@" "$input" ;;
esac
status=$?
if test $status -eq 0; then
- set X $pairlist
- shift
- first=yes
- # Since DOS filename conventions don't allow two dots,
- # the DOS version of Bison writes out y_tab.c instead of y.tab.c
- # and y_tab.h instead of y.tab.h. Test to see if this is the case.
- y_tab_nodot="no"
- if test -f y_tab.c || test -f y_tab.h; then
- y_tab_nodot="yes"
- fi
-
- # The directory holding the input.
- input_dir=`echo "$input" | sed -e 's,\([\\/]\)[^\\/]*$,\1,'`
- # Quote $INPUT_DIR so we can use it in a regexp.
- # FIXME: really we should care about more than `.' and `\'.
- input_rx=`echo "$input_dir" | sed 's,\\\\,\\\\\\\\,g;s,\\.,\\\\.,g'`
-
- while test "$#" -ne 0; do
- from="$1"
- # Handle y_tab.c and y_tab.h output by DOS
- if test $y_tab_nodot = "yes"; then
- if test $from = "y.tab.c"; then
- from="y_tab.c"
- else
- if test $from = "y.tab.h"; then
- from="y_tab.h"
- fi
- fi
- fi
- if test -f "$from"; then
- # If $2 is an absolute path name, then just use that,
- # otherwise prepend `../'.
- case "$2" in
- [\\/]* | ?:[\\/]*) target="$2";;
- *) target="../$2";;
- esac
-
- # Edit out `#line' or `#' directives.
- #
- # We don't want the resulting debug information to point at
- # an absolute srcdir; it is better for it to just mention the
- # .y file with no path.
- #
- # We want to use the real output file name, not yy.lex.c for
- # instance.
- #
- # We want the include guards to be adjusted too.
- FROM=`echo "$from" | sed \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\
- -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`
- TARGET=`echo "$2" | sed \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\
- -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`
- sed "/^#/{s,$input_rx,,;s,$from,$2,;s,$FROM,$TO,;}" "$from" >"$target" ||
- status=$?
+ set X $pairlist
+ shift
+ first=yes
+ # Since DOS filename conventions don't allow two dots,
+ # the DOS version of Bison writes out y_tab.c instead of y.tab.c
+ # and y_tab.h instead of y.tab.h. Test to see if this is the case.
+ y_tab_nodot="no"
+ if test -f y_tab.c || test -f y_tab.h; then
+ y_tab_nodot="yes"
+ fi
+
+ # The directory holding the input.
+ input_dir=`echo "$input" | sed -e 's,\([\\/]\)[^\\/]*$,\1,'`
+ # Quote $INPUT_DIR so we can use it in a regexp.
+ # FIXME: really we should care about more than `.' and `\'.
+ input_rx=`echo "$input_dir" | sed 's,\\\\,\\\\\\\\,g;s,\\.,\\\\.,g'`
+
+ while test "$#" -ne 0; do
+ from="$1"
+ # Handle y_tab.c and y_tab.h output by DOS
+ if test $y_tab_nodot = "yes"; then
+ if test $from = "y.tab.c"; then
+ from="y_tab.c"
else
- # A missing file is only an error for the first file. This
- # is a blatant hack to let us support using "yacc -d". If -d
- # is not specified, we don't want an error when the header
- # file is "missing".
- if test $first = yes; then
- status=1
- fi
+ if test $from = "y.tab.h"; then
+ from="y_tab.h"
+ fi
fi
- shift
- shift
- first=no
- done
+ fi
+ if test -f "$from"; then
+ # If $2 is an absolute path name, then just use that,
+ # otherwise prepend `../'.
+ case "$2" in
+ [\\/]* | ?:[\\/]*) target="$2";;
+ *) target="../$2";;
+ esac
+
+ # Edit out `#line' or `#' directives.
+ #
+ # We don't want the resulting debug information to point at
+ # an absolute srcdir; it is better for it to just mention the
+ # .y file with no path.
+ #
+ # We want to use the real output file name, not yy.lex.c for
+ # instance.
+ #
+ # We want the include guards to be adjusted too.
+ FROM=`echo "$from" | sed \
+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\
+ -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`
+ TARGET=`echo "$2" | sed \
+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\
+ -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`
+ sed "/^#/{s,$input_rx,,;s,$from,$2,;s,$FROM,$TO,;}" "$from" >"$target" ||
+ status=$?
+ else
+ # A missing file is only an error for the first file. This
+ # is a blatant hack to let us support using "yacc -d". If -d
+ # is not specified, we don't want an error when the header
+ # file is "missing".
+ if test $first = yes; then
+ status=1
+ fi
+ fi
+ shift
+ shift
+ first=no
+ done
else
- status=$?
+ status=$?
fi
# Remove the directory.
rm -rf $dirname
exit $status
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End: