emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/mmm-mode 3269d940b9 14/14: Merge pull request #126 from


From: ELPA Syncer
Subject: [elpa] externals/mmm-mode 3269d940b9 14/14: Merge pull request #126 from snogge/build-cleanup
Date: Mon, 10 Oct 2022 18:57:52 -0400 (EDT)

branch: externals/mmm-mode
commit 3269d940b9ef536cdff2528417ad33d63caa7677
Merge: 0d00cdf4d0 6fa96364e9
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: GitHub <noreply@github.com>

    Merge pull request #126 from snogge/build-cleanup
    
    Build cleanup
---
 Makefile.am             |  12 +-
 acinclude.m4            |  16 +-
 configure.ac            |  22 +++
 configure.in            |  36 ----
 elisp-comp              |  55 ------
 missing                 | 455 ++++++++++++++++++------------------------------
 mkinstalldirs           |  38 ----
 mmm-auto.el             |   6 +-
 mmm-cmds.el             |   6 +-
 mmm-vars.el             |  28 +--
 mmm.texinfo => mmm.texi |   3 +-
 11 files changed, 224 insertions(+), 453 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 942c46754f..74ea8afb32 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,15 +2,13 @@
 
 ## The MMM Mode distribution is `flat', so we have no SUBDIRS macro.
 
-lisp_LISP = mmm-compat.el mmm-vars.el mmm-utils.el mmm-auto.el \
+# Distribute the lisp files with the dist_ prefix.
+# See the automake manual.
+dist_lisp_LISP = mmm-compat.el mmm-vars.el mmm-utils.el mmm-auto.el \
   mmm-region.el mmm-class.el mmm-cmds.el mmm-mode.el \
   mmm-sample.el mmm-mason.el mmm-univ.el mmm-rpm.el mmm-cweb.el \
   mmm-noweb.el mmm-myghty.el mmm-erb.el mmm-defaults.el
 
-info_TEXINFOS = mmm.texinfo
+info_TEXINFOS = mmm.texi
 
-# This is a hack IMO.  Automake should recognize lisp files as
-# "sources" and include them in the distribution, but it doesn't.
-EXTRA_DIST = $(lisp_LISP) README.Mason FAQ
-
-# See also `elisp-comp' for another hack.
+EXTRA_DIST = README.Mason FAQ
diff --git a/acinclude.m4 b/acinclude.m4
index e02262f90e..3e8cb2f657 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -1,7 +1,7 @@
 dnl
 dnl Execute arbitrary emacs lisp
 dnl
