From f514925ac5d420688f4810ad19a336e964269035 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sun, 1 Jun 1997 23:08:48 +0000 Subject: [PATCH] more pre-built-sources support --- ChangeLog | 3 +++ automake.in | 38 +++++++++++++++++++++++--------------- 2 files changed, 26 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0c2d8452..d42aca99 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ Sun Jun 1 13:16:05 1997 Tom Tromey + * automake.in (handle_built_sources): Handle PRE_BUILT_SOURCES. + (handle_configure): Likewise. + * depend2.am (.deps/%.P): Don't generate file if MKDEP fails. From Alexandre Oliva. diff --git a/automake.in b/automake.in index 4c90c5eb..9609b817 100755 --- a/automake.in +++ b/automake.in @@ -1242,25 +1242,33 @@ sub handle_source_transform # Handle the BUILT_SOURCES variable. sub handle_built_sources { - return unless &variable_defined ('BUILT_SOURCES'); - push (@all, '$(BUILT_SOURCES)'); + local ($prefix); - local (@sources) = &variable_value_as_list ('BUILT_SOURCES', 'all'); - local ($s); - foreach $s (@sources) + foreach $prefix ('', 'PRE_') { - if (/^\@.*\@$/) + next unless &variable_defined ($prefix . 'BUILT_SOURCES'); + push (@all, '$(' . $prefix . 'BUILT_SOURCES)'); + + local (@sources) = &variable_value_as_list ($prefix. 'BUILT_SOURCES', + 'all'); + local ($s); + foreach $s (@sources) { - # FIXME: is this really the right thing to do? - &am_line_error ('BUILT_SOURCES', "\`BUILT_SOURCES' should not contain a configure substitution"); - last; + if (/^\@.*\@$/) + { + # FIXME: is this really the right thing to do? + &am_line_error ($prefix . 'BUILT_SOURCES', + "\`" . $prefix + . "BUILT_SOURCES' should not contain a configure substitution"); + last; + } } - } - # We don't care about the return value of this function. We just - # want to make sure to update %dep_files with the contents of - # BUILT_SOURCES. - &handle_single_transform_list (@sources); + # We don't care about the return value of this function. We + # just want to make sure to update %dep_files with the + # contents of BUILT_SOURCES. + &handle_single_transform_list (@sources); + } } # Special-case @ALLOCA@ and @LIBOBJS@ in _LDADD or _LIBADD variables. @@ -2902,7 +2910,7 @@ sub handle_configure # a workaround for an obscure bug with # AC_LINK_FILES. Anyway, when dependencies are # turned off, this shouldn't matter. - . ($use_dependencies ? ' $(BUILT_SOURCES)' : '') + . ($use_dependencies ? ' $(PRE_BUILT_SOURCES) $(BUILT_SOURCES)' : '') . "\n" . "\tcd \$(top_builddir) \\\n" . "\t && CONFIG_FILES=" -- 2.43.5