]> git.ipfire.org Git - thirdparty/automake.git/log
thirdparty/automake.git
13 years ago[ng] tests: merge, tweak and modernize few test scripts
Stefano Lattarini [Sat, 9 Jun 2012 18:49:09 +0000 (20:49 +0200)] 
[ng] tests: merge, tweak and modernize few test scripts

* t/specflg.sh, t/specflg2.sh, t/specflg3.sh: Merged into ...
* t/per-target-flags.sh: ... this test.
* t/fo.sh: Remove, its weak grepping checks well superseded by
the semantic checks in 't/fort4.sh'.
* t/cxxo.sh: Remove, its weak grepping checks well superseded
by the semantic checks in 't/cxx-demo.sh'.
* t/cxxcpp.sh: Enhance a little.
* t/empty.sh: Renamed ...
* t/empty-data-primary.sh: ... to this.  Add trailing ':' command.
* t/empty2.sh, t/empty3.sh, t/empty4.sh: Merged ...
* t/empty-sources-primary.tap: ... into this new test.
* t/no-outdir-option.sh: Remove.  A test to check than an obsolete
and now deleted option ("--output-dir") stays deleted is way too
much even for the most test-infected person ;-)

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] maintcheck: fix failures introduced by the recent merge of master
Stefano Lattarini [Sat, 9 Jun 2012 19:17:33 +0000 (21:17 +0200)] 
[ng] maintcheck: fix failures introduced by the recent merge of master

* t/cxx-lt-demo.sh: Avoid use of "make -e".

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'master' into ng/master
Stefano Lattarini [Sat, 9 Jun 2012 18:52:26 +0000 (20:52 +0200)] 
Merge branch 'master' into ng/master

* master:
  tests: look for '.lo' rather than '.o' object when using Libtool with C++
  cosmetics: few typofixes in older ChangeLogs, suggested by "codespell.py"
  tests: add basic semantic tests on C++ support
  tests: minor tweak to 't/objc-megademo.sh'

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'maint'
Stefano Lattarini [Sat, 9 Jun 2012 18:15:18 +0000 (20:15 +0200)] 
Merge branch 'maint'

* maint:
  tests: look for '.lo' rather than '.o' object when using Libtool with C++
  cosmetics: few typofixes in older ChangeLogs, suggested by "codespell.py"
  tests: add basic semantic tests on C++ support
  tests: minor tweak to 't/objc-megademo.sh'

13 years agotests: look for '.lo' rather than '.o' object when using Libtool with C++
Stefano Lattarini [Sat, 9 Jun 2012 18:13:43 +0000 (20:13 +0200)] 
tests: look for '.lo' rather than '.o' object when using Libtool with C++

* t/cxx-lt-demo.sh: ... in this test.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agocosmetics: few typofixes in older ChangeLogs, suggested by "codespell.py"
Stefano Lattarini [Sat, 9 Jun 2012 18:04:24 +0000 (20:04 +0200)] 
cosmetics: few typofixes in older ChangeLogs, suggested by "codespell.py"

The typofixes offered by this patch have been suggested by the
"codespell.py" script.  Reference:
<http://git.profusion.mobi/cgit.cgi/lucas/codespell/>

* old/ChangeLog.01, old/ChangeLog.02, old/ChangeLog.03: Fix few typos.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: add basic semantic tests on C++ support
Stefano Lattarini [Sat, 9 Jun 2012 13:11:10 +0000 (15:11 +0200)] 
tests: add basic semantic tests on C++ support

Strange as it might seem, we were still missing them (yikes).

* t/cxx-demo.sh: New test.
* t/cxx-lt-demo.sh: Likewise (using libtool).
* t/list-of-tests.mk: Add them.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: minor tweak to 't/objc-megademo.sh'
Stefano Lattarini [Sat, 9 Jun 2012 11:50:12 +0000 (13:50 +0200)] 
tests: minor tweak to 't/objc-megademo.sh'

* t/objc-megademo.sh (am_create_testdir): Define to "empty" before
including ./defs, because this test doesn't rely on the files usually
pre-set by the setup in there.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] tests: fix unportable find(1) usage
Stefano Lattarini [Sat, 9 Jun 2012 11:12:35 +0000 (13:12 +0200)] 
[ng] tests: fix unportable find(1) usage

* t/subobj10.sh: The use of find(1) without an explicitly given
file or directory argument (as in "find -name '*.o'" instead of
"find . '-name.o'") is mostly a GNU extension, and not portable
to POSIX find.  Fix it.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'master' into ng/master
Stefano Lattarini [Sat, 9 Jun 2012 09:57:00 +0000 (11:57 +0200)] 
Merge branch 'master' into ng/master

* master:
  cleanup: simplify subroutine '&saw_extension'
  cleanup: remove subroutine '&saw_sources_p'
  cleanup: remove unused '&count_files_for_language' subroutine
  automake: simplify '&saw_sources_p'
  tags: look at $(am__tagged_files) to decide whether to activate
  tags: new var $(am__tagged_files) to list all files to run taggers on
  tags (cscope): also process $(TAGS_FILES)
  tags (ID, cscope): also process config header (if any)

+ Extra non-trivial edits:

* automake.in (handle_tags): Adjust the call to 'define_variable' for
the variable '$(am__tagged_files)' to the different signature we have
in Automake-NG, i.e., "define_variable($VAR, $WHERE, @VALUE)" rather
than "define_variable($VAR, $VALUE, $WHERE)".

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] docs: fix a bug in generation of man pages
Stefano Lattarini [Sat, 9 Jun 2012 09:23:56 +0000 (11:23 +0200)] 
[ng] docs: fix a bug in generation of man pages

* Makefile.am ($(versioned_mans)): Pass 'aclocal-$(APIVERSION)' and
'automake-$(APIVERSION)' to the 'help2man' invocation, rather than
'aclocal' and 'automake', since otherwise the system-wide automake
and aclocal programs would be used instead of the proper wrappers in
't/wrap'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'ng/depcomp-unify-o-obj-rules' into ng/master
Stefano Lattarini [Sat, 9 Jun 2012 08:25:10 +0000 (10:25 +0200)] 
Merge branch 'ng/depcomp-unify-o-obj-rules' into ng/master

* ng/depcomp-unify-o-obj-rules:
  [ng] depcomp: remove unused variable '$source' from the depcomp script
  [ng] depcomp: unify rules for '.o' and '.obj' objects
  [ng] depcomp: prefer make automatic variables over automake transforms

+ Extra non-trivial edits:

* t/libtool3.sh: Also look for the '.$(OBJEXT)' extension when grepping
the generated Makefile to ensure no explicit rules for the C compilation
has been emitted (only pattern rules should have been).
* t/subdir3.sh: Remove, since the changes done to it in the branch
'ng/depcomp-unify-o-obj-rules' have been obsoleted by the general
semantic changes done in the 'ng/subdir-objects' branch (where this
test had indeed been removed).
* t/subobj4.sh: Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agocleanup: simplify subroutine '&saw_extension'
Stefano Lattarini [Thu, 7 Jun 2012 17:14:30 +0000 (19:14 +0200)] 
cleanup: simplify subroutine '&saw_extension'

* automake.in (saw_extension): Now that we use the '%extension_seen'
hash only as a set (it's keys being its elements), we can simplify
the implementation of this function accordingly.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agocleanup: remove subroutine '&saw_sources_p'
Stefano Lattarini [Thu, 7 Jun 2012 17:14:12 +0000 (19:14 +0200)] 
cleanup: remove subroutine '&saw_sources_p'

* automake.in (saw_sources_p): Remove, its implementation is now so
trivial that it's easier to inline it into ...
(handle_languages): ... it's only caller.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agocleanup: remove unused '&count_files_for_language' subroutine
Stefano Lattarini [Thu, 7 Jun 2012 17:13:39 +0000 (19:13 +0200)] 
cleanup: remove unused '&count_files_for_language' subroutine

* automake.in (count_files_for_language): Remove.  Its only remaining
caller (saw_sources_p) has stopped calling it in the previous commit.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoautomake: simplify '&saw_sources_p'
Stefano Lattarini [Thu, 7 Jun 2012 17:12:43 +0000 (19:12 +0200)] 
automake: simplify '&saw_sources_p'

This is just a minor cleanup.  No semantic change is intended.

* automake.in (saw_sources_p): Since its now-only caller calls it with
the '0' argument, remove the code paths that assumed the argument could
be '1', and assume no arguments.
(handle_languages): Drop the arguments '0' in the '&saw_sources_p'
invocation.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotags: look at $(am__tagged_files) to decide whether to activate
Stefano Lattarini [Thu, 7 Jun 2012 17:12:11 +0000 (19:12 +0200)] 
tags: look at $(am__tagged_files) to decide whether to activate

This is just a preparatory refactoring in view of future changes.

* automake.in (handle_tags): To decide whether to include the tags rules,
rely on whether the automake-defined variable $(SOURCES) is non-empty,
rather than on the fact that '&saw_sources(1)' returns true.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotags: new var $(am__tagged_files) to list all files to run taggers on
Stefano Lattarini [Thu, 7 Jun 2012 18:13:37 +0000 (20:13 +0200)] 
tags: new var $(am__tagged_files) to list all files to run taggers on

This change reduce code duplication a little, and will be needed by
future simplifications.

* automake.in (handle_tags): Define a new 'am__tagged_files' private
make variable that lists all files to run taggers (mkid, cscope, ctags,
etc) on.  Drop the now-useless transform '%CONFIG%' when including
'tags.am'.
* lib/am/tags.am: Use it in several recipes and dependencies list to
reduce code duplication.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] depcomp: remove unused variable '$source' from the depcomp script
Stefano Lattarini [Thu, 7 Jun 2012 01:06:10 +0000 (03:06 +0200)] 
[ng] depcomp: remove unused variable '$source' from the depcomp script

