Edit

kc3-lang/automake/m4/Makefile.am

Branch :

  • Show log

    Commit

  • Author : Stefano Lattarini
    Date : 2011-09-05 17:37:44
    Hash : 30f99cbd
    Message : aclocal: more granularity in acdir overriding Before this change, using the `--acdir' option caused aclocal to redefine both the directory of automake-provided m4 macros and the directory of third-party system-wide m4 macros. With this change, we deprecate the `--acdir' aclocal option, and introduce two new options `--automake-acdir' and `--system-acdir', to allow for more granularity. * aclocal.in (@automake_includes, @system_includes, @user_includes): Fix and extend comments. (usage): Update. (handle_acdir_option): New function. (parse_arguments): Recognize new options `--system-acdir' and `automake-acdir', and handle `--acdir' using the new function above. Simplify logic by assuming that the directory of third-party system-wide m4 files always exists. * tests/aclocal.in: Update to use the new options, instead of the deprecated. `--acdir'. * m4/dirlist: Move ... * m4/acdir/dirlist: ... here. * m4/Makefile.am (EXTRA_DIST): Update. (m4datadir): Rename ... (automake_acdir): ... to this. Accordingly, ... (dist_m4data_DATA): ... rename this ... (dist_automake_ac_DATA): ... to this. (system_acdir): New, directory. (dist_system_ac_DATA): New, defined to an empty value; this will ensure that the $(system_acdir) directory will be created by "make install". * tests/aclocal.test: Remove check about the `--print-ac-dir' option of aclocal, it has been moved into ... * tests/aclocal-print-acdir.test: ... this new test, and quite extended. * tests/aclocal-acdir.test: New test. * tests/Makefile.am (TESTS): Add the new tests. * NEWS, bootstrap: Update. * doc/automake.texi (aclocal Options, Macro Search Path): Update.

  • m4/Makefile.am
  • ## Process this file with automake to create Makefile.in
    
    ## Makefile for Automake m4.
    
    # Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2006,
    # 2008, 2009, 2011 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/>.
    
    automake_acdir = $(datadir)/aclocal-$(APIVERSION)
    system_acdir = $(datadir)/aclocal
    
    dist_automake_ac_DATA = \
    $(top_srcdir)/m4/amversion.m4 \
    as.m4 \
    auxdir.m4 \
    ccstdc.m4 \
    cond.m4 \
    cond-if.m4 \
    depend.m4 \
    depout.m4 \
    dmalloc.m4 \
    gcj.m4 \
    header.m4 \
    init.m4 \
    install-sh.m4 \
    lead-dot.m4 \
    lex.m4 \
    lispdir.m4 \
    maintainer.m4 \
    make.m4 \
    minuso.m4 \
    missing.m4 \
    mkdirp.m4 \
    multi.m4 \
    obsol-gt.m4 \
    obsol-lt.m4 \
    obsolete.m4 \
    options.m4 \
    protos.m4 \
    python.m4 \
    regex.m4 \
    runlog.m4 \
    sanity.m4 \
    silent.m4 \
    strip.m4 \
    substnot.m4 \
    tar.m4 \
    upc.m4 \
    vala.m4
    
    # So that $(system_acdir) will be created by "make install".
    dist_system_ac_DATA =
    
    EXTRA_DIST = acdir/dirlist amversion.in
    
    # We build amversion.m4 here, instead of from config.status,
    # because config.status is rerun each time one of configure's
    # dependencies change and amversion.m4 happens to be a configure
    # dependency.  configure and amversion.m4 would be rebuilt in
    # loop otherwise.
    # Use `$(top_srcdir)/m4' for the benefit of non-GNU makes: this is
    # how amversion.m4 appears in our dependencies.
    $(top_srcdir)/m4/amversion.m4: $(srcdir)/amversion.in
    	sed -e 's,[@]VERSION[@],$(VERSION),g' \
    	    -e 's,[@]APIVERSION[@],$(APIVERSION),g' \
    	    -e "s,[@]configure_input[@],Generated from amversion.in; do not edit by hand.,g" \
    	    $(srcdir)/amversion.in > $@t
    	chmod a-w $@t
    	mv -f $@t $@