automake-patches
[Top][All Lists]
Advanced

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

FYI: --help and --version for auxiliary scripts (Was: Re: [PATCH] ylwrap


From: Alexandre Duret-Lutz
Subject: FYI: --help and --version for auxiliary scripts (Was: Re: [PATCH] ylwrap)
Date: Sun, 09 Nov 2003 01:10:34 +0100
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux)

>>> "Tom" == Tom Tromey <address@hidden> writes:

 Tom> Alexandre, is ylwrap still maintained in the automake
 Tom> repository?

 adl> Yes.  Do you think we should mention Automake in the
 adl> headings of all similar auxiliary files?

 Tom> Sure, but it doesn't matter much to me.  A note in HACKING
 Tom> would suffice as well.

I'm checking this in.


(diff -w to hide the reindentation)
2003-11-09  Alexandre Duret-Lutz  <address@hidden>

        * lib/mkinstalldirs: Mention address@hidden and
        address@hidden
        * 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.

Index: NEWS
===================================================================
RCS file: /cvs/automake/automake/NEWS,v
retrieving revision 1.237
diff -u -w -r1.237 NEWS
--- NEWS        8 Nov 2003 16:07:44 -0000       1.237
+++ NEWS        9 Nov 2003 00:05:32 -0000
@@ -80,7 +80,8 @@
 
   - 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
Index: lib/compile
===================================================================
RCS file: /cvs/automake/automake/lib/compile,v
retrieving revision 1.6
diff -u -w -r1.6 compile
--- lib/compile 20 Jul 2001 01:25:13 -0000      1.6
+++ lib/compile 9 Nov 2003 00:05:34 -0000
@@ -1,8 +1,9 @@
 #! /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 <address@hidden>.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -24,9 +25,36 @@
 # 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 <address@hidden> or send patches to
+# <address@hidden>.
+
+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 <address@hidden>.
+EOF
+    exit 0
+    ;;
+  -v | --v*)
+    echo "compile $scriptversion"
+    exit 0
+    ;;
+esac
+
 
 prog=$1
 shift
@@ -97,3 +125,12 @@
 
 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:
Index: lib/depcomp
===================================================================
RCS file: /cvs/automake/automake/lib/depcomp,v
retrieving revision 1.46
diff -u -w -r1.46 depcomp
--- lib/depcomp 6 Sep 2003 05:36:56 -0000       1.46
+++ lib/depcomp 9 Nov 2003 00:05:35 -0000
@@ -1,6 +1,8 @@
 #! /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
@@ -25,6 +27,36 @@
 
 # Originally written by Alexandre Oliva <address@hidden>.
 
+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 <address@hidden>.
+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
@@ -477,3 +509,12 @@
 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:
Index: lib/elisp-comp
===================================================================
RCS file: /cvs/automake/automake/lib/elisp-comp,v
retrieving revision 1.9
diff -u -w -r1.9 elisp-comp
--- lib/elisp-comp      22 May 2003 20:23:33 -0000      1.9
+++ lib/elisp-comp      9 Nov 2003 00:05:35 -0000
@@ -1,5 +1,8 @@
 #!/bin/sh
 # Copyright (C) 1995, 2000, 2003  Free Software Foundation, Inc.
+
+scriptversion=2003-11-08.23
+
 # Franc,ois Pinard <address@hidden>, 1995.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -21,19 +24,36 @@
 # 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.
-
-if test $# = 0; then
-  echo 1>&2 "No files given to $0"
-  exit 1
-fi
+# This file is maintained in Automake, please report
+# bugs to <address@hidden> or send patches to
+# <address@hidden>.
+
+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 <address@hidden>.
+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.
@@ -58,3 +78,12 @@
 ) || 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:
Index: lib/mdate-sh
===================================================================
RCS file: /cvs/automake/automake/lib/mdate-sh,v
retrieving revision 1.11
diff -u -w -r1.11 mdate-sh
--- lib/mdate-sh        4 Mar 2003 21:26:06 -0000       1.11
+++ lib/mdate-sh        9 Nov 2003 00:05:35 -0000
@@ -1,5 +1,8 @@
 #!/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 <address@hidden>, June 1995
 #