* lib/am/depend2.am (%.c -> %.$(OBJEXT) compilation recipes): Do not
pass the path of the source file in the 'source' environment variable
to the invocation of the 'depcomp' script.
* lib/depcomp: Don't document the 'source' environment variable, and
do not abort if it is not set; that variable wasn't actually used
anyway.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] depcomp: unify rules for '.o' and '.obj' objects
Stefano Lattarini [Thu, 7 Jun 2012 00:26:17 +0000 (02:26 +0200)] 
[ng] depcomp: unify rules for '.o' and '.obj' objects

This change just reduces code duplication and size of the generated
Makefiles a little.  No actual semantic change is intended.

* automake.in (handle_languages): Drop the '%OBJOBJ%' transform.
* lib/am/depend2.am (am__o_src): New, return the path of the source
file corresponding to the target compiled object unchanged when the
object has the '.o' suffix, and returns a proper invocation of
'$(CYGPATH_W)' on that same source file when the object has the
'.obj' suffix.
Using the new $(am__o_src) function, unify rules for the creation of
'.o' and '.obj' objects into a rule for the creation of '.$(OBJEXT)'
objects.
* t/ext.sh: Adjust grepping checks.
* t/ext2.sh: Likewise.
* t/libtool3.sh: Likewise.
* t/objc-basic.sh: Likewise.
* t/objcxx-basic.sh: Likewise.
* t/silent-many-gcc.sh: Likewise.
* t/silent-many-generic.sh: Likewise.
* t/specflg6.sh: Likewise.
* t/subdir3.sh: Likewise.
* t/subobj4.sh: Likewise.
* t/suffix.sh: Likewise.
* t/suffix2.sh: Likewise.
* t/empty2.sh: Enhance a little.
* t/empty3.sh: Likewise.
* t/specflg.sh: Likewise, and adjust comments.
* t/specflg2.sh: Likewise.
* t/pr87.sh: Remove an obsolete check (obsolete since our switch
from suffix rules to pattern rules for C compilation recipes).

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'ng/subdir-objects' into ng/master
Stefano Lattarini [Fri, 8 Jun 2012 10:36:21 +0000 (12:36 +0200)] 
Merge branch 'ng/subdir-objects' into ng/master

* ng/subdir-objects:
  [ng] cleanup: after enabling of subdir-objects unconditionally
  [ng] tests: remove explicit usages of the 'subdir-objects' option
  [ng] subdir-objects: enable unconditionally
  [ng] automake: don't define many identical 'lang_*_rewrite' subroutines

13 years ago[ng] cleanup: after enabling of subdir-objects unconditionally
Stefano Lattarini [Thu, 7 Jun 2012 15:04:26 +0000 (17:04 +0200)] 
[ng] cleanup: after enabling of subdir-objects unconditionally

Few minor cleanups made possible by earlier changes, plus other minor
cleanups triggered in cascade.  No semantic change is intended.

* automake.in (LANG_IGNORE, LANG_SUBDIR): Remove.
(register_language ('name' => 'vala', ...)): Add '.vapi' to the entry
'extensions', and simplify the entry 'output_extensions' to point to a
dummy subroutine (since it wasn't really used anyway).
(handle_single_transform): Don't expect the 'lang_*_rewrite' subroutines
to return a 'LANG_*' constant anymore, but only a transformed extension,
if required.  To decide whether further processing of the source file
should be stopped, rely on a new set of 'lang_*_ignore' subroutines,
defaulting to a subroutine that returns false.  Accordingly, don't special
case the handling of '.vapi' files anymore, instead relying on ...
(lang_vala_ignore, lang_header_ignore): ... these new subroutines to avoid
extra processing of C/C++ headers and Vala '.vapi' headers.
(lang_c_rewrite): Adjust to explicitly return an undefined value.
(lang_java_rewrite): Remove.
Remove an outdated comment.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] depcomp: prefer make automatic variables over automake transforms
Stefano Lattarini [Wed, 6 Jun 2012 23:52:37 +0000 (01:52 +0200)] 
[ng] depcomp: prefer make automatic variables over automake transforms

* lib/am/depend2.am: Here, in several recipes.
* t/specflg3.sh: Adjust grepping checks
* t/subobj4.sh: Relax grepping checks.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotags (cscope): also process $(TAGS_FILES)
Stefano Lattarini [Thu, 7 Jun 2012 17:41:37 +0000 (19:41 +0200)] 
tags (cscope): also process $(TAGS_FILES)

* lib/am/tags.am (cscopelist): Also scan the files (if any) listed in
the '$(TAGS_FILES) variable, for consistency by what is done by the
'ID', 'TAGS' and 'CTAGS' rules.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotags (ID, cscope): also process config header (if any)
Stefano Lattarini [Thu, 7 Jun 2012 17:19:15 +0000 (19:19 +0200)] 
tags (ID, cscope): also process config header (if any)

* lib/am/tags.am (cscopelist, ID): Also scan the file given by the
'%CONFIG%' transform, for consistency by what is done by the 'TAGS'
and 'CTAGS' rules.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] tests: remove explicit usages of the 'subdir-objects' option
Stefano Lattarini [Thu, 7 Jun 2012 08:38:29 +0000 (10:38 +0200)] 
[ng] tests: remove explicit usages of the 'subdir-objects' option

It is enabled unconditionally since the previous change.

* Several tests: Adjust, extend, rework and simplify, as needed.
* t/ax/depcomp-shuffle.sh, t/ax/depcomp.sh: Likewise.
* t/subobj2.sh: Rename ...
* t/subobj-cxx-grep.sh: ... to this, and adjust.
* t/subobj.sh: Rename ...
* t/subobj-c.sh: ... to this, and adjust.
* t/subobj-cxx.sh: New test.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] subdir-objects: enable unconditionally
Stefano Lattarini [Wed, 6 Jun 2012 08:27:46 +0000 (10:27 +0200)] 
[ng] subdir-objects: enable unconditionally

The fact that Automake-generated Makefiles places compiled
object files in the current directory by default, also when the
corresponding source file is in a subdirectory, is basically an
historical accident, due to the fact that the 'subdir-objects'
option had only been introduced in April 1999, starting with
commit 'user-dep-gen-branchpoint-56-g88b5959', and never made
the default, likely to avoid backwards-compatibility issues.

Since we believe the behaviour enabled by the 'subdir-objects'
is the only natural and most useful one, we make it the only
only one available, simplifying the Automake implementation and
APIs a little in the process.

* NG-NEWS: Update.
* doc/automake-ng.texi (Program and Library Variables): The output
object files are not anymore placed in the current directory by
default, but rather in the same directory of the source file.
(LIBOBJS): Now the $(LIBOBJS) and $(ALLOCA) variables can also be
be used outside of the directory where their sources lie.
(List of Automake options): Don't document the 'subdir-objects'
option anymore.
Other related minor adjustments.
* automake.in (LANG_PROCESS): Remove, it's not needed anymore.
(handle_languages): Don't test whether option 'subdir-objects'
is set (just assume it is), and do not use the '%SUBDIROBJ%'
transform when processing '.am' fragments.
(lang_sub_obj): Delete, it would just return 'LANG_SUBDIR'
unconditionally now.
(lang_c_rewrite): Adjust.  Don't test whether the option
'subdir-objects' is set (just assume it is).
(lang_yacc_rewrite): Likewise.
(lang_lex_rewrite): Likewise.
(handle_single_transform): Likewise.  Remove an obsolete
comment.  Add a proper "FIXME" comments about a fragment
of code that might have become dead code now.
(handle_LIBOBJS_or_ALLOCA): Simplify assuming that the option
'subdir-objects' is always set.  Accordingly, there's no need
to warn anymore if '$(LIBOBJS)' or '$(ALLOCA)' are used outside
the '$config_libobj_dir' directory (as specified by autoconf
macro 'AC_CONFIG_LIBOBJ_DIR').
* lib/am/depend2.am: Assume the '?SUBDIROBJ?' Automake time
conditional is always true, and remove its use accordingly.
lib/am/depend2.am
* t/ax/depcomp.sh: Adjust to the fact that 'subdir-objects' is
always in effect.
* t/ccnoco2.sh: Likewise.
* t/cscope.tap: Likewise.
* t/depcomp8a.sh: Likewise.
* t/depcomp8b.sh: Likewise.
* t/libtool3.sh: Likewise.
* t/pr401.sh: Likewise.
* t/pr401b.sh: Likewise.
* t/pr401c.sh: Likewise.
* t/lex-line.sh: Likewise.
* t/yacc-line.sh: Likewise.
* t/yacc5.sh: Likewise.
* t/parallel-tests-suffix-prog.sh: Likewise.
* t/fort4.sh: Likewise, and extend a bit.
* t/fort5.sh: Likewise.
* t/gcj.sh: Likewise.
* t/subpkg.sh: Likewise.
* t/subpkg-yacc.sh: Likewise.
* t/xsource.sh: Likewise.
* t/libobj20a.sh: Remove as obsolete.
* t/libobj20b.sh: Adjust heading comments.
* t/libobj20c.sh: Likewise.
* t/subdir3.sh: Remove as obsolete.
* t/subobj4.sh: Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] automake: don't define many identical 'lang_*_rewrite' subroutines
Stefano Lattarini [Wed, 6 Jun 2012 07:52:22 +0000 (09:52 +0200)] 
[ng] automake: don't define many identical 'lang_*_rewrite' subroutines

