Here is a new version of my per target built sources patch. Its main
utility is to allow first time parallel builds of projects containing
built sources without using the deprecated BUILT_SOURCES variable.
It does this by generating a phony target with dependencies on
foo_BUILTSOURCES and foo_DEPENCENCIES but _not_ foo_OBJECTS. The rule
uses make -q to test for a need to rebuild. If make -q returns true,
the objects are built and linked.
If a target depends on one of these phony rules, it is itself marked
as phony to prevent it always rebuilding. The template for the phony
rules is in (program|library|ltlbrary)-hook.am.
Of course if no built sources are detected, the normal program.am et
al are used and none of the above happens.
It uses suffix rules to determine which targets contain built sources
and will generate rules for these targets that generate built sources
before building objects that might use them (think #include of a
non-existant header).
I have also improved suffix rule recognition and added a
USER_DEP_FILES variable so that suffix rules can contribute automated
dependencies. I've also added patsubst style variable expansion, which
is nice.
I've sent the necessary paperwork to RMS. I don't know if he's
received/read it yet though :)
This patch applies cleanly against CVS automake with patch -p1.
Regards,
Alex.
Common subdirectories: automake/CVS and automake-anvil/CVS
diff -u --unidirectional-new-file automake/Changelog.entry
automake-anvil/Changelog.entry
--- automake/Changelog.entry Thu Jan 1 01:00:00 1970
+++ automake-anvil/Changelog.entry Thu Jul 6 13:35:18 2000
@@ -0,0 +1,34 @@
+2000-06-21 Alex Hornby <[EMAIL PROTECTED]>
+
+ * automake.in (handle_source_transform): Added support for per
+ target built source detection using suffix rules. This allows
+ projects with built sources to build with make -j without prior
+ dependency computation.
+ (read_am_file) : Improved suffix rule matching to find rules not
+ split on period. This uses match_suffixes_to_rule to do the actual
+ work.
+ (match_suffixes_to_rule): new function
+ (%reverse_suffix_rules): new global, holds object to source
+ mappings
+ (longest_suffix): new function, finds longest suffix rule matching
+ a source file.
+ (previous_suffix): new function, finds suffix of file that
+ generated this one, if any.
+ (value_to_list): added support for patsubst style variable
+ substitution.
+ (handle_dependencies): added support for USER_DEP_FILES, so that
+ user suffix rules can have their auto generated dependencies
+ considered.
+
+ * depcomp: added extra sed clause to strip of inclusion depth
+ numbers generated by cpp
+
+ * library-hook.am : new file, used to generate a target with per
+ target built sources
+
+ * ltlibrary-hook.am: likewise
+
+ * program-hook.am: likewise
+
+ * Makefile.am: added library-hook.am ltlibrary-hook.am
+ program-hook.am
diff -u --unidirectional-new-file automake/Makefile.am automake-anvil/Makefile.am
--- automake/Makefile.am Mon Nov 22 19:22:02 1999
+++ automake-anvil/Makefile.am Tue Jun 20 10:58:01 2000
@@ -13,9 +13,11 @@
amfiles = clean-hdr.am clean-kr.am clean.am comp-vars.am compile.am \
data-clean.am data.am dejagnu.am depend.am depend2.am dist.am \
dist-vars.am footer.am header-vars.am header.am java-clean.am java.am \
-kr-extra.am library.am libs-clean.am libs.am libtool.am lisp-clean.am \
-lisp.am ltlib-clean.am ltlib.am ltlibrary.am mans-vars.am mans.am \
-multilib.am program.am progs-clean.am progs.am python.am \
+kr-extra.am library.am library-hook.am libs-clean.am libs.am libtool.am \
+lisp-clean.am \
+lisp.am ltlib-clean.am ltlib.am ltlibrary.am ltlibrary-hook.am \
+mans-vars.am mans.am \
+multilib.am program.am program-hook.am progs-clean.am progs.am python.am \
python-clean.am remake-hdr.am remake.am scripts.am subdirs.am \
tags-clean.am tags.am texi-vers.am texinfos.am
diff -u --unidirectional-new-file automake/Makefile.in automake-anvil/Makefile.in
--- automake/Makefile.in Wed Feb 2 04:29:02 2000
+++ automake-anvil/Makefile.in Tue Jun 20 11:00:36 2000
@@ -1,6 +1,6 @@
# Makefile.in generated automatically by automake 1.4a from Makefile.am
-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995-9, 2000 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -31,8 +31,6 @@
includedir = @includedir@
oldincludedir = /usr/include
-DESTDIR =
-
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
@@ -80,9 +78,11 @@
amfiles = clean-hdr.am clean-kr.am clean.am comp-vars.am compile.am \
data-clean.am data.am dejagnu.am depend.am depend2.am dist.am \
dist-vars.am footer.am header-vars.am header.am java-clean.am java.am \
-kr-extra.am library.am libs-clean.am libs.am libtool.am lisp-clean.am \
-lisp.am ltlib-clean.am ltlib.am ltlibrary.am mans-vars.am mans.am \
-multilib.am program.am progs-clean.am progs.am python.am \
+kr-extra.am library.am library-hook.am libs-clean.am libs.am libtool.am \
+lisp-clean.am \
+lisp.am ltlib-clean.am ltlib.am ltlibrary.am ltlibrary-hook.am \
+mans-vars.am mans.am \
+multilib.am program.am program-hook.am progs-clean.am progs.am python.am \
python-clean.am remake-hdr.am remake.am scripts.am subdirs.am \
tags-clean.am tags.am texi-vers.am texinfos.am
@@ -135,7 +135,7 @@
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnits Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
@@ -292,7 +292,6 @@
d=$(srcdir); \
for file in `CDPATH=: && cd $$d && eval echo $$base*`; do \
test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file; \
done; \
done
@@ -414,7 +413,7 @@
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
- mkid -f$$here/ID $$unique $(LISP)
+ mkid -fID $$unique $(LISP)
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
@@ -503,11 +502,12 @@
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
- cp -pR $$d/$$file $(distdir); \
+ cp -pR $$d/$$file $(distdir) \
+ || exit 1; \
else \
test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
fi; \
done
for subdir in $(SUBDIRS); do \
diff -u --unidirectional-new-file automake/automake.in automake-anvil/automake.in
--- automake/automake.in Thu Jul 6 13:32:29 2000
+++ automake-anvil/automake.in Thu Jul 6 13:36:09 2000
@@ -1477,6 +1477,22 @@
$linker = $temp if $linker eq '';
&define_pretty_variable ($xpfx . $one_file . "_OBJECTS", '', @result)
unless $prefix =~ /EXTRA_/;
+
+ local ($bs, @builtsources);
+ foreach $bs ( @files )
+ {
+ local ($sf) = longest_suffix($bs);
+ if ( $sf ne '' && previous_suffix($sf) ne $sf )
+ {
+ print "$bs identified as a built source\n" if $verbose;
+ push @builtsources, $bs;
+ }
+ }
+ if ( scalar @builtsources != 0)
+ {
+ &define_pretty_variable ( $one_file . "_BUILTSOURCES", '',
+ @builtsources);
+ }
}
local (@keys) = sort keys %used_pfx;
@@ -1694,6 +1710,43 @@
return $xname;
}
+# Add a phony make rule.
+# prevents double append and keeps a hash of the values
+sub add_phony
+{
+ local ( @new_phonies ) = @_;
+ local $rule;
+ foreach $rule ( @new_phonies )
+ {
+ unless( exists ( %phony_hash->{$rule} ) )
+ {
+ push ( @phony, $rule );
+ %phony_hash->{$rule} = 1;
+ }
+ }
+}
+
+# Check if a variable contains phony targets
+sub contains_phony
+{
+ local ($varname) = @_;
+ local $res = 0;
+ if ( &variable_defined($varname) )
+ {
+ local @values = &variable_value_as_list ( $varname, '' );
+ local @t;
+ foreach $t ( @values )
+ {
+ if ( exists( %phony_hash->{$t} ) )
+ {
+ $res = 1;
+ last;
+ }
+ }
+ }
+ return $res;
+}
+
# Handle C programs.
sub handle_programs
{
@@ -1785,13 +1838,28 @@
}
local ($xexe);
+ local ($makename);
if ($seen_exeext && $one_file !~ /\./)
{
$xexe = 's/\@EXEEXT\@/\$(EXEEXT)/g;';
+ $makename = $one_file . '$(EXEEXT)';
}
else
{
$xexe = 's/\@EXEEXT\@//g;';
+ $makename = $one_file;
+ }
+
+ local $template = '';
+ if ( &variable_defined ($xname . '_BUILTSOURCES' ) ||
+ &contains_phony( $xname . '_DEPENDENCIES' ) )
+ {
+ $template = 'program-hook';
+ &add_phony( $makename );
+ }
+ else
+ {
+ $template = 'program';
}
$output_rules .=
@@ -1800,7 +1868,7 @@
. 's/\@XPROGRAM\@/' . $xname . '/go;'
. 's/\@XLINK\@/' . $xlink . '/go;'
. $xexe,
- 'program');
+ $template);
}
if (&variable_defined ('LDADD') && &handle_lib_objects ('', 'LDADD', 0))
@@ -1905,11 +1973,19 @@
&handle_source_transform ($xlib, $onelib, $obj);
+ local $template = '';
+ if ( &variable_defined ($xlib . '_BUILTSOURCES' ) ) {
+ $template = 'library-hook';
+ &add_phony( $onelib);
+ } else {
+ $template = 'library';
+ }
+
$output_rules .=
&file_contents_with_transform ('s/\@LIBRARY\@/' . $onelib . '/go;'
. 's/\@XLIBRARY\@/'
. $xlib . '/go;',
- 'library');
+ $template);
}
if ($seen_libobjs)
@@ -2057,7 +2133,14 @@
$rpath = ('s/\@RPATH\@/-rpath \$(' . $instdirs{$onelib}
. 'dir)/go;');
}
-
+
+ local $template = '';
+ if ( &variable_defined ($xlib . '_BUILTSOURCES' ) ) {
+ $template = 'ltlibrary-hook';
+ &add_phony( $onelib);
+ } else {
+ $template = 'ltlibrary';
+ }
$output_rules .=
&file_contents_with_transform ('s/\@LTLIBRARY\@/'
. $onelib . '/go;'
@@ -2065,7 +2148,7 @@
. $xlib . '/go;'
. $rpath
. 's/\@XLINK\@/' . $xlink . '/go;',
- 'ltlibrary');
+ $template);
}
if ($seen_libobjs)
@@ -2357,7 +2440,7 @@
$xform .= ' s/\@TEXINFODIR\@/' . $xxform . '/g;';
$output_rules .= &file_contents_with_transform ($xform, 'texinfos');
- push (@phony, 'install-info-am', 'uninstall-info');
+ &add_phony( 'install-info-am', 'uninstall-info');
push (@dist_targets, 'dist-info');
# How to clean. The funny name is due to --cygnus influence; in
@@ -2468,7 +2551,7 @@
$output_rules .= &file_contents_with_transform ('s/\@SECTION\@/'
. $sect . '/g;',
'mans');
- push (@phony, 'install-man' . $sect, 'uninstall-man' . $sect);
+ &add_phony( 'install-man' . $sect, 'uninstall-man' . $sect);
push (@namelist, 'install-man' . $sect);
}
@@ -2480,12 +2563,12 @@
$output_rules .= ("install-man: \$(MANS)\n"
. "\t\@\$(NORMAL_INSTALL)\n");
&pretty_print_rule ("\t\$(MAKE) \$(AM_MAKEFLAGS)", "\t ", @namelist);
- push (@phony, 'install-man');
+ &add_phony( 'install-man');
$output_rules .= "uninstall-man:\n\t\@\$(NORMAL_UNINSTALL)\n";
grep ($_ = 'un' . $_, @namelist);
&pretty_print_rule ("\t\$(MAKE) \$(AM_MAKEFLAGS)", "\t ", @namelist);
- push (@phony, 'uninstall-man');
+ &add_phony( 'uninstall-man');
$output_vars .= &file_contents ('mans-vars');
@@ -2508,7 +2591,7 @@
# Handle TAGS.
sub handle_tags
{
- push (@phony, 'tags');
+ &add_phony( 'tags');
local (@tag_deps) = ();
if (&variable_defined ('SUBDIRS'))
{
@@ -2520,7 +2603,7 @@
. " && \$(MAKE) \$(AM_MAKEFLAGS) tags); \\\n"
. "\tdone\n");
push (@tag_deps, 'tags-recursive');
- push (@phony, 'tags-recursive');
+ &add_phony( 'tags-recursive');
}
if (&saw_sources_p (1)
@@ -2579,7 +2662,7 @@
$output_rules .= &file_contents ('multilib.am');
&push_phony_cleaners ('multi');
- push (@phony, 'all-multi', 'install-multi');
+ &add_phony( 'all-multi', 'install-multi');
}
# Worker for handle_dist.
@@ -2751,7 +2834,7 @@
. " distdir=\"\$(distdir)\" $targ\n");
}
- push (@phony, 'distdir');
+ &add_phony( 'distdir');
}
# Handle 'dist' target.
@@ -3033,6 +3116,11 @@
local ($iter);
local (@deplist) = sort keys %dep_files;
+ # Allow the user to add dependency files if they wish
+ if ( &variable_defined('USER_DEP_FILES') )
+ {
+ push @deplist, &variable_value_as_list ('USER_DEP_FILES', '');
+ }
&define_pretty_variable ('DEP_FILES', '', ("\@AMDEP\@", @deplist));
# Generate each `include' individually. Irix 6 make will
@@ -3098,12 +3186,12 @@
local ($phonies);
foreach $phonies ('', '-data', '-exec', 'dirs')
{
- push (@phony, 'install' . $phonies . '-recursive');
- push (@phony, 'uninstall' . $phonies . '-recursive');
+ &add_phony( 'install' . $phonies . '-recursive');
+ &add_phony( 'uninstall' . $phonies . '-recursive');
}
foreach $phonies ('all', 'check', 'installcheck', 'info', 'dvi')
{
- push (@phony, $phonies . '-recursive');
+ &add_phony( $phonies . '-recursive');
}
&push_phony_cleaners ('recursive');
@@ -3669,13 +3757,13 @@
# rule will work correctly.
$output_rules .= ("installdirs: installdirs-recursive\n"
. "installdirs-am:\n");
- push (@phony, 'installdirs-am');
+ &add_phony( 'installdirs-am');
}
else
{
$output_rules .= "installdirs:\n";
}
- push (@phony, 'installdirs');
+ &add_phony( 'installdirs');
if (@installdirs)
{
&pretty_print_rule ("\t" . '$(mkinstalldirs) ', "\t\t",
@@ -3772,7 +3860,7 @@
. " all-recursive"
. "\n\n");
$all_target = 'all-recursive-am';
- push (@phony, 'all-recursive-am');
+ &add_phony( 'all-recursive-am');
}
}
@@ -3793,7 +3881,7 @@
$output_rules .= ("install-strip:\n\t"
. '$(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install'
. "\n");
- push (@phony, 'install-strip');
+ &add_phony( 'install-strip');
}
# Helper for handle_merge_targets. Note that handle_merge_targets
@@ -3806,7 +3894,7 @@
{
# User defined local form of target. So include it.
push (@values, $name . '-local');
- push (@phony, $name . '-local');
+ &add_phony( $name . '-local');
}
&pretty_print_rule ($name . "-am:", "\t\t", @values);
@@ -3837,11 +3925,11 @@
{
$tname = 'all-redirect';
$lname = $all_target if $recursive_install;
- push (@phony, 'all-redirect');
+ &add_phony( 'all-redirect');
$output_all = "all: all-redirect\n";
}
&pretty_print_rule ($tname . ":", "\t\t", $lname);
- push (@phony, $name . '-am', $name);
+ &add_phony( $name . '-am', $name);
}
# Handle check merge target specially.
@@ -3851,7 +3939,7 @@
{
# User defined local form of target. So include it.
push (@check_tests, 'check-local');
- push (@phony, 'check-local');
+ &add_phony( 'check-local');
}
# In --cygnus mode, check doesn't depend on all.
@@ -3874,7 +3962,7 @@
@check_tests)
if @check_tests;
- push (@phony, 'check', 'check-am');
+ &add_phony( 'check', 'check-am');
$output_rules .= ("check: "
. ($recursive_install ? 'check-recursive' : 'check-am')
. "\n");
@@ -3930,7 +4018,7 @@
&do_one_clean_target ('clean', 'dist', '', @clean);
&do_one_clean_target ('clean', 'maintainer-', 'dist', @clean);
- push (@phony, 'clean', 'mostlyclean', 'distclean', 'maintainer-clean');
+ &add_phony( 'clean', 'mostlyclean', 'distclean', 'maintainer-clean');
}
# Helper for handle_clean.
@@ -4002,7 +4090,7 @@
if (defined $options{'dejagnu'})
{
push (@check_tests, 'check-DEJAGNU');
- push (@phony, 'check-DEJAGNU');
+ &add_phony( 'check-DEJAGNU');
local ($xform);
if ($cygnus_mode)
@@ -4081,7 +4169,7 @@
if (&variable_defined ('TESTS'))
{
push (@check_tests, 'check-TESTS');
- push (@phony, 'check-TESTS');
+ &add_phony( 'check-TESTS');
# Note: Solaris 2.7 seems to expand TESTS using VPATH. That's
# why we also try `dir='
@@ -5320,6 +5408,80 @@
}
}
+# Finds longest initial suffix, then longest trailing for that intial
+sub match_suffixes_to_rule
+{
+ local ($rule) = @_;
+ local @result = ();
+
+ local $s = '';
+ local @sufbylen = ();
+
+ # Gather all know suffixes
+ if ( variable_defined("SUFFIXES") )
+ {
+ @sufbylen = sort { length($b)<=>length($a) }
+ ( @suffixes, &variable_value_as_list ('SUFFIXES', '') );
+ }
+ else
+ {
+ @sufbylen = sort { length($b)<=>length($a) }( @suffixes);
+ }
+
+ # Match longest source suffix
+ foreach $s ( @sufbylen )
+ {
+ if ( $rule =~ m/^$s/ )
+ {
+ $result[0] = $s;
+ last;
+ }
+ }
+ # Match longest target suffix
+ foreach $s ( @sufbylen )
+ {
+ if ( $rule =~ m/${result[0]}${s}$/ )
+ {
+ $result[1] = $s;
+ last;
+ }
+ }
+
+ return @result;
+}
+
+# This function takes a source file name and return the longest suffix that
+# matches
+sub longest_suffix
+{
+ local ($filename) = @_;
+ local ($longest_suffix) = '';
+ local ($suf);
+ foreach $suf ( keys %reverse_suffix_rules )
+ {
+ if ( length($suf) > length($longest_suffix) &&
+ $filename =~ m/${suf}$/ )
+ {
+ $longest_suffix = $suf;
+ }
+ }
+ return $longest_suffix;
+}
+
+# This function gives the suffix this suffix was generated from
+# In the case of normal static source files, it will always return
+# the same as the input
+sub previous_suffix
+{
+ local ($source_ext) = @_;
+ while ( defined $reverse_suffix_rules{$source_ext})
+ {
+ $source_ext = $reverse_suffix_rules{$source_ext};
+ }
+ return $source_ext;
+}
+
+
# This function is used to find a path from a user-specified suffix to
# `o' or to some other suffix we recognize internally, eg `cc'.
sub derive_suffix
@@ -5860,16 +6022,30 @@
{
$varname = $1;
$to = $3;
- ($from = $2) =~ s/(\W)/\\$1/g;
+ ($from = $2) =~ s/(\W)/$1/g;
}
# Find the value.
@temp_list = &variable_value_as_list_worker ($1, $cond, $var);
# Now rewrite the value if appropriate.
- if ($from)
+ if ($from =~ '^([^%]*)%([^%]*)')
+ {
+ # patsubst style substitution
+ local ($prefrom, $suffrom, $preto, $sufto);
+ $prefrom = $1;
+ $suffrom = $2;
+ if ( $to =~ '^([^%]*)%([^%]*)')
+ {
+ $preto = $1;
+ $sufto = $2;
+ }
+ grep (s/$prefrom$_$suffrom$/$preto$_$sufto/, @temp_list);
+ }
+ elsif ($from)
{
- grep (s/$from$/$to/, @temp_list);
+ # standard substitution reference style
+ grep (s/$from$/$to/, @temp_list);
}
push (@result, @temp_list);
@@ -6246,14 +6422,16 @@
# Check the rule for being a suffix rule. If so, store in
# a hash.
- local ($source_suffix);
- local ($object_suffix);
-
- if (($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) . ")";
+ local ($source_suffix) = '';
+ local ($object_suffix) = '';
+
+ ($source_suffix, $object_suffix) = match_suffixes_to_rule($1);
+ if ($source_suffix ne '' && $object_suffix ne '')
+ {
+ $suffix_rules{$source_suffix} = $object_suffix;
+ $reverse_suffix_rules{$object_suffix} = $source_suffix;
+ print "Sources ending in $source_suffix become $object_suffix\n" if
+$verbose;
+ $source_suffix_pattern = "(" . join ('|', keys %suffix_rules) . ")";
}
# FIXME: make sure both suffixes are in SUFFIXES? Or set
@@ -6779,6 +6957,7 @@
@clean = ();
@phony = ();
+ %phony_hash = ();
# A list of files deleted by `maintainer-clean'.
@maintainer_clean_files = ();
@@ -6846,6 +7025,9 @@
# corresponding output extension.
%suffix_rules = ();
+ # Reverse mapping of suffix rules. Used for detecting built sources
+ %reverse_suffix_rules = ();
+
# This is a regular expression which matches all the known source
# suffix. A source suffix is one that appears in the first
# position of a suffix rule.
@@ -6978,7 +7160,7 @@
}
}
- close (FC_FILE);
+ close (FC_FILE);
return $result_vars . $result_rules . $comment;
}
@@ -7306,17 +7488,17 @@
$file);
push (@uninstall, 'uninstall-' . $X . $primary);
- push (@phony, 'uninstall-' . $X . $primary);
+ &add_phony( 'uninstall-' . $X . $primary);
push (@installdirs, '$(DESTDIR)$(' . $X . 'dir)');
if (defined $exec_dir_p{$X} ? $exec_dir_p{$X} : ($X =~ /exec/))
{
push (@install_exec, 'install-' . $X . $primary);
- push (@phony, 'install-' . $X . $primary);
+ &add_phony( 'install-' . $X . $primary);
}
else
{
push (@install_data, 'install-' . $X . $primary);
- push (@phony, 'install-' . $X . $primary);
+ &add_phony( 'install-' . $X . $primary);
}
}
}
@@ -7645,7 +7827,7 @@
local ($target);
foreach $target ('mostly', 'dist', '', 'maintainer-')
{
- push (@phony, $target . 'clean-' . $base);
+ &add_phony( $target . 'clean-' . $base);
}
}
diff -u --unidirectional-new-file automake/depcomp automake-anvil/depcomp
--- automake/depcomp Sat Jun 3 00:27:02 2000
+++ automake-anvil/depcomp Mon Jun 26 11:05:15 2000
@@ -250,7 +250,8 @@
;;
esac
"$@" -E |
- sed -n '/^# [0-9][0-9]* "\([^"]*\)"/ s::'"$object"'\: \1:p' > "$tmpdepfile"
+ sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+ sed '$ s: \\$::' > "$tmpdepfile"
) &
proc=$!
"$@"
@@ -258,8 +259,9 @@
wait "$proc"
if test "$stat" != 0; then exit $stat; fi
rm -f "$depfile"
- cat < "$tmpdepfile" > "$depfile"
- sed < "$tmpdepfile" -e 's/^[^:]*: //' -e 's/$/ :/' >> "$depfile"
+ echo "$object : \\" > "$depfile"
+ cat < "$tmpdepfile" >> "$depfile"
+ sed < "$tmpdepfile" -e '/^$/d' -e 's/^ //' -e 's/ \\$//' -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
diff -u --unidirectional-new-file automake/library-hook.am
automake-anvil/library-hook.am
--- automake/library-hook.am Thu Jan 1 01:00:00 1970
+++ automake-anvil/library-hook.am Tue Jul 4 10:00:35 2000
@@ -0,0 +1,32 @@
+## automake - create Makefile.in from Makefile.am
+## Copyright (C) 1994, 1995, 1996, 1999 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.
+
+@XLIBRARY@-library-hooks-query: $(@XLIBRARY@_DEPENDENCIES) $(@XLIBRARY@_BUILTSOURCES)
+$(@XLIBRARY@_OBJECTS)
+
+@LIBRARY@: $(@XLIBRARY@_DEPENDENCIES) $(@XLIBRARY@_BUILTSOURCES)
+## See if this is needed. Can't use standard dependencies above, as
+## a parallel build might try to build objects from built sources before
+## the sources exist
+ @$(MAKE) -q @XLIBRARY@-library-hooks-query || { \
+ $(MAKE) $(@XLIBRARY@_OBJECTS) && \
+ rm -f @LIBRARY@ && \
+ echo $(@XLIBRARY@_AR) @LIBRARY@ $(@XLIBRARY@_OBJECTS) $(@XLIBRARY@_LIBADD) && \
+ $(@XLIBRARY@_AR) @LIBRARY@ $(@XLIBRARY@_OBJECTS) $(@XLIBRARY@_LIBADD) && \
+ echo $(RANLIB) @LIBRARY@ && \
+ $(RANLIB) @LIBRARY@; \
+ }
diff -u --unidirectional-new-file automake/ltlibrary-hook.am
automake-anvil/ltlibrary-hook.am
--- automake/ltlibrary-hook.am Thu Jan 1 01:00:00 1970
+++ automake-anvil/ltlibrary-hook.am Tue Jul 4 10:00:15 2000
@@ -0,0 +1,30 @@
+## automake - create Makefile.in from Makefile.am
+## Copyright (C) 1994, 1995, 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.
+
+@XLTLIBRARY@-ltlibrary-hooks-query: $(@XLTLIBRARY@_DEPENDENCIES)
+$(@XLTLIBRARY@_BUILTSOURCES) $(@XLTLIBRARY@_OBJECTS)
+
+@LTLIBRARY@: $(@XLTLIBRARY@_DEPENDENCIES) $(@XLTLIBRARY@_BUILTSOURCES)
+## See if this is needed. Can't use objects in standard dependencies above, as
+## a parallel build might try to build objects from built sources before
+## the sources exist
+ @$(MAKE) -q @XLTLIBRARY@-ltlibrary-hooks-query || { \
+ $(MAKE) $(@XLTLIBRARY@_OBJECTS) && \
+ rm -f @LIBRARY@ && \
+ echo $(@XLINK@) @RPATH@ $(@XLTLIBRARY@_LDFLAGS) $(@XLTLIBRARY@_OBJECTS)
+$(@XLTLIBRARY@_LIBADD) $(LIBS) && \
+ $(@XLINK@) @RPATH@ $(@XLTLIBRARY@_LDFLAGS) $(@XLTLIBRARY@_OBJECTS)
+$(@XLTLIBRARY@_LIBADD) $(LIBS); \
+ }
Common subdirectories: automake/m4 and automake-anvil/m4
diff -u --unidirectional-new-file automake/program-hook.am
automake-anvil/program-hook.am
--- automake/program-hook.am Thu Jan 1 01:00:00 1970
+++ automake-anvil/program-hook.am Tue Jul 4 09:59:58 2000
@@ -0,0 +1,30 @@
+## automake - create Makefile.in from Makefile.am
+## Copyright (C) 1994, 1995, 1996, 1997 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.
+
+@XPROGRAM@-program-hooks-query: $(@XPROGRAM@_DEPENDENCIES) $(@XPROGRAM@_BUILTSOURCES)
+$(@XPROGRAM@_OBJECTS)
+
+@PROGRAM@@EXEEXT@: $(@XPROGRAM@_DEPENDENCIES) $(@XPROGRAM@_BUILTSOURCES)
+## See if this is needed. Can't use objects in standard dependencies above, as
+## a parallel build might try to build objects from built sources before
+## the sources exist
+ @$(MAKE) -q @XPROGRAM@-program-hooks-query || { \
+ $(MAKE) $(@XPROGRAM@_OBJECTS) && \
+ rm -f @PROGRAM@@EXEEXT@ && \
+ echo $(@XLINK@) $(@XPROGRAM@_LDFLAGS) $(@XPROGRAM@_OBJECTS)
+$(@XPROGRAM@_LDADD) $(LIBS) && \
+ $(@XLINK@) $(@XPROGRAM@_LDFLAGS) $(@XPROGRAM@_OBJECTS) $(@XPROGRAM@_LDADD)
+$(LIBS); \
+ }
Common subdirectories: automake/tests and automake-anvil/tests