[PATCH v2 xserver 7/7] configure.ac: use automake option subdir-objects

Mihail Konev k.mvc at ya.ru
Tue Apr 4 23:49:46 UTC 2017


Both fixes "source file is in a subdirectory" autoreconf warnings and
ensures automake 2.0 (future) compatibility.

Dummy source files that only #include the real one are so that every dir
has its own source, and, therefore, does not reuse compilation results
of another (objects are now put where the source is, not the makefile),
thus retaining the CFLAGS and other settings as before.

Explicitly distribute hw/xfree86/os-support/shared/, as other dirs
now wouldn't do that implicitly by referencing source files from it.

Signed-off-by: Mihail Konev <k.mvc at ya.ru>
---
v2: fix empty line in hw/kdrive/src/minintext.include.c

 .gitignore                                        |  1 +
 configure.ac                                      |  2 +-
 hw/dmx/Makefile.am                                |  4 ++--
 hw/dmx/config/Makefile.am                         |  4 ++--
 hw/dmx/config/dmxlog.include.c                    |  1 +
 hw/dmx/config/strlcpy.include.c                   |  1 +
 hw/dmx/miinitext.include.c                        |  1 +
 hw/dmx/panoramiX.include.c                        |  1 +
 hw/kdrive/src/Makefile.am                         |  2 +-
 hw/kdrive/src/miinitext.include.c                 |  1 +
 hw/vfb/Makefile.am                                |  2 +-
 hw/vfb/miinitext.include.c                        |  1 +
 hw/xfree86/dixmods/Makefile.am                    |  2 +-
 hw/xfree86/dixmods/miinitext.include.c            |  1 +
 hw/xfree86/glamor_egl/Makefile.am                 |  4 ++--
 hw/xfree86/glamor_egl/glamor_egl.include.c        |  1 +
 hw/xfree86/glamor_egl/glamor_eglmodule.include.c  |  1 +
 hw/xfree86/int10/Makefile.am                      |  4 ++--
 hw/xfree86/int10/linux.include.c                  |  1 +
 hw/xfree86/int10/linux_vm86.include.c             |  1 +
 hw/xfree86/os-support/Makefile.am                 | 14 +++++++++++++-
 hw/xfree86/os-support/bsd/Makefile.am             | 20 ++++++++++----------
 hw/xfree86/os-support/bsd/agp_noop.include.c      |  1 +
 hw/xfree86/os-support/bsd/ioperm_noop.include.c   |  1 +
 hw/xfree86/os-support/bsd/kmod_noop.include.c     |  1 +
 hw/xfree86/os-support/bsd/lnx_agp.include.c       |  1 +
 hw/xfree86/os-support/bsd/pm_noop.include.c       |  1 +
 hw/xfree86/os-support/bsd/posix_tty.include.c     |  1 +
 hw/xfree86/os-support/bsd/sigio.include.c         |  1 +
 hw/xfree86/os-support/bsd/vidmem.include.c        |  1 +
 hw/xfree86/os-support/hurd/Makefile.am            | 14 +++++++-------
 hw/xfree86/os-support/hurd/VTsw_noop.include.c    |  1 +
 hw/xfree86/os-support/hurd/agp_noop.include.c     |  1 +
 hw/xfree86/os-support/hurd/kmod_noop.include.c    |  1 +
 hw/xfree86/os-support/hurd/pm_noop.include.c      |  1 +
 hw/xfree86/os-support/hurd/posix_tty.include.c    |  1 +
 hw/xfree86/os-support/hurd/sigiostubs.include.c   |  1 +
 hw/xfree86/os-support/hurd/vidmem.include.c       |  1 +
 hw/xfree86/os-support/linux/Makefile.am           |  8 ++++----
 hw/xfree86/os-support/linux/VTsw_usl.include.c    |  1 +
 hw/xfree86/os-support/linux/posix_tty.include.c   |  1 +
 hw/xfree86/os-support/linux/sigio.include.c       |  1 +
 hw/xfree86/os-support/linux/vidmem.include.c      |  1 +
 hw/xfree86/os-support/solaris/Makefile.am         | 12 ++++++------
 hw/xfree86/os-support/solaris/VTsw_noop.include.c |  1 +
 hw/xfree86/os-support/solaris/agp_noop.include.c  |  1 +
 hw/xfree86/os-support/solaris/kmod_noop.include.c |  1 +
 hw/xfree86/os-support/solaris/posix_tty.include.c |  1 +
 hw/xfree86/os-support/solaris/sigio.include.c     |  1 +
 hw/xfree86/os-support/solaris/vidmem.include.c    |  1 +
 hw/xfree86/os-support/stub/Makefile.am            | 16 ++++++++--------
 hw/xfree86/os-support/stub/VTsw_noop.include.c    |  1 +
 hw/xfree86/os-support/stub/agp_noop.include.c     |  1 +
 hw/xfree86/os-support/stub/ioperm_noop.include.c  |  1 +
 hw/xfree86/os-support/stub/kmod_noop.include.c    |  1 +
 hw/xfree86/os-support/stub/pm_noop.include.c      |  1 +
 hw/xfree86/os-support/stub/posix_tty.include.c    |  1 +
 hw/xfree86/os-support/stub/sigio.include.c        |  1 +
 hw/xfree86/os-support/stub/vidmem.include.c       |  1 +
 hw/xfree86/utils/cvt/Makefile.am                  |  4 ++--
 hw/xfree86/utils/cvt/xf86cvt.include.c            |  1 +
 hw/xfree86/utils/cvt/xprintf.include.c            |  1 +
 hw/xnest/Makefile.am                              |  2 +-
 hw/xnest/miinitext.include.c                      |  1 +
 hw/xquartz/Makefile.am                            |  2 +-
 hw/xquartz/mach-startup/Makefile.am               |  2 +-
 hw/xquartz/mach-startup/strndup.include.c         |  1 +
 hw/xquartz/miinitext.include.c                    |  1 +
 hw/xwayland/Makefile.am                           |  6 +++---
 hw/xwayland/dpmsstubs.include.c                   |  1 +
 hw/xwayland/miinitext.include.c                   |  1 +
 hw/xwayland/stubs.include.c                       |  1 +
 hw/xwin/Makefile.am                               |  2 +-
 hw/xwin/miinitext.include.c                       |  1 +
 test/miinitext.include.c                          |  1 +
 75 files changed, 124 insertions(+), 57 deletions(-)
 create mode 100644 hw/dmx/config/dmxlog.include.c
 create mode 100644 hw/dmx/config/strlcpy.include.c
 create mode 100644 hw/dmx/miinitext.include.c
 create mode 100644 hw/dmx/panoramiX.include.c
 create mode 100644 hw/kdrive/src/miinitext.include.c
 create mode 100644 hw/vfb/miinitext.include.c
 create mode 100644 hw/xfree86/dixmods/miinitext.include.c
 create mode 100644 hw/xfree86/glamor_egl/glamor_egl.include.c
 create mode 100644 hw/xfree86/glamor_egl/glamor_eglmodule.include.c
 create mode 100644 hw/xfree86/int10/linux.include.c
 create mode 100644 hw/xfree86/int10/linux_vm86.include.c
 create mode 100644 hw/xfree86/os-support/bsd/agp_noop.include.c
 create mode 100644 hw/xfree86/os-support/bsd/ioperm_noop.include.c
 create mode 100644 hw/xfree86/os-support/bsd/kmod_noop.include.c
 create mode 100644 hw/xfree86/os-support/bsd/lnx_agp.include.c
 create mode 100644 hw/xfree86/os-support/bsd/pm_noop.include.c
 create mode 100644 hw/xfree86/os-support/bsd/posix_tty.include.c
 create mode 100644 hw/xfree86/os-support/bsd/sigio.include.c
 create mode 100644 hw/xfree86/os-support/bsd/vidmem.include.c
 create mode 100644 hw/xfree86/os-support/hurd/VTsw_noop.include.c
 create mode 100644 hw/xfree86/os-support/hurd/agp_noop.include.c
 create mode 100644 hw/xfree86/os-support/hurd/kmod_noop.include.c
 create mode 100644 hw/xfree86/os-support/hurd/pm_noop.include.c
 create mode 100644 hw/xfree86/os-support/hurd/posix_tty.include.c
 create mode 100644 hw/xfree86/os-support/hurd/sigiostubs.include.c
 create mode 100644 hw/xfree86/os-support/hurd/vidmem.include.c
 create mode 100644 hw/xfree86/os-support/linux/VTsw_usl.include.c
 create mode 100644 hw/xfree86/os-support/linux/posix_tty.include.c
 create mode 100644 hw/xfree86/os-support/linux/sigio.include.c
 create mode 100644 hw/xfree86/os-support/linux/vidmem.include.c
 create mode 100644 hw/xfree86/os-support/solaris/VTsw_noop.include.c
 create mode 100644 hw/xfree86/os-support/solaris/agp_noop.include.c
 create mode 100644 hw/xfree86/os-support/solaris/kmod_noop.include.c
 create mode 100644 hw/xfree86/os-support/solaris/posix_tty.include.c
 create mode 100644 hw/xfree86/os-support/solaris/sigio.include.c
 create mode 100644 hw/xfree86/os-support/solaris/vidmem.include.c
 create mode 100644 hw/xfree86/os-support/stub/VTsw_noop.include.c
 create mode 100644 hw/xfree86/os-support/stub/agp_noop.include.c
 create mode 100644 hw/xfree86/os-support/stub/ioperm_noop.include.c
 create mode 100644 hw/xfree86/os-support/stub/kmod_noop.include.c
 create mode 100644 hw/xfree86/os-support/stub/pm_noop.include.c
 create mode 100644 hw/xfree86/os-support/stub/posix_tty.include.c
 create mode 100644 hw/xfree86/os-support/stub/sigio.include.c
 create mode 100644 hw/xfree86/os-support/stub/vidmem.include.c
 create mode 100644 hw/xfree86/utils/cvt/xf86cvt.include.c
 create mode 100644 hw/xfree86/utils/cvt/xprintf.include.c
 create mode 100644 hw/xnest/miinitext.include.c
 create mode 100644 hw/xquartz/mach-startup/strndup.include.c
 create mode 100644 hw/xquartz/miinitext.include.c
 create mode 100644 hw/xwayland/dpmsstubs.include.c
 create mode 100644 hw/xwayland/miinitext.include.c
 create mode 100644 hw/xwayland/stubs.include.c
 create mode 100644 hw/xwin/miinitext.include.c
 create mode 100644 test/miinitext.include.c