This is just a refactoring prompted by future planned changes.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'ng/check-typos-at-make-runtime' into ng/master
Stefano Lattarini [Thu, 7 Jun 2012 10:17:00 +0000 (12:17 +0200)] 
Merge branch 'ng/check-typos-at-make-runtime' into ng/master

* ng/check-typos-at-make-runtime:
  [ng] vartypos: update news file
  [ng] vartypos: allow user to whitelist false positives

13 years ago[ng] parallel-tests: use 'am__error' instead of hand-rolled equivalent
Stefano Lattarini [Wed, 6 Jun 2012 16:33:23 +0000 (18:33 +0200)] 
[ng] parallel-tests: use 'am__error' instead of hand-rolled equivalent

The API offered by 'am__error' (as introduced in recent commit
'v1.12.1-302-g67d6102') is cleaner, and allows us to diagnose more
issues (even if unrelated), rather than stopping at the first one.

* lib/am/parallel-tests.am: Use '$(am__error)' instead of an hand-rolled
poor man's equivalent to diagnose invalid $(TEST_EXTENSIONS).  In
particular ...
(am__maybe_invalid_test_extensions): Remove this as now useless.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] vartypos: update news file
Stefano Lattarini [Wed, 6 Jun 2012 16:12:49 +0000 (18:12 +0200)] 
[ng] vartypos: update news file

* NG-NEWS (Warnings and diagnostic):  Diagnostic about typos in
'_SOURCES' etc. variable is issued at make, not automake, runtime,
and when undesired can be silenced (totally or partly) with the
help of the 'AM_VARTYPOS_WHITELIST' variable.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] vartypos: allow user to whitelist false positives
Stefano Lattarini [Wed, 6 Jun 2012 15:37:12 +0000 (17:37 +0200)] 
[ng] vartypos: allow user to whitelist false positives

It can happen that the user legitimately employs what the new Automake-NG
make runtime warnings would take for an erroneous usage; for example, GNU
coreutils 8.17 uses something like this is its build system (see file
'src/Makefile.am'):

    # Shared files.
    copy_LDADD =
    cp_LDADD += $(copy_LDADD)
    ginstall_LDADD += $(copy_LDADD)
    mv_LDADD += $(copy_LDADD)
    ...
    copy_LDADD += $(LIB_SELINUX)       # for selinux use
    copy_LDADD += $(LIB_CLOCK_GETTIME) # for gettime, settime, ...
    copy_LDADD += $(LIB_XATTR)         # for various xattr functions
    ...

Since it does so without having a program called 'copy' anywhere, the
Makefile generated by Automake complains like this:

    Makefile:2544: variable 'copy_LDADD' is defined but no program
    Makefile:2544:   or library has 'copy' as canonical name
    Makefile:2546: *** Some Automake-NG error occurred.  Stop.

Instead of forcing the coreutils developers to heavily edit their Makefile,
it is better to allow them to whitelist their suspicious usages as correct.
And such a whitelisting capability is a good idea even regardless this
motivation, since it helps enforcing the Autotools- philosophy "the user is
always right" (as long as he is explicit enough).

* lib/am/check-typos (.am/vartypos/whitelisted-vars ): Also add the contents
of the user-reserved variable '$(AM_VARTYPOS_WHITELIST)' (note that it is
still undocumented).
* t/vartypos-whitelist.sh: New test.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branches 'ng/check-typos-at-make-runtime' and 'ng/yacc-lex-fixlets' into ng...
Stefano Lattarini [Wed, 6 Jun 2012 13:50:11 +0000 (15:50 +0200)] 
Merge branches 'ng/check-typos-at-make-runtime' and 'ng/yacc-lex-fixlets' into ng/master

* ng/check-typos-at-make-runtime:
  [ng] cleanup: unused variable in the automake script removed
  [ng] warns: also report typos for 'LOG_DEPENDENCIES' variables
  [ng] warns: typos in '_DEPENDENCIES' variables are now reported
  [ng] warns: typos in _SOURCES etc. reported at make runtime
  [ng] refactor: new make variables am__all_libs and am__all_ltlibs
  [ng] automake: new global variable '%known_ltlibraries'
  [ng] coverage: conditional defn of lib_LIBRARIES and lib_LTLIBRARIES

* ng/yacc-lex-fixlets:
  [ng] yacc: prefer use of automatic variables over automake-time transforms
  [ng] yacc/c++: prefer make-time processing over recipe-time one
  [ng] lex: fix a (mostly harmless) typo in code
  [ng] refactor: merge lang_{yacc,lex}_finish functions
  [ng] cleanup: don't error on 'YACCFLAGS' usage

13 years ago[ng] yacc: prefer use of automatic variables over automake-time transforms
Stefano Lattarini [Tue, 29 May 2012 22:34:34 +0000 (00:34 +0200)] 
[ng] yacc: prefer use of automatic variables over automake-time transforms

* lib/am/yacc.am: Prefer use of GNU make builtin '$(basename)' over
automake-time transform %BASE%.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] yacc/c++: prefer make-time processing over recipe-time one
Stefano Lattarini [Tue, 29 May 2012 22:30:07 +0000 (00:30 +0200)] 
[ng] yacc/c++: prefer make-time processing over recipe-time one

* lib/am/yacc.am (am__yacc_c2h): Transform from a sed command to a
make function.
(Rules for Yacc -> C transform): Adjust.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] lex: fix a (mostly harmless) typo in code
Stefano Lattarini [Tue, 29 May 2012 22:04:20 +0000 (00:04 +0200)] 
[ng] lex: fix a (mostly harmless) typo in code

* lib/am/lex.am [?GENERIC?]: s/$(am__skipyacc)/$(am__skiplex)/.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] refactor: merge lang_{yacc,lex}_finish functions
Stefano Lattarini [Tue, 29 May 2012 21:02:42 +0000 (23:02 +0200)] 
[ng] refactor: merge lang_{yacc,lex}_finish functions

They are identical after the last commit, so no need to keep them
separated anymore

* automake.in (yacc_lex_finish_helper, lang_yacc_finish,
lang_lex_finish): Merge into ..
(lang_yacc_lex_finish): ... this.
Adjust calls to 'register_language' for Yacc and Lex accordingly.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] cleanup: don't error on 'YACCFLAGS' usage
Stefano Lattarini [Tue, 29 May 2012 20:57:48 +0000 (22:57 +0200)] 
[ng] cleanup: don't error on 'YACCFLAGS' usage

* automake.in (lang_yacc_finish): Stop calling 'reject_var' on
'YACCFLAGS'; that has been obsolete for such a long time (since
1998 at least!) that is not worth worrying about anymore in
Automake-NG.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] cleanup: unused variable in the automake script removed
Stefano Lattarini [Tue, 5 Jun 2012 22:04:23 +0000 (00:04 +0200)] 
[ng] cleanup: unused variable in the automake script removed

* automake.in ($output_header): Remove.
(initialize_per_input): Don't reset it.
(generate_makefile): Don't use its content when creating the output
Makefile: it was always empty anyway.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] warns: also report typos for 'LOG_DEPENDENCIES' variables
Stefano Lattarini [Tue, 5 Jun 2012 15:08:59 +0000 (17:08 +0200)] 
[ng] warns: also report typos for 'LOG_DEPENDENCIES' variables

* lib/am/parallel-tests.am (am__using_parallel_tests): New, set to
"yes" to inform the rest of the makefile that the parallel testsuite
harness is in use.
* lib/am/check-typos.am (.am/vartypos/whitelisted-vars): Whitelist
only 'LOG_DEPENDENCIES' variables that actually correspond to a
declared test extension.
* t/vartypos-deps.sh: New test.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] warns: typos in '_DEPENDENCIES' variables are now reported
Stefano Lattarini [Tue, 5 Jun 2012 14:16:21 +0000 (16:16 +0200)] 
[ng] warns: typos in '_DEPENDENCIES' variables are now reported