-AC_DEFUN(AC_EMACS_LISP, [
+AC_DEFUN([AC_EMACS_LISP], [
 elisp="$2"
 if test -z "$3"; then
        AC_MSG_CHECKING(for $1)
@@ -21,7 +21,7 @@ if test -z "$3"; then
 fi
 ])
 
-AC_DEFUN(AC_XEMACS_P, [
+AC_DEFUN([AC_XEMACS_P], [
   AC_MSG_CHECKING([if $EMACS is really XEmacs])
   AC_EMACS_LISP(xemacsp,(if (string-match \"XEmacs\" emacs-version) \"yes\" 
\"no\") ,"noecho")
   XEMACS=${EMACS_cv_SYS_xemacsp}
@@ -34,7 +34,7 @@ AC_DEFUN(AC_XEMACS_P, [
   AC_SUBST(EMACS_FLAVOR)
 ])
 
-AC_DEFUN(AC_PATH_LISPDIR, [
+AC_DEFUN([AC_PATH_LISPDIR], [
   AC_XEMACS_P
   if test "$prefix" = "NONE"; then
        AC_MSG_CHECKING([prefix for your Emacs])
@@ -67,7 +67,7 @@ dnl
 dnl Determine the emacs version we are running.
 dnl Automatically substitutes @EMACS_VERSION@ with this number.
 dnl
-AC_DEFUN(AC_EMACS_VERSION, [
+AC_DEFUN([AC_EMACS_VERSION], [
 AC_MSG_CHECKING(for emacs version)
 AC_EMACS_LISP(version,(and (boundp 'emacs-major-version) (format \"%d.%d\" 
emacs-major-version emacs-minor-version)),"noecho")
 
@@ -81,7 +81,7 @@ dnl Determine whether the specified version of Emacs supports 
packages
 dnl or not.  Currently, only XEmacs 20.3 does, but this is a general
 dnl check.
 dnl
-AC_DEFUN(AC_EMACS_PACKAGES, [
+AC_DEFUN([AC_EMACS_PACKAGES], [
 AC_ARG_WITH(package-dir,      --with-package-dir        Configure as a XEmacs 
package in directory, [ EMACS_PACKAGE_DIR="${withval}"])
 if test -n "$EMACS_PACKAGE_DIR"; then
   if test "$prefix" != "NONE"; then
@@ -100,7 +100,7 @@ dnl
 dnl Check whether a function exists in a library
 dnl All '_' characters in the first argument are converted to '-'
 dnl
-AC_DEFUN(AC_EMACS_CHECK_LIB, [
+AC_DEFUN([AC_EMACS_CHECK_LIB], [
 if test -z "$3"; then
        AC_MSG_CHECKING(for $2 in $1)
 fi
@@ -123,7 +123,7 @@ dnl
 dnl Check whether a variable exists in a library
 dnl All '_' characters in the first argument are converted to '-'
 dnl
-AC_DEFUN(AC_EMACS_CHECK_VAR, [
+AC_DEFUN([AC_EMACS_CHECK_VAR], [
 AC_MSG_CHECKING(for $2 in $1)
 library=`echo $1 | tr _ -`
 AC_EMACS_LISP($1,(progn (makunbound '$2) (condition-case nil (progn (require 
'$library) (boundp '$2)) (error nil))),"noecho")
@@ -138,7 +138,7 @@ AC_MSG_RESULT($HAVE_$1)
 dnl
 dnl Perform sanity checking and try to locate the custom and widget packages
 dnl
-AC_DEFUN(AC_CHECK_CUSTOM, [
+AC_DEFUN([AC_CHECK_CUSTOM], [
 AC_MSG_CHECKING(for acceptable custom library)
 AC_CACHE_VAL(EMACS_cv_ACCEPTABLE_CUSTOM,[
 AC_EMACS_CHECK_LIB(widget,widget-convert-text,"noecho")
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000000..e1a552ed56
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,22 @@
+dnl Process this file with autoconf to produce a configure script.
+AC_INIT([mmm-mode], [0.5.8])
+AC_CONFIG_SRCDIR([mmm-mode.el])
+AM_INIT_AUTOMAKE([info-in-builddir])
+
+AM_PATH_LISPDIR
+
+AS_IF([test "$EMACS" = no],[AC_MSG_ERROR([no Emacs program found])])
+
+AC_EMACS_VERSION
+
+dnl Checks for programs.
+
+dnl Checks for libraries.
+
+dnl Checks for header files.
+
+dnl Checks for typedefs, structures, and compiler characteristics.
+
+dnl Checks for library functions.
+
+AC_OUTPUT(Makefile)
diff --git a/configure.in b/configure.in
deleted file mode 100644
index b2f3a7060a..0000000000
--- a/configure.in
+++ /dev/null
@@ -1,36 +0,0 @@
-dnl Process this file with autoconf to produce a configure script.
-AC_INIT()
-
-AM_INIT_AUTOMAKE(mmm-mode, 0.5.8)
-
-dnl
-dnl Apparently, if you run a shell window in Emacs, it sets the EMACS
-dnl environment variable to 't'.  Lets undo the damage.
-dnl
-if test "${EMACS}" = "t"; then
-   EMACS=""
-fi
-
-AC_ARG_WITH(xemacs,           --with-xemacs             Use XEmacs to build, [ 
if test "${withval}" = "yes"; then EMACS=xemacs; else EMACS=${withval}; fi ])
-AC_ARG_WITH(emacs,            --with-emacs              Use Emacs to build, [ 
if test "${withval}" = "yes"; then EMACS=emacs; else EMACS=${withval}; fi ])
-
-AC_CHECK_PROG(EMACS, xemacs, xemacs, emacs)
-
-AM_PATH_LISPDIR
-
-AC_EMACS_VERSION
-
-
-dnl Checks for programs.
-
-dnl Checks for libraries.
-
-dnl Checks for header files.
-
-dnl Checks for typedefs, structures, and compiler characteristics.
-
-dnl Checks for library functions.
-
-AC_SUBST(EMACS)
-
-AC_OUTPUT(Makefile)
diff --git a/elisp-comp b/elisp-comp
deleted file mode 100755
index 76f5d60789..0000000000
--- a/elisp-comp
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/bin/sh
-# Copyright (C) 1995 Free Software Foundation, Inc.
-# Fran�ois Pinard <pinard@iro.umontreal.ca>, 1995.
-#
-# 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.
-
-# 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 script was modified by Michael Abraham Shulman
-# <mas@kurukshetra.cjb.net> not to create a temporary directory, so
-# that elisp files not given on the command line at the same time,
-# the way Automake *actually* uses this script, can load each other.
-
-if test $# = 0; then
-   echo 1>&2 "No files given to $0"
-   exit 1
-else
-   if test -z "$EMACS" || test "$EMACS" = "t"; then
-      # Value of "t" means we are running in a shell under Emacs.
-      # Just assume Emacs is called "emacs".
-      EMACS=emacs
-   fi
-
-#   tempdir=elc.$$
-#   mkdir $tempdir
-#   cp $* $tempdir
-#   cd $tempdir
-
-#   echo "elisp-comp called on $*"
-   echo "(setq load-path (cons nil load-path))" > script
-   $EMACS -q -batch -l script -f batch-byte-compile $*
-#   mv *.elc ..
-
-#   cd ..
-#   rm -fr $tempdir
-fi
diff --git a/missing b/missing
index fc54c64ec9..c3ab06a86f 100755
--- a/missing
+++ b/missing
@@ -1,7 +1,10 @@
 #! /bin/sh
-# Common stub for a few missing GNU programs while installing.
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 Free Software Foundation, 
Inc.
-# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+# Common wrapper for a few potentially missing GNU programs.
+
+scriptversion=2022-09-25.19; # UTC
+
+# Copyright (C) 1996-2018 Free Software Foundation, Inc.
+# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
 
 # 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
@@ -14,9 +17,7 @@
 # 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.
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -24,313 +25,191 @@
 # the same distribution terms that you use for the rest of that program.
 
 if test $# -eq 0; then
-  echo 1>&2 "Try \`$0 --help' for more information"
+  echo 1>&2 "Try '$0 --help' for more information"
   exit 1
 fi
 
-run=:
-
-# In the cases where this matters, `missing' is being run in the
-# srcdir already.
-if test -f configure.ac; then
-  configure_ac=configure.ac
-else
-  configure_ac=configure.in
-fi
+case $1 in
 
-case "$1" in
---run)
-  # Try to run requested program, and just exit if it succeeds.
-  run=
-  shift
-  "$@" && exit 0
-  ;;
-esac
+  --is-lightweight)
+    # Used by our autoconf macros to check whether the available missing
+    # script is modern enough.
+    exit 0
+    ;;
 
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case "$1" in
+  --run)
+    # Back-compat with the calling convention used by older automake.
+    shift
+    ;;
 
   -h|--h|--he|--hel|--help)
     echo "\
 $0 [OPTION]... PROGRAM [ARGUMENT]...
 
-Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
-error status if there is no known handling for PROGRAM.
+Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
+to PROGRAM being missing or too old.
 
 Options:
   -h, --help      display this help and exit
   -v, --version   output version information and exit
-  --run           try to run the given command, and emulate it if it fails
 
 Supported PROGRAM values:
-  aclocal      touch file \`aclocal.m4'
-  autoconf     touch file \`configure'
-  autoheader   touch file \`config.h.in'
-  automake     touch all \`Makefile.in' files
-  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
-  flex         create \`lex.yy.c', if possible, from existing .c
-  help2man     touch the output file
-  lex          create \`lex.yy.c', if possible, from existing .c
-  makeinfo     touch the output file
-  tar          try tar, gnutar, gtar, then tar without non-portable flags
-  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]"
+  aclocal   autoconf  autoheader   autom4te  automake  makeinfo
+  bison     yacc      flex         lex       help2man
+
+Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
+'g' are ignored when checking the name.
+
+Send bug reports to <bug-automake@gnu.org>."
+    exit $?
     ;;
 
   -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
-    echo "missing 0.4 - GNU automake"
+    echo "missing $scriptversion (GNU Automake)"
+    exit $?
     ;;
 
   -*)
-    echo 1>&2 "$0: Unknown \`$1' option"
-    echo 1>&2 "Try \`$0 --help' for more information"
+    echo 1>&2 "$0: unknown '$1' option"
+    echo 1>&2 "Try '$0 --help' for more information"
     exit 1
     ;;
 
-  aclocal*)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
-    echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
-         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
-         to install the \`Automake' and \`Perl' packages.  Grab them from
-         any GNU archive site."
-    touch aclocal.m4
-    ;;
-
-  autoconf)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
-    echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
-         you modified \`${configure_ac}'.  You might want to install the
-         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
-         archive site."
-    touch configure
-    ;;
-
-  autoheader)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
-    echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
-         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
-         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
-         from any GNU archive site."
-    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' 
${configure_ac}`
-    test -z "$files" && files="config.h"
-    touch_files=
-    for f in $files; do
-      case "$f" in
-      *:*) touch_files="$touch_files "`echo "$f" |
-                                      sed -e 's/^[^:]*://' -e 's/:.*//'`;;
-      *) touch_files="$touch_files $f.in";;
-      esac
-    done
-    touch $touch_files
-    ;;
-
-  automake*)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
-    echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
-         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
-         You might want to install the \`Automake' and \`Perl' packages.
-         Grab them from any GNU archive site."
-    find . -type f -name Makefile.am -print |
-          sed 's/\.am$/.in/' |
-          while read f; do touch "$f"; done
-    ;;
-
-  autom4te)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
-    echo 1>&2 "\
-WARNING: \`$1' is needed, and you do not seem to have it handy on your
-         system.  You might have modified some files without having the
-         proper tools for further handling them.
-         You can get \`$1' as part of \`Autoconf' from any GNU
-         archive site."
-
-    file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
-    test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
-    if test -f "$file"; then
-       touch $file
-    else
-       test -z "$file" || exec >$file
-       echo "#! /bin/sh"
-       echo "# Created by GNU Automake missing as a replacement of"
-       echo "#  $ $@"
-       echo "exit 0"
-       chmod +x $file
-       exit 1
-    fi
-    ;;
-
-  bison|yacc)
-    echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
-         you modified a \`.y' file.  You may need the \`Bison' package
-         in order for those modifications to take effect.  You can get
-         \`Bison' from any GNU archive site."
-    rm -f y.tab.c y.tab.h
-    if [ $# -ne 1 ]; then
-        eval LASTARG="\${$#}"
-       case "$LASTARG" in
-       *.y)
-           SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
-           if [ -f "$SRCFILE" ]; then
-                cp "$SRCFILE" y.tab.c
-           fi
-           SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
-           if [ -f "$SRCFILE" ]; then
-                cp "$SRCFILE" y.tab.h
-           fi
-         ;;
-       esac
-    fi
-    if [ ! -f y.tab.h ]; then
-       echo >y.tab.h
-    fi
-    if [ ! -f y.tab.c ]; then
-       echo 'main() { return 0; }' >y.tab.c
-    fi
-    ;;
-
-  lex|flex)
-    echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
-         you modified a \`.l' file.  You may need the \`Flex' package
-         in order for those modifications to take effect.  You can get
-         \`Flex' from any GNU archive site."
-    rm -f lex.yy.c
-    if [ $# -ne 1 ]; then
-        eval LASTARG="\${$#}"
-       case "$LASTARG" in
-       *.l)
-           SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
-           if [ -f "$SRCFILE" ]; then
-                cp "$SRCFILE" lex.yy.c
-           fi
-         ;;
-       esac
-    fi
-    if [ ! -f lex.yy.c ]; then
-       echo 'main() { return 0; }' >lex.yy.c
-    fi
-    ;;
-
-  help2man)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
-    echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
-        you modified a dependency of a manual page.  You may need the
-        \`Help2man' package in order for those modifications to take
-        effect.  You can get \`Help2man' from any GNU archive site."
-
-    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
-    if test -z "$file"; then
-       file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
-    fi
-    if [ -f "$file" ]; then
-       touch $file
-    else
-       test -z "$file" || exec >$file
-       echo ".ab help2man is required to generate this page"
-       exit 1
-    fi
-    ;;
-
-  makeinfo)
-    if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
-       # We have makeinfo, but it failed.
-       exit 1
-    fi
-
-    echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
-         you modified a \`.texi' or \`.texinfo' file, or any other file
-         indirectly affecting the aspect of the manual.  The spurious
-         call might also be the consequence of using a buggy \`make' (AIX,
-         DU, IRIX).  You might want to install the \`Texinfo' package or
-         the \`GNU make' package.  Grab either from any GNU archive site."
-    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
-    if test -z "$file"; then
-      file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
-      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
-    fi
-    touch $file
-    ;;
-
-  tar)
-    shift
-    if test -n "$run"; then
-      echo 1>&2 "ERROR: \`tar' requires --run"
-      exit 1
-    fi
-
-    # We have already tried tar in the generic part.
-    # Look for gnutar/gtar before invocation to avoid ugly error
-    # messages.
-    if (gnutar --version > /dev/null 2>&1); then
-       gnutar "$@" && exit 0
-    fi
-    if (gtar --version > /dev/null 2>&1); then
-       gtar "$@" && exit 0
-    fi
-    firstarg="$1"
-    if shift; then
-       case "$firstarg" in
-       *o*)
-           firstarg=`echo "$firstarg" | sed s/o//`
-           tar "$firstarg" "$@" && exit 0
-           ;;
-       esac
-       case "$firstarg" in
-       *h*)
-           firstarg=`echo "$firstarg" | sed s/h//`
-           tar "$firstarg" "$@" && exit 0
-           ;;
-       esac
-    fi
+esac
 
-    echo 1>&2 "\
-WARNING: I can't seem to be able to run \`tar' with the given arguments.
-         You may want to install GNU tar or Free paxutils, or check the
-         command line arguments."
-    exit 1
-    ;;
+# Run the given program, remember its exit status.
+"$@"; st=$?
+
+# If it succeeded, we are done.
+test $st -eq 0 && exit 0
+
+# Also exit now if we it failed (or wasn't found), and '--version' was
+# passed; such an option is passed most likely to detect whether the
+# program is present and works.
+case $2 in --version|--help) exit $st;; esac
+
+# Exit code 63 means version mismatch.  This often happens when the user
+# tries to use an ancient version of a tool on a file that requires a
+# minimum version.
+if test $st -eq 63; then
+  msg="probably too old"
+elif test $st -eq 127; then
+  # Program was missing.
+  msg="missing on your system"
+else
+  # Program was found and executed, but failed.  Give up.
+  exit $st
+fi
 
-  *)
-    echo 1>&2 "\
-WARNING: \`$1' is needed, and you do not seem to have it handy on your
-         system.  You might have modified some files without having the
-         proper tools for further handling them.  Check the \`README' file,
-         it often tells you about the needed prerequisites for installing
-         this package.  You may also peek at any GNU archive site, in case
-         some other package would contain this missing \`$1' program."
-    exit 1
+perl_URL=https://www.perl.org/
+flex_URL=https://github.com/westes/flex
+gnu_software_URL=https://www.gnu.org/software
+
+program_details ()
+{
+  case $1 in
+    aclocal|automake)
+      echo "The '$1' program is part of the GNU Automake package:"
+      echo "<$gnu_software_URL/automake>"
+      echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
+      echo "<$gnu_software_URL/autoconf>"
+      echo "<$gnu_software_URL/m4/>"
+      echo "<$perl_URL>"
+      ;;
+    autoconf|autom4te|autoheader)
+      echo "The '$1' program is part of the GNU Autoconf package:"
+      echo "<$gnu_software_URL/autoconf/>"
+      echo "It also requires GNU m4 and Perl in order to run:"
+      echo "<$gnu_software_URL/m4/>"
+      echo "<$perl_URL>"
+      ;;
+  esac
+}
+
+give_advice ()
+{
+  # Normalize program name to check for.
+  normalized_program=`echo "$1" | sed '
+    s/^gnu-//; t
+    s/^gnu//; t
+    s/^g//; t'`
+
+  printf '%s\n' "'$1' is $msg."
+
+  configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
+  case $normalized_program in
+    autoconf*)
+      echo "You should only need it if you modified 'configure.ac',"
+      echo "or m4 files included by it."
+      program_details 'autoconf'
+      ;;
+    autoheader*)
+      echo "You should only need it if you modified 'acconfig.h' or"
+      echo "$configure_deps."
+      program_details 'autoheader'
+      ;;
+    automake*)
+      echo "You should only need it if you modified 'Makefile.am' or"
+      echo "$configure_deps."
+      program_details 'automake'
+      ;;
+    aclocal*)
+      echo "You should only need it if you modified 'acinclude.m4' or"
+      echo "$configure_deps."
+      program_details 'aclocal'
+      ;;
+   autom4te*)
+      echo "You might have modified some maintainer files that require"
+      echo "the 'autom4te' program to be rebuilt."
+      program_details 'autom4te'
+      ;;
+    bison*|yacc*)
+      echo "You should only need it if you modified a '.y' file."
+      echo "You may want to install the GNU Bison package:"
+      echo "<$gnu_software_URL/bison/>"
+      ;;
+    lex*|flex*)
+      echo "You should only need it if you modified a '.l' file."
+      echo "You may want to install the Fast Lexical Analyzer package:"
+      echo "<$flex_URL>"
+      ;;
+    help2man*)
+      echo "You should only need it if you modified a dependency" \
+           "of a man page."
+      echo "You may want to install the GNU Help2man package:"
+      echo "<$gnu_software_URL/help2man/>"
     ;;
-esac
-
-exit 0
+    makeinfo*)
+      echo "You should only need it if you modified a '.texi' file, or"
+      echo "any other file indirectly affecting the aspect of the manual."
+      echo "You might want to install the Texinfo package:"
+      echo "<$gnu_software_URL/texinfo/>"
+      echo "The spurious makeinfo call might also be the consequence of"
+      echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
+      echo "want to install GNU make:"
+      echo "<$gnu_software_URL/make/>"
+      ;;
+    *)
+      echo "You might have modified some files without having the proper"
+      echo "tools for further handling them.  Check the 'README' file, it"
+      echo "often tells you about the needed prerequisites for installing"
+      echo "this package.  You may also peek at any GNU archive site, in"
+      echo "case some other package contains this missing '$1' program."
+      ;;
+  esac
+}
+
+give_advice "$1" | sed -e '1s/^/WARNING: /' \
+                       -e '2,$s/^/         /' >&2
+
+# Propagate the correct exit status (expected to be 127 for a program
+# not found, 63 for a program that failed due to version mismatch).
+exit $st
+
+# Local variables:
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC0"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/mkinstalldirs b/mkinstalldirs
deleted file mode 100755
index 5e17cd39fb..0000000000
--- a/mkinstalldirs
+++ /dev/null
@@ -1,38 +0,0 @@
-#! /bin/sh
-# mkinstalldirs --- make directory hierarchy
-# Author: Noah Friedman <friedman@prep.ai.mit.edu>
-# Created: 1993-05-16
-# Public domain
-
-errstatus=0
-
-for file
-do
-   set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
-   shift
-
-   pathcomp=
-   for d
-   do
-     pathcomp="$pathcomp$d"
-     case "$pathcomp" in
-       -* ) pathcomp=./$pathcomp ;;
-     esac
-
-     if test ! -d "$pathcomp"; then
-        echo "mkdir $pathcomp"
-
-        mkdir "$pathcomp" || lasterr=$?
-
-        if test ! -d "$pathcomp"; then
-         errstatus=$lasterr
-        fi
-     fi
-
-     pathcomp="$pathcomp/"
-   done
-done
-
-exit $errstatus
-
-# mkinstalldirs ends here
diff --git a/mmm-auto.el b/mmm-auto.el
index 30d46b726d..cee17e9a9b 100644
--- a/mmm-auto.el
+++ b/mmm-auto.el
@@ -164,10 +164,12 @@ to apply, or always if `mmm-global-mode' is t."
 
 (add-hook 'mmm-major-mode-hook #'mmm-mode-on-maybe)
 
-(defalias 'mmm-add-find-file-hooks #'mmm-add-find-file-hook)
+(define-obsolete-function-alias 'mmm-add-find-file-hooks 
'mmm-add-find-file-hook "0.3.8"
+  "Both `mmm-add-find-file-hooks' and `mmm-add-find-file-hook' are 
deprecated.")
 (defun mmm-add-find-file-hook ()
-  "Equivalent to (setq mmm-global-mode 'maybe).
+  "Equivalent to \(setq mmm-global-mode \\='maybe).
 This function is deprecated and may be removed in future."
+  (declare (obsolete nil "0.3.8"))
   (message "Warning: `mmm-add-find-file-hook' is deprecated.")
   (setq mmm-global-mode 'maybe))
 
diff --git a/mmm-cmds.el b/mmm-cmds.el
index 40fcfb9b3c..8ce6200c58 100644
--- a/mmm-cmds.el
+++ b/mmm-cmds.el
@@ -185,13 +185,13 @@ Use this command if a submode region's boundaries have 
become wrong."
 (cl-defun mmm-end-current-region (&optional arg)
   "End current submode region.
 If ARG is nil, end it at the most appropriate place, usually its
-current back boundary. If ARG is non-nil, end it at point. If the
+current back boundary.  If ARG is non-nil, end it at point.  If the
 current region is correctly bounded, the first does nothing, but the
 second deletes that delimiter as well.
 
 If the region's BACK property is a string, it is inserted as above and
-the overlay moved if necessary. If it is a function, it is called with
-two arguments--the overlay, and \(if ARG 'middle t)--and must do the
+the overlay moved if necessary.  If it is a function, it is called with
+two arguments -- the overlay, and \(if ARG \\='middle t) -- and must do the
 entire job of this function."
   (interactive "P")
   (let ((ovl (mmm-overlay-at)))
diff --git a/mmm-vars.el b/mmm-vars.el
index e360029696..8fc4dc7cc9 100644
--- a/mmm-vars.el
+++ b/mmm-vars.el
@@ -884,7 +884,7 @@ regions, and sometimes for inserting new ones while editing.
 
 Each element of this alist looks like \(CLASS . ARGS) where CLASS is a
 symbol naming the submode class and ARGS is a list of keyword
-arguments, called a \"class specifier\". There are a large number of
+arguments, called a \"class specifier\".  There are a large number of
 accepted keyword arguments in the class specifier.
 
 The argument CLASSES, if supplied, must be a list of other submode
@@ -896,8 +896,8 @@ classes can do nothing but group other classes.
 
 The argument HANDLER, if supplied, also overrides any other processing.
 It must be a function, and all the arguments are passed to it as
-keywords, and it must do everything. See `mmm-ify' for what sorts of
-things it must do. This back-door interface should be cleaned up.
+keywords, and it must do everything.  See `mmm-ify' for what sorts of
+things it must do.  This back-door interface should be cleaned up.
 
 The optional argument FACE gives the display face of the submode
 regions under high decoration (see `mmm-submode-decoration-level').
@@ -918,13 +918,13 @@ a match is found for FRONT, which is passed one argument, 
the form of
 the front delimiter \(found from FRONT-FORM, below), and return a
 symbol such as SUBMODE would be set to.  If MATCH-SUBMODE detects an
 invalid match--for example a specified mode which is not `fboundp'--it
-should \(signal 'mmm-no-matching-submode nil).
+should \(signal \\='mmm-no-matching-submode nil).
 
 FRONT and BACK are the means to find the submode regions, and can be
 either buffer positions \(number-or-markers), regular expressions, or
-functions. If they are absolute buffer positions, only one submode
-region is created, from FRONT to BACK. This is generally not used in
-named classes. \(Unnamed classes are created by interactive commands
+functions.  If they are absolute buffer positions, only one submode
+region is created, from FRONT to BACK.  This is generally not used in
+named classes.  \(Unnamed classes are created by interactive commands
 in `mmm-interactive-history').
 
 If FRONT is a regexp, then that regexp is searched for, and the end of
@@ -967,7 +967,7 @@ delimiter.  If nil, it means not to make a region for the 
respective
 delimiter at all.
 
 DELIMITER-MODE, if supplied, specifies what submode to use for the
-delimiter regions, if any.  If `nil', the primary mode is used.  If
+delimiter regions, if any.  If nil, the primary mode is used.  If
 not supplied, `mmm-delimiter-mode' is used.
 
 FRONT-FACE and BACK-FACE specify faces to use for displaying the
@@ -987,7 +987,7 @@ delimiter.  See `mmm-match-front', `mmm-match-back', and
 `mmm-end-current-region'.
 
 CASE-FOLD-SEARCH, if specified, controls whether the search is
-case-insensitive. See `case-fold-search'. It defaults to `t'.
+case-insensitive.  See `case-fold-search'.  It defaults to t.
 
 CREATION-HOOK, if specified, should be a function which is run
 whenever a submode region is created, with point at the beginning of
@@ -996,16 +996,16 @@ the new region.  One use for it is to set region-saved 
local variables
 
 INSERT specifies the keypress insertion spec for such submode regions.
 INSERT's value should be list of elements of the form \(KEY NAME .
-SPEC). Each KEY should be either a character, a function key symbol,
+SPEC).  Each KEY should be either a character, a function key symbol,
 or a dotted list \(MOD . KEY) where MOD is a symbol for a modifier
-key. The use of any other modifier than meta is discouraged, as
+key.  The use of any other modifier than meta is discouraged, as
 `mmm-insert-modifiers' is sometimes set to \(control), and other
-modifiers are not very portable. Each NAME should be a symbol
-representing the insertion for that key. Each SPEC can be either a
+modifiers are not very portable.  Each NAME should be a symbol
+representing the insertion for that key.  Each SPEC can be either a
 skeleton, suitable for passing to `skeleton-insert' to create a
 submode region, or a dotted pair \(OTHER-KEY . ARG) meaning to use the
 skeleton defined for OTHER-KEY but pass it the argument ARG as the
-`str' variable, possible replacing a prompt string. Skeletons for
+`str' variable, possible replacing a prompt string.  Skeletons for
 insertion should have the symbol `_' where point \(or wrapped text)
 should go, and the symbol `@' in four different places: at the
 beginning of the front delimiter, the beginning of the submode region,
diff --git a/mmm.texinfo b/mmm.texi
similarity index 99%
rename from mmm.texinfo
rename to mmm.texi
index 6b6bb1f7a1..8fe3e5742d 100644
--- a/mmm.texinfo
+++ b/mmm.texi
@@ -2104,6 +2104,5 @@ variable @code{case-fold-search}.
 
 @c Local Variables:
 @c mode: texinfo
-@c mode: font-lock
-@c mode: outline-minor
+@c eval: (outline-minor-mode)
 @c End:



reply via email to

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