diff --git a/.gitignore b/.gitignore
index dc56b4651710..4ccc3f1ff8c0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,6 +22,7 @@ configure
 configure.scan
 depcomp
 .deps/
+.dirstamp
 INSTALL
 install-sh
 .libs/
diff --git a/configure.ac b/configure.ac
index 7e44f2c3166c..8ce7984e8990 100644
--- a/configure.ac
+++ b/configure.ac
@@ -31,7 +31,7 @@ RELEASE_DATE="2016-11-18"
 RELEASE_NAME="Shrimp-and-grits"
 AC_CONFIG_SRCDIR([Makefile.am])
 AC_CONFIG_MACRO_DIR([m4])
-AM_INIT_AUTOMAKE([foreign dist-bzip2])
+AM_INIT_AUTOMAKE([foreign subdir-objects dist-bzip2])
 AC_USE_SYSTEM_EXTENSIONS
 
 # Require xorg-macros minimum of 1.14 for XORG_COMPILER_BRAND in XORG_DEFAULT_OPTIONS
diff --git a/hw/dmx/Makefile.am b/hw/dmx/Makefile.am
index 38d6ac409e76..07a6551df956 100644
--- a/hw/dmx/Makefile.am
+++ b/hw/dmx/Makefile.am
@@ -3,7 +3,7 @@ SUBDIRS = input config examples doc doxygen man
 bin_PROGRAMS = Xdmx
 
 if XINERAMA
-PANORAMIX_SRCS = $(top_srcdir)/Xext/panoramiX.c
+PANORAMIX_SRCS = panoramiX.include.c
 endif
 
 if GLX
@@ -64,7 +64,7 @@ Xdmx_SOURCES = dmx.c \
                dmxvisual.h \
                dmxwindow.c \
                dmxwindow.h \
-               $(top_srcdir)/mi/miinitext.c \
+               miinitext.include.c \
                $(GLX_SRCS) 
 
 