Detection of those typos had been disabled in commit in commit
'v1.12-295-g9a5f837' of 2012-05-22, "[ng] warns: don't report possible
issues with '_DEPENDENCIES' variables", to avoid spurious errors.

* lib/am/check-typos.am (.am/vartypos/suffixes): Add '_DEPENDENCIES'.
(.am/vartypos/whitelisted-vars): Extend accordingly to avoid spurious
errors.
* t/vartypos.sh: Extend to also test bad usages of '_DEPENDENCIES'
variables.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] warns: typos in _SOURCES etc. reported at make runtime
Stefano Lattarini [Tue, 5 Jun 2012 11:49:04 +0000 (13:49 +0200)] 
[ng] warns: typos in _SOURCES etc. reported at make runtime

For example, on an input:

    bin_PROGRAMS = frob
    forb_SOURCES = main.c

a proper warning should be given, since either 'forb' or 'frob' is likely a
typo.  Mainline Automake gives the warning at automake runtime, while with
this change, the warnings will be moved at make runtime.  This will allow
us to warn about variables like '_DEPENDENCIES', whose definitions can
be unavailable (or unanalyzable) at automake runtime (check about those
variables had to be disabled in commit 'v1.12-295-g9a5f837' of 2012-05-22,
"[ng] warns: don't report possible issues with '_DEPENDENCIES' variables",
to avoid spurious errors).

* automake.in (generate_makefile): Emit code to perform make runtime
checks, in particular those moved out from ...
(check_typos): ... this now-deleted function ...
* lib/am/check-typos.am: ... into this new Makefile fragment.
* Makefile.am (dist_am_DATA): Add the new file.
* lib/am/header-vars.am (am__error): New internal function, declares an
error without immediately terminating the make process.  Allows us to
diagnose more issues at once, rather than stopping at the first one.
* t/spell.sh: Adjust and extend.
* t/spell2.sh: Likewise.
* t/warnopts.sh: Adjust.
* t/vartypo2.sh: Remove, its content adjusted and merged ...
* t/vartypos.sh: ... into this test, adjusted and extended as well.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] refactor: new make variables am__all_libs and am__all_ltlibs
Stefano Lattarini [Tue, 5 Jun 2012 16:31:58 +0000 (18:31 +0200)] 
[ng] refactor: new make variables am__all_libs and am__all_ltlibs

This change is only a preparatory refactoring in view of future changes.

* t/all-progs.sh: Renamed ...
* t/all-prog-libs.sh: ... like this, and extended.
* automake.in (generate_makefile): Define the make vars 'am__all_libs'
and 'am__all_ltlibs' respectively from the sorted keys of the hashes
'%known_libraries' and '%known_ltlibraries'.  For consistency, and for
offering a better stability of the output Makefiles, sort the keys of
the '%known_programs' hash before using them to define the make variable
'am__all_progs'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] automake: new global variable '%known_ltlibraries'
Stefano Lattarini [Tue, 5 Jun 2012 16:28:01 +0000 (18:28 +0200)] 
[ng] automake: new global variable '%known_ltlibraries'

This is just a preparatory refactoring in view of future changes.

* automake.in (%known_ltlibraries): New global variable.
(initialize_per_input): Reset it.
(handle_ltlibraries): Register processed libtool libraries in
'%known_ltlibraries' rather than in '%known_libraries'.
(lang_vala_finish): Also take into account the contents of
'%known_ltlibraries'; since we are at it, refactor a little
to remove some inconsistency and code duplication.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] coverage: conditional defn of lib_LIBRARIES and lib_LTLIBRARIES
Stefano Lattarini [Tue, 5 Jun 2012 16:22:33 +0000 (18:22 +0200)] 
[ng] coverage: conditional defn of lib_LIBRARIES and lib_LTLIBRARIES

This improved coverage will come handy to check the correctness of
future changes.

* t/cond30.sh: Enhance.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] refactor: a first use of "ifndef VAR"
Stefano Lattarini [Sat, 2 Jun 2012 19:11:38 +0000 (21:11 +0200)] 
[ng] refactor: a first use of "ifndef VAR"

* lib/am/header-vars.am: Use "ifndef .FEATURES" instead of
"$(if $(.FEATURES))" to determine whether the used GNU make
version is recent enough.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] internals: new variable $(am__newline)
Stefano Lattarini [Sat, 2 Jun 2012 18:52:26 +0000 (20:52 +0200)] 
[ng] internals: new variable $(am__newline)

* lib/am/header-vars.am (am__newline): New, contains one single newline.
* t/internals.tap: Test it.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] internals: copy 'header-vars.am' more verbatim in the output makefile
Stefano Lattarini [Sat, 2 Jun 2012 15:59:19 +0000 (17:59 +0200)] 
[ng] internals: copy 'header-vars.am' more verbatim in the output makefile

* automake.in (define_standard_variables): The 'header-vars.am' file should
contain no rule definition, nor any variable definition that must be known
at automake runtime; so we can read and process that file's content using
the 'preprocess_file' function rather than the 'file_contents_internal' one.
This will allow us to make a more liberal use of GNU make builtins in there,
like the 'define' builtin.
* t/comment4.sh: Adjust.
* t/vpath.sh: Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] tests: remove redundant code in a test case
Stefano Lattarini [Sat, 2 Jun 2012 15:44:02 +0000 (17:44 +0200)] 
[ng] tests: remove redundant code in a test case

* t/internals.tap (Makefile.am): Remove extra declaration of the
'test-tolower' target.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] tests: fix a spurious failure
Stefano Lattarini [Sat, 2 Jun 2012 13:25:29 +0000 (15:25 +0200)] 
[ng] tests: fix a spurious failure

* t/txinfo17.sh (texinfo.texi): Use "foobar", not "example", as the
argument of the @setfilename call, to ensure we don't get false
positives in the later grepping checks.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotexinfo: fix an imprecise comment
Stefano Lattarini [Sat, 2 Jun 2012 11:55:15 +0000 (13:55 +0200)] 
texinfo: fix an imprecise comment

In GNU make, '$^' used in a recipe contains every dependency for the
target, even those not declared when the recipe is read; for example,
on:

    all: foo1; @echo $^
    all: foo2

"make all" would output "foo1 foo2".  This is not Automake's fault,
as some comments incorrectly stated.  See also:
<http://lists.gnu.org/archive/html/help-make/2012-05/msg00029.html>

* lib/am/texinfos.am: Fix those incorrect comments, and document the
GNU make behaviour described above.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] maintcheck: avoid spurious failures
Stefano Lattarini [Sat, 2 Jun 2012 10:29:59 +0000 (12:29 +0200)] 
[ng] maintcheck: avoid spurious failures

* t/suffix-custom-link.sh: Rewrite a little to avoid triggering warnings
from the 'sc_tests_here_document_format' maintainer check.
* syntax-checks.mk (sc_diff_aclocal_in_aclocal,
sc_diff_automake_in_automake): Rename ...
(sc_diff_aclocal_in_aclocal,
sc_diff_automake_in_automake): ... respectively to these, rewrite to use
static pattern rules and 'diff -u' instead of bare 'diff', and fix the
count of expected differences to account for the removed substitution of
'@SHELL@' in automake.in.
(syntax_check_rules): Adjust.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'master' into ng/master
Stefano Lattarini [Sat, 2 Jun 2012 09:40:29 +0000 (11:40 +0200)] 
Merge branch 'master' into ng/master

* master: (21 commits)
  news: document deprecation of configure.in
  news: put planned backward compatibilities early
  sync: update files from upstream with "make fetch"
  maint: deprecate 'configure.in' as autoconf input
  maint: post-release minor version bump
  release: stable release 1.12.1
  copyright: update copyright years in a couple of files
  tests: avoid spurious failures with Solaris 9 cscope program
  maintcheck: fix a spurious failure
  perf: beginning of a performance testsuite
  aclocal: declare function prototypes, do not use '&' in function calls
  news: support for configure.in will be dropped in future automake versions
  missing: support AC_CONFIG_HEADERS in addition to obsolete AC_CONFIG_HEADER
  missing: don't bother checking for AM_CONFIG_HEADER: it is gone now
  docs: remove mention of AM_CONFIG_HEADER: it is obsolete and removed now
  tests: fix botched heading comments in 'lex-clean-cxx.sh'
  [ng] maintcheck: some tweaks and fixlets
  help: fix a typo in the list of warning categories
  maint: version bump after beta release
  release: beta release 1.12.0b (will become 1.12.1)
  ...

+ Extra non-trivial edits:

* Makefile.am (TESTS): Add the tests in the 't/perf' directory.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] install: fix an unquoted usage of $(DESTDIR)
Stefano Lattarini [Sat, 2 Jun 2012 09:04:42 +0000 (11:04 +0200)] 
[ng] install: fix an unquoted usage of $(DESTDIR)