@@ -22,6 +25,31 @@
 # 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 <address@hidden> or send patches to
+# <address@hidden>.
+
+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 <address@hidden>.
+EOF
+    exit 0
+    ;;
+  -v | --v*)
+    echo "mdate-sh $scriptversion"
+    exit 0
+    ;;
+esac
+
 # Prevent date giving response in another language.
 LANG=C
 export LANG
@@ -131,3 +159,12 @@
 
 # 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:
Index: lib/mkinstalldirs
===================================================================
RCS file: /cvs/automake/automake/lib/mkinstalldirs,v
retrieving revision 1.14
diff -u -w -r1.14 mkinstalldirs
--- lib/mkinstalldirs   26 Sep 2003 17:28:52 -0000      1.14
+++ lib/mkinstalldirs   9 Nov 2003 00:05:35 -0000
@@ -1,10 +1,15 @@
 #! /bin/sh
 # mkinstalldirs --- make directory hierarchy
+
+scriptversion=2003-11-08.23
+
 # Original author: Noah Friedman <address@hidden>
 # Created: 1993-05-16
 # Public domain.
-
-scriptversion=2003-09-26.19
+#
+# This file is maintained in Automake, please report
+# bugs to <address@hidden> or send patches to
+# <address@hidden>.
 
 errstatus=0
 dirmode=""
@@ -14,7 +19,8 @@
 
 Create each directory DIR (with mode MODE, if specified), including all
 leading file name components.
-"
+
+Report bugs to <address@hidden>."
 
 # process command line arguments
 while test $# -gt 0 ; do
Index: lib/py-compile
===================================================================
RCS file: /cvs/automake/automake/lib/py-compile,v
retrieving revision 1.3
diff -u -w -r1.3 py-compile
--- lib/py-compile      6 Sep 2003 05:36:56 -0000       1.3
+++ lib/py-compile      9 Nov 2003 00:05:35 -0000
@@ -1,7 +1,9 @@
 #!/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
@@ -23,7 +25,9 @@
 # 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 <address@hidden> or send patches to
+# <address@hidden>.
 
 if [ -z "$PYTHON" ]; then
   PYTHON=python
@@ -32,27 +36,31 @@
 basedir=
 
 case "$1" in
+  '')
+    echo "$0: No files given.  Try \`$0 --help' for more information." 1>&2
+    exit 1
+    ;;
     --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"
+  -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 <address@hidden>.
+EOF
        exit 0
        ;;
-    --version)
-       echo "py-compile version 0.0"
+  -v|--v*)
+    echo "py-compile $scriptversion"
        exit 0
        ;;
 esac
 
-if [ $# = 0 ]; then
-    echo "No files given to $0" 1>&2
-    exit 1
-fi
-
 # if basedir was given, then it should be prepended to filenames before
 # byte compilation.
 if [ -z "$basedir" ]; then
@@ -90,3 +98,11 @@
     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:
Index: lib/ylwrap
===================================================================
RCS file: /cvs/automake/automake/lib/ylwrap,v
retrieving revision 1.22
diff -u -w -r1.22 ylwrap
--- lib/ylwrap  24 Oct 2003 19:33:17 -0000      1.22
+++ lib/ylwrap  9 Nov 2003 00:05:35 -0000
@@ -1,8 +1,10 @@
 #! /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 <address@hidden>.
 #
@@ -25,14 +27,43 @@
 # 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 <address@hidden> or send patches to
+# <address@hidden>.
+
+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 <address@hidden>.
+EOF
+    exit 0
+    ;;
+  -v|--v*)
+    echo "ylwrap $scriptversion"
+    exit 0
+    ;;
+esac
+
 
 # The input.
 input="$1"
@@ -158,3 +189,12 @@
 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:

-- 
Alexandre Duret-Lutz





reply via email to

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