]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
Added Emacs Lisp handling
authorTom Tromey <tromey@redhat.com>
Sun, 2 Jun 1996 22:00:38 +0000 (22:00 +0000)
committerTom Tromey <tromey@redhat.com>
Sun, 2 Jun 1996 22:00:38 +0000 (22:00 +0000)
ChangeLog
Makefile.am
Makefile.in
TODO
aclocal.m4
automake.in
elisp-comp [new file with mode: 0755]
lib/am/Makefile.am
lib/am/lisp.am [new file with mode: 0644]
lib/elisp-comp [new file with mode: 0755]
lisp.am [new file with mode: 0644]

index b1bb4a99c5c482a3c44679075b1637096fc75d6e..c0099aebddbcb2e7abd65a0e5ed700b4ebece2c4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,19 @@
 Sun Jun  2 10:33:10 1996  Tom Tromey  <tromey@creche.cygnus.com>
 
+       * automake.in (handle_emacs_lisp): New function.
+       (initialize_global_constants): Added elisp-comp to
+       @common_sometimes.
+       (seen_lispdir): New global.
+       (scan_configure): Handle ud_PATH_LISPDIR.
+
+       * elisp-comp: New file.
+
+       * lisp.am: New file.
+
+       * automake.in (generate_makefile): Run handle_emacs_lisp.
+
+       * aclocal.m4 (ud_PATH_LISPDIR): New macro, from Ulrich Drepper.
+
        * automake.in (initialize_global_constants): Removed version.texi
        from common_sometimes.
        (initialize_global_constants): Added texinfo.tex to common_files.
@@ -14,6 +28,10 @@ Sun Jun  2 10:33:10 1996  Tom Tromey  <tromey@creche.cygnus.com>
        (read_am_file): Generate some extra variables when AC_CANONICAL_*
        used.
        (handle_options): Allow version number to have letters appended.
+       (handle_tests): Error if RUNTEST, RUNTESTFLAGS defined but dejagnu
+       option not specd.
+       (initialize_global_constants): install_man_format changed to
+       handle built man pages.
 
 Wed May 29 10:35:01 1996  Tom Tromey  <tromey@creche.cygnus.com>
 
index 39c660a36b0b895028f4f2d61ab673130c9fbb47..4d459ffa327a4074a95228176f442ae4b44d350b 100644 (file)
@@ -18,10 +18,11 @@ mans-vars.am program.am programs.am remake-hdr.am remake-subd.am \
 remake.am scripts.am subdirs.am tags.am tags-subd.am tags-clean.am \
 texi-version.am texinfos-vars.am texinfos.am libraries-clean.am \
 programs-clean.am data-clean.am COPYING INSTALL texinfo.tex ansi2knr.c \
-ansi2knr.1 aclocal.m4
+ansi2knr.1 aclocal.m4 lisp.am
 
 ## These must all be executable when installed.
-pkgdata_SCRIPTS = config.guess config.sub install-sh mdate-sh mkinstalldirs
+pkgdata_SCRIPTS = config.guess config.sub install-sh mdate-sh \
+mkinstalldirs elisp-comp
 
 CLEANFILES = automake
 
@@ -40,22 +41,23 @@ installcheck-local:
        $(PERL) -e "exit ! -x '$(pkgdatadir)/mdate-sh';"
        $(PERL) -e "exit ! -x '$(pkgdatadir)/mkinstalldirs';"
 
-# Some simple checks:
-# * syntax check with perl4 and perl5.
-# * make sure the scripts don't use 'true'
-# * expect no instances of '${...}'
-# These are only really guaranteed to work on my machine.
+# Some simple checks, and then ordinary check.  These are only really
+# guaranteed to work on my machine.
 maintainer-check: automake
-## Do syntax, etc, checks before make check.
+## Syntax check with default Perl (on my machine, Perl 5).
        $(PERL) -c -w automake
+## Ensure `true' is never used; I've accidentally used it before.
        @if grep '^[^#].*true' $(srcdir)/[a-z]*.am; then \
          echo "can't use 'true' in GNU Makefile" 1>&2; \
          exit 1;                               \
        else :; fi
-       @if test `fgrep '$${' $(srcdir)/[a-z]*.am | wc -l` -ne 0; then \
+## expect no instances of '${...}'.  However, $${...} is ok, since that
+## is a shell construct, not a Makefile construct.
+       @if test `fgrep '$${' $(srcdir)/[a-z]*.am | fgrep -v '$$$$' | wc -l` -ne 0; then \
          echo "found too many uses of '\$${'" 1>&2; \
          exit 1;                               \
        fi
