From 71b8de67e64355789d61f668505cfc7c785d6d10 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 11 Oct 1996 04:54:48 +0000 Subject: [PATCH] Emacs lisp fixups. Removed UNMAINT --- ChangeLog | 12 ++++++++++++ TODO | 3 --- automake.in | 7 ++++--- elisp-comp | 27 +++++++++++++++++---------- lib/elisp-comp | 27 +++++++++++++++++---------- m4/maintainer.m4 | 3 --- 6 files changed, 50 insertions(+), 29 deletions(-) diff --git a/ChangeLog b/ChangeLog index e70990bb..b5b22f2a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,17 @@ Thu Oct 10 16:12:38 1996 Tom Tromey + * automake.in (read_am_file): Removed UNMAINT code. + (file_contents_with_transform): Ditto. + * m4/maintainer.m4: Removed bogus UNMAINT code. + + * automake.in (handle_emacs_lisp): Define EMACS variable. + (handle_emacs_lisp): Make sure EMACS is in environment when + elisp-comp is run. + + * elisp-comp: Exit with status 1 if usage bad. + Use "emacs -q". Use EMACS environment variable if set (unless set + to t). + * m4/lispdir.m4: Unset EMACS if it is set to `t'. * automake.in (handle_dist_worker): Allow EXTRA_DIST items to be diff --git a/TODO b/TODO index 7391ef12..3019f9a2 100644 --- a/TODO +++ b/TODO @@ -76,9 +76,6 @@ Jim's idea: should look for @setfilename and warn if filenames too long * guess split size * allow ".info" to be missing -should put inverse of @MAINT@ before `.PHONY: configure'. This means -fixing configure target name (no $srcdir) - * must update GNU Hello ** many requests for a way to omit a file from the distribution. diff --git a/automake.in b/automake.in index 027d8445..74257265 100755 --- a/automake.in +++ b/automake.in @@ -2662,9 +2662,10 @@ sub handle_emacs_lisp { # Found some lisp. &define_variable ("lispdir", "\@lispdir\@"); + &define_variable ("EMACS", "\@EMACS\@"); $output_rules .= (".el.elc:\n" . "\t\@echo 'WARNING: Warnings can be ignored. :-)'\n" - . "\t\$(SHELL) \$(srcdir)/elisp-comp \$<\n"); + . "\t\EMACS=$(EMACS) $(SHELL) \$(srcdir)/elisp-comp \$<\n"); push (@suffixes, '.el', '.elc'); # Generate .elc files. @@ -3203,7 +3204,7 @@ sub read_am_file $_ .= "\n" unless substr ($_, -1, 1) eq "\n"; - $_ =~ s/\@(UN)?MAINT\@//g + $_ =~ s/\@MAINT\@//g unless $seen_maint_mode; if (/$IGNORE_PATTERN/o) @@ -3560,7 +3561,7 @@ sub file_contents_with_transform while () { - $_ =~ s/\@(UN)?MAINT\@//g + $_ =~ s/\@MAINT\@//g unless $seen_maint_mode; eval $command; diff --git a/elisp-comp b/elisp-comp index d9adbfee..96e4aa58 100755 --- a/elisp-comp +++ b/elisp-comp @@ -26,17 +26,24 @@ # they require or load-library one another. if test $# = 0; then - echo 1>&2 "No files given to $0" + echo 1>&2 "No files given to $0" + exit 1 else - tempdir=elc.$$ - mkdir $tempdir - cp $* $tempdir - cd $tempdir + 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 - echo "(setq load-path (cons nil load-path))" > script - emacs -batch -l script -f batch-byte-compile *.el - mv *.elc .. + tempdir=elc.$$ + mkdir $tempdir + cp $* $tempdir + cd $tempdir - cd .. - rm -fr $tempdir + echo "(setq load-path (cons nil load-path))" > script + $EMACS -q -batch -l script -f batch-byte-compile *.el + mv *.elc .. + + cd .. + rm -fr $tempdir fi diff --git a/lib/elisp-comp b/lib/elisp-comp index d9adbfee..96e4aa58 100755 --- a/lib/elisp-comp +++ b/lib/elisp-comp @@ -26,17 +26,24 @@ # they require or load-library one another. if test $# = 0; then - echo 1>&2 "No files given to $0" + echo 1>&2 "No files given to $0" + exit 1 else - tempdir=elc.$$ - mkdir $tempdir - cp $* $tempdir - cd $tempdir + 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 - echo "(setq load-path (cons nil load-path))" > script - emacs -batch -l script -f batch-byte-compile *.el - mv *.elc .. + tempdir=elc.$$ + mkdir $tempdir + cp $* $tempdir + cd $tempdir - cd .. - rm -fr $tempdir + echo "(setq load-path (cons nil load-path))" > script + $EMACS -q -batch -l script -f batch-byte-compile *.el + mv *.elc .. + + cd .. + rm -fr $tempdir fi diff --git a/m4/maintainer.m4 b/m4/maintainer.m4 index f4425121..5d9a7658 100644 --- a/m4/maintainer.m4 +++ b/m4/maintainer.m4 @@ -14,12 +14,9 @@ AC_DEFUN(AM_MAINTAINER_MODE, AC_MSG_RESULT($USE_MAINTAINER_MODE) if test $USE_MAINTAINER_MODE = yes; then MAINT= - UNMAINT='#M#' else MAINT='#M#' - UNMAINT= fi AC_SUBST(MAINT)dnl - AC_SUBST(UNMAINT)dnl ] ) -- 2.43.5