From 6037a7bc9cb97ee5f94e97364f62923a139840a0 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Mon, 9 Apr 2001 14:46:45 +0000 Subject: [PATCH] * automake.in (&rule_define): When you discover a suffix rules, register the extensions for .SUFFIXES. (&handle_texinfo): Don't register the suffixes. (&get_object_extension): Don't register suffixes, let them be discovered in depend2.am. (&handle_emacs_lisp): Depend on your lisp.am. * lisp.am: Include the rule &handle_emacs_lisp used to output. --- ChangeLog | 10 ++++++++++ Makefile.in | 2 +- automake.in | 20 +++----------------- compile.am | 1 - lib/am/compile.am | 1 - lib/am/libtool.am | 1 + lib/am/lisp.am | 14 ++++++++++++++ lib/am/texinfos.am | 20 +++++++++++++++----- libtool.am | 1 + lisp.am | 14 ++++++++++++++ texinfos.am | 20 +++++++++++++++----- 11 files changed, 74 insertions(+), 30 deletions(-) diff --git a/ChangeLog b/ChangeLog index e813a4a..d3b16ad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,15 @@ 2001-04-09 Akim Demaille + * automake.in (&rule_define): When you discover a suffix rules, + register the extensions for .SUFFIXES. + (&handle_texinfo): Don't register the suffixes. + (&get_object_extension): Don't register suffixes, let them be + discovered in depend2.am. + (&handle_emacs_lisp): Depend on your lisp.am. + * lisp.am: Include the rule &handle_emacs_lisp used to output. + +2001-04-09 Akim Demaille + * subdirs.am: Don't define info related recursive targets. * texinfos.am: Do. diff --git a/Makefile.in b/Makefile.in index 6c61643..df1566f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -145,7 +145,7 @@ DIST_SUBDIRS = $(SUBDIRS) all: all-recursive .SUFFIXES: -.SUFFIXES: .dvi .info .ps .texi .texinfo .txi +.SUFFIXES: .dvi .info .ps .texi $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && \ diff --git a/automake.in b/automake.in index 55885e4..3422b83 100755 --- a/automake.in +++ b/automake.in @@ -2696,7 +2696,6 @@ sub handle_texinfo ('TEXICLEAN' => $texiclean)); push (@dist_targets, 'dist-info'); - push (@suffixes, '.texi', '.texinfo', '.txi', '.info', '.dvi', '.ps'); if (! defined $options{'no-installinfo'}) { @@ -4015,16 +4014,6 @@ sub handle_emacs_lisp if (@elfiles) { - # Found some lisp. - &define_configure_variable ('lispdir'); - &define_configure_variable ('EMACS'); - $output_rules .= (".el.elc:\n" - . "\t\@echo 'WARNING: Warnings can be ignored. :-)'\n" - . "\tif test \$(EMACS) != no; then \\\n" - . "\t EMACS=\$(EMACS) \$(SHELL) \$(srcdir)/elisp-comp \$<; \\\n" - . "\tfi\n"); - push (@suffixes, '.el', '.elc'); - # Generate .elc files. grep ($_ .= 'c', @elfiles); &define_pretty_variable ('ELCFILES', '', @elfiles); @@ -6270,19 +6259,16 @@ sub rule_define ($$$$) # Check the rule for being a suffix rule. If so, store in a hash. - my $source_suffix; - my $object_suffix; - if (($source_suffix, $object_suffix) = ($1 =~ $SUFFIX_RULE_PATTERN)) + if ((my ($source_suffix, $object_suffix)) = ($1 =~ $SUFFIX_RULE_PATTERN)) { $suffix_rules{$source_suffix} = $object_suffix; print "Sources ending in .$source_suffix become .$object_suffix\n" if $verbose; $source_suffix_pattern = "(" . join ('|', keys %suffix_rules) . ")"; + # Set SUFFIXES from suffix_rules. + push @suffixes, ".$source_suffix", ".$object_suffix"; } - - # FIXME: make sure both suffixes are in SUFFIXES? Or set SUFFIXES from - # suffix_rules? } ################################################################ diff --git a/compile.am b/compile.am index f47c2e0..6f6909e 100644 --- a/compile.am +++ b/compile.am @@ -22,7 +22,6 @@ CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ - mostlyclean-am: mostlyclean-compile mostlyclean-compile: ## Don't remove 'core.*' because some distributions have eg "core.c". diff --git a/lib/am/compile.am b/lib/am/compile.am index f47c2e0..6f6909e 100644 --- a/lib/am/compile.am +++ b/lib/am/compile.am @@ -22,7 +22,6 @@ CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ - mostlyclean-am: mostlyclean-compile mostlyclean-compile: ## Don't remove 'core.*' because some distributions have eg "core.c". diff --git a/lib/am/libtool.am b/lib/am/libtool.am index e65e644..71ae829 100644 --- a/lib/am/libtool.am +++ b/lib/am/libtool.am @@ -16,6 +16,7 @@ ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. + .PHONY: mostlyclean-libtool clean-libtool distclean-libtool mostlyclean-am: mostlyclean-libtool mostlyclean-libtool: diff --git a/lib/am/lisp.am b/lib/am/lisp.am index 9502075..323cda4 100644 --- a/lib/am/lisp.am +++ b/lib/am/lisp.am @@ -16,6 +16,20 @@ ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. + +## ---------- ## +## Building. ## +## ---------- ## + +EMACS = @EMACS@ +lispdir = @lispdir@ + +.el.elc: + @echo 'WARNING: Warnings can be ignored. :-)' + if test $(EMACS) != no; then \ + EMACS=$(EMACS) $(SHELL) $(srcdir)/elisp-comp $<; \ + fi + ## ------------ ## ## Installing. ## ## ------------ ## diff --git a/lib/am/texinfos.am b/lib/am/texinfos.am index 0d08fd4..0261ad0 100644 --- a/lib/am/texinfos.am +++ b/lib/am/texinfos.am @@ -35,6 +35,11 @@ endif %?SUBDIRS% info-am: $(INFO_DEPS) dvi-am: $(DVIS) + +## ------------ ## +## Installing. ## +## ------------ ## + ## Look in both . and srcdir because the info pages might have been ## rebuilt in the build directory. Can't cd to srcdir; that might ## break a possible install-sh reference. @@ -90,9 +95,9 @@ install-info-am: $(INFO_DEPS) else : ; fi -## ------------------------- ## -## Uninstalling info pages. ## -## ------------------------- ## +## -------------- ## +## Uninstalling. ## +## -------------- ## ?SUBDIRS?RECURSIVE_TARGETS += uninstall-info-recursive ?SUBDIRS?.PHONY uninstall-info: uninstall-info-recursive @@ -136,8 +141,13 @@ dist-info: $(INFO_DEPS) done -## How to clean. The funny name is due to --cygnus influence; in -## Cygnus mode, `clean-info' is a target that users can use. + +## ---------- ## +## Cleaning. ## +## ---------- ## + +## The funny name is due to --cygnus influence; in Cygnus mode, +## `clean-info' is a target that users can use. .PHONY: mostlyclean-aminfo mostlyclean-am: mostlyclean-aminfo diff --git a/libtool.am b/libtool.am index e65e644..71ae829 100644 --- a/libtool.am +++ b/libtool.am @@ -16,6 +16,7 @@ ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. + .PHONY: mostlyclean-libtool clean-libtool distclean-libtool mostlyclean-am: mostlyclean-libtool mostlyclean-libtool: diff --git a/lisp.am b/lisp.am index 9502075..323cda4 100644 --- a/lisp.am +++ b/lisp.am @@ -16,6 +16,20 @@ ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. + +## ---------- ## +## Building. ## +## ---------- ## + +EMACS = @EMACS@ +lispdir = @lispdir@ + +.el.elc: + @echo 'WARNING: Warnings can be ignored. :-)' + if test $(EMACS) != no; then \ + EMACS=$(EMACS) $(SHELL) $(srcdir)/elisp-comp $<; \ + fi + ## ------------ ## ## Installing. ## ## ------------ ## diff --git a/texinfos.am b/texinfos.am index 0d08fd4..0261ad0 100644 --- a/texinfos.am +++ b/texinfos.am @@ -35,6 +35,11 @@ endif %?SUBDIRS% info-am: $(INFO_DEPS) dvi-am: $(DVIS) + +## ------------ ## +## Installing. ## +## ------------ ## + ## Look in both . and srcdir because the info pages might have been ## rebuilt in the build directory. Can't cd to srcdir; that might ## break a possible install-sh reference. @@ -90,9 +95,9 @@ install-info-am: $(INFO_DEPS) else : ; fi -## ------------------------- ## -## Uninstalling info pages. ## -## ------------------------- ## +## -------------- ## +## Uninstalling. ## +## -------------- ## ?SUBDIRS?RECURSIVE_TARGETS += uninstall-info-recursive ?SUBDIRS?.PHONY uninstall-info: uninstall-info-recursive @@ -136,8 +141,13 @@ dist-info: $(INFO_DEPS) done -## How to clean. The funny name is due to --cygnus influence; in -## Cygnus mode, `clean-info' is a target that users can use. + +## ---------- ## +## Cleaning. ## +## ---------- ## + +## The funny name is due to --cygnus influence; in Cygnus mode, +## `clean-info' is a target that users can use. .PHONY: mostlyclean-aminfo mostlyclean-am: mostlyclean-aminfo -- 2.7.4