diff --git a/hw/dmx/config/Makefile.am b/hw/dmx/config/Makefile.am
index 06588e7a140a..4809de41126e 100644
--- a/hw/dmx/config/Makefile.am
+++ b/hw/dmx/config/Makefile.am
@@ -21,7 +21,7 @@ BUILT_SOURCES = parser.c parser.h scanner.c
 MAINTAINERCLEANFILES = $(BUILT_SOURCES)
 
 libdmxconfig_a_SOURCES = $(LIBSRCS)
-libdmxconfig_a_SOURCES += $(top_srcdir)/os/strlcpy.c
+libdmxconfig_a_SOURCES += strlcpy.include.c
 
 if GLX
 GLX_DEFS = @GL_CFLAGS@
@@ -41,7 +41,7 @@ bin_PROGRAMS = xdmxconfig vdltodmx dmxtodmx
 xdmxconfig_DEPENDENCIES = libdmxconfig.a
 xdmxconfig_SOURCES = \
 	xdmxconfig.c \
-	$(top_srcdir)/hw/dmx/dmxlog.c \
+	dmxlog.include.c \
 	Canvas.c \
 	Canvas.h \
 	CanvasP.h
diff --git a/hw/dmx/config/dmxlog.include.c b/hw/dmx/config/dmxlog.include.c
new file mode 100644
index 000000000000..24ac97a05982
--- /dev/null
+++ b/hw/dmx/config/dmxlog.include.c
@@ -0,0 +1 @@
+#include "../dmxlog.c"
diff --git a/hw/dmx/config/strlcpy.include.c b/hw/dmx/config/strlcpy.include.c
new file mode 100644
index 000000000000..7f9b2eb77129
--- /dev/null
+++ b/hw/dmx/config/strlcpy.include.c
@@ -0,0 +1 @@
+#include "../../../os/strlcpy.c"
diff --git a/hw/dmx/miinitext.include.c b/hw/dmx/miinitext.include.c
new file mode 100644
index 000000000000..fc754602c3f0
--- /dev/null
+++ b/hw/dmx/miinitext.include.c
@@ -0,0 +1 @@
+#include "../../mi/miinitext.c"
diff --git a/hw/dmx/panoramiX.include.c b/hw/dmx/panoramiX.include.c
new file mode 100644
index 000000000000..c0b8c95759b7
--- /dev/null
+++ b/hw/dmx/panoramiX.include.c
@@ -0,0 +1 @@
+#include "../../Xext/panoramiX.c"
diff --git a/hw/kdrive/src/Makefile.am b/hw/kdrive/src/Makefile.am
index b7f94b0583c1..5358c3d8c536 100644
--- a/hw/kdrive/src/Makefile.am
+++ b/hw/kdrive/src/Makefile.am
@@ -22,7 +22,7 @@ libkdrive_la_SOURCES =	\
 	kmode.c		\
 	kshadow.c	\
 	$(KDRIVE_XV_SOURCES) \
-        $(top_srcdir)/mi/miinitext.c
+        miinitext.include.c
 
 if CONFIG_UDEV
 libkdrive_la_LIBADD = $(top_builddir)/config/libconfig.la
diff --git a/hw/kdrive/src/miinitext.include.c b/hw/kdrive/src/miinitext.include.c
new file mode 100644
index 000000000000..7f1a601c008a
--- /dev/null
+++ b/hw/kdrive/src/miinitext.include.c
@@ -0,0 +1 @@
+#include "../../../mi/miinitext.c"
diff --git a/hw/vfb/Makefile.am b/hw/vfb/Makefile.am
index f0f9fee478bc..01a6960a979f 100644
--- a/hw/vfb/Makefile.am
+++ b/hw/vfb/Makefile.am
@@ -8,7 +8,7 @@ AM_CFLAGS = -DHAVE_DIX_CONFIG_H \
 
 SRCS =	InitInput.c \
 	InitOutput.c \
-	$(top_srcdir)/mi/miinitext.c
+	miinitext.include.c
 
 Xvfb_SOURCES = $(SRCS)
 
diff --git a/hw/vfb/miinitext.include.c b/hw/vfb/miinitext.include.c
new file mode 100644
index 000000000000..fc754602c3f0
--- /dev/null
+++ b/hw/vfb/miinitext.include.c
@@ -0,0 +1 @@
+#include "../../mi/miinitext.c"
diff --git a/hw/xfree86/dixmods/Makefile.am b/hw/xfree86/dixmods/Makefile.am
index d534c789ba8f..d27f63eb10ba 100644
--- a/hw/xfree86/dixmods/Makefile.am
+++ b/hw/xfree86/dixmods/Makefile.am
@@ -44,7 +44,7 @@ libshadow_la_LIBADD += libfb.la
 endif
 libshadow_la_SOURCES = shmodule.c
 
-libdixmods_la_SOURCES = $(top_srcdir)/mi/miinitext.c
+libdixmods_la_SOURCES = miinitext.include.c
 libdixmods_la_CFLAGS = $(AM_CFLAGS)
 
 libxorgxkb_la_SOURCES = xkbVT.c xkbPrivate.c xkbKillSrv.c
diff --git a/hw/xfree86/dixmods/miinitext.include.c b/hw/xfree86/dixmods/miinitext.include.c
new file mode 100644
index 000000000000..7f1a601c008a
--- /dev/null
+++ b/hw/xfree86/dixmods/miinitext.include.c
@@ -0,0 +1 @@
+#include "../../../mi/miinitext.c"
diff --git a/hw/xfree86/glamor_egl/Makefile.am b/hw/xfree86/glamor_egl/Makefile.am
index e697c8296195..86abf4d2e0d5 100644
--- a/hw/xfree86/glamor_egl/Makefile.am
+++ b/hw/xfree86/glamor_egl/Makefile.am
@@ -22,8 +22,8 @@
 module_LTLIBRARIES = libglamoregl.la
 
 libglamoregl_la_SOURCES = \
-	$(top_srcdir)/glamor/glamor_egl.c \
-	$(top_srcdir)/glamor/glamor_eglmodule.c \
+	glamor_egl.include.c \
+	glamor_eglmodule.include.c \
 	glamor_xf86_xv.c \
 	$()
 