+## Another syntax check, this time with Perl 4, if it exists.
        if $(SHELL) -c 'perl4.036 -v' >/dev/null 2>&1; then \
          perl4.036 -c -w automake; \
        else :; fi
index aee9c9536e642224461dbaea3fcc549af72209cf..3c47ce18afa780485d78931a7a962bfdf60a2d3c 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile.in generated automatically by automake 1.0 from Makefile.am
+# Makefile.in generated automatically by automake 1.1a from Makefile.am
 
 # Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
@@ -56,9 +56,10 @@ mans-vars.am program.am programs.am remake-hdr.am remake-subd.am \
 remake.am scripts.am subdirs.am tags.am tags-subd.am tags-clean.am \
 texi-version.am texinfos-vars.am texinfos.am libraries-clean.am \
 programs-clean.am data-clean.am COPYING INSTALL texinfo.tex ansi2knr.c \
-ansi2knr.1 aclocal.m4
+ansi2knr.1 aclocal.m4 lisp.am
 
-pkgdata_SCRIPTS = config.guess config.sub install-sh mdate-sh mkinstalldirs
+pkgdata_SCRIPTS = config.guess config.sub install-sh mdate-sh \
+mkinstalldirs elisp-comp
 
 CLEANFILES = automake
 
@@ -410,18 +411,15 @@ installcheck-local:
        $(PERL) -e "exit ! -x '$(pkgdatadir)/mdate-sh';"
        $(PERL) -e "exit ! -x '$(pkgdatadir)/mkinstalldirs';"
 
-# Some simple checks:
-# * syntax check with perl4 and perl5.
-# * make sure the scripts don't use 'true'
-# * expect no instances of '${...}'
-# These are only really guaranteed to work on my machine.
+# Some simple checks, and then ordinary check.  These are only really
+# guaranteed to work on my machine.
 maintainer-check: automake
        $(PERL) -c -w automake
        @if grep '^[^#].*true' $(srcdir)/[a-z]*.am; then \
          echo "can't use 'true' in GNU Makefile" 1>&2; \
          exit 1;                               \
        else :; fi
-       @if test `fgrep '$${' $(srcdir)/[a-z]*.am | wc -l` -ne 0; then \
+       @if test `fgrep '$${' $(srcdir)/[a-z]*.am | fgrep -v '$$$$' | wc -l` -ne 0; then \
          echo "found too many uses of '\$${'" 1>&2; \
          exit 1;                               \
        fi
diff --git a/TODO b/TODO
index a065d34e8f493eb4321d130497d65dd061ca159a..3622f021fb9f528dd25e2c44917ebe7f76711b61 100644 (file)
--- a/TODO
+++ b/TODO
@@ -5,13 +5,6 @@ consider supporting "var+= stuff" syntax.  rewrite to just var=... on
 output.  This is sometimes convenient when you want to write a
 Makefile.am in more-or-less modular parts
 
-dejagnu support:
-* create site.exp based on known things: tool, srcdir, objdir,
-  maybe host_alias, host_triplet, target_alias, target_triplet,
-  build_triplet (depending on whether AC_CANONICAL_* is used)
-* use RUNTEST_FOR_TARGET in some cases?
-* defining RUNTEST, RUNTESTFLAGS should require dejagnu option
-
 should be able to determine what is built by looking at rules (and
 configure.in).  Then built man pages (eg) could automatically be
 omitted from the distribution.
@@ -34,8 +27,6 @@ to fully support libtool ("grody compilation issue")
 If @LIBOBJS@ or @ALLOCA@ appears in _LDADD or _LIBADD, put it into
 dependencies automatically
 
-Man pages can be generated
-
 * ansi2knr.c needs STDC_HEADERS and HAVE_STRING_H
   [ I've asked François about this.  The change should probably
     be in the fp_C_PROTOTYPES macro ]
@@ -43,14 +34,11 @@ Man pages can be generated
 Think about: maybe "make check" should just bomb if error occurs?
 Then user must use "make -k check".  This is probably more natural.
 
-Consider: should Gnits require jm_MAINTAINER_MODE?
-
 Consider: "cvs" option adds some cvs-specific rules?
 
 Consider adding an option that statically rewrites @MAINT@ to "#M#".
 (this would be useful at Cygnus)
 
-
 Automake and Cygnus: info target separate from all.  Always make
 install-info target.  install-info separate from install.
 