* lib/am/texinfos.am (am__create_installdir): Single-quote $(DESTDIR).
Issue revealed by the 'sc_unquoted_DESTDIR' maintainer check.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] maintcheck: fix several spurious failures
Stefano Lattarini [Sat, 2 Jun 2012 08:59:56 +0000 (10:59 +0200)] 
[ng] maintcheck: fix several spurious failures

* syntax-checks.mk ($(sc_renamed_variables_rules)): Only match the
"blacklisted" old variable names when they constitute a single word.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] maintcheck: fix bad typo, was preventing some checks to run
Stefano Lattarini [Thu, 31 May 2012 09:23:11 +0000 (11:23 +0200)] 
[ng] maintcheck: fix bad typo, was preventing some checks to run

* syntax-check.mk (Sc_renamed_variables_rules): Renamed ...
(sc_renamed_variables_rules): ... to this.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'maint'
Stefano Lattarini [Sat, 2 Jun 2012 07:54:17 +0000 (09:54 +0200)] 
Merge branch 'maint'

* maint:
  news: document deprecation of configure.in
  news: put planned backward compatibilities early
  sync: update files from upstream with "make fetch"
  maint: deprecate 'configure.in' as autoconf input
  maint: post-release minor version bump
  release: stable release 1.12.1
  copyright: update copyright years in a couple of files
  tests: avoid spurious failures with Solaris 9 cscope program
  maintcheck: fix a spurious failure
  perf: beginning of a performance testsuite
  aclocal: declare function prototypes, do not use '&' in function calls
  news: support for configure.in will be dropped in future automake versions
  tests: fix botched heading comments in 'lex-clean-cxx.sh'
  [ng] maintcheck: some tweaks and fixlets
  help: fix a typo in the list of warning categories
  maint: version bump after beta release
  release: beta release 1.12.0b (will become 1.12.1)
  release: remove overly picky check

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] vars: recognize escaped '#' correctly in a variable definition
Stefano Lattarini [Thu, 31 May 2012 15:52:51 +0000 (17:52 +0200)] 
[ng] vars: recognize escaped '#' correctly in a variable definition

Regression revealed by a failure in test 't/backslash-tricks.sh', and
caused by the recent merge of the 'ng/var-simplify' branch.

It is worth noting that this change has a collateral effect: comments
placed after the variable definition *must* now be separated with one
or more spaces from said definition:

   # This won't work, and will produce a subtly broken Makefile
   foo = val# comment
   foo += val2

   # Please do this instead
   foo = val # comment
   foo += val2

We believe that supporting the use of escaped '#' characters in variable
definitions is more important than supporting the fringe case above.

* lib/Automake/VarDef.pm (raw_value): Fix processing of stored value
to account for escaped '#' characters.
(value): Add a FIXME comment about a statement that is not strictly
true anymore now that we assume GNU make.
* t/backslash-tricks.sh: Extend a bit.
* t/comment8.sh: Relax a bit, by placing spaces between the variable's
definitions and the comments on the same line.  Extend in another
respect, to watch against a regression introduced by the first draft of
this commit.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agonews: document deprecation of configure.in
Stefano Lattarini [Sat, 2 Jun 2012 07:34:29 +0000 (09:34 +0200)] 
news: document deprecation of configure.in

* NEWS (Warnings and deprecations): We now warn if 'configure.in' is
used instead of 'configure.ac' as autoconf input.
(Future backward-incompatibilities): Adjust.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agonews: put planned backward compatibilities early
Stefano Lattarini [Sat, 2 Jun 2012 07:24:29 +0000 (09:24 +0200)] 
news: put planned backward compatibilities early

* NEWS (Future backward-incompatibilities): Put them in the news
entries for the future 1.12.2 release.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agosync: update files from upstream with "make fetch"
Stefano Lattarini [Fri, 1 Jun 2012 18:24:20 +0000 (20:24 +0200)] 
sync: update files from upstream with "make fetch"

* lib/config.sub, lib/gitlog-to-changelog, lib/texinfo.tex: Update.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agomaint: deprecate 'configure.in' as autoconf input
Stefano Lattarini [Fri, 1 Jun 2012 17:15:29 +0000 (19:15 +0200)] 
maint: deprecate 'configure.in' as autoconf input

It has been years since that has been deprecated in the documentation,
in favour of 'configure.ac':

    Previous versions of Autoconf promoted the name configure.in, which
    is somewhat ambiguous (the tool needed to process this file is not
    described by its extension), and introduces a slight confusion with
    config.h.in and so on (for which '.in' means "to be processed by
    configure"). Using configure.ac is now preferred.

It's now time to start giving runtime warning about the use of
'configure.in', so that support for it can be removed in future
versions of autoconf/automake.

See also, in the Autoconf repository, commit 'v2.69-4-g560f16b' of
2012-05-23, "general: deprecate 'configure.in' as autoconf input".

* lib/Automake/Configure_ac.pm: Issue a warning in the 'obsolete'
category if 'configure.in' is detected.  Since this module is synced
from Automake, this change is to be backported there (and will be
soon).
* t/help.sh: Adjust.
* t/configure.sh: Adjust and enhance.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agomaint: post-release minor version bump
Stefano Lattarini [Fri, 1 Jun 2012 16:55:14 +0000 (18:55 +0200)] 
maint: post-release minor version bump

* configure.ac (AC_INIT): Bump version number to 1.12.1a.
* m4/amversion.m4: Likewise (automatically regenerated by
"make bootstrap").

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agorelease: stable release 1.12.1 v1.12.1
Stefano Lattarini [Fri, 1 Jun 2012 13:50:03 +0000 (15:50 +0200)] 
release: stable release 1.12.1

* configure.ac (AC_INIT): Bump version number to 1.12.1.
* m4/amversion.m4: Likewise (auto-updated by "./bootstrap").

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agocopyright: update copyright years in a couple of files
Stefano Lattarini [Fri, 1 Jun 2012 13:47:17 +0000 (15:47 +0200)] 
copyright: update copyright years in a couple of files

* doc/help2man, t/aclocal-verbose-install.sh: Update copyright,
thanks to "make update-copyright".

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: avoid spurious failures with Solaris 9 cscope program
Stefano Lattarini [Fri, 1 Jun 2012 10:37:41 +0000 (12:37 +0200)] 
tests: avoid spurious failures with Solaris 9 cscope program

* t/cscope.tap: Also check that the cscope program in use supports the
'-q' option; if this is not the case, some cscope usages in the generated
Makefiles would fail, so we must skip the checks involving those usages.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agomaintcheck: fix a spurious failure
Stefano Lattarini [Fri, 1 Jun 2012 09:49:16 +0000 (11:49 +0200)] 
maintcheck: fix a spurious failure

* Makefile.am (test_subdirs): Add 't/perf'.  Fix spurious failure
of the 'maintainer-check-list-of-tests' target.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'ng/var-simplify' into ng/master
Stefano Lattarini [Thu, 31 May 2012 08:53:20 +0000 (10:53 +0200)] 
Merge branch 'ng/var-simplify' into ng/master

* ng/var-simplify:
  [ng] cosmetics: avoid redundant use of '&' in subroutine calls
  [ng] rename: define_pretty_variable -> define_cond_variable()
  [ng] cleanup: prefer 'define_variable' over 'define_pretty_variable'
  [ng] refactor: change signature of 'define_variable()'
  [ng] vars: get rid of VAR_ASIS / VAR_PRETTY distinction
  [ng] vars: keep track of conditionals in appended values and comments
  [ng] vars: simplify logic for appending conditionally
  [ng] VarDef: store comments and values as a perl array
  [ng] refactor: support comments only for VarDef, not for ItemDef too
  [ng] tests: Automake should let us append to undefined variables (someday)
  [ng] tests: spy behaviour of '+=' with GNU make
  [ng] vars: get rid of VAR_SILENT type
  [ng] vars: get rid of VAR_SORTED type
  [ng] cleanup: remove unused private variables in Automake::Variable

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] cosmetics: avoid redundant use of '&' in subroutine calls
Stefano Lattarini [Sat, 19 May 2012 22:27:10 +0000 (00:27 +0200)] 
[ng] cosmetics: avoid redundant use of '&' in subroutine calls

* automake.in: Avoid redundant '&' in calls to the subroutines
'push_dist_common', 'define_variable' and 'define_verbose_tagvar'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: define_pretty_variable -> define_cond_variable()
Stefano Lattarini [Sat, 19 May 2012 21:06:27 +0000 (23:06 +0200)] 
[ng] rename: define_pretty_variable -> define_cond_variable()

The new name is more appropriate, now that there is no more
distinction between variables "pretty printed" and "printed
as is".

* automake.in (define_pretty_variable): Rename ...
(define_cond_variable): ... to this.
(handle_ltlibraries): Adjust (yes, this was the only caller!)

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] cleanup: prefer 'define_variable' over 'define_pretty_variable'
Stefano Lattarini [Sat, 19 May 2012 20:49:36 +0000 (22:49 +0200)] 
[ng] cleanup: prefer 'define_variable' over 'define_pretty_variable'

