[PATCH] Enable subdir-objects

Gaetan Nadon memsize at videotron.ca
Wed Feb 12 14:50:59 PST 2014


On 14-02-12 11:15 AM, Thierry Reding wrote:
> automake complains about the subdir-objects being missing. Enabling it,
Is automake issuing a real warning or just making a suggestion?
> however, causes various build issues to pop up because $(srcdir),
> $(top_srcdir), $(builddir) and $(top_builddir) aren't handled properly.
> It's simple to work around it by substituting them for their actual
> values, though.
>
> Signed-off-by: Thierry Reding <treding at nvidia.com>
> ---
>  configure.ac                            |  2 +-
>  hw/vfb/Makefile.am                      |  8 ++++----
>  hw/xfree86/dixmods/Makefile.am          |  6 +++---
>  hw/xfree86/int10/Makefile.am            |  4 ++--
>  hw/xfree86/os-support/linux/Makefile.am | 16 ++++++++--------
>  hw/xfree86/parser/Makefile.am           |  2 +-
>  hw/xfree86/utils/cvt/Makefile.am        |  4 ++--
>  hw/xnest/Makefile.am                    |  8 ++++----
>  test/Makefile.am                        |  8 ++++----
>  9 files changed, 29 insertions(+), 29 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 21a659141bc9..d135cb2b38c2 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -31,7 +31,7 @@ RELEASE_DATE="2014-01-09"
>  RELEASE_NAME="Golden Gaytime"
>  AC_CONFIG_SRCDIR([Makefile.am])
>  AC_CONFIG_MACRO_DIR([m4])
> -AM_INIT_AUTOMAKE([foreign dist-bzip2])
> +AM_INIT_AUTOMAKE([foreign dist-bzip2 subdir-objects])
>  AC_USE_SYSTEM_EXTENSIONS
>  
>  # Require xorg-macros minimum of 1.14 for XORG_COMPILER_BRAND in XORG_DEFAULT_OPTIONS
> diff --git a/hw/vfb/Makefile.am b/hw/vfb/Makefile.am
> index 9f4992c8b7f1..ceb418388505 100644
> --- a/hw/vfb/Makefile.am
> +++ b/hw/vfb/Makefile.am
> @@ -9,12 +9,12 @@ AM_CFLAGS = -DHAVE_DIX_CONFIG_H \
>  
>  SRCS =	InitInput.c \
>  	InitOutput.c \
> -	$(top_srcdir)/Xext/dpmsstubs.c \
> -	$(top_srcdir)/Xi/stubs.c \
> -	$(top_srcdir)/mi/miinitext.c
> +	../../Xext/dpmsstubs.c \
> +	../../Xi/stubs.c \
> +	../../mi/miinitext.c
No, No, please No!!!
For full disclosure, I spent months replacing those ../ in all the 250
modules.

Automake recommend against use these ../ and there are scenarios where
it breaks.

If the automake defined variables $(top_srcdir) does not work, then
something is seriously broken and the root cause should be found, not
worked around :-)

You are probably running automake 1.14. The current code works fine on
automake 1.10 and later. I think they are suggesting using a new feature
in 1.14, which is not available in versions prior to automake 1.14. The
X.Org minimum version is now 1.11 which means no features newer than
1.11 should be used.

There are other situations where 1.14 make recommendations, which if
applied, break on earlier versions. This is a pain for well meaning
developers who want to make improvements. It happens regularly. They
don't think code has to be backward compatible.

Ok, so back to basics. If you limit your patch to enable subdir-objects,
does it work with 1.11? If the feature is not avaiable at that level
then you cannot use it. I would have to look it up. If it works on 1.11
but breaks on 1.14, then lets not work around and put up with the
suggestions. Eventually someone will fix 1.14.

I'll take some more to look into this. Sorry if I am a bit hasty for now.








More information about the xorg-devel mailing list