diff --git a/hw/xfree86/glamor_egl/glamor_egl.include.c b/hw/xfree86/glamor_egl/glamor_egl.include.c
new file mode 100644
index 000000000000..84041622a0af
--- /dev/null
+++ b/hw/xfree86/glamor_egl/glamor_egl.include.c
@@ -0,0 +1 @@
+#include "../../../glamor/glamor_egl.c"
diff --git a/hw/xfree86/glamor_egl/glamor_eglmodule.include.c b/hw/xfree86/glamor_egl/glamor_eglmodule.include.c
new file mode 100644
index 000000000000..c4f0ffd34e1d
--- /dev/null
+++ b/hw/xfree86/glamor_egl/glamor_eglmodule.include.c
@@ -0,0 +1 @@
+#include "../../../glamor/glamor_eglmodule.c"
diff --git a/hw/xfree86/int10/Makefile.am b/hw/xfree86/int10/Makefile.am
index 66cb14d46152..0beb65892423 100644
--- a/hw/xfree86/int10/Makefile.am
+++ b/hw/xfree86/int10/Makefile.am
@@ -23,8 +23,8 @@ if INT10_VM86
 AM_CFLAGS = $(I386_VIDEO_CFLAGS) -D_VM86_LINUX $(DIX_CFLAGS) $(XORG_CFLAGS) $(EXTRA_CFLAGS)
 libint10_la_SOURCES = \
 	$(COMMON_SOURCES) \
-	$(srcdir)/../os-support/linux/int10/vm86/linux_vm86.c \
-	$(srcdir)/../os-support/linux/int10/linux.c
+	linux_vm86.include.c \
+	linux.include.c
 endif
 
 if INT10_X86EMU
diff --git a/hw/xfree86/int10/linux.include.c b/hw/xfree86/int10/linux.include.c
new file mode 100644
index 000000000000..af0d1b66eda2
--- /dev/null
+++ b/hw/xfree86/int10/linux.include.c
@@ -0,0 +1 @@
+#include "../os-support/linux/int10/linux.c"
diff --git a/hw/xfree86/int10/linux_vm86.include.c b/hw/xfree86/int10/linux_vm86.include.c
new file mode 100644
index 000000000000..9a327a444503
--- /dev/null
+++ b/hw/xfree86/int10/linux_vm86.include.c
@@ -0,0 +1 @@
+#include "../os-support/linux/int10/vm86/linux_vm86.c"
diff --git a/hw/xfree86/os-support/Makefile.am b/hw/xfree86/os-support/Makefile.am
index a0140a16d9fe..d991b79d5605 100644
--- a/hw/xfree86/os-support/Makefile.am
+++ b/hw/xfree86/os-support/Makefile.am
@@ -3,7 +3,19 @@ DIST_SUBDIRS = bsd bus misc linux solaris stub hurd
 
 sdk_HEADERS = xf86_OSproc.h xf86_OSlib.h
 
-EXTRA_DIST = int10Defines.h xf86OSpriv.h
+EXTRA_DIST = int10Defines.h xf86OSpriv.h \
+             shared/VTsw_noop.c \
+             shared/VTsw_usl.c \
+             shared/agp_noop.c \
+             shared/ioperm_noop.c \
+             shared/kmod_noop.c \
+             shared/platform_noop.c \
+             shared/pm_noop.c \
+             shared/posix_tty.c \
+             shared/sigio.c \
+             shared/sigiostubs.c \
+             shared/vidmem.c \
+             $()
 
 # to get the grouping semantics right, you have to glom these three together
 # as one library, otherwise libtool will actively defeat your attempts to
diff --git a/hw/xfree86/os-support/bsd/Makefile.am b/hw/xfree86/os-support/bsd/Makefile.am
index b01ea5bca36e..6a315c750135 100644
--- a/hw/xfree86/os-support/bsd/Makefile.am
+++ b/hw/xfree86/os-support/bsd/Makefile.am
@@ -2,25 +2,25 @@ noinst_LTLIBRARIES = libbsd.la
 
 # APM support.
 if BSD_KQUEUE_APM
-APM_SOURCES = $(srcdir)/bsd_kqueue_apm.c
+APM_SOURCES = bsd_kqueue_apm.c
 else 
 if BSD_APM
-APM_SOURCES = $(srcdir)/bsd_apm.c
+APM_SOURCES = bsd_apm.c
 else
-APM_SOURCES = $(srcdir)/../shared/pm_noop.c
+APM_SOURCES = pm_noop.include.c
 endif
 endif
 
 if FREEBSD_KLDLOAD
 KMOD_SOURCES = bsd_kmod.c
 else
-KMOD_SOURCES = $(srcdir)/../shared/kmod_noop.c
+KMOD_SOURCES = kmod_noop.include.c
 endif
 
 if AGP
-AGP_SOURCES = $(srcdir)/../linux/lnx_agp.c
+AGP_SOURCES = lnx_agp.include.c
 else
-AGP_SOURCES = $(srcdir)/../shared/agp_noop.c
+AGP_SOURCES = agp_noop.include.c
 endif
 
 if ALPHA_VIDEO
@@ -46,7 +46,7 @@ if SPARC64_VIDEO
 # Cheat here and piggyback other sparc64 bits on SPARC64_VIDEO.
 ARCH_SOURCES = \
 	sparc64_video.c \
-	$(srcdir)/../shared/ioperm_noop.c
+	ioperm_noop.include.c
 endif
 
 # FIXME: NetBSD Aperture defines (configure.ac)
@@ -55,9 +55,9 @@ AM_CFLAGS = -DUSESTDRES $(XORG_CFLAGS) $(DIX_CFLAGS)
 AM_CPPFLAGS = $(XORG_INCS)
 
 libbsd_la_SOURCES = \
-	$(srcdir)/../shared/posix_tty.c \
-	$(srcdir)/../shared/sigio.c \
-	$(srcdir)/../shared/vidmem.c \
+	posix_tty.include.c \
+	sigio.include.c \
+	vidmem.include.c \
 	bsd_VTsw.c \
 	bsd_init.c \
 	bsd_bell.c \