No semantic change is intended.

* automake.in: Any call to 'define_pretty_variable' where the condition
argument is 'TRUE' can be simplified to a call to 'define_variable'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] refactor: change signature of 'define_variable()'
Stefano Lattarini [Sat, 19 May 2012 20:38:38 +0000 (22:38 +0200)] 
[ng] refactor: change signature of 'define_variable()'

Change signature from:
    define_variable ($VAR, $VALUE, $WHERE)
to:
    define_variable ($VAR, $WHERE, @VALUE)

This makes the signature more consistent with the one of
'define_pretty_variable()'.

* automake.in (define_variable): Change signature.
All callers adjusted.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] vars: get rid of VAR_ASIS / VAR_PRETTY distinction
Stefano Lattarini [Sat, 19 May 2012 17:34:06 +0000 (19:34 +0200)] 
[ng] vars: get rid of VAR_ASIS / VAR_PRETTY distinction

It doesn't offer us any real advantage (apart from some eye-candy
in the generated makefile), and complicates the code and the
internal APIs.

* automake.in (define_verbose_var, define_configure_variable,
file_contents_internal): Adjust the 'Automake::Variable::define'
call to drop the VAR_ASIS parameter.
(define_pretty_variable): Likewise.  Also, adjust the function
description not to state that the value of a variable defined by
it is "pretty printed in the output file".
(handle_subdirs): Don't try to prettify the RECURSIVE_TARGETS
variable anymore.
(read_am_file): Adjust the 'Automake::Variable::define' calls
to drop the VAR_ASIS parameter.  Also, don't "prettify" the
definition of variables whose value is more than 1000 characters
long.  That is now done directly ...
* lib/Automake/Variable.pm (output): ... in here.
(define): Drop the '$pretty' parameter, and adjust implementation
details accordingly.  Now output variable definitions are only
prettified when needed, i.e., when their value is more than 1000
characters long.  And the only reason this prettification is done
is to ensure the generated Makefile.in won't have lines so long
that could confuse tools (like sed and awk) processing it into a
Makefile at config.status runtime.
(Pod Documentation): Adjust.
(_has_line_too_long): New internal function.
(transform_variable_recursively): Drop '$pretty' parameter in a
call to 'define'.
* lib/Automake/VarDef.pm (VAR_ASIS, VAR_PRETTY): Delete.
(@EXPORT): Don't advertise them.
(new): Don't take nor store the '$pretty' parameter anymore.
(pretty): Remove this accessor method.
(Pod Documentation): Adjust.
* t/check2.sh: Adjust.
* t/distcom-subdir.sh: Likewise.
* t/distcom2.sh: Likewise.
* t/longline.sh: Likewise.
* t/pluseq3.sh: Likewise.
* t/subdir4.sh: Likewise.
* t/subst-no-trailing-empty-line.sh: Remove as obsolete.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] vars: keep track of conditionals in appended values and comments
Stefano Lattarini [Thu, 3 May 2012 13:08:39 +0000 (15:08 +0200)] 
[ng] vars: keep track of conditionals in appended values and comments

This is a refactoring only needed by later changes.

* lib/Automake/VarDef.pm: Updated methods and constructor.
* lib/Automake/Variable.pm: Callers adjusted.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] vars: simplify logic for appending conditionally
Stefano Lattarini [Thu, 3 May 2012 10:00:35 +0000 (12:00 +0200)] 
[ng] vars: simplify logic for appending conditionally

This will make the generated Makefiles more bloated, but that should
be OK, since eventually further refactorings will change the format used
to output conditional variables extending, and the resulting Makefiles
will once again be smaller and cleaner.

* lib/Automake/Variable.pm (define): When appending to an existing
variable *defined in another condition*, don't bother to avoid the
creation of intermediate internal variables when that's not really
needed; just create them unconditionally.
(_new): Don't reset $self->{'last-append'} anymore, it has been
removed (it was only used in the 'define' function).

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] texinfo: take advantage of GNU make features in several recipes
Stefano Lattarini [Wed, 30 May 2012 08:23:03 +0000 (10:23 +0200)] 
[ng] texinfo: take advantage of GNU make features in several recipes

* lib/am/texibuild.am: In a recipe, use $(@D) instead of extracting
the directory component from '$@' with echo+sed.
* lib/am/texinfos.am (am__create_installdir): New private helper
variable.
Rewrite several rules to take advantage of it and of GNU make automatic
variables (like $^) and builtins (like $(and), $(addprefix), $(notdir)).
Add a workaround for a misfeature of the Automake parser/preprocessor
that might sometimes prevent us from using the '$^' automatic variable
correctly in our recipe.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] coverage: VPATH build with PDF, DVI and PostScript Texinfo output
Stefano Lattarini [Wed, 30 May 2012 07:04:24 +0000 (09:04 +0200)] 
[ng] coverage: VPATH build with PDF, DVI and PostScript Texinfo output

* t/txinfo21b.sh: New test.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] fixup: really remove DJGPP support
Stefano Lattarini [Wed, 30 May 2012 08:37:50 +0000 (10:37 +0200)] 
[ng] fixup: really remove DJGPP support

Follow-up on earlier patch 'v1.12-341-gc853c20'.

* lib/am/texinfos.am (uninstall-info-am): Remove support for '*.iNN'
files used on DJGPP.
(maintainer-clean-aminfo): Likewise.
* bootstrap.sh: Adjust comments: we don't use "ln -s" not because
it's not properly supported by DJGPP, but because it might not be
properly supported by MinGW/MSYS.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] general: assume dot-starting file names are supported
Stefano Lattarini [Wed, 30 May 2012 07:25:59 +0000 (09:25 +0200)] 
[ng] general: assume dot-starting file names are supported

Now that we've dropped support for DJGPP, Windows 95/98/ME and MS-DOS,
that should always the case.

* lib/am/texibuild.am: Just assume we can have directories whose name
starts with a dot, i.e., that '${am__leading_dot}' expands to '.'.
* m4/depend.m4 (AM_SET_DEPDIR): Likewise.  Now $(DEPDIR) will be set
unconditionally to '.deps'.
* m4/init.m4 (AM_INIT_AUTOMAKE): Don't AC_REQUIRE the m4 macro
'AM_SET_LEADING_DOT' anymore.
* m4/lead-dot.m4: Delete.
* Makefile.am (dist_automake_ac_DATA): Remove it.
* NG-NEWS: Update.
* t/subobj11a.sh: Just assume $(DEPDIR) expands to '.deps'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] cleanup: drop support for DJGPP, Windows 95/98/ME, MS-DOS
Stefano Lattarini [Tue, 29 May 2012 17:51:22 +0000 (19:51 +0200)] 
[ng] cleanup: drop support for DJGPP, Windows 95/98/ME, MS-DOS

See also:
<http://lists.gnu.org/archive/html/automake-ng/2012-05/msg00104.html>

* automake.in (BEGIN): Don't override $ENV{SHELL} for DJGPP.
* bootstrap: Don't special case the default value for BOOTSTRAP_SHELL
on DJGPP.  While we are at, allow that variable to be overridden from
the environment.
* configure.ac (MODIFICATION_DELAY): Define to '2' unconditionally, as
we don't have to cater to quirks of Windows 95/98/ME anymore.
* lib/am/texibuild.am: Remove support for '*.iNN' files used on DJGPP.
* lib/am/texinfos.am: Likewise.
* NG-NEWS: Update.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'ng/drop-configure-in' into ng/master
Stefano Lattarini [Tue, 29 May 2012 17:18:07 +0000 (19:18 +0200)] 
Merge branch 'ng/drop-configure-in' into ng/master

* ng/drop-configure-in:
  [ng] missing: configure.in is unsupported now, just assume configure.ac

13 years ago[ng] missing: configure.in is unsupported now, just assume configure.ac
Stefano Lattarini [Tue, 29 May 2012 17:17:37 +0000 (19:17 +0200)] 
[ng] missing: configure.in is unsupported now, just assume configure.ac

* lib/missing ($configure_ac): Simply define to configure.ac.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'ng/suffix-rules-old-fashioned' into ng/master
Stefano Lattarini [Tue, 29 May 2012 17:08:52 +0000 (19:08 +0200)] 
Merge branch 'ng/suffix-rules-old-fashioned' into ng/master

* ng/suffix-rules-old-fashioned:
  [ng] suffix: don't reject old-fashioned suffix rules anymore

13 years ago[ng] suffix: don't reject old-fashioned suffix rules anymore
Stefano Lattarini [Tue, 29 May 2012 11:45:46 +0000 (13:45 +0200)] 
[ng] suffix: don't reject old-fashioned suffix rules anymore

