From: Stefano Lattarini Date: Sun, 12 Aug 2012 12:12:52 +0000 (+0200) Subject: Merge branch 'maint' X-Git-Tag: v1.12b~59 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2868ff8ca1792a7d5298923aff49647a754bc23e;hp=-c;p=platform%2Fupstream%2Fautomake.git Merge branch 'maint' * maint: cleanup: remove stale references to 'lzma' option --- 2868ff8ca1792a7d5298923aff49647a754bc23e diff --combined automake.in index 9d24abf,a9c1a06..95ecbef --- a/automake.in +++ b/automake.in @@@ -231,7 -231,7 +231,7 @@@ my @common_files (qw(ABOUT-GNU ABOUT-NLS AUTHORS BACKLOG COPYING COPYING.DOC COPYING.LIB COPYING.LESSER ChangeLog INSTALL NEWS README THANKS TODO ar-lib compile config.guess config.rpath - config.sub depcomp elisp-comp install-sh libversion.in mdate-sh + config.sub depcomp install-sh libversion.in mdate-sh missing mkinstalldirs py-compile texinfo.tex ylwrap), @libtool_files, @libtool_sometimes); @@@ -362,9 -362,6 +362,9 @@@ my $ac_gettext_location # Whether AM_GNU_GETTEXT_INTL_SUBDIR has been seen. my $seen_gettext_intl = 0; +# The arguments of the AM_EXTRA_RECURSIVE_TARGETS call (if any). +my @extra_recursive_targets = (); + # Lists of tags supported by Libtool. my %libtool_tags = (); # 1 if Libtool uses LT_SUPPORTED_TAG. If it does, then it also @@@ -462,11 -459,9 +462,11 @@@ my %required_targets 'install-ps-am' => 1, 'install-info-am' => 1, 'installcheck-am' => 1, - 'uninstall-am' => 1, - - 'install-man' => 1, + 'uninstall-am' => 1, + 'tags-am' => 1, + 'ctags-am' => 1, + 'cscopelist-am' => 1, + 'install-man' => 1, ); # Queue to push require_conf_file requirements to. @@@ -1108,11 -1103,11 +1108,11 @@@ sub backname ($ ################################################################ -# 'silent-rules' mode handling functions. +# Silent rules handling functions. # verbose_var (NAME) # ------------------ -# The public variable stem used to implement 'silent-rules'. +# The public variable stem used to implement silent rules. sub verbose_var ($) { my ($name) = @_; @@@ -1121,7 -1116,7 +1121,7 @@@ # verbose_private_var (NAME) # -------------------------- -# The naming policy for the private variables for 'silent-rules'. +# The naming policy for the private variables for silent rules. sub verbose_private_var ($) { my ($name) = @_; @@@ -1130,9 -1125,9 +1130,9 @@@ # define_verbose_var (NAME, VAL-IF-SILENT, [VAL-IF-VERBOSE]) # ---------------------------------------------------------- -# For 'silent-rules' mode, setup VAR and dispatcher, to expand to -# VAL-IF-SILENT if silent, to VAL-IF-VERBOSE (defaulting to empty) -# if not. +# For silent rules, setup VAR and dispatcher, to expand to +# VAL-IF-SILENT if silent, to VAL-IF-VERBOSE (defaulting to +# empty) if not. sub define_verbose_var ($$;$) { my ($name, $silent_val, $verbose_val) = @_; @@@ -1141,19 -1136,21 +1141,19 @@@ my $pvar = verbose_private_var ($name); my $silent_var = $pvar . '_0'; my $verbose_var = $pvar . '_1'; - if (option 'silent-rules') - { - # For typical 'make's, 'configure' replaces AM_V (inside @@) with $(V) - # and AM_DEFAULT_V (inside @@) with $(AM_DEFAULT_VERBOSITY). - # For strict POSIX 2008 'make's, it replaces them with 0 or 1 instead. - # See AM_SILENT_RULES in m4/silent.m4. - define_variable ($var, '$(' . $pvar . '_@'.'AM_V'.'@)', INTERNAL); - define_variable ($pvar . '_', '$(' . $pvar . '_@'.'AM_DEFAULT_V'.'@)', INTERNAL); - Automake::Variable::define ($silent_var, VAR_AUTOMAKE, '', TRUE, - $silent_val, '', INTERNAL, VAR_ASIS) - if (! vardef ($silent_var, TRUE)); - Automake::Variable::define ($verbose_var, VAR_AUTOMAKE, '', TRUE, - $verbose_val, '', INTERNAL, VAR_ASIS) - if (! vardef ($verbose_var, TRUE)); -} + # For typical 'make's, 'configure' replaces AM_V (inside @@) with $(V) + # and AM_DEFAULT_V (inside @@) with $(AM_DEFAULT_VERBOSITY). + # For strict POSIX 2008 'make's, it replaces them with 0 or 1 instead. + # See AM_SILENT_RULES in m4/silent.m4. + define_variable ($var, '$(' . $pvar . '_@'.'AM_V'.'@)', INTERNAL); + define_variable ($pvar . '_', '$(' . $pvar . '_@'.'AM_DEFAULT_V'.'@)', + INTERNAL); + Automake::Variable::define ($silent_var, VAR_AUTOMAKE, '', TRUE, + $silent_val, '', INTERNAL, VAR_ASIS) + if (! vardef ($silent_var, TRUE)); + Automake::Variable::define ($verbose_var, VAR_AUTOMAKE, '', TRUE, + $verbose_val, '', INTERNAL, VAR_ASIS) + if (! vardef ($verbose_var, TRUE)); } # Above should not be needed in the general automake code. @@@ -1164,13 -1161,17 +1164,13 @@@ sub verbose_flag ($) { my ($name) = @_; - return '$(' . verbose_var ($name) . ')' - if (option 'silent-rules'); - return ''; + return '$(' . verbose_var ($name) . ')'; } sub verbose_nodep_flag ($) { my ($name) = @_; - return '$(' . verbose_var ($name) . subst ('am__nodep') . ')' - if (option 'silent-rules'); - return ''; + return '$(' . verbose_var ($name) . subst ('am__nodep') . ')'; } # silent_flag @@@ -1183,16 -1184,19 +1183,16 @@@ sub silent_flag ( # define_verbose_tagvar (NAME) # ---------------------------- -# Engage the needed 'silent-rules' machinery for tag NAME. +# Engage the needed silent rules machinery for tag NAME. sub define_verbose_tagvar ($) { my ($name) = @_; - if (option 'silent-rules') - { - define_verbose_var ($name, '@echo " '. $name . ' ' x (8 - length ($name)) . '" $@;'); - } + define_verbose_var ($name, '@echo " '. $name . ' ' x (8 - length ($name)) . '" $@;'); } # define_verbose_texinfo # ---------------------- -# Engage the needed 'silent-rules' machinery for assorted texinfo commands. +# Engage the needed silent rules machinery for assorted texinfo commands. sub define_verbose_texinfo () { my @tagvars = ('DVIPS', 'MAKEINFO', 'INFOHTML', 'TEXI2DVI', 'TEXI2PDF'); @@@ -1206,7 -1210,7 +1206,7 @@@ # define_verbose_libtool # ---------------------- -# Engage the needed 'silent-rules' machinery for 'libtool --silent'. +# Engage the needed silent rules machinery for 'libtool --silent'. sub define_verbose_libtool () { define_verbose_var ('lt', '--silent'); @@@ -1215,6 -1219,7 +1215,6 @@@ sub handle_silent () { - return unless option 'silent-rules'; # Define "$(AM_V_P)", expanding to a shell conditional that can be # used in make recipes to determine whether we are being run in # silent mode or not. The choice of the name derives from the LISP @@@ -1222,7 -1227,7 +1222,7 @@@ # also "the '-P' convention" in the Jargon File); we do so for lack # of a better convention. define_verbose_var ('P', 'false', ':'); - # *Always* provide the user with 'AM_V_GEN' for 'silent-rules' mode. + # *Always* provide the user with '$(AM_V_GEN)', unconditionally. define_verbose_tagvar ('GEN'); define_verbose_var ('at', '@'); } @@@ -1248,6 -1253,10 +1248,6 @@@ sub handle_option return 1 if process_option_list (@options); } - # Override portability-recursive warning. - switch_warning ('no-portability-recursive') - if option 'silent-rules'; - if ($strictness == GNITS) { set_option ('readme-alpha', INTERNAL); @@@ -1311,7 -1320,7 +1311,7 @@@ sub handle_language { # Include auto-dep code. Don't include it if DEP_FILES would # be empty. - if (&saw_sources_p (0) && keys %dep_files) + if (keys %extension_seen && keys %dep_files) { # Set location of depcomp. &define_variable ('depcomp', @@@ -2967,15 -2976,35 +2967,15 @@@ sub handle_script ## Handling Texinfo files. ## ## ------------------------ ## -# ($OUTFILE, $VFILE, @CLEAN_FILES) +# ($OUTFILE, $VFILE) # &scan_texinfo_file ($FILENAME) # ------------------------------ # $OUTFILE - name of the info file produced by $FILENAME. # $VFILE - name of the version.texi file used (undef if none). -# @CLEAN_FILES - list of byproducts (indexes etc.) sub scan_texinfo_file ($) { my ($filename) = @_; - # Some of the following extensions are always created, no matter - # whether indexes are used or not. Other (like cps, fns, ... pgs) - # are only created when they are used. We used to scan $FILENAME - # for their use, but that is not enough: they could be used in - # included files. We can't scan included files because we don't - # know the include path. Therefore we always erase these files, no - # matter whether they are used or not. - # - # (tmp is only created if an @macro is used and a certain e-TeX - # feature is not available.) - my %clean_suffixes = - map { $_ => 1 } (qw(aux log toc tmp - cp cps - fn fns - ky kys - vr vrs - tp tps - pg pgs)); # grep 'new.*index' texinfo.tex - my $texi = new Automake::XFile "< $filename"; verb "reading $filename"; @@@ -3003,6 -3032,23 +3003,6 @@@ { $vfile = $1; } - - # Try to find new or unused indexes. - - # Creating a new category of index. - elsif (/^\@def(code)?index (\w+)/) - { - $clean_suffixes{$2} = 1; - $clean_suffixes{"$2s"} = 1; - } - - # Merging an index into an another. - elsif (/^\@syn(code)?index (\w+) (\w+)/) - { - delete $clean_suffixes{"$2s"}; - $clean_suffixes{"$3s"} = 1; - } - } if (! $outfile) @@@ -3013,7 -3059,8 +3013,7 @@@ my $infobase = basename ($filename); $infobase =~ s/\.te?xi(nfo)?$//; - return ($outfile, $vfile, - map { "$infobase.$_" } (sort keys %clean_suffixes)); + return ($outfile, $vfile); } @@@ -3153,13 -3200,10 +3153,13 @@@ sub handle_texinfo_helper ($ # If 'version.texi' is referenced by input file, then include # automatic versioning capability. - my ($out_file, $vtexi, @clean_files) = + my ($out_file, $vtexi) = scan_texinfo_file ("$relative_dir/$texi") or next; - push (@mostly_cleans, @clean_files); + # Directory of auxiliary files and build by-products used by texi2dvi + # and texi2pdf. + push @mostly_cleans, "$infobase.t2d"; + push @mostly_cleans, "$infobase.t2p"; # If the Texinfo source is in a subdirectory, create the # resulting info in this subdirectory. If it is in the current @@@ -3347,6 -3391,11 +3347,6 @@@ $texinfodir = ('$(srcdir)/' . dirname (variable_value ('TEXINFO_TEX'))); } - elsif (option 'cygnus') - { - $texinfodir = '$(top_srcdir)/../texinfo'; - define_variable ('TEXINFO_TEX', "$texinfodir/texinfo.tex", INTERNAL); - } elsif ($config_aux_dir_set_in_configure_ac) { $texinfodir = $am_config_aux_dir; @@@ -3585,43 -3634,85 +3585,43 @@@ sub handle_dat # Handle TAGS. sub handle_tags { - my @tag_deps = (); - my @ctag_deps = (); - my @cscope_deps = (); - if (var ('SUBDIRS')) - { - $output_rules .= ("tags-recursive:\n" - . "\tlist='\$(SUBDIRS)'; for subdir in \$\$list; do \\\n" - # Never fail here if a subdir fails; it - # isn't important. - . "\t test \"\$\$subdir\" = . || (\$(am__cd) \$\$subdir" - . " && \$(MAKE) \$(AM_MAKEFLAGS) tags); \\\n" - . "\tdone\n"); - push (@tag_deps, 'tags-recursive'); - &depend ('.PHONY', 'tags-recursive'); - &depend ('.MAKE', 'tags-recursive'); - - $output_rules .= ("ctags-recursive:\n" - . "\tlist='\$(SUBDIRS)'; for subdir in \$\$list; do \\\n" - # Never fail here if a subdir fails; it - # isn't important. - . "\t test \"\$\$subdir\" = . || (\$(am__cd) \$\$subdir" - . " && \$(MAKE) \$(AM_MAKEFLAGS) ctags); \\\n" - . "\tdone\n"); - push (@ctag_deps, 'ctags-recursive'); - &depend ('.PHONY', 'ctags-recursive'); - &depend ('.MAKE', 'ctags-recursive'); - - $output_rules .= ("cscopelist-recursive:\n" - . "\tlist='\$(SUBDIRS)'; for subdir in \$\$list; do \\\n" - # Never fail here if a subdir fails; it - # isn't important. - . "\t test \"\$\$subdir\" = . || (\$(am__cd) \$\$subdir" - . " && \$(MAKE) \$(AM_MAKEFLAGS) cscopelist); \\\n" - . "\tdone\n"); - push (@cscope_deps, 'cscopelist-recursive'); - &depend ('.PHONY', 'cscopelist-recursive'); - &depend ('.MAKE', 'cscopelist-recursive'); - } - - if (&saw_sources_p (1) - || var ('ETAGS_ARGS') - || @tag_deps) - { - my @config; - foreach my $spec (@config_headers) - { - my ($out, @ins) = split_config_file_spec ($spec); - foreach my $in (@ins) - { - # If the config header source is in this directory, - # require it. - push @config, basename ($in) - if $relative_dir eq dirname ($in); - } - } - $output_rules .= &file_contents ('tags', - new Automake::Location, - CONFIG => "@config", - TAGSDIRS => "@tag_deps", - CTAGSDIRS => "@ctag_deps", - CSCOPEDIRS => "@cscope_deps"); + my @config; + foreach my $spec (@config_headers) + { + my ($out, @ins) = split_config_file_spec ($spec); + foreach my $in (@ins) + { + # If the config header source is in this directory, + # require it. + push @config, basename ($in) + if $relative_dir eq dirname ($in); + } + } + + define_variable ('am__tagged_files', + '$(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)' + . "@config", INTERNAL); + if (rvar('am__tagged_files')->value_as_list_recursive + || var ('ETAGS_ARGS') || var ('SUBDIRS')) + { + $output_rules .= &file_contents ('tags', new Automake::Location); set_seen 'TAGS_DEPENDENCIES'; - } - elsif (reject_var ('TAGS_DEPENDENCIES', - "it doesn't make sense to define 'TAGS_DEPENDENCIES'" - . " without\nsources or 'ETAGS_ARGS'")) - { - } + } else - { + { + reject_var ('TAGS_DEPENDENCIES', + "it doesn't make sense to define 'TAGS_DEPENDENCIES'" + . " without\nsources or 'ETAGS_ARGS'"); # Every Makefile must define some sort of TAGS rule. # Otherwise, it would be possible for a top-level "make TAGS" - # to fail because some subdirectory failed. - $output_rules .= "tags: TAGS\nTAGS:\n\n"; - # Ditto ctags and cscope. - $output_rules .= "ctags: CTAGS\nCTAGS:\n\n"; - $output_rules .= "cscope cscopelist:\n\n"; - } + # to fail because some subdirectory failed. Ditto ctags and + # cscope. + $output_rules .= + "tags TAGS:\n\n" . + "ctags CTAGS:\n\n" . + "cscope cscopelist:\n\n"; + } } @@@ -3650,6 -3741,26 +3650,6 @@@ sub user_phony_rule ($ } -# $BOOLEAN -# &for_dist_common ($A, $B) -# ------------------------- -# Subroutine for &handle_dist: sort files to dist. -# -# We put README first because it then becomes easier to make a -# Usenet-compliant shar file (in these, README must be first). -# -# FIXME: do more ordering of files here. -sub for_dist_common -{ - return 0 - if $a eq $b; - return -1 - if $a eq 'README'; - return 1 - if $b eq 'README'; - return $a cmp $b; -} - # handle_dist # ----------- # Handle 'dist' target. @@@ -3700,7 -3811,7 +3700,7 @@@ sub handle_dist ( { my $archive_defined = option 'no-dist-gzip' ? 0 : 1; $archive_defined ||= - grep { option "dist-$_" } qw(shar zip tarZ bzip2 lzip lzma xz); + grep { option "dist-$_" } qw(shar zip tarZ bzip2 lzip xz); error (option 'no-dist-gzip', "no-dist-gzip specified but no dist-* specified,\n" . "at least one archive format must be enabled") @@@ -3760,7 -3871,7 +3760,7 @@@ # Files to distributed. Don't use ->value_as_list_recursive # as it recursively expands '$(dist_pkgdata_DATA)' etc. my @dist_common = split (' ', rvar ('DIST_COMMON')->variable_value); - @dist_common = uniq (sort for_dist_common (@dist_common)); + @dist_common = uniq @dist_common; variable_delete 'DIST_COMMON'; define_pretty_variable ('DIST_COMMON', TRUE, INTERNAL, @dist_common); @@@ -4023,8 -4134,8 +4023,8 @@@ sub handle_configure ($$$@ define_pretty_variable ('am__configure_deps', TRUE, INTERNAL, @configuredeps); - my $automake_options = '--' . (global_option 'cygnus' ? 'cygnus' : $strictness_name) - . (global_option 'no-dependencies' ? ' --ignore-deps' : ''); + my $automake_options = '--' . $strictness_name . + (global_option 'no-dependencies' ? ' --ignore-deps' : ''); $output_rules .= file_contents ('configure', @@@ -4487,32 -4598,6 +4487,32 @@@ sub handle_all ($ } } +# Generate helper targets for user recursion, where needed. +sub handle_user_recursion () +{ + return unless @extra_recursive_targets; + + define_pretty_variable ('am__extra_recursive_targets', TRUE, INTERNAL, + map { "$_-recursive" } @extra_recursive_targets); + my $aux = var ('SUBDIRS') ? 'recursive' : 'am'; + foreach my $target (@extra_recursive_targets) + { + # This allows the default target's rules to be overridden in + # Makefile.am. + user_phony_rule ($target); + depend ("$target", "$target-$aux"); + depend ("$target-am", "$target-local"); + # Every user-defined recursive target 'foo' *must* have a valid + # associated 'foo-local' rule; we define it as an empty rule by + # default, so that the user can transparently extend it in his + # own Makefile.am. + pretty_print_rule ("$target-local:"); + # $target-recursive might as well be undefined, so do not add + # it here; it's taken care of in subdirs.am anyway. + depend (".PHONY", "$target-am", "$target-local"); + } +} + # &do_check_merge_target () # ------------------------- @@@ -4523,16 -4608,25 +4523,16 @@@ sub do_check_merge_target ( push @check_tests, 'check-local' if user_phony_rule 'check-local'; - # In --cygnus mode, check doesn't depend on all. - if (option 'cygnus') - { - # Just run the local check rules. - pretty_print_rule ('check-am:', "\t\t", @check); - } - else + # The check target must depend on the local equivalent of + # 'all', to ensure all the primary targets are built. Then it + # must build the local check rules. + $output_rules .= "check-am: all-am\n"; + if (@check) { - # The check target must depend on the local equivalent of - # 'all', to ensure all the primary targets are built. Then it - # must build the local check rules. - $output_rules .= "check-am: all-am\n"; - if (@check) - { - pretty_print_rule ("\t\$(MAKE) \$(AM_MAKEFLAGS)", "\t ", - @check); - depend ('.MAKE', 'check-am'); - } + pretty_print_rule ("\t\$(MAKE) \$(AM_MAKEFLAGS)", "\t ", @check); + depend ('.MAKE', 'check-am'); } + if (@check_tests) { pretty_print_rule ("\t\$(MAKE) \$(AM_MAKEFLAGS)", "\t ", @@@ -4723,7 -4817,9 +4723,7 @@@ sub handle_tests_dejagn sub handle_per_suffix_test { my ($test_suffix, %transform) = @_; - my ($pfx, $generic, $parallel_tests_option, $am_exeext); - prog_error ("called with 'parallel-tests' option not set") - unless $parallel_tests_option = option 'parallel-tests'; + my ($pfx, $generic, $am_exeext); if ($test_suffix eq '') { $pfx = ''; @@@ -4740,12 -4836,13 +4740,12 @@@ : 'FALSE'; } # The "test driver" program, deputed to handle tests protocol used by - # test scripts. By default, it's assumed that no protocol is used, - # so we fall back to the old "parallel-tests" behaviour, implemented - # by the 'test-driver' auxiliary script. + # test scripts. By default, it's assumed that no protocol is used, so + # we fall back to the old behaviour, implemented by the 'test-driver' + # auxiliary script. if (! var "${pfx}LOG_DRIVER") { - require_conf_file ($parallel_tests_option->{position}, FOREIGN, - 'test-driver'); + require_conf_file ("parallel-tests", FOREIGN, 'test-driver'); define_variable ("${pfx}LOG_DRIVER", "\$(SHELL) $am_config_aux_dir/test-driver", INTERNAL); @@@ -4804,7 -4901,8 +4804,7 @@@ sub handle_test push (@check_tests, 'check-TESTS'); my $check_deps = "@check"; $output_rules .= &file_contents ('check', new Automake::Location, - COLOR => !! option 'color-tests', - PARALLEL_TESTS => !! option 'parallel-tests', + SERIAL_TESTS => !! option 'serial-tests', CHECK_DEPS => $check_deps); # Tests that are known programs should have $(EXEEXT) appended. @@@ -4813,7 -4911,7 +4813,7 @@@ append_exeext { exists $known_programs{$_[0]} } 'XFAIL_TESTS' if (var ('XFAIL_TESTS')); - if (my $parallel_tests = option 'parallel-tests') + if (! option 'serial-tests') { define_variable ('TEST_SUITE_LOG', 'test-suite.log', INTERNAL); my $suff = '.test'; @@@ -4863,7 -4961,7 +4863,7 @@@ if ($val =~ /(\$\((top_)?srcdir\))\//o) { msg ('error', $subvar->rdef ($cond)->location, - "parallel-tests: using '$1' in TESTS is currently broken: '$val'"); + "using '$1' in TESTS is currently broken: '$val'"); } foreach my $test_suffix (@test_suffixes) @@@ -4936,6 -5034,8 +4936,6 @@@ sub handle_emacs_lis require_variables ($elfiles[0][0], "Emacs Lisp sources seen", TRUE, 'EMACS', 'lispdir'); - require_conf_file ($elfiles[0][0], FOREIGN, 'elisp-comp'); - &define_variable ('elisp_comp', "$am_config_aux_dir/elisp-comp", INTERNAL); } # Handle Python @@@ -5126,14 -5226,15 +5126,14 @@@ sub scan_autoconf_traces ($ AC_REQUIRE_AUX_FILE => 1, AC_SUBST_TRACE => 1, AM_AUTOMAKE_VERSION => 1, - AM_PROG_MKDIR_P => 0, # FIXME: to be removed in 1.13 AM_CONDITIONAL => 2, + _AM_EXTRA_RECURSIVE_TARGETS => 1, AM_GNU_GETTEXT => 0, AM_GNU_GETTEXT_INTL_SUBDIR => 0, AM_INIT_AUTOMAKE => 0, AM_MAINTAINER_MODE => 0, AM_PROG_AR => 0, AM_PROG_CC_C_O => 0, - AM_SILENT_RULES => 0, _AM_SUBST_NOTMAKE => 1, _AM_COND_IF => 1, _AM_COND_ELSE => 1, @@@ -5281,14 -5382,18 +5281,14 @@@ $seen_automake_version = 1; } - elsif ($macro eq 'AM_PROG_MKDIR_P') # FIXME: to be removed in 1.13 - { - msg 'obsolete', $where, <<'EOF'; -The 'AM_PROG_MKDIR_P' macro is deprecated, and will soon be removed. -You should use the Autoconf-provided 'AC_PROG_MKDIR_P' macro instead, -and use '$(MKDIR_P)' instead of '$(mkdir_p)'in your Makefile.am files. -EOF - } elsif ($macro eq 'AM_CONDITIONAL') { $configure_cond{$args[1]} = $where; } + elsif ($macro eq '_AM_EXTRA_RECURSIVE_TARGETS') + { + push @extra_recursive_targets, split (' ', $args[1]); + } elsif ($macro eq 'AM_GNU_GETTEXT') { $seen_gettext = $where; @@@ -5330,6 -5435,10 +5330,6 @@@ EO { $seen_cc_c_o = $where; } - elsif ($macro eq 'AM_SILENT_RULES') - { - set_global_option ('silent-rules', $where); - } elsif ($macro eq '_AM_COND_IF') { cond_stack_if ('', $args[1], $where); @@@ -5486,6 -5595,26 +5486,6 @@@ sub scan_autoconf_files ( ################################################################ -# Set up for Cygnus mode. -sub check_cygnus -{ - my $cygnus = option 'cygnus'; - return unless $cygnus; - - # This feature is deprecated, will be removed in the next - # Automake major release. - msg 'obsolete', $cygnus->get, - "support for Cygnus-style trees is deprecated"; - - set_strictness ('foreign'); - set_option ('no-installinfo', $cygnus); - set_option ('no-dependencies', $cygnus); - set_option ('no-dist', $cygnus); - - err_ac "'AM_MAINTAINER_MODE' required when --cygnus specified" - if !$seen_maint_mode; -} - # Do any extra checking for GNU standards. sub check_gnu_standards { @@@ -5980,9 -6109,76 +5980,9 @@@ sub resolve_linke sub saw_extension { my ($ext) = @_; - if (! defined $extension_seen{$ext}) - { - $extension_seen{$ext} = 1; - } - else - { - ++$extension_seen{$ext}; - } + $extension_seen{$ext} = 1; } -# Return the number of files seen for a given language. Knows about -# special cases we care about. FIXME: this is hideous. We need -# something that involves real language objects. For instance yacc -# and yaccxx could both derive from a common yacc class which would -# know about the strange ylwrap requirement. (Or better yet we could -# just not support legacy yacc!) -sub count_files_for_language -{ - my ($name) = @_; - - my @names; - if ($name eq 'yacc' || $name eq 'yaccxx') - { - @names = ('yacc', 'yaccxx'); - } - elsif ($name eq 'lex' || $name eq 'lexxx') - { - @names = ('lex', 'lexxx'); - } - else - { - @names = ($name); - } - - my $r = 0; - foreach $name (@names) - { - my $lang = $languages{$name}; - foreach my $ext (@{$lang->extensions}) - { - $r += $extension_seen{$ext} - if defined $extension_seen{$ext}; - } - } - - return $r -} - -# Called to ask whether source files have been seen . If HEADERS is 1, -# headers can be included. -sub saw_sources_p -{ - my ($headers) = @_; - - # count all the sources - my $count = 0; - foreach my $val (values %extension_seen) - { - $count += $val; - } - - if (!$headers) - { - $count -= count_files_for_language ('header'); - } - - return $count > 0; -} - - # register_language (%ATTRIBUTE) # ------------------------------ # Register a single language. @@@ -6748,6 -6944,8 +6748,6 @@@ sub transform_token ($$$ # - replaces %KEY% with $VAL, # - enables/disables ?KEY? and ?!KEY?, # - replaces %?KEY% with TRUE or FALSE. -# - replaces %KEY?IFTRUE%, %KEY:IFFALSE%, and %KEY?IFTRUE:IFFALSE% with -# IFTRUE / IFFALSE, as appropriate. sub transform ($$) { my ($token, $transform) = @_; @@@ -6759,6 -6957,11 +6759,6 @@@ { return transform_token ($token, $transform, $1); } - # %KEY?IFTRUE%, %KEY:IFFALSE%, and %KEY?IFTRUE:IFFALSE%. - elsif ($token =~ /^%([\w\-]+)(?:\?([^?:%]+))?(?::([^?:%]+))?%$/) - { - return transform_token ($token, $transform, $1) ? ($2 || '') : ($3 || ''); - } # %?KEY%. elsif ($token =~ /^%\?([\w\-]+)%$/) { @@@ -6789,11 -6992,11 +6789,10 @@@ sub preprocess_file ($% # Complete %transform with global options. # Note that %transform goes last, so it overrides global options. - %transform = ('CYGNUS' => !! option 'cygnus', - 'MAINTAINER-MODE' + %transform = ( 'MAINTAINER-MODE' => $seen_maint_mode ? subst ('MAINTAINER_MODE_TRUE') : '', 'XZ' => !! option 'dist-xz', - 'LZMA' => !! option 'dist-lzma', 'LZIP' => !! option 'dist-lzip', 'BZIP2' => !! option 'dist-bzip2', 'COMPRESS' => !! option 'dist-tarZ', @@@ -6803,6 -7006,7 +6802,6 @@@ 'INSTALL-INFO' => ! option 'no-installinfo', 'INSTALL-MAN' => ! option 'no-installman', - 'HAVE-MANS' => !! var ('MANS'), 'CK-NEWS' => !! option 'check-news', 'SUBDIRS' => !! var ('SUBDIRS'), @@@ -6835,6 -7039,7 +6834,6 @@@ # Substitute Automake template tokens. s/(?: % \?? [\w\-]+ % - | % [\w\-]+ (?:\?[^?:%]+)? (?::[^?:%]+)? % | \? !? [\w\-]+ \? )/transform($&, \%transform)/gex; # transform() may have added some ##%-comments to strip. @@@ -7922,6 -8127,7 +7921,6 @@@ sub generate_makefile ($$ if var 'DIST_SUBDIRS' && ! var 'SUBDIRS'; # Check first, because we might modify some state. - check_cygnus; check_gnu_standards; check_gnits_standards; @@@ -7956,7 -8162,6 +7955,7 @@@ handle_data; handle_headers; handle_subdirs; + handle_user_recursion; handle_tags; handle_minor_options; # Must come after handle_programs so that %known_programs is up-to-date. @@@ -8107,6 -8312,7 +8106,6 @@@ Dependency tracking --include-deps enable dependency tracking code Flavors: - --cygnus assume program is part of Cygnus-style tree --foreign set strictness to foreign --gnits set strictness to gnits --gnu set strictness to gnu @@@ -8164,6 -8370,7 +8163,6 @@@ EO sub parse_arguments () { my $strict = 'gnu'; - my $cygnus = 0; my $ignore_deps = 0; my @warnings = (); @@@ -8176,6 -8383,7 +8175,6 @@@ 'gnu' => sub { $strict = 'gnu'; }, 'gnits' => sub { $strict = 'gnits'; }, 'foreign' => sub { $strict = 'foreign'; }, - 'cygnus' => \$cygnus, 'include-deps' => sub { $ignore_deps = 0; }, 'i|ignore-deps' => sub { $ignore_deps = 1; }, 'no-force' => sub { $force_generation = 0; }, @@@ -8191,6 -8399,7 +8190,6 @@@ set_strictness ($strict); my $cli_where = new Automake::Location; - set_global_option ('cygnus', $cli_where) if $cygnus; set_global_option ('no-dependencies', $cli_where) if $ignore_deps; for my $warning (@warnings) {