diff --git a/hw/xfree86/os-support/bsd/agp_noop.include.c b/hw/xfree86/os-support/bsd/agp_noop.include.c
new file mode 100644
index 000000000000..890902c4b611
--- /dev/null
+++ b/hw/xfree86/os-support/bsd/agp_noop.include.c
@@ -0,0 +1 @@
+#include "../shared/agp_noop.c"
diff --git a/hw/xfree86/os-support/bsd/ioperm_noop.include.c b/hw/xfree86/os-support/bsd/ioperm_noop.include.c
new file mode 100644
index 000000000000..2c59e589ac23
--- /dev/null
+++ b/hw/xfree86/os-support/bsd/ioperm_noop.include.c
@@ -0,0 +1 @@
+#include "../shared/ioperm_noop.c"
diff --git a/hw/xfree86/os-support/bsd/kmod_noop.include.c b/hw/xfree86/os-support/bsd/kmod_noop.include.c
new file mode 100644
index 000000000000..05fcccbb2dd7
--- /dev/null
+++ b/hw/xfree86/os-support/bsd/kmod_noop.include.c
@@ -0,0 +1 @@
+#include "../shared/kmod_noop.c"
diff --git a/hw/xfree86/os-support/bsd/lnx_agp.include.c b/hw/xfree86/os-support/bsd/lnx_agp.include.c
new file mode 100644
index 000000000000..43c4a9ee353f
--- /dev/null
+++ b/hw/xfree86/os-support/bsd/lnx_agp.include.c
@@ -0,0 +1 @@
+#include "../linux/lnx_agp.c"
diff --git a/hw/xfree86/os-support/bsd/pm_noop.include.c b/hw/xfree86/os-support/bsd/pm_noop.include.c
new file mode 100644
index 000000000000..f83a4ca026b4
--- /dev/null
+++ b/hw/xfree86/os-support/bsd/pm_noop.include.c
@@ -0,0 +1 @@
+#include "../shared/pm_noop.c"
diff --git a/hw/xfree86/os-support/bsd/posix_tty.include.c b/hw/xfree86/os-support/bsd/posix_tty.include.c
new file mode 100644
index 000000000000..a0085fc9ed2a
--- /dev/null
+++ b/hw/xfree86/os-support/bsd/posix_tty.include.c
@@ -0,0 +1 @@
+#include "../shared/posix_tty.c"
diff --git a/hw/xfree86/os-support/bsd/sigio.include.c b/hw/xfree86/os-support/bsd/sigio.include.c
new file mode 100644
index 000000000000..1bf59b11540c
--- /dev/null
+++ b/hw/xfree86/os-support/bsd/sigio.include.c
@@ -0,0 +1 @@
+#include "../shared/sigio.c"
diff --git a/hw/xfree86/os-support/bsd/vidmem.include.c b/hw/xfree86/os-support/bsd/vidmem.include.c
new file mode 100644
index 000000000000..ad8cf682ec65
--- /dev/null
+++ b/hw/xfree86/os-support/bsd/vidmem.include.c
@@ -0,0 +1 @@
+#include "../shared/vidmem.c"
diff --git a/hw/xfree86/os-support/hurd/Makefile.am b/hw/xfree86/os-support/hurd/Makefile.am
index 38660544ad57..7c9fd32548ac 100644
--- a/hw/xfree86/os-support/hurd/Makefile.am
+++ b/hw/xfree86/os-support/hurd/Makefile.am
@@ -2,13 +2,13 @@ noinst_LTLIBRARIES = libhurd.la
 
 libhurd_la_SOURCES = hurd_bell.c hurd_init.c \
 		hurd_video.c \
-		$(srcdir)/../shared/VTsw_noop.c \
-		$(srcdir)/../shared/posix_tty.c \
-		$(srcdir)/../shared/vidmem.c \
-		$(srcdir)/../shared/sigiostubs.c \
-		$(srcdir)/../shared/pm_noop.c \
-		$(srcdir)/../shared/kmod_noop.c \
-		$(srcdir)/../shared/agp_noop.c
+		VTsw_noop.include.c \
+		posix_tty.include.c \
+		vidmem.include.c \
+		sigiostubs.include.c \
+		pm_noop.include.c \
+		kmod_noop.include.c \
+		agp_noop.include.c
 
 AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(XORG_CFLAGS) $(DIX_CFLAGS)
 
diff --git a/hw/xfree86/os-support/hurd/VTsw_noop.include.c b/hw/xfree86/os-support/hurd/VTsw_noop.include.c
new file mode 100644
index 000000000000..76f3e9bcd973
--- /dev/null
+++ b/hw/xfree86/os-support/hurd/VTsw_noop.include.c
@@ -0,0 +1 @@
+#include "../shared/VTsw_noop.c"
diff --git a/hw/xfree86/os-support/hurd/agp_noop.include.c b/hw/xfree86/os-support/hurd/agp_noop.include.c
new file mode 100644
index 000000000000..890902c4b611
--- /dev/null
+++ b/hw/xfree86/os-support/hurd/agp_noop.include.c
@@ -0,0 +1 @@
+#include "../shared/agp_noop.c"
diff --git a/hw/xfree86/os-support/hurd/kmod_noop.include.c b/hw/xfree86/os-support/hurd/kmod_noop.include.c
new file mode 100644
index 000000000000..05fcccbb2dd7
--- /dev/null
+++ b/hw/xfree86/os-support/hurd/kmod_noop.include.c
@@ -0,0 +1 @@
+#include "../shared/kmod_noop.c"
diff --git a/hw/xfree86/os-support/hurd/pm_noop.include.c b/hw/xfree86/os-support/hurd/pm_noop.include.c
new file mode 100644
index 000000000000..f83a4ca026b4
--- /dev/null
+++ b/hw/xfree86/os-support/hurd/pm_noop.include.c
@@ -0,0 +1 @@
+#include "../shared/pm_noop.c"
diff --git a/hw/xfree86/os-support/hurd/posix_tty.include.c b/hw/xfree86/os-support/hurd/posix_tty.include.c
new file mode 100644
index 000000000000..a0085fc9ed2a
--- /dev/null
+++ b/hw/xfree86/os-support/hurd/posix_tty.include.c
@@ -0,0 +1 @@
+#include "../shared/posix_tty.c"
diff --git a/hw/xfree86/os-support/hurd/sigiostubs.include.c b/hw/xfree86/os-support/hurd/sigiostubs.include.c
new file mode 100644
index 000000000000..ee0447ab19cd
--- /dev/null
+++ b/hw/xfree86/os-support/hurd/sigiostubs.include.c
@@ -0,0 +1 @@
+#include "../shared/sigiostubs.c"
diff --git a/hw/xfree86/os-support/hurd/vidmem.include.c b/hw/xfree86/os-support/hurd/vidmem.include.c
new file mode 100644
index 000000000000..ad8cf682ec65
--- /dev/null
+++ b/hw/xfree86/os-support/hurd/vidmem.include.c
@@ -0,0 +1 @@
+#include "../shared/vidmem.c"
diff --git a/hw/xfree86/os-support/linux/Makefile.am b/hw/xfree86/os-support/linux/Makefile.am
index 26e40bb935e3..6d8ba164e2c6 100644
--- a/hw/xfree86/os-support/linux/Makefile.am
+++ b/hw/xfree86/os-support/linux/Makefile.am
@@ -28,10 +28,10 @@ endif
 
 liblinux_la_SOURCES = linux.h lnx_init.c lnx_video.c \
                      lnx_agp.c lnx_kmod.c lnx_bell.c lnx_platform.c \
