[PATCH xserver 0/5] Prepare makefiles for automake 2.0 mandatory subdir-objects
Gaetan Nadon
memsize at videotron.ca
Mon Feb 17 14:33:09 PST 2014
Automake 1.14 is warning us about upcoming 2.0 making subdir-objects mandatory.
This is a feature that has been around for many years but never used in X.
This feature is not compatible with the way our makefiles cherry-pick source
files from other directories anywhere in the source tree.
The subdir-objects feature assumes the path for the source code specified
in _SOURCES represents a subdirectory relative to makefile. Dependency tracking
uses the path verbatim to create a directory such as '$(top_srcdir)/hw/xfree86'
without resolving the variable. The object code will not be generated where
the makefile is, but in the same where the source was specified.
The proposed solution is to create a link in git for the source files that
are shared (fb, mi, xfree86) by multiple directories (kdrive, vfb, ...)
I noticed mesa is using links in git and probably other projects as well.
They are invited to share their experience.
After applying this series of patches, there are no more automake warnings
regarding subdir-objects. In addition, the xserver module can be configured
and compiled with the subdir-objects feature enabled (as it will be with
automake 2.0) and nothing breaks.
>From the PLANS/subdir-objs.txt file from Automake 1.14 package:
The fact that Automake-generated Makefiles place 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 I believe the behaviour enabled by the 'subdir-objects' is the most
useful one, and in fact the *only* natural one, I'd like to make it the
only one available, simplifying the Automake implementation and APIs a
little in the process.
The current behaviour where compiled source is located anywhere in the source
tree is unknown to automake and probably works by accident. This is an opinion,
just to set expectations for anyone who would be hoping to change automake
to preserve status quo.
Gaetan Nadon (5):
hw: use links in git to share source files due to upcoming automake
changes
test: remove source file from hashtabletest LDADD
fb and xi: source files in EXTRA_DIST are redundant
xfree86: use links in git to share files due to upcoming automake
changes
test: create a link to the generated hw/xfree86/sdksyms.c at build
time
Xi/Makefile.am | 1 -
fb/Makefile.am | 1 -
hw/dmx/Makefile.am | 6 +++---
hw/dmx/config/Makefile.am | 4 ++--
hw/dmx/config/dmxlog.c | 1 +
hw/dmx/config/strlcpy.c | 1 +
hw/dmx/fbcmap_mi.c | 1 +
hw/dmx/miinitext.c | 1 +
hw/dmx/panoramiX.c | 1 +
hw/kdrive/src/Makefile.am | 4 ++--
hw/kdrive/src/fbcmap_mi.c | 1 +
hw/kdrive/src/miinitext.c | 1 +
hw/vfb/Makefile.am | 8 ++++----
hw/vfb/dpmsstubs.c | 1 +
hw/vfb/fbcmap_mi.c | 1 +
hw/vfb/miinitext.c | 1 +
hw/vfb/stubs.c | 1 +
hw/xfree86/dixmods/Makefile.am | 6 +++---
hw/xfree86/dixmods/fbcmap_mi.c | 1 +
hw/xfree86/dixmods/miinitext.c | 1 +
hw/xfree86/int10/Makefile.am | 4 ++--
hw/xfree86/int10/linux.c | 1 +
hw/xfree86/int10/linux_vm86.c | 1 +
hw/xfree86/os-support/bsd/Makefile.am | 22 +++++++++++-----------
hw/xfree86/os-support/bsd/agp_noop.c | 1 +
hw/xfree86/os-support/bsd/ioperm_noop.c | 1 +
hw/xfree86/os-support/bsd/kmod_noop.c | 1 +
hw/xfree86/os-support/bsd/lnx_agp.c | 1 +
hw/xfree86/os-support/bsd/pm_noop.c | 1 +
hw/xfree86/os-support/bsd/posix_tty.c | 1 +
hw/xfree86/os-support/bsd/sigio.c | 1 +
hw/xfree86/os-support/bsd/vidmem.c | 1 +
hw/xfree86/os-support/bsd/xf86Axp.c | 1 +
hw/xfree86/os-support/hurd/Makefile.am | 14 +++++++-------
hw/xfree86/os-support/hurd/VTsw_noop.c | 1 +
hw/xfree86/os-support/hurd/agp_noop.c | 1 +
hw/xfree86/os-support/hurd/kmod_noop.c | 1 +
hw/xfree86/os-support/hurd/pm_noop.c | 1 +
hw/xfree86/os-support/hurd/posix_tty.c | 1 +
hw/xfree86/os-support/hurd/sigiostubs.c | 1 +
hw/xfree86/os-support/hurd/vidmem.c | 1 +
hw/xfree86/os-support/linux/Makefile.am | 14 +++++++-------
hw/xfree86/os-support/linux/VTsw_usl.c | 1 +
hw/xfree86/os-support/linux/bios_mmap.c | 1 +
hw/xfree86/os-support/linux/posix_tty.c | 1 +
hw/xfree86/os-support/linux/sigio.c | 1 +
hw/xfree86/os-support/linux/vidmem.c | 1 +
hw/xfree86/os-support/linux/xf86Axp.c | 1 +
hw/xfree86/os-support/solaris/Makefile.am | 12 ++++++------
hw/xfree86/os-support/solaris/VTsw_noop.c | 1 +
hw/xfree86/os-support/solaris/agp_noop.c | 1 +
hw/xfree86/os-support/solaris/kmod_noop.c | 1 +
hw/xfree86/os-support/solaris/posix_tty.c | 1 +
hw/xfree86/os-support/solaris/sigio.c | 1 +
hw/xfree86/os-support/solaris/vidmem.c | 1 +
hw/xfree86/os-support/stub/Makefile.am | 16 ++++++++--------
hw/xfree86/os-support/stub/VTsw_noop.c | 1 +
hw/xfree86/os-support/stub/agp_noop.c | 1 +
hw/xfree86/os-support/stub/ioperm_noop.c | 1 +
hw/xfree86/os-support/stub/kmod_noop.c | 1 +
hw/xfree86/os-support/stub/pm_noop.c | 1 +
hw/xfree86/os-support/stub/posix_tty.c | 1 +
hw/xfree86/os-support/stub/sigio.c | 1 +
hw/xfree86/os-support/stub/vidmem.c | 1 +
hw/xfree86/parser/Makefile.am | 2 +-
hw/xfree86/parser/xprintf.c | 1 +
hw/xfree86/utils/cvt/Makefile.am | 4 ++--
hw/xfree86/utils/cvt/xf86cvt.c | 1 +
hw/xfree86/utils/cvt/xprintf.c | 1 +
hw/xnest/Makefile.am | 8 ++++----
hw/xnest/dpmsstubs.c | 1 +
hw/xnest/fbcmap_mi.c | 1 +
hw/xnest/miinitext.c | 1 +
hw/xnest/stubs.c | 1 +
hw/xquartz/Makefile.am | 4 ++--
hw/xquartz/fbcmap_mi.c | 1 +
hw/xquartz/mach-startup/Makefile.am | 2 +-
hw/xquartz/mach-startup/strndup.c | 1 +
hw/xquartz/miinitext.c | 1 +
hw/xwin/Makefile.am | 8 ++++----
hw/xwin/dpmsstubs.c | 1 +
hw/xwin/fbcmap_mi.c | 1 +
hw/xwin/miinitext.c | 1 +
hw/xwin/stubs.c | 1 +
test/.gitignore | 1 +
test/Makefile.am | 16 +++++++++++-----
test/dpmsstubs.c | 1 +
test/miinitext.c | 1 +
test/stubs.c | 1 +
89 files changed, 149 insertions(+), 76 deletions(-)
create mode 120000 hw/dmx/config/dmxlog.c
create mode 120000 hw/dmx/config/strlcpy.c
create mode 120000 hw/dmx/fbcmap_mi.c
create mode 120000 hw/dmx/miinitext.c
create mode 120000 hw/dmx/panoramiX.c
create mode 120000 hw/kdrive/src/fbcmap_mi.c
create mode 120000 hw/kdrive/src/miinitext.c
create mode 120000 hw/vfb/dpmsstubs.c
create mode 120000 hw/vfb/fbcmap_mi.c
create mode 120000 hw/vfb/miinitext.c
create mode 120000 hw/vfb/stubs.c
create mode 120000 hw/xfree86/dixmods/fbcmap_mi.c
create mode 120000 hw/xfree86/dixmods/miinitext.c
create mode 120000 hw/xfree86/int10/linux.c
create mode 120000 hw/xfree86/int10/linux_vm86.c
create mode 120000 hw/xfree86/os-support/bsd/agp_noop.c
create mode 120000 hw/xfree86/os-support/bsd/ioperm_noop.c
create mode 120000 hw/xfree86/os-support/bsd/kmod_noop.c
create mode 120000 hw/xfree86/os-support/bsd/lnx_agp.c
create mode 120000 hw/xfree86/os-support/bsd/pm_noop.c
create mode 120000 hw/xfree86/os-support/bsd/posix_tty.c
create mode 120000 hw/xfree86/os-support/bsd/sigio.c
create mode 120000 hw/xfree86/os-support/bsd/vidmem.c
create mode 120000 hw/xfree86/os-support/bsd/xf86Axp.c
create mode 120000 hw/xfree86/os-support/hurd/VTsw_noop.c
create mode 120000 hw/xfree86/os-support/hurd/agp_noop.c
create mode 120000 hw/xfree86/os-support/hurd/kmod_noop.c
create mode 120000 hw/xfree86/os-support/hurd/pm_noop.c
create mode 120000 hw/xfree86/os-support/hurd/posix_tty.c
create mode 120000 hw/xfree86/os-support/hurd/sigiostubs.c
create mode 120000 hw/xfree86/os-support/hurd/vidmem.c
create mode 120000 hw/xfree86/os-support/linux/VTsw_usl.c
create mode 120000 hw/xfree86/os-support/linux/bios_mmap.c
create mode 120000 hw/xfree86/os-support/linux/posix_tty.c
create mode 120000 hw/xfree86/os-support/linux/sigio.c
create mode 120000 hw/xfree86/os-support/linux/vidmem.c
create mode 120000 hw/xfree86/os-support/linux/xf86Axp.c
create mode 120000 hw/xfree86/os-support/solaris/VTsw_noop.c
create mode 120000 hw/xfree86/os-support/solaris/agp_noop.c
create mode 120000 hw/xfree86/os-support/solaris/kmod_noop.c
create mode 120000 hw/xfree86/os-support/solaris/posix_tty.c
create mode 120000 hw/xfree86/os-support/solaris/sigio.c
create mode 120000 hw/xfree86/os-support/solaris/vidmem.c
create mode 120000 hw/xfree86/os-support/stub/VTsw_noop.c
create mode 120000 hw/xfree86/os-support/stub/agp_noop.c
create mode 120000 hw/xfree86/os-support/stub/ioperm_noop.c
create mode 120000 hw/xfree86/os-support/stub/kmod_noop.c
create mode 120000 hw/xfree86/os-support/stub/pm_noop.c
create mode 120000 hw/xfree86/os-support/stub/posix_tty.c
create mode 120000 hw/xfree86/os-support/stub/sigio.c
create mode 120000 hw/xfree86/os-support/stub/vidmem.c
create mode 120000 hw/xfree86/parser/xprintf.c
create mode 120000 hw/xfree86/utils/cvt/xf86cvt.c
create mode 120000 hw/xfree86/utils/cvt/xprintf.c
create mode 120000 hw/xnest/dpmsstubs.c
create mode 120000 hw/xnest/fbcmap_mi.c
create mode 120000 hw/xnest/miinitext.c
create mode 120000 hw/xnest/stubs.c
create mode 120000 hw/xquartz/fbcmap_mi.c
create mode 120000 hw/xquartz/mach-startup/strndup.c
create mode 120000 hw/xquartz/miinitext.c
create mode 120000 hw/xwin/dpmsstubs.c
create mode 120000 hw/xwin/fbcmap_mi.c
create mode 120000 hw/xwin/miinitext.c
create mode 120000 hw/xwin/stubs.c
create mode 120000 test/dpmsstubs.c
create mode 120000 test/miinitext.c
create mode 120000 test/stubs.c
--
1.7.9.5
More information about the xorg-devel
mailing list