@@ -97,8 +85,6 @@ Need way to say there are no suffixes in a Makefile (Franc,ois'
 Check to make sure various scripts are executable (IE when looking for
 them in a directory)
 
-Think about ways to make automake fit better with Cygnus-style trees.
-
 Use recode in dist target when MAINT_CHARSET specified.  Read caveats
 in automake.in before doing this.  Note the same problem used to apply
 to the no-dependencies option; maybe it still should?  Note also that
@@ -229,6 +215,9 @@ some support for this.  Here are some of the issues:
 * Should handle AC_CONFIG_SUBDIRS, ie must handle configure.in in subdirs
 * Must handle SUBDIRS in subdir Makefile.am's
 
+dejagnu support:
+* use RUNTEST_FOR_TARGET in some cases?
+
 These can both be handled via dist-hook:
 . Consider supporting guile-style PLUGIN directories automatically?
 . Consider allowing eg "foo/bar" to appear in EXTRA_DIST, and generating
@@ -284,6 +273,8 @@ document TAGS_DEPENDENCIES
 
 document new variables introduced when AC_CANONICAL_* used
 
+document _LISP handling
+
 ================================================================
 
 Libraries:
index 4f5c34dcc123c3fc174732d237baf2283f0fc7f5..1b98e69366e31204464a9e96e8c9debab96908b0 100644 (file)
@@ -103,3 +103,35 @@ AC_DEFUN(jm_MAINTAINER_MODE,
   AC_SUBST(MAINT)dnl
 ]
 )
+
+## ------------------------
+## Emacs LISP file handling
+## ------------------------
+AC_DEFUN(ud_PATH_LISPDIR,
+ [AC_PATH_PROG(EMACS, emacs, no)
+  if test $EMACS != "no"; then
+    AC_MSG_CHECKING([where .elc files should go])
+    dnl Set default value
+    lispdir="\$(datadir)/emacs/site-lisp"
+    if test "x$prefix" = "xNONE"; then
+      if test -d $ac_default_prefix/share/emacs/site-lisp; then
+       lispdir="\$(prefix)/share/emacs/site-lisp"
+      else
+       if test -d $ac_default_prefix/lib/emacs/site-lisp; then
+         lispdir="\$(prefix)/lib/emacs/site-lisp"
+       fi
+      fi
+    else
+      if test -d $prefix/share/emacs/site-lisp; then
+       lispdir="\$(prefix)/share/emacs/site-lisp"
+      else
+       if test -d $prefix/lib/emacs/site-lisp; then
+         lispdir="\$(prefix)/lib/emacs/site-lisp"
+       fi
+      fi
+    fi
+    AC_MSG_RESULT($lispdir)
+    ELCFILES="\$(ELCFILES)"
+  fi
+  AC_SUBST(lispdir)
+  AC_SUBST(ELCFILES)])
index da1b76543827eaa171abd33d8221bec54cf2ca07..e9dedc35dd0bd3e759544630d479480546fc279e 100755 (executable)
@@ -156,6 +156,9 @@ $seen_maint_mode = 0;
 $seen_package = 0;
 $seen_version = 0;
 
+# TRUE if we've seen ud_PATH_LISPDIR.
+$seen_lispdir = 0;
+
 
 # Charsets used by maintainer and in distribution.  MAINT_CHARSET is
 # handled in a funny way: if seen in the top-level Makefile.am, it is
@@ -383,6 +386,7 @@ sub generate_makefile
     $contents{'OBJECTS'} = join (' ', @objects);
 
     &handle_texinfo;
+    &handle_emacs_lisp;
     &handle_man_pages;
     &handle_data;
     &handle_headers;
@@ -1896,14 +1900,6 @@ sub handle_phony
 # Handle TESTS variable and other checks.
 sub handle_tests
 {
-    if (&variable_defined ('DEJATOOL') && ! defined $options{'dejagnu'})
-    {
-       # Error.
-       &am_line_error ('DEJATOOL',
-                       "\`DEJATOOL' defined but \`dejagnu' not in \`AUTOMAKE_OPTIONS'");
-       return;
-    }
-
     if (defined $options{'dejagnu'})
     {
        push (@check, 'check-DEJAGNU');
@@ -1945,6 +1941,17 @@ sub handle_tests
        $output_rules .= ("\t\@echo '## All variables above are generated by configure. Do Not Edit ##' >> site.exp\n"
                          . "\t-\@sed '1,/^## All variables above are.*##/ d' site.bak >> site.exp\n");
     }
+    else
+    {
+       local ($c);
+       foreach $c ('DEJATOOL', 'RUNTEST', 'RUNTESTFLAGS')
+       {
+           if (&variable_defined ($c))
+           {
+               &am_line_error ($c, "\`$c' defined but \`dejagnu' not in \`AUTOMAKE_OPTIONS'");
+           }
+       }
+    }
 
     if (&variable_defined ('TESTS'))
     {
@@ -1979,6 +1986,40 @@ sub handle_tests
     }
 }
 
