]> git.ipfire.org Git - thirdparty/automake.git/commit
automake: Shorter object file names under subdir-objects
authorThomas Martitz <kugel@rockbox.org>
Mon, 13 Mar 2017 11:41:59 +0000 (12:41 +0100)
committerMathieu Lirzin <mthl@gnu.org>
Thu, 6 Jul 2017 20:23:25 +0000 (22:23 +0200)
commitf4e91bfc490da63209aad19636568da3b955dcd4
tree7b4dcaa4591c8c25c13a2a20cd741d806749a27e
parentc946ae6f25422d45e54de0fd69309cbb438f942d
automake: Shorter object file names under subdir-objects

Combining the 'subdir-objects' option with target-specific flags had
the consequence of producing long object file names.  This was done to
preventively ensure the uniqueness of object file names.  We are now
using shorter names by default, and handle long names when an actual
conflict is detected.  This will hopefully reduce the necessity of
using the 'prog_SHORTNAME' facility.

Example:
previously:
  AUTOMAKE_OPTIONS = subdir-objects
  bin_PROGRAMS += path/to/foo
  path_to_foo_CFLAGS = $(AM_CFLAGS) -g

resulted in objects:
  sub/path_to_foo-foo.o

now object file name is:
  sub/foo-foo.o

* bin/automake.in (proglist, liblist, ltliblist)
(dup_shortnames): New globals.
(initialize_per_input): Initialize them.
(handle_targets): New subroutine.
(handle_single_transform): Truncate object file names when possible.
* t/subobj-objname-clash.sh: New test.
* t/list-of-tests.mk (handwritten_TESTS): Add it.
* NEWS: Update.

Signed-off-by: Mathieu Lirzin <mthl@gnu.org>
NEWS
bin/automake.in
t/list-of-tests.mk
t/subobj-objname-clash.sh [new file with mode: 0644]