From: Alexandre Duret-Lutz Date: Tue, 23 Sep 2003 08:14:35 +0000 (+0000) Subject: Support for multiple inputs in AC_CONFIG_FILES. X-Git-Tag: Release-1-7b~51 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74fe06a8da51f85af74d7cb8ec9b5531f4939bfb;p=thirdparty%2Fautomake.git Support for multiple inputs in AC_CONFIG_FILES. Requested long ago by Harlan Stenn. * automake.in (handle_dist): Remove unused argument $makefile. (handle_subdirs): Expect SUBDIRS elements in $relative_dir, not $am_relative_dir. (rewrite_inputs_into_dependencies): Allow $add_srcdir to be a filename that must always be prefixed by $(srcdir) or $(top_srcdir). (handle_configure, generate_makefile): Revamp to make the Makefile.am, Makefile.in, Makefile more independent. (locate_am): New function. (scan_configure_dep, parse_arguments): Use locate_am. (MAIN): Adjust call to generate_makefile. * lib/am/configure.am: Remove %MAKEFILE-IN% from the dependencies of %MAKEFILE%. %MAKEFILE-IN% is already in %MAKEFILE-DEPS%. * tests/output6.test, tests/output7.test: New files. * tests/Makefile.am (TESTS): Add them. * automake.texi (Requirements) : Document how multiple inputs are scanned. --- diff --git a/ChangeLog b/ChangeLog index 01fcb06e7..dca3139e6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,25 @@ +2003-09-23 Alexandre Duret-Lutz + + Support for multiple inputs in AC_CONFIG_FILES. + Requested long ago by Harlan Stenn. + * automake.in (handle_dist): Remove unused argument $makefile. + (handle_subdirs): Expect SUBDIRS elements in $relative_dir, + not $am_relative_dir. + (rewrite_inputs_into_dependencies): Allow $add_srcdir to + be a filename that must always be prefixed by $(srcdir) or + $(top_srcdir). + (handle_configure, generate_makefile): Revamp to make the + Makefile.am, Makefile.in, Makefile more independent. + (locate_am): New function. + (scan_configure_dep, parse_arguments): Use locate_am. + (MAIN): Adjust call to generate_makefile. + * lib/am/configure.am: Remove %MAKEFILE-IN% from the dependencies + of %MAKEFILE%. %MAKEFILE-IN% is already in %MAKEFILE-DEPS%. + * tests/output6.test, tests/output7.test: New files. + * tests/Makefile.am (TESTS): Add them. + * automake.texi (Requirements) : Document how + multiple inputs are scanned. + 2003-09-13 Alexandre Duret-Lutz * Makefile.am (FETCHFILES, fetch): Do not fetch lib/Automake/XFile.pm diff --git a/Makefile.in b/Makefile.in index fbde9e845..7cef79d1e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -201,7 +201,7 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) $( echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ diff --git a/NEWS b/NEWS index b6e812f88..c2de8161c 100644 --- a/NEWS +++ b/NEWS @@ -95,6 +95,11 @@ New in 1.7a: will only be useful in projects generated with future versions of these tools. + - When using AC_CONFIG_FILES with multiple input files, Automake + generates the first ".in" input file for which a ".am" exists. + (Former versions would try to use only the first of the input + files.) + * Obsolete features - lisp_DATA is now allowed. If you are using the empty ELCFILES diff --git a/automake.in b/automake.in index cd182f742..f241b7422 100755 --- a/automake.in +++ b/automake.in @@ -3041,13 +3041,11 @@ sub for_dist_common } -# handle_dist ($MAKEFILE) -# ----------------------- +# handle_dist +# ----------- # Handle 'dist' target. -sub handle_dist +sub handle_dist () { - my ($makefile) = @_; - # `make dist' isn't used in a Cygnus-style tree. # Omit the rules so that people don't try to use them. return if option 'cygnus'; @@ -3260,9 +3258,9 @@ sub handle_subdirs () # Skip directories substituted by configure. next if $dir =~ /^\@.*\@$/; - if (! -d $am_relative_dir . '/' . $dir) + if (! -d $relative_dir . '/' . $dir) { - err_var ('SUBDIRS', "required directory $am_relative_dir/$dir " + err_var ('SUBDIRS', "required directory $relative_dir/$dir " . "does not exist"); next; } @@ -3328,8 +3326,11 @@ sub scan_aclocal_m4 () # AC_OUTPUT. Consider what the dependencies should look like in this # case: # AC_OUTPUT(src/out:src/in1:lib/in2) -# The first argument, ADD_SRCDIR, is 1 if $(top_srcdir) should be added. -# If 0 then files that require this addition will simply be ignored. +# If the first argument, ADD_SRCDIR, is non-zero (e.g. 1), $(top_srcdir) +# is added to files which are not in the current directory. +# If ADD_SRCDIR is a filename and the filename occurs in INPUTS, it +# will be prefixed with $(srcdir) unless already prefixed by $(top_srcdir) +# by the above rule. sub rewrite_inputs_into_dependencies ($@) { my ($add_srcdir, @inputs) = @_; @@ -3339,62 +3340,57 @@ sub rewrite_inputs_into_dependencies ($@) { if (dirname ($single) eq $relative_dir) { - push (@newinputs, basename ($single)); + push (@newinputs, + ($add_srcdir eq $single ? '$(srcdir)/' : '') + . basename ($single)); } else { - push (@newinputs, ($add_srcdir ? '$(top_srcdir)/' : '') . $single); + push (@newinputs, + ($add_srcdir ? '$(top_srcdir)/' : '') . $single); } } return @newinputs; } -# &handle_configure ($LOCAL, $INPUT, @SECONDARY_INPUTS) -# ----------------------------------------------------- +# &handle_configure ($MAKEFILE_AM, $MAKEFILE_IN, $MAKEFILE, @INPUTS) +# ------------------------------------------------------------------ # Handle remaking and configure stuff. # We need the name of the input file, to do proper remaking rules. -sub handle_configure ($$@) +sub handle_configure ($$$@) { - my ($local, $input, @secondary_inputs) = @_; + my ($makefile_am, $makefile_in, $makefile, @inputs) = @_; - my $input_base = basename ($input); - my $local_base = basename ($local); - - my $amfile = $input_base . '.am'; - # We know we can always add '.in' because it really should be an - # error if the .in was missing originally. - my $infile = '$(srcdir)/' . $input_base . '.in'; - my $colon_infile = ''; - if ($local ne $input || @secondary_inputs) - { - $colon_infile = ':' . $input . '.in'; - } - $colon_infile .= ':' . join (':', @secondary_inputs) - if @secondary_inputs; + prog_error 'empty @inputs' + unless @inputs; - my @rewritten = rewrite_inputs_into_dependencies (1, @secondary_inputs); + my ($rel_makefile_am) = rewrite_inputs_into_dependencies (1, $makefile_am); + my ($rel_makefile_in) = rewrite_inputs_into_dependencies ($makefile_in, + $makefile_in); + my $rel_makefile = basename $makefile; + my $colon_infile = ':' . join (':', @inputs); + $colon_infile = '' if $colon_infile eq ":$makefile.in"; + my @rewritten = rewrite_inputs_into_dependencies ($makefile_in, @inputs); my ($regen_aclocal_m4, @aclocal_m4_deps) = scan_aclocal_m4; - - define_pretty_variable ('am__configure_deps', TRUE, INTERNAL, @configure_deps); $output_rules .= file_contents ('configure', new Automake::Location, - MAKEFILE => $local_base, + MAKEFILE => $rel_makefile, 'MAKEFILE-DEPS' => "@rewritten", 'CONFIG-MAKEFILE' => ($relative_dir eq '.') ? '$@' : '$(subdir)/$@', - 'MAKEFILE-IN' => $infile, + 'MAKEFILE-IN' => $rel_makefile_in, 'MAKEFILE-IN-DEPS' => "@include_stack", - 'MAKEFILE-AM' => $amfile, + 'MAKEFILE-AM' => $rel_makefile_am, STRICTNESS => global_option 'cygnus' ? 'cygnus' : $strictness_name, 'USE-DEPS' => global_option 'no-dependencies' ? ' --ignore-deps' : '', - 'MAKEFILE-AM-SOURCES' => "$input$colon_infile", + 'MAKEFILE-AM-SOURCES' => "$makefile$colon_infile", 'REGEN-ACLOCAL-M4' => $regen_aclocal_m4, ACLOCAL_M4_DEPS => "@aclocal_m4_deps"); @@ -3540,7 +3536,8 @@ sub handle_configure ($$@) } # Automake files should not be stored in here, but in %MAKE_LIST. - prog_error "$lfile in \@other_input_files" + prog_error ("$lfile in \@other_input_files\n" + . "\@other_input_files = (@other_input_files)") if -f $file . '.am'; my $local = basename ($file); @@ -4174,6 +4171,26 @@ sub split_config_file_spec ($) return ($output, @inputs); } +# $input +# locate_am (@POSSIBLE_SOURCES) +# ----------------------------- +# AC_CONFIG_FILES allow specifications such as Makefile:top.in:mid.in:bot.in +# This functions returns the first *.in file for which a *.am exists. +# It returns undef otherwise. +sub locate_am (@) +{ + my (@rest) = @_; + my $input; + foreach my $file (@rest) + { + if (($file =~ /^(.*)\.in$/) && -f "$1.am") + { + $input = $file; + last; + } + } + return $input; +} my %make_list; @@ -4184,27 +4201,18 @@ my %make_list; sub scan_autoconf_config_files ($) { my ($config_files) = @_; + # Look at potential Makefile.am's. foreach (split ' ', $config_files) { # Must skip empty string for Perl 4. next if $_ eq "\\" || $_ eq ''; - # Handle $local:$input syntax. Note that we ignore - # every input file past the first, though we keep - # those around for later. - my ($local, $input, @rest) = split (/:/); - if (! $input) - { - $input = $local; - } - else - { - # FIXME: should be error if .in is missing. - $input =~ s/\.in$//; - } - - if (-f $input . '.am') + # Handle $local:$input syntax. + my ($local, @rest) = split (/:/); + @rest = ("$local.in",) unless @rest; + my $input = locate_am @rest; + if ($input) { # We have a file that automake should generate. $make_list{$input} = join (':', ($local, @rest)); @@ -4424,14 +4432,14 @@ sub scan_autoconf_files () scan_autoconf_traces ($configure_ac); + @configure_input_files = sort keys %make_list; # Set input and output files if not specified by user. if (! @input_files) { - @input_files = sort keys %make_list; + @input_files = @configure_input_files; %output_files = %make_list; } - @configure_input_files = sort keys %make_list; if (! $seen_init_automake) { @@ -6501,13 +6509,13 @@ sub push_dist_common ################################################################ -# generate_makefile ($OUTPUT, $MAKEFILE) -# -------------------------------------- +# generate_makefile ($MAKEFILE_AM, $MAKEFILE_IN) +# ---------------------------------------------- # Generate a Makefile.in given the name of the corresponding Makefile and # the name of the file output by config.status. sub generate_makefile ($$) { - my ($output, $makefile) = @_; + my ($makefile_am, $makefile_in) = @_; # Reset all the Makefile.am related variables. initialize_per_input; @@ -6519,21 +6527,20 @@ sub generate_makefile ($$) # Name of input file ("Makefile.am") and output file # ("Makefile.in"). These have no directory components. - $am_file_name = basename ($makefile) . '.am'; - $in_file_name = basename ($makefile) . '.in'; + $am_file_name = basename ($makefile_am); + $in_file_name = basename ($makefile_in); # $OUTPUT is encoded. If it contains a ":" then the first element # is the real output file, and all remaining elements are input # files. We don't scan or otherwise deal with these input files, # other than to mark them as dependencies. See # &scan_autoconf_files for details. - my (@secondary_inputs); - ($output, @secondary_inputs) = split (/:/, $output); + my ($makefile, @inputs) = split (/:/, $output_files{$makefile_in}); - $relative_dir = dirname ($output); - $am_relative_dir = dirname ($makefile); + $relative_dir = dirname ($makefile); + $am_relative_dir = dirname ($makefile_am); - read_main_am_file ($makefile . '.am'); + read_main_am_file ($makefile_am); if (handle_options) { # Process buffered warnings. @@ -6582,7 +6589,7 @@ sub generate_makefile ($$) check_gnu_standards; check_gnits_standards; - handle_configure ($output, $makefile, @secondary_inputs); + handle_configure ($makefile_am, $makefile_in, $makefile, @inputs); handle_gettext; handle_libraries; handle_ltlibraries; @@ -6618,11 +6625,11 @@ sub generate_makefile ($$) handle_tests; # This must come after most other rules. - handle_dist ($makefile); + handle_dist; handle_footer; do_check_merge_target; - handle_all ($output); + handle_all ($makefile); # FIXME: Gross! if (var ('lib_LTLIBRARIES') && var ('bin_PROGRAMS')) @@ -6645,10 +6652,10 @@ sub generate_makefile ($$) mkdir ($output_directory . '/' . $am_relative_dir, 0755); } - my ($out_file) = $output_directory . '/' . $makefile . ".in"; + my ($out_file) = $output_directory . '/' . $makefile_in; # We make sure that `all:' is the first target. - $output = + my $output = "$output_vars$output_all$output_header$output_rules$output_trailer"; # Decide whether we must update the output file or not. @@ -6871,25 +6878,19 @@ sub parse_arguments () . "Try `$0 --help' for more information."); } - # Handle $local:$input syntax. Note that we only examine the - # first ":" file to see if it is automake input; the rest are - # just taken verbatim. We still keep all the files around for - # dependency checking, however. - my ($local, $input, @rest) = split (/:/, $arg); - if (! $input) + # Handle $local:$input syntax. + my ($local, @rest) = split (/:/, $arg); + @rest = ("$local.in",) unless @rest; + my $input = locate_am @rest; + if ($input) { - $input = $local; + push @input_files, $input; + $output_files{$input} = join (':', ($local, @rest)); } else { - # Strip .in; later on .am is tacked on. That is how the - # automake input file is found. Maybe not the best way, but - # it is easy to explain. - $input =~ s/\.in$// - or fatal "invalid input file name `$arg'\n."; + error "no Automake input file found in `$arg'"; } - push (@input_files, $input); - $output_files{$input} = join (':', ($local, @rest)); } } @@ -6924,7 +6925,7 @@ do # Now do all the work on each file. foreach my $file (@input_files) { - $am_file = $file; + ($am_file = $file) =~ s/\.in$//; if (! -f ($am_file . '.am')) { error "`$am_file.am' does not exist"; @@ -6934,7 +6935,7 @@ do # Any warning setting now local to this Makefile.am. dup_channel_setup; - generate_makefile ($output_files{$am_file}, $am_file); + generate_makefile ($am_file . '.am', $file); # Back out any warning setting. drop_channel_setup; diff --git a/automake.texi b/automake.texi index 5d2d143c9..b8a34bb36 100644 --- a/automake.texi +++ b/automake.texi @@ -1120,7 +1120,13 @@ exists a file with the same name and the @file{.am} extension appended. Typically, @code{AC_CONFIG_FILES([foo/Makefile])} will cause Automake to generate @file{foo/Makefile.in} if @file{foo/Makefile.am} exists. -These files are all removed by @code{make distclean}. +When using @code{AC_CONFIG_FILES} with multiple input files, as in +@code{AC_CONFIG_FILES([Makefile:top.in:Makefile.in:bot.in])}, Automake +will generate the first @file{.in} input file for which a @file{.am} +file exists. If no such file exists the output file is not considered +to be Automake generated. + +Files created by @code{AC_CONFIG_FILES} are removed by @code{make distclean}. @cvindex AC_CONFIG_FILES @cvindex AC_OUTPUT @end table diff --git a/lib/Automake/Makefile.in b/lib/Automake/Makefile.in index 2f5196054..77a1656fc 100644 --- a/lib/Automake/Makefile.in +++ b/lib/Automake/Makefile.in @@ -176,7 +176,7 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) $( echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Automake/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu lib/Automake/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ diff --git a/lib/Automake/tests/Makefile.in b/lib/Automake/tests/Makefile.in index 0fe616fae..93855fb18 100644 --- a/lib/Automake/tests/Makefile.in +++ b/lib/Automake/tests/Makefile.in @@ -133,7 +133,7 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) $( echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Automake/tests/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu lib/Automake/tests/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ diff --git a/lib/Makefile.in b/lib/Makefile.in index 9cf0e494f..c7dfed91e 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -152,7 +152,7 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) $( echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu lib/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ diff --git a/lib/am/Makefile.in b/lib/am/Makefile.in index 2e3a4ee2e..2abc6723d 100644 --- a/lib/am/Makefile.in +++ b/lib/am/Makefile.in @@ -138,7 +138,7 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) $( echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/am/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu lib/am/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ diff --git a/lib/am/configure.am b/lib/am/configure.am index 2f399ae00..a274ea4be 100644 --- a/lib/am/configure.am +++ b/lib/am/configure.am @@ -54,7 +54,7 @@ endif %?TOPDIR_P% $(AUTOMAKE) --%STRICTNESS% %USE-DEPS% %MAKEFILE-AM-SOURCES% ## This rule remakes the Makefile. -%MAKEFILE%: %MAINTAINER-MODE% %MAKEFILE-IN% %MAKEFILE-DEPS% $(top_builddir)/config.status +%MAKEFILE%: %MAINTAINER-MODE% %MAKEFILE-DEPS% $(top_builddir)/config.status ## If Makefile is to be updated because of config.status, then run ## config.status without argument in order to (i) rerun all the ## AC_CONFIG_COMMANDS including those that are not visible to diff --git a/m4/Makefile.in b/m4/Makefile.in index 477a5f074..4e91c9e64 100644 --- a/m4/Makefile.in +++ b/m4/Makefile.in @@ -163,7 +163,7 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) $( echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu m4/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu m4/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ diff --git a/stamp-vti b/stamp-vti index 8ff204370..85ab91b37 100644 --- a/stamp-vti +++ b/stamp-vti @@ -1,4 +1,4 @@ -@set UPDATED 6 September 2003 +@set UPDATED 23 September 2003 @set UPDATED-MONTH September 2003 @set EDITION 1.7a @set VERSION 1.7a diff --git a/tests/Makefile.am b/tests/Makefile.am index 5b0a28f1d..9b972521e 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -328,6 +328,8 @@ output2.test \ output3.test \ output4.test \ output5.test \ +output6.test \ +output7.test \ overrid.test \ parse.test \ percent.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index a0e255a9a..66b3bb272 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -438,6 +438,8 @@ output2.test \ output3.test \ output4.test \ output5.test \ +output6.test \ +output7.test \ overrid.test \ parse.test \ percent.test \ @@ -627,7 +629,7 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) $( echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ diff --git a/tests/output6.test b/tests/output6.test new file mode 100755 index 000000000..e245d318f --- /dev/null +++ b/tests/output6.test @@ -0,0 +1,74 @@ +#! /bin/sh +# Copyright (C) 2003 Free Software Foundation, Inc. +# +# This file is part of GNU Automake. +# +# GNU Automake 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. +# +# GNU Automake 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 Automake; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + +# Check for support for colon separated input files in AC_CONFIG_FILES + +required=GNUmake +. ./defs || exit 1 + +set -e + +cat > configure.in << END +AC_INIT([$me], [1.0]) +AM_INIT_AUTOMAKE +AC_CONFIG_FILES(foo:a.in:b.in:c.in:d.in) +AC_OUTPUT +END + +cat >a.in <<'EOF' +a = A +b = A +c = A +d = A +EOF + +cat >b.in <<'EOF' +b = B +c = B +d = B +EOF + +cat >c.am <<'EOF' +c = C +d = C + +print: + @echo $a$b$c$d +EOF + +echo 'd = D' > d.in + + +$ACLOCAL +$AUTOCONF +$AUTOMAKE +./configure +$MAKE -f foo print | grep 'ABCD' + +$sleep +cat >b.in <<'EOF' +a = G +b = F +c = F +d = F +EOF + +# This involves the rebuild rule, hence it requires GNUmake +$MAKE -f foo print | grep 'GFCD' diff --git a/tests/output7.test b/tests/output7.test new file mode 100755 index 000000000..eb9c65992 --- /dev/null +++ b/tests/output7.test @@ -0,0 +1,66 @@ +#! /bin/sh +# Copyright (C) 2003 Free Software Foundation, Inc. +# +# This file is part of GNU Automake. +# +# GNU Automake 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. +# +# GNU Automake 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 Automake; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + +# Check for support for colon separated input files in AC_CONFIG_FILES, +# with sources in sub directories. + +. ./defs || exit 1 + +set -e + +cat > configure.in << END +AC_INIT([$me], [1.0]) +AM_INIT_AUTOMAKE +AC_CONFIG_FILES([ + Makefile:mk/toplevel.in + sub/Makefile:mk/sub.in + mk/Makefile +]) +AC_OUTPUT +END + +mkdir mk sub +cat >mk/Makefile.am <<'EOF' +all-local: + @echo in--mk +EOF + +cat >mk/sub.am <<'EOF' +all-local: + @echo in--sub +EOF + +cat >mk/toplevel.am <<'EOF' +all-local: + @echo at--toplevel +SUBDIRS = mk sub +EOF + +$ACLOCAL +$AUTOCONF +$AUTOMAKE +./configure +$MAKE >output +cat output +grep in--mk output +grep in--sub output +grep at--toplevel output + +$MAKE distcheck diff --git a/version.texi b/version.texi index 8ff204370..85ab91b37 100644 --- a/version.texi +++ b/version.texi @@ -1,4 +1,4 @@ -@set UPDATED 6 September 2003 +@set UPDATED 23 September 2003 @set UPDATED-MONTH September 2003 @set EDITION 1.7a @set VERSION 1.7a