+# Handle Emacs Lisp.
+sub handle_emacs_lisp
+{
+    local (@elfiles) = &am_install_var ('lisp', 'LISP', 'lisp', 'noinst');
+
+    if (@elfiles)
+    {
+       # Found some lisp.
+       $output_vars .= "lispdir = \@lispdir\@\n";
+       $output_rules .= (".el.elc:\n"
+                         . "\t\@echo 'WARNING: Warnings can be ignored. :-)'\n"
+                         . "\t\$(SHELL) \$(srcdir)/elisp-comp \$<\n");
+       push (@suffixes, '.el', '.elc');
+
+       # Generate .elc files.
+       grep ($_ .= 'c', @elfiles);
+       &pretty_print ('ELCFILES =', '', @elfiles);
+
+       local ($varname);
+       if (&variable_defined ('lisp_LISP'))
+       {
+           $varname = 'lisp_LISP';
+           &am_error ("\`lisp_LISP' defined but \`ud_PATH_LISPDIR' not in \`configure.in'")
+               if ! $seen_lispdir;
+       }
+       else
+       {
+           $varname = 'noinst_LISP';
+       }
+       &require_file_with_line ($varname, $FOREIGN, 'elisp-comp');
+
+    }
+}
+
 ################################################################
 
 # Scan configure.in for interesting things.
@@ -2141,6 +2182,8 @@ sub scan_configure
        $seen_prog_install = 1 if ! $seen_prog_install && /AC_PROG_INSTALL/;
        $seen_prog_install = 2 if /fp_PROG_INSTALL/;
 