-		     $(srcdir)/../shared/VTsw_usl.c \
-		     $(srcdir)/../shared/posix_tty.c \
-                     $(srcdir)/../shared/vidmem.c \
-		     $(srcdir)/../shared/sigio.c \
+		     VTsw_usl.include.c \
+		     posix_tty.include.c \
+                     vidmem.include.c \
+		     sigio.include.c \
                      $(ACPI_SRCS) \
                      $(APM_SRCS) \
                      $(LOGIND_SRCS)
diff --git a/hw/xfree86/os-support/linux/VTsw_usl.include.c b/hw/xfree86/os-support/linux/VTsw_usl.include.c
new file mode 100644
index 000000000000..2bf33b87aed2
--- /dev/null
+++ b/hw/xfree86/os-support/linux/VTsw_usl.include.c
@@ -0,0 +1 @@
+#include "../shared/VTsw_usl.c"
diff --git a/hw/xfree86/os-support/linux/posix_tty.include.c b/hw/xfree86/os-support/linux/posix_tty.include.c
new file mode 100644
index 000000000000..a0085fc9ed2a
--- /dev/null
+++ b/hw/xfree86/os-support/linux/posix_tty.include.c
@@ -0,0 +1 @@
+#include "../shared/posix_tty.c"
diff --git a/hw/xfree86/os-support/linux/sigio.include.c b/hw/xfree86/os-support/linux/sigio.include.c
new file mode 100644
index 000000000000..1bf59b11540c
--- /dev/null
+++ b/hw/xfree86/os-support/linux/sigio.include.c
@@ -0,0 +1 @@
+#include "../shared/sigio.c"
diff --git a/hw/xfree86/os-support/linux/vidmem.include.c b/hw/xfree86/os-support/linux/vidmem.include.c
new file mode 100644
index 000000000000..ad8cf682ec65
--- /dev/null
+++ b/hw/xfree86/os-support/linux/vidmem.include.c
@@ -0,0 +1 @@
+#include "../shared/vidmem.c"
diff --git a/hw/xfree86/os-support/solaris/Makefile.am b/hw/xfree86/os-support/solaris/Makefile.am
index e534bc8dc2c6..0257de3c895a 100644
--- a/hw/xfree86/os-support/solaris/Makefile.am
+++ b/hw/xfree86/os-support/solaris/Makefile.am
@@ -1,13 +1,13 @@
 if SOLARIS_VT
 VTSW_SRC = sun_VTsw.c
 else
-VTSW_SRC = $(srcdir)/../shared/VTsw_noop.c
+VTSW_SRC = VTsw_noop.include.c
 endif
 
 if AGP
 AGP_SRC = sun_agp.c
 else
-AGP_SRC = $(srcdir)/../shared/agp_noop.c
+AGP_SRC = agp_noop.include.c
 endif
 
 SOLARIS_INOUT_SRC = solaris- at SOLARIS_INOUT_ARCH@.S
@@ -19,10 +19,10 @@ solaris- at SOLARIS_INOUT_ARCH@.il: solaris- at SOLARIS_INOUT_ARCH@.S
 noinst_LTLIBRARIES = libsolaris.la
 libsolaris_la_SOURCES = sun_init.c \
 	sun_vid.c sun_bell.c $(AGP_SRC) sun_apm.c \
-	$(srcdir)/../shared/kmod_noop.c \
-	$(srcdir)/../shared/posix_tty.c \
-	$(srcdir)/../shared/sigio.c \
-	$(srcdir)/../shared/vidmem.c \
+	kmod_noop.include.c \
+	posix_tty.include.c \
+	sigio.include.c \
+	vidmem.include.c \
 	$(VTSW_SRC)
 nodist_libsolaris_la_SOURCES = $(SOLARIS_INOUT_SRC)
 
diff --git a/hw/xfree86/os-support/solaris/VTsw_noop.include.c b/hw/xfree86/os-support/solaris/VTsw_noop.include.c
new file mode 100644
index 000000000000..76f3e9bcd973
--- /dev/null
+++ b/hw/xfree86/os-support/solaris/VTsw_noop.include.c
@@ -0,0 +1 @@
+#include "../shared/VTsw_noop.c"
diff --git a/hw/xfree86/os-support/solaris/agp_noop.include.c b/hw/xfree86/os-support/solaris/agp_noop.include.c
new file mode 100644
index 000000000000..890902c4b611
--- /dev/null
+++ b/hw/xfree86/os-support/solaris/agp_noop.include.c
@@ -0,0 +1 @@
+#include "../shared/agp_noop.c"
diff --git a/hw/xfree86/os-support/solaris/kmod_noop.include.c b/hw/xfree86/os-support/solaris/kmod_noop.include.c
new file mode 100644
index 000000000000..05fcccbb2dd7
--- /dev/null
+++ b/hw/xfree86/os-support/solaris/kmod_noop.include.c
@@ -0,0 +1 @@
+#include "../shared/kmod_noop.c"
diff --git a/hw/xfree86/os-support/solaris/posix_tty.include.c b/hw/xfree86/os-support/solaris/posix_tty.include.c
new file mode 100644
index 000000000000..a0085fc9ed2a
--- /dev/null
+++ b/hw/xfree86/os-support/solaris/posix_tty.include.c
@@ -0,0 +1 @@
+#include "../shared/posix_tty.c"
diff --git a/hw/xfree86/os-support/solaris/sigio.include.c b/hw/xfree86/os-support/solaris/sigio.include.c
new file mode 100644
index 000000000000..1bf59b11540c
--- /dev/null
+++ b/hw/xfree86/os-support/solaris/sigio.include.c
@@ -0,0 +1 @@
+#include "../shared/sigio.c"
diff --git a/hw/xfree86/os-support/solaris/vidmem.include.c b/hw/xfree86/os-support/solaris/vidmem.include.c
new file mode 100644
index 000000000000..ad8cf682ec65
--- /dev/null
+++ b/hw/xfree86/os-support/solaris/vidmem.include.c
@@ -0,0 +1 @@
+#include "../shared/vidmem.c"
diff --git a/hw/xfree86/os-support/stub/Makefile.am b/hw/xfree86/os-support/stub/Makefile.am
index 19468c6de281..a441edecf0d9 100644
--- a/hw/xfree86/os-support/stub/Makefile.am
+++ b/hw/xfree86/os-support/stub/Makefile.am
@@ -5,14 +5,14 @@ AM_CFLAGS = $(XORG_CFLAGS) $(DIX_CFLAGS)
 AM_CPPFLAGS = $(XORG_INCS)
 
 libstub_la_SOURCES = \
