• Show log

    Commit

  • Hash : 3da1457d
    Author : Stefano Lattarini
    Date : 2012-06-12T14:48:12

    recursion: support user-defined recursive targets
    
    The user can now define his own recursive targets that recurse
    in the directories specified in $(SUBDIRS).  That can be done by
    specifying the name of such targets in invocations of the new
    'AM_EXTRA_RECURSIVE_TARGETS' m4 macro.
    
    The API goes like this:
    
        $ cat configure.ac
        AC_INIT([pkg-name], [1.0]
        AM_INIT_AUTOMAKE
        AM_EXTRA_RECURSIVE_TARGETS([foo])
        AC_CONFIG_FILES([Makefile sub/Makefile])
        AC_OUTPUT
    
        $ cat Makefile.am
        SUBDIRS = sub
        foo-local:
            @echo This will be run by "make foo".
    
        $ cat sub/Makefile.am
        foo-local:
            @echo This too will be run by a "make foo" issued either in
            @echo the 'sub/' directory or in the top-level directory.
    
    Like for the "default" recursive targets (e.g., 'all' and 'check'),
    the user-defined recursive targets descend in the $(SUBDIRS) in a
    depth-first fashion, and process '.' last (unless that is explicitly
    specified in $(SUBDIRS)).
    
    * NEWS, doc/automake.texi: Document the new feature.
    * automake.in (@extra_recursive_targets): New global variable.
    (scan_autoconf_traces): Trace macro '_AM_EXTRA_RECURSIVE_TARGETS'.
    (handle_user_recursion): New subroutine; among other things, it defines
    the new internal '$(am__extra_recursive_targets)' make variable, and
    the '*-am', '*-local' and '*-recursive' targets associated with the
    user-specified user recursive targets.
    (generate_makefile): Call the new subroutine.
    * lib/am/subdirs.am (am__recursive_targets): New internal make variable,
    listing all of '$(RECURSIVE_TARGETS)', '$(RECURSIVE_CLEAN_TARGETS)' and
    '$(am__extra_recursive_targets)' together.
    (AM_RECURSIVE_TARGETS): Adjust the definition of this variable ...
    (.PHONY, .MAKE): ... and the list of dependencies of these special targets
    to take advantage of the new '$(am__recursive_targets)' variable.
    ($(am__recursive_targets)): New targets, superseding ...
    ($(RECURSIVE_TARGETS), $(RECURSIVE_CLEAN_TARGETS)): ... these, and
    inheriting their rules.  This way, the rules to handle recursion for
    built-in recursive targets (e.g., 'all', 'dvi', 'clean') and for user
    defined recursive targets are the same.
    * m4/extra-recurs.m4: New file, contain definition of new macro
    'AM_EXTRA_RECURSIVE_TARGETS' and '_AM_EXTRA_RECURSIVE_TARGETS'.
    These macros are basically dummy, only used for tracing by automake.
    * m4/Makefile.am (dist_automake_ac_DATA): Update.
    * t/recurs-user.sh: New test.
    * t/recurs-user2.sh: Likewise.
    * t/recurs-user-deeply-nested.sh: Likewise.
    * t/recurs-user-indir.sh: Likewise.
    * t/recurs-user-keep-going.sh: Likewise.
    * t/recurs-user-many.sh: Likewise.
    * t/recurs-user-no-subdirs.sh: Likewise.
    * t/recurs-user-no-top-level.sh: Likewise.
    * t/recurs-user-override.sh: Likewise.
    * t/recurs-user-phony.sh: Likewise.
    * t/recurs-user-wrap.sh: Likewise.
    * t/remake-recurs-user.sh: Likewise.
    * t/list-of-tests.mk: Update.
    
    Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
    

  • README

  • This is Automake, a Makefile generator.  It aims to be portable and
    to conform to the GNU Coding Standards for Makefile variables and
    targets.
    
    See the INSTALL file for detailed information about how to configure
    and install Automake.
    
    Automake is a Perl script.  The input files are called Makefile.am.
    The output files are called Makefile.in; they are intended for use
    with Autoconf.  Automake requires certain things to be done in your
    configure.ac.
    
    Automake comes with extensive documentation; please refer to it for
    more details about its purpose, features, and usage patterns.
    
    This package also includes the "aclocal" program, whose purpose is
    to generate an 'aclocal.m4' based on the contents of 'configure.ac'.
    It is useful as an extensible, maintainable mechanism for augmenting
    autoconf.  It is intended that other package authors will write m4
    macros which can be automatically used by aclocal.  The documentation
    for aclocal is currently found in the Automake manual.
    
    Automake has a test suite.  Use "make check" to run it.  For more
    information, see the file t/README.
    
    Automake has a page on the web.  See:
    
    	http://www.gnu.org/software/automake/
    
    Automake also has three mailing lists:
    
      * automake@gnu.org
        For general discussions of Automake and its interactions with other
        configuration/portability tools like Autoconf or Libtool.
    
      * bug-automake@gnu.org
        Where to send bug reports and feature requests.
    
      * automake-patches@gnu.org
        Where to send patches, and discuss the automake development process
        and the  design of new features.
    
    To obtain more information about these list, or to subscribe to them,
    refer to <http://www.gnu.org/software/automake/#mailinglists>
    
    New releases are announced to autotools-announce@gnu.org.  If you want to
    be informed, subscribe to that list by following the instructions at
    <http://lists.gnu.org/mailman/listinfo/autotools-announce>.
    
    For any copyright year range specified as YYYY-ZZZZ in this package,
    that the range specifies every single year in that closed interval.
    
    -----
    
    Copyright (C) 1994-2012 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, see <http://www.gnu.org/licenses/>.