Now that, after today's commit 'v1.12-331-g645bb21', Automake-NG does
not follow the chain of user-defined pattern rules anymore, there's no
need to treat such rules preferentially, nor to reject old-fashioned
suffix rules.  This will help interoperability with tools like Gnulib,
which generated Makefile.am fragments that still uses old-fashioned
suffix rules (since they are targeted to mainline Automake).

* automake.in (handle_footer): Do not reject the '.SUFFIXES:' rule
nor the 'SUFFIXES' variable.  Add a "FIXME" comment about why we
still support the 'SUFFIXES' variable.
* lib/Automake/Rule.pm: Do not error out if an old-fashioned suffix
rule is seen.
* lib/am/footer.am (.SUFFIXES): Depend on '$(SUFFIXES)', if that's
non-empty.
* t/suffix-rules-reject.sh: Remove.
* t/suffix-rules-old-fashioned.sh: New.
* NG-NEWS: Adjust.
* doc/automake-ng.texi (Suffixes): Do not state that Automake-NG
rejects attempts to define old-fashioned suffix rules.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branches 'ng/stdinc' and 'ng/suffix-rules-mutilation' into ng/master
Stefano Lattarini [Tue, 29 May 2012 10:49:05 +0000 (12:49 +0200)] 
Merge branches 'ng/stdinc' and 'ng/suffix-rules-mutilation' into ng/master

* ng/stdinc:
  [ng] compile: rename make variable DEFAULT_INCLUDES -> AM_DEFAULT_INCLUDES
  [ng] compile: add extra -I opts from config headers at make runtime
  [ng] compile: rename make variable CONFIG_HEADER -> AM_CONFIG_HEADERS
  [ng] maintcheck: refactor checks on obsolete variable names

* ng/suffix-rules-mutilation:
  [ng] suffix: drop Automake-time chaining of suffix rules

13 years ago[ng] compile: rename make variable DEFAULT_INCLUDES -> AM_DEFAULT_INCLUDES
Stefano Lattarini [Mon, 28 May 2012 08:08:39 +0000 (10:08 +0200)] 
[ng] compile: rename make variable DEFAULT_INCLUDES -> AM_DEFAULT_INCLUDES

The automake-generated variable 'DEFAULT_INCLUDES' has never been
documented, and it violates user namespace.  So rename it to
'AM_DEFAULT_INCLUDES', to make it clear that it is owned by Automake.
We prefer that name to something that would sound more "private",
like 'am__default_includes', because there are possibly legitimate
usages of that variable on the user's part.

* automake.in, lib/am/compile.am: Do the rename.
* NG-NEWS, doc/automake-ng.texi: Update.
* t/confh4.sh, t/no-extra-makefile-code.sh: Adjust.
* syntax-checks.mk (old_vars_checks): Add new check
'sc_no_DEFAULT_INCLUDES'.
(modern_DEFAULT_INCLUDES): Define to 'DEFAULT_INCLUDES'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] compile: add extra -I opts from config headers at make runtime
Stefano Lattarini [Sun, 27 May 2012 18:27:24 +0000 (20:27 +0200)] 
[ng] compile: add extra -I opts from config headers at make runtime

Unless the 'no-stdinc' option is in use, automake automatically adds
to the compiler's include path (through the use of '-I' options placed
in the $(DEFAULT_INCLUDES) variable) the $(srcdir), the current
directory, and all the directories where header files specified with
AC_CONFIG_HEADERS macro are placed.  It also tries to remove unseemly
duplicated '-I' entries, for  example simplifying "-I. -I$(srcdir)" to
"-I." when in a non-VPATH build (in which case '$(srcdir)' is simply
'.').

Before this change, that preprocessing was done both at automake runtime
and configure runtime; with GNU make features, we can simplify it a bit
and move almost all of it at make runtime instead.

* automake.in (handle_compile): Remove automake-time preprocessing, and
support for further configure-time preprocessing, of the intended contents
of $(DEFAULT_INCLUDES); instead, move all of them ...
* lib/am/compile.am (DEFAULT_INCLUDES) [%?STDINC%]: ... here.
* m4/init.m4: Remove AC_SUBST of @am__isrc@.
* t/no-extra-makefile-code.sh: Trivially adjust.
* t/nostdinc.sh: Adjust by preferring more "semantic" checks to grepping
checks.
* t/confh4.sh: Adjust and extend.
* t/stdinc-no-repeated.sh: New test.
* Makefile.am (do_subst): Remove a now-unneeded hack.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] compile: rename make variable CONFIG_HEADER -> AM_CONFIG_HEADERS
Stefano Lattarini [Sun, 27 May 2012 13:48:30 +0000 (15:48 +0200)] 
[ng] compile: rename make variable CONFIG_HEADER -> AM_CONFIG_HEADERS

The automake-generated variable 'CONFIG_HEADER' has never been
documented, and it violates user namespace.  So rename it to
'AM_CONFIG_HEADERS', to make it clear that it is owned by Automake.
We prefer that name to something that would sound more "private",
like 'am__config_headers', because there are possibly legitimate
usages of that variable on the user's part.

* automake.in: Do the rename.  Also, don't bother explicitly
rejecting the setting of 'CONFIG_HEADER' as an anachronism:
that warning has been active so long that any still maintained
Makefile.am file should have stopped doing that long ago.
* NG-NEWS: Update.
* lib/am/remake-hdr.am: Update a comment.
* syntax-checks.mk (modern.CONFIG_HEADER): New, define to
'AM_CONFIG_HEADERS'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] maintcheck: refactor checks on obsolete variable names
Stefano Lattarini [Mon, 28 May 2012 08:26:56 +0000 (10:26 +0200)] 
[ng] maintcheck: refactor checks on obsolete variable names

This is just a preparatory refactoring, to make future additions
easier.

* syntax-checks.mk (sc_renamed_variables_rules): New autocomputed
variable.
($(sc_renamed_variables_rules)): New static pattern rule, subsuming
most of the existing checks against the use of old names for some
automake provided make variables.
(syntax_check_rules): Add the contents of the new variable, and do
not explicitly list the checks subsumed by it.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] suffix: drop Automake-time chaining of suffix rules
Stefano Lattarini [Sat, 26 May 2012 09:39:29 +0000 (11:39 +0200)] 
[ng] suffix: drop Automake-time chaining of suffix rules

This change simplifies the Automake::Rule module a little, moves yet
more logic from Automake runtime to GNU make runtime (in the spirit of
Automake-NG), and gets us rid of some never-documented nor completely
specified Automake magics.  OTOH, it also breaks some idioms that, while
only relevant for uncommon cases, have been working since the first
Automake releases.  Still, it is easy to slightly modify those idioms to
have the use cases they were catering to correctly handled with the new
semantics (examples of this are given below); the only downside being the
need of a little more verbosity and explicitness on the user's part.

So, with the present change, automake starts using a much simpler and
dumber algorithm to determine how to build an object associated to a
source whose extension in not one of those it handles internally.

The new algorithm goes like this.  For any file listed in a '_SOURCES'
variable whose suffix is not recognized internally by automake (in
contrast to known suffixes like '.c' or '.f90'), automake will obtain
the expected target object file by stripping the suffix from the source
file, and appending either '.$(OBJEXT)' or '.lo' to it (which one depends
on whether the object is built as part of a program, a static library, or
a libtool library).  It will then be assumed (but not checked!) that the
user has defined a rule (either explicit or defined from a pattern rule)
which can turn that source file into this corresponding object file.  For
example, on an input like:

      bin_PROGRAMS = foo
      foo_SOURCES = mu.ext1 fu.ext1 zu.ext1

automake will expect that the three objects 'mu.$(OBJEXT)', 'fu.$(OBJEXT)'
and 'zu.$(OBJEXT)' are to be used in the linking of the 'foo' program, and
that the user has provided proper recipes for all those objects to be
built at make time, as well as a link command for linking 'foo'.  Here is
an example of how those declarations could look like:

    %.$(OBJEXT): %.ext1
            my-compiler -c -o $@ $<
    # We need to compile mu with debugging enabled.
    mu.$(OBJEXT): mu.ext1
            my-compiler -DDEBUG=1 -c -o $@ $<
    foo_LINK = $(CC) -o $@

In this particular case, the idiom above is basically the same one that
would be required in mainline automake (apart for the fact that, there,
old-fashioned suffix rules should be used instead of pattern rules).  To
see what is truly changed with the new algorithm, we have to look at a
more indirect usage.

Mainline Automake follows the chain of user-defined pattern rules to
determine how to build the object file deriving from a source file with
a custom user extension; for example, upon reading:

     %.cc: %.zoo:
             $(preprocess) $< > $@
     bin_PROGRAMS = foo
     foo_SOURCES = bar.zoo

automake knew that it has to bring in the C++ support (compilation rules,
requirement for AC_PROG_CXX in configure.ac, etc), and use the C++ linker
to link the 'foo' executable.