-	$(srcdir)/../shared/VTsw_noop.c \
-	$(srcdir)/../shared/agp_noop.c \
-	$(srcdir)/../shared/ioperm_noop.c \
-	$(srcdir)/../shared/kmod_noop.c \
-	$(srcdir)/../shared/pm_noop.c \
-	$(srcdir)/../shared/vidmem.c \
-	$(srcdir)/../shared/posix_tty.c \
-	$(srcdir)/../shared/sigio.c \
+	VTsw_noop.include.c \
+	agp_noop.include.c \
+	ioperm_noop.include.c \
+	kmod_noop.include.c \
+	pm_noop.include.c \
+	vidmem.include.c \
+	posix_tty.include.c \
+	sigio.include.c \
 	stub_bell.c \
 	stub_init.c \
 	stub_video.c
diff --git a/hw/xfree86/os-support/stub/VTsw_noop.include.c b/hw/xfree86/os-support/stub/VTsw_noop.include.c
new file mode 100644
index 000000000000..76f3e9bcd973
--- /dev/null
+++ b/hw/xfree86/os-support/stub/VTsw_noop.include.c
@@ -0,0 +1 @@
+#include "../shared/VTsw_noop.c"
diff --git a/hw/xfree86/os-support/stub/agp_noop.include.c b/hw/xfree86/os-support/stub/agp_noop.include.c
new file mode 100644
index 000000000000..890902c4b611
--- /dev/null
+++ b/hw/xfree86/os-support/stub/agp_noop.include.c
@@ -0,0 +1 @@
+#include "../shared/agp_noop.c"
diff --git a/hw/xfree86/os-support/stub/ioperm_noop.include.c b/hw/xfree86/os-support/stub/ioperm_noop.include.c
new file mode 100644
index 000000000000..2c59e589ac23
--- /dev/null
+++ b/hw/xfree86/os-support/stub/ioperm_noop.include.c
@@ -0,0 +1 @@
+#include "../shared/ioperm_noop.c"
diff --git a/hw/xfree86/os-support/stub/kmod_noop.include.c b/hw/xfree86/os-support/stub/kmod_noop.include.c
new file mode 100644
index 000000000000..05fcccbb2dd7
--- /dev/null
+++ b/hw/xfree86/os-support/stub/kmod_noop.include.c
@@ -0,0 +1 @@
+#include "../shared/kmod_noop.c"
diff --git a/hw/xfree86/os-support/stub/pm_noop.include.c b/hw/xfree86/os-support/stub/pm_noop.include.c
new file mode 100644
index 000000000000..f83a4ca026b4
--- /dev/null
+++ b/hw/xfree86/os-support/stub/pm_noop.include.c
@@ -0,0 +1 @@
+#include "../shared/pm_noop.c"
diff --git a/hw/xfree86/os-support/stub/posix_tty.include.c b/hw/xfree86/os-support/stub/posix_tty.include.c
new file mode 100644
index 000000000000..a0085fc9ed2a
--- /dev/null
+++ b/hw/xfree86/os-support/stub/posix_tty.include.c
@@ -0,0 +1 @@
+#include "../shared/posix_tty.c"
diff --git a/hw/xfree86/os-support/stub/sigio.include.c b/hw/xfree86/os-support/stub/sigio.include.c
new file mode 100644
index 000000000000..1bf59b11540c
--- /dev/null
+++ b/hw/xfree86/os-support/stub/sigio.include.c
@@ -0,0 +1 @@
+#include "../shared/sigio.c"
diff --git a/hw/xfree86/os-support/stub/vidmem.include.c b/hw/xfree86/os-support/stub/vidmem.include.c
new file mode 100644
index 000000000000..ad8cf682ec65
--- /dev/null
+++ b/hw/xfree86/os-support/stub/vidmem.include.c
@@ -0,0 +1 @@
+#include "../shared/vidmem.c"
diff --git a/hw/xfree86/utils/cvt/Makefile.am b/hw/xfree86/utils/cvt/Makefile.am
index 26abeb40be9a..6df99fa3a13e 100644
--- a/hw/xfree86/utils/cvt/Makefile.am
+++ b/hw/xfree86/utils/cvt/Makefile.am
@@ -29,7 +29,7 @@ AM_CPPFLAGS = $(XORG_INCS) \
 
 # gah
 cvt_SOURCES = cvt.c \
-	$(top_srcdir)/hw/xfree86/modes/xf86cvt.c \
-	$(top_srcdir)/os/xprintf.c
+	xf86cvt.include.c \
+	xprintf.include.c
 
 cvt_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS)