+        $seen_lispdir = 1 if /ud_PATH_LISPDIR/;
+
         if (/AC_PROG_LIBTOOL/ || /gm_PROG_LIBTOOL/)
        {
            $seen_libtool = 1;
@@ -2482,6 +2525,8 @@ sub initialize_global_constants
     '  @sect=@SECTION@;                                \\
        inst=`echo "@MANBASE@" | sed \'$(transform)\'`.@FULLSECT@; \\
        echo installing @MAN@ as $(mandir)/man$$sect/$$inst; \\
+       if test -f $(srcdir)/@MAN@; then file=$(srcdir)/@MAN@; \\
+       else file=@MAN@; fi; \\
        $(INSTALL_DATA) $(srcdir)/@MAN@ $(mandir)/man$$sect/$$inst
 ';
 
@@ -2506,7 +2551,7 @@ sub initialize_global_constants
        (
         "aclocal.m4", "acconfig.h", "config.h.top",
         "config.h.bot", "stamp-h.in", "ansi2knr.c",
-        "ansi2knr.1", 'stamp-vti'
+        "ansi2knr.1", 'stamp-vti', 'elisp-comp'
         );
 
     $USAGE = "\
diff --git a/elisp-comp b/elisp-comp
new file mode 100755 (executable)
index 0000000..d9adbfe
--- /dev/null
@@ -0,0 +1,42 @@
+#!/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.
+
+if test $# = 0; then
+  echo 1>&2 "No files given to $0"
+else
+  tempdir=elc.$$
+  mkdir $tempdir
+  cp $* $tempdir
+  cd $tempdir
+
+  echo "(setq load-path (cons nil load-path))" > script
+  emacs -batch -l script -f batch-byte-compile *.el
+  mv *.elc ..
+
+  cd ..
+  rm -fr $tempdir
+fi
index 39c660a36b0b895028f4f2d61ab673130c9fbb47..4d459ffa327a4074a95228176f442ae4b44d350b 100644 (file)
@@ -18,10 +18,11 @@ mans-vars.am program.am programs.am remake-hdr.am remake-subd.am \
 remake.am scripts.am subdirs.am tags.am tags-subd.am tags-clean.am \
 texi-version.am texinfos-vars.am texinfos.am libraries-clean.am \
 programs-clean.am data-clean.am COPYING INSTALL texinfo.tex ansi2knr.c \
-ansi2knr.1 aclocal.m4
+ansi2knr.1 aclocal.m4 lisp.am
 
 ## These must all be executable when installed.
-pkgdata_SCRIPTS = config.guess config.sub install-sh mdate-sh mkinstalldirs
+pkgdata_SCRIPTS = config.guess config.sub install-sh mdate-sh \
+mkinstalldirs elisp-comp
 
 CLEANFILES = automake
 
@@ -40,22 +41,23 @@ installcheck-local:
        $(PERL) -e "exit ! -x '$(pkgdatadir)/mdate-sh';"
        $(PERL) -e "exit ! -x '$(pkgdatadir)/mkinstalldirs';"
 
-# Some simple checks:
-# * syntax check with perl4 and perl5.
-# * make sure the scripts don't use 'true'
-# * expect no instances of '${...}'
-# These are only really guaranteed to work on my machine.
+# Some simple checks, and then ordinary check.  These are only really
+# guaranteed to work on my machine.
 maintainer-check: automake
-## Do syntax, etc, checks before make check.
+## Syntax check with default Perl (on my machine, Perl 5).
        $(PERL) -c -w automake
+## Ensure `true' is never used; I've accidentally used it before.
        @if grep '^[^#].*true' $(srcdir)/[a-z]*.am; then \
          echo "can't use 'true' in GNU Makefile" 1>&2; \
          exit 1;                               \
        else :; fi
-       @if test `fgrep '$${' $(srcdir)/[a-z]*.am | wc -l` -ne 0; then \
+## expect no instances of '${...}'.  However, $${...} is ok, since that
+## is a shell construct, not a Makefile construct.
+       @if test `fgrep '$${' $(srcdir)/[a-z]*.am | fgrep -v '$$$$' | wc -l` -ne 0; then \
          echo "found too many uses of '\$${'" 1>&2; \
          exit 1;                               \
        fi
+## Another syntax check, this time with Perl 4, if it exists.
        if $(SHELL) -c 'perl4.036 -v' >/dev/null 2>&1; then \
          perl4.036 -c -w automake; \
        else :; fi
diff --git a/lib/am/lisp.am b/lib/am/lisp.am
new file mode 100644 (file)
index 0000000..cbfe544
--- /dev/null
@@ -0,0 +1,33 @@
+## automake - create Makefile.in from Makefile.am
+## Copyright (C) 1996 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.
+install-@DIR@LISP: $(@DIR@_LISP) $(ELCFILES)
+       $(mkinstalldirs) $(@DIR@dir)
+## Funny invocation because Makefile variable can be empty, leading to
+## a syntax error in sh.
+       list="$(@DIR@_LISP)"; for p in $$list; do \
+         $(INSTALL_DATA) $(srcdir)/$$p $(@DIR@dir)/$$p; \
+## Only install .elc file if it exists.
+         if test -f $${p}c; then
+           $(INSTALL_DATA) $${p}c $(@DIR@dir)/$${p}c; \
+         else : ; fi; \
+       done
+
+uninstall-@DIR@LISP:
+       list="$(@DIR@_LISP)"; for p in $$list; do \
+         rm -f $(@DIR@dir)/$$p $(@DIR@dir)/$${p}c; \
+       done
diff --git a/lib/elisp-comp b/lib/elisp-comp
new file mode 100755 (executable)
index 0000000..d9adbfe
--- /dev/null
@@ -0,0 +1,42 @@
+#!/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.
+
+if test $# = 0; then
+  echo 1>&2 "No files given to $0"
+else
+  tempdir=elc.$$
+  mkdir $tempdir
+  cp $* $tempdir
+  cd $tempdir
+
+  echo "(setq load-path (cons nil load-path))" > script
+  emacs -batch -l script -f batch-byte-compile *.el
+  mv *.elc ..
+
+  cd ..
+  rm -fr $tempdir
+fi
diff --git a/lisp.am b/lisp.am
new file mode 100644 (file)
index 0000000..cbfe544
--- /dev/null
+++ b/lisp.am
@@ -0,0 +1,33 @@
+## automake - create Makefile.in from Makefile.am
+## Copyright (C) 1996 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.
+install-@DIR@LISP: $(@DIR@_LISP) $(ELCFILES)
+       $(mkinstalldirs) $(@DIR@dir)
+## Funny invocation because Makefile variable can be empty, leading to
+## a syntax error in sh.
+       list="$(@DIR@_LISP)"; for p in $$list; do \
+         $(INSTALL_DATA) $(srcdir)/$$p $(@DIR@dir)/$$p; \
+## Only install .elc file if it exists.
+         if test -f $${p}c; then
+           $(INSTALL_DATA) $${p}c $(@DIR@dir)/$${p}c; \
+         else : ; fi; \
+       done
+
+uninstall-@DIR@LISP:
+       list="$(@DIR@_LISP)"; for p in $$list; do \
+         rm -f $(@DIR@dir)/$$p $(@DIR@dir)/$${p}c; \
+       done