But after the present change, automake *won't follow those implicit
chains of pattern rules* anymore; so that the idiom above will have to
be re-worked like follows to preserve its intent and behaviour:

     %.cc: %.zoo:
             $(preprocess) $< > $@
     bin_PROGRAMS = foo
     # The use of '.cc' is required to let Automake know to bring in
     # stuff for the handling of C++ compilation, and to use the C++
     # linker to build 'foo'.
     nodist_foo_SOURCES = bar.cc
     EXTRA_DIST = foo.zoo

Finally, we must note another, slightly annoying first consequence of
this change of semantics: one can't use anymore "header files" with
extensions unrecognized to Automake anymore; for example, an usage like
this:

    # Won't work anymore: will cause errors at make runtime.
    %.h: %.my-hdr
          $(preprocess-header) $< >$@
    foo_SOURCES = foo.c bar.my-hdr
    BUILT_SOURCES = bar.h

will cause the generated Makefile to die on "make all", with an error
like:

    make[1]: *** No rule to make target 'bar.o', needed by 'zardoz'.  Stop.

while an usage like this:

    # Won't work anymore: will cause errors at automake runtime.
    %.h: %.my-hdr
          $(preprocess-header) $< >$@
    foo_SOURCES = foo.c foo.my-hdr
    BUILT_SOURCES = foo.h

will cause automake itself to die, reporting an error like:

    object 'foo.$(OBJEXT)' created by 'foo.my-hdr' and 'foo.c'

We don't believe the above breakage is a real issue though, because
the use case can still be served by placing the "non standard" headers
in EXTRA_DIST rather than in a _SOURCES variable:

    # This will work.
    %.h: %.my-hdr
          $(preprocess-header) $< >$@
    foo_SOURCES = foo.c
    EXTRA_DIST = foo.my-hdr
    BUILT_SOURCES = foo.h

A more detailed list of changes follow ...

* automake.in (register_language): Don't call 'register_suffix_rule'
on the source and object extensions of the registered languages.
(handle_single_transform): Implement the new simple algorithm described
in details above (plus an hack to continue supporting Vala-related
'.vapi' files in _SOURCES variables).  Remove the only call ever to ...
(derive_suffix): ... this function, which has thus been removed.
* lib/Automake/Rule.pm
($_suffix_rules_default, $suffix_rules, register_suffix_rule): Remove.
(@EXPORT, reset): Adjust.
(define): Don't call 'register_suffix_rule' on the suffixes of target
and dependency when a pattern rule is seen.
* t/specflg10.sh: Move ...
* t/am-default-source-ext.sh: ... to this more proper name, and
adjusted.
* t/suffix12.sh: Renamed ...
* t/suffix-custom-subobj.sh: ... to this, and remove a botched heading
comment.
* t/suffix3.sh: Adjust.
* t/suffix5.sh: Likewise.
* t/suffix8.sh: Likewise.
* t/suffix10.sh: Likewise.
* t/suffix13.sh: Likewise.
* t/suffix-chain.sh: Likewise.
* t/suffix-hdr.sh: Likewise.
* t/suffix-custom.sh: New test.
* t/suffix-custom-link.sh: Likewise.
* t/suffix-custom-default-ext.sh: Likewise.
* t/yacc-lex-cxx-alone.sh: Likewise.
* NG-NEWS: Update.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoperf: beginning of a performance testsuite
Stefano Lattarini [Tue, 29 May 2012 09:58:02 +0000 (11:58 +0200)] 
perf: beginning of a performance testsuite

Some tests in the Automake testsuite already aims only at verifying
the performance, rather than the correctness, of some operations.
Still, they are somewhat shoehorned and forced into the PASS/FAIL
framework (say, with the 'ulimit' shell builtin used to verify some
operation doesn't take up too much time or memory), but that is
conceptually a stretch, and has already caused problems in practice
(see automake bug#11512 for an example).

So we start moving the "performance tests" out of the testsuite proper,
and make them run only "on demand" (when the user exports the variable
'AM_TESTSUITE_PERF' to "yes").  Ideally, we should provide those tests
with a custom runner/driver that measures and displays the relevant
performance information, but doing that correctly and with the right
APIs is definitely more difficult, so we leave it for a later step
(an hope we'll take such a step eventually).

* t/cond29.sh: Move ...
* t/perf/cond.sh: ... here, and adjust.
* t/testsuite-recheck-speed.sh: Move ...
* t/perf/testsuite-recheck.sh: ... here.
* t/testsuite-summary-speed.sh: Move ...
* t/perf/testsuite-summary.sh: ... here.
* t/list-of-tests.mk (perf_TESTS): New variable, listing the tests in
the 't/perf' directory.
(handwritten_TESTS): Adjust.
* defs: Skip any tests in the 't/perf/' subdirectory unless the
'AM_TESTSUITE_PERF' variable is set to "yes" or "y".
* .gitignore: Update.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'fix-pr11543' into maint
Stefano Lattarini [Tue, 29 May 2012 07:36:26 +0000 (09:36 +0200)] 
Merge branch 'fix-pr11543' into maint

* fix-pr11543:
  aclocal: declare function prototypes, do not use '&' in function calls

13 years agoaclocal: declare function prototypes, do not use '&' in function calls
Stefano Lattarini [Mon, 28 May 2012 11:32:03 +0000 (13:32 +0200)] 
aclocal: declare function prototypes, do not use '&' in function calls

This change will also fix automake bug#11543 (from a report by Matt
Burgess).

* aclocal.in: Declare prototypes for almost all functions early, before
any actual function definition (but omit the prototype for the dynamically
generated '&search' function).  Add prototypes to any function definition.
Remove '&' from function invocations (i.e., simply use "func(ARGS..)"
instead of "&func(ARGS...)").
* THANKS, NEWS: Update.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agonews: support for configure.in will be dropped in future automake versions
Stefano Lattarini [Mon, 28 May 2012 11:52:34 +0000 (13:52 +0200)] 
news: support for configure.in will be dropped in future automake versions

The use of configure.in as Autoconf input has been deprecated for a
very long time in the Autoconf documentation, and the next version of
Autoconf (2.70) will start warning about it ar runtime as well (see
commit 'v2.69-4-g560f16b' or 2012-05-23, "general: deprecate
'configure.in' as autoconf input", in the Autoconf's git repository).

* NEWS (Future backward-incompatibilities): Update.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agomissing: support AC_CONFIG_HEADERS in addition to obsolete AC_CONFIG_HEADER
Stefano Lattarini [Sun, 27 May 2012 17:33:26 +0000 (19:33 +0200)] 
missing: support AC_CONFIG_HEADERS in addition to obsolete AC_CONFIG_HEADER

* missing (autoheader*): Do not look only for AC_CONFIG_HEADER when
grepping configure.ac, but also for AC_CONFIG_HEADERS: the latter has
been preferred to the former by several years now in Autoconf.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agomissing: don't bother checking for AM_CONFIG_HEADER: it is gone now
Stefano Lattarini [Sun, 27 May 2012 17:05:14 +0000 (19:05 +0200)] 
missing: don't bother checking for AM_CONFIG_HEADER: it is gone now

* missing (autoheader*): Do not look for AM_CONFIG_HEADER when
grepping configure.ac: it is not supported anymore (has been in
fact deleted in commit v1.12-15-gd2ca168 of 2012-04-27, "m4: delete
several obsolete macros").

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agodocs: remove mention of AM_CONFIG_HEADER: it is obsolete and removed now
Stefano Lattarini [Sun, 27 May 2012 16:47:46 +0000 (18:47 +0200)] 
docs: remove mention of AM_CONFIG_HEADER: it is obsolete and removed now

* doc/automake.texi (Variables used when building a program): Remove
obsolete mention of AM_CONFIG_HEADER as an alias to AC_CONFIG_HEADERS.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: fix botched heading comments in 'lex-clean-cxx.sh'
Stefano Lattarini [Sat, 26 May 2012 16:01:23 +0000 (18:01 +0200)] 
tests: fix botched heading comments in 'lex-clean-cxx.sh'

* t/lex-clean-cxx.sh: This file tests lex, not yacc.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'ng/drop-configure-in' into ng/master
Stefano Lattarini [Sat, 26 May 2012 11:51:24 +0000 (13:51 +0200)] 
Merge branch 'ng/drop-configure-in' into ng/master

* ng/drop-configure-in:
  maintcheck: obsolete check 'sc_tests_no_configure_in' removed
  cleanup: get rid of 'Automake::Configure_ac' module
  cleanup: just assume configure input is configure.ac
  cleanup: don't support configure.in anymore

13 years agomaintcheck: obsolete check 'sc_tests_no_configure_in' removed
Stefano Lattarini [Fri, 25 May 2012 15:51:02 +0000 (17:51 +0200)] 
maintcheck: obsolete check 'sc_tests_no_configure_in' removed

There's no need to verify our tests doesn't use the obsoleted
name 'configure.in' for the Autoconf file anymore: we don't support
it anyway in Automake-NG, so any test trying to use it would fail.

* syntax-checks.mk (sc_tests_no_configure_in): Remove.
* tests/autodist-configure-no-subdir.sh: Remove unneeded occurrences
of 'configure.in'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>