diff --git a/hw/xfree86/utils/cvt/xf86cvt.include.c b/hw/xfree86/utils/cvt/xf86cvt.include.c
new file mode 100644
index 000000000000..60616f6bd6ca
--- /dev/null
+++ b/hw/xfree86/utils/cvt/xf86cvt.include.c
@@ -0,0 +1 @@
+#include "../../modes/xf86cvt.c"
diff --git a/hw/xfree86/utils/cvt/xprintf.include.c b/hw/xfree86/utils/cvt/xprintf.include.c
new file mode 100644
index 000000000000..a98ab5c2dae2
--- /dev/null
+++ b/hw/xfree86/utils/cvt/xprintf.include.c
@@ -0,0 +1 @@
+#include "../../../../os/xprintf.c"
diff --git a/hw/xnest/Makefile.am b/hw/xnest/Makefile.am
index eb550c0f7d67..9fd9c88d7da6 100644
--- a/hw/xnest/Makefile.am
+++ b/hw/xnest/Makefile.am
@@ -41,7 +41,7 @@ SRCS =	Args.c \
 	XNPixmap.h \
 	XNWindow.h \
 	xnest-config.h \
-	$(top_srcdir)/mi/miinitext.c
+	miinitext.include.c
 
 XNEST_LIBS = \
         @XNEST_LIBS@ \
diff --git a/hw/xnest/miinitext.include.c b/hw/xnest/miinitext.include.c
new file mode 100644
index 000000000000..fc754602c3f0
--- /dev/null
+++ b/hw/xnest/miinitext.include.c
@@ -0,0 +1 @@
+#include "../../mi/miinitext.c"
diff --git a/hw/xquartz/Makefile.am b/hw/xquartz/Makefile.am
index 5ccbe48917bc..81d528ceb570 100644
--- a/hw/xquartz/Makefile.am
+++ b/hw/xquartz/Makefile.am
@@ -20,7 +20,7 @@ SUBDIRS = bundle . $(GL_DIR) xpr pbproxy mach-startup man
 DIST_SUBDIRS = bundle . GL xpr pbproxy mach-startup man
 
 libXquartz_la_SOURCES = \
-	$(top_srcdir)/mi/miinitext.c \
+	miinitext.include.c \
 	X11Application.m \
 	X11Controller.m \
 	applewm.c \
diff --git a/hw/xquartz/mach-startup/Makefile.am b/hw/xquartz/mach-startup/Makefile.am
index 17f0b9d4ddc4..15a4f1d68af9 100644
--- a/hw/xquartz/mach-startup/Makefile.am
+++ b/hw/xquartz/mach-startup/Makefile.am
@@ -16,7 +16,7 @@ dist_X11_bin_SOURCES = \
 # with the case where we build on Lion but target Snow Leopard as the minimum
 # OS version.
 #if NEED_STRNDUP
-dist_X11_bin_SOURCES += $(top_srcdir)/os/strndup.c
+dist_X11_bin_SOURCES += strndup.include.c
 #endif
 
 nodist_X11_bin_SOURCES = \
diff --git a/hw/xquartz/mach-startup/strndup.include.c b/hw/xquartz/mach-startup/strndup.include.c
new file mode 100644
index 000000000000..48af33338b2f
--- /dev/null
+++ b/hw/xquartz/mach-startup/strndup.include.c
@@ -0,0 +1 @@
+#include "../../../os/strndup.c"
diff --git a/hw/xquartz/miinitext.include.c b/hw/xquartz/miinitext.include.c
new file mode 100644
index 000000000000..fc754602c3f0
--- /dev/null
+++ b/hw/xquartz/miinitext.include.c
@@ -0,0 +1 @@
+#include "../../mi/miinitext.c"
diff --git a/hw/xwayland/Makefile.am b/hw/xwayland/Makefile.am
index a3c9fce48226..9f0bb5fa56a0 100644
--- a/hw/xwayland/Makefile.am
+++ b/hw/xwayland/Makefile.am
@@ -18,9 +18,9 @@ Xwayland_SOURCES =				\
 	xwayland-cvt.c				\
 	xwayland-vidmode.c			\
 	xwayland.h				\
-	$(top_srcdir)/Xext/dpmsstubs.c		\
-	$(top_srcdir)/Xi/stubs.c		\
-	$(top_srcdir)/mi/miinitext.c
+	dpmsstubs.include.c			\
+	stubs.include.c				\
+	miinitext.include.c
 
 Xwayland_LDADD =				\
 	$(glamor_lib)				\
diff --git a/hw/xwayland/dpmsstubs.include.c b/hw/xwayland/dpmsstubs.include.c
new file mode 100644
index 000000000000..b318337d2400
--- /dev/null
+++ b/hw/xwayland/dpmsstubs.include.c
@@ -0,0 +1 @@
+#include "../../Xext/dpmsstubs.c"
diff --git a/hw/xwayland/miinitext.include.c b/hw/xwayland/miinitext.include.c
new file mode 100644
index 000000000000..fc754602c3f0
--- /dev/null
+++ b/hw/xwayland/miinitext.include.c
@@ -0,0 +1 @@
+#include "../../mi/miinitext.c"
diff --git a/hw/xwayland/stubs.include.c b/hw/xwayland/stubs.include.c
new file mode 100644
index 000000000000..9dfbe3f936c1
--- /dev/null
+++ b/hw/xwayland/stubs.include.c
@@ -0,0 +1 @@
+#include "../../Xi/stubs.c"
diff --git a/hw/xwin/Makefile.am b/hw/xwin/Makefile.am
index 0846230b00b2..9d08b409be07 100644
--- a/hw/xwin/Makefile.am
+++ b/hw/xwin/Makefile.am
@@ -112,7 +112,7 @@ SRCS =	InitInput.c \
 	windisplay.c \
 	windisplay.h \
 	XWin.rc \
-	$(top_srcdir)/mi/miinitext.c \
+	miinitext.include.c \
 	$(SRCS_CLIPBOARD) \
 	$(SRCS_MULTIWINDOW) \
 	$(SRCS_MULTIWINDOWEXTWM) \
diff --git a/hw/xwin/miinitext.include.c b/hw/xwin/miinitext.include.c
new file mode 100644
index 000000000000..fc754602c3f0
--- /dev/null
+++ b/hw/xwin/miinitext.include.c
@@ -0,0 +1 @@
+#include "../../mi/miinitext.c"
diff --git a/test/miinitext.include.c b/test/miinitext.include.c
new file mode 100644
index 000000000000..ca6cb4ac2584
--- /dev/null
+++ b/test/miinitext.include.c
@@ -0,0 +1 @@
+#include "../mi/miinitext.c"
-- 
2.9.2



More information about the xorg-devel mailing list