automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2] new option: object-shortname


From: Thomas Martitz
Subject: [PATCH v2] new option: object-shortname
Date: Mon, 29 Aug 2016 14:05:28 +0200

This option is intended to be used in conjunction with subdir-objects and
Automake-time substitutions for included makefile fragments (%C%, %D%).
Enabling the option shortens the file name of object files such that the prefix
derived (after canonicalization) from the path is not included.

Enabling the option is basically equivalent to setting foo_SHORTNAME =
foo. However, it also works flawlessly if a Makefile fragment is
conditionally included. Note that actually setting foo_SHORTNAME
still overrides the object name, regardless of this option. This can improve
the modularity of Automake-using projects.

Example:
without object-shortname
  sub/Makefile.am:
  bin_PROGRAMS += %D%/foo
  %C%_foo_CFLAGS = $(AM_CFLAGS) -g

results in objects:
  sub/sub_foo-foo.o

with object-shortname the object file name is:
  sub/foo-foo.o

And it allows the following in $(top_srcdir)/Makefile.am (not possible with foo_SHORTNAME=f
  if ENABLE_SUB
  include sub/Makefile.am
  endif

Attachment: 0001-new-option-object-shortname.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]