There are two chunks I would have liked to remove, but couldn't:
@@ -1266,8 +1266,6 @@ sub get_object_extension
}
}
- push (@suffixes, '.c', '.o', '.obj');
-
$included_generic_compile = 1;
}
I can remove this one, because I have not yet found where the rules
are issued... It is not coming from depend2.am necessarily, and
actually if you don't include this, some PREFIXES are missing, and
ansi3 fails.
@@ -1276,8 +1274,6 @@ sub get_object_extension
# Output the libtool compilation rules.
$output_rules .= &file_contents ('libtool');
- push (@suffixes, '.lo');
-
$included_libtool_compile = 1;
}
I can't remove this one, because I suspect the same as above: I'm not
sure where the suffix rules are coming from, hence I'm not sure they
are properly discovered.
There one easy means to workaround these issues: use
SUFFIXES += .lo
etc. in those files. But then the current ownership rules for
variables will fail. Yes, the user is allowed to extend/override
Automake variables, but then, since we are documenting `SUFFIXES =',
and not `SUFFIXES +=', bad things could happen. We also could use
_AM_SUFFIXES in the *.am files (and actually it matches the actual
system where user suffixes are enumerated first, and then the
``_AM_SUFFIXES''), but I find this kludgy. In fact, no suffix should
have to be listed, they all should be discovered (but for non `.*'
pathological case, which anyway Automake does not recognize IIRC).
(In fact, I've just discovered it's coming from finish_language. Once
I fully understand it, I'll finish cleaning up @suffixes).
Index: ChangeLog
from Akim Demaille <[EMAIL PROTECTED]>
* 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.
Index: Makefile.in
--- Makefile.in Tue, 13 Mar 2001 01:26:20 +0100 akim (am/h/16_Makefile.i 1.54 644)
+++ Makefile.in Tue, 13 Mar 2001 23:52:01 +0100 akim (am/h/16_Makefile.i 1.54 644)
@@ -146,7 +146,7 @@
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) && \
Index: automake.in
--- automake.in Tue, 13 Mar 2001 01:26:20 +0100 akim (am/f/39_automake.i 1.187 755)
+++ automake.in Tue, 13 Mar 2001 23:45:06 +0100 akim (am/f/39_automake.i 1.187 755)
@@ -2696,7 +2692,6 @@ sub handle_texinfo
('TEXICLEAN' => $texiclean));
push (@dist_targets, 'dist-info');
- push (@suffixes, '.texi', '.texinfo', '.txi', '.info', '.dvi', '.ps');
if (! defined $options{'no-installinfo'})
{
@@ -4008,16 +4003,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);
@@ -6263,19 +6248,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?
}
################################################################
Index: compile.am
--- compile.am Sun, 11 Mar 2001 21:03:14 +0100 akim (am/g/48_compile.am 1.5 644)
+++ compile.am Tue, 13 Mar 2001 23:49:54 +0100 akim (am/g/48_compile.am 1.5 644)
@@ -22,7 +22,6 @@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
-
mostlyclean-am: mostlyclean-compile
mostlyclean-compile:
## Don't remove 'core.*' because some distributions have eg "core.c".
Index: libtool.am
--- libtool.am Sun, 04 Feb 2001 14:35:53 +0100 akim (am/g/31_libtool.am 1.3 644)
+++ libtool.am Tue, 13 Mar 2001 23:51:38 +0100 akim (am/g/31_libtool.am 1.3 644)
@@ -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:
Index: lisp.am
--- lisp.am Mon, 12 Mar 2001 21:28:36 +0100 akim (am/g/29_lisp.am 1.13 644)
+++ lisp.am Tue, 13 Mar 2001 23:45:08 +0100 akim (am/g/29_lisp.am 1.13 644)
@@ -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. ##
## ------------ ##
Index: texinfos.am
--- texinfos.am Tue, 13 Mar 2001 01:26:20 +0100 akim (am/g/10_texinfos.a 1.17 644)
+++ texinfos.am Tue, 13 Mar 2001 23:29:32 +0100 akim (am/g/10_texinfos.a 1.17 644)
@@ -35,6 +35,11 @@
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 @@
else : ; fi
-## ------------------------- ##
-## Uninstalling info pages. ##
-## ------------------------- ##
+## -------------- ##
+## Uninstalling. ##
+## -------------- ##
?SUBDIRS?RECURSIVE_TARGETS += uninstall-info-recursive
?SUBDIRS?.PHONY uninstall-info: uninstall-info-recursive
@@ -136,8 +141,13 @@
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