[PATCH xserver] configure.ac: use subdir-objects

Mihail Konev k.mvc at ya.ru
Thu Feb 16 23:08:45 UTC 2017


automake-1.15 says:
  warning: possible forward-incompatibility.
  At least a source file is in a subdirectory, but the 'subdir-objects'
  automake option hasn't been enabled.  For now, the corresponding output
  object file(s) will be placed in the top-level directory.  However,
  this behaviour will change in future Automake versions: they will
  unconditionally cause object files to be placed in the same subdirectory
  of the corresponding sources.
  You are advised to start using 'subdir-objects' option throughout your
  project, to avoid future incompatibilities.

This fixes the "autoreconf -i" warnings.

Automake cannot (re)generate per-object '.Plo' makefile that records
the dependencies, if it is in another dir (now that the .Plo is in a
'subdirectory', i.e. ../xyz dir).
Work this around by symlinking the source files.

Signed-off-by: Mihail Konev <k.mvc at ya.ru>
---
Builds hw/ on Solaris, NetBSD, Linux, Windows, and Mac.

Don't know whether mi/miinitext.c is better #included instead,
sending as-is.

 configure.ac                              |  5 +++-
 hw/dmx/.gitignore                         |  2 ++
 hw/dmx/Makefile.am                        | 10 +++++--
 hw/dmx/config/.gitignore                  |  2 ++
 hw/dmx/config/Makefile.am                 | 11 ++++++--
 hw/kdrive/src/.gitignore                  |  1 +
 hw/kdrive/src/Makefile.am                 |  6 ++++-
 hw/vfb/.gitignore                         |  1 +
 hw/vfb/Makefile.am                        |  6 ++++-
 hw/xfree86/dixmods/.gitignore             |  1 +
 hw/xfree86/dixmods/Makefile.am            |  6 ++++-
 hw/xfree86/glamor_egl/.gitignore          |  2 ++
 hw/xfree86/glamor_egl/Makefile.am         | 10 +++++--
 hw/xfree86/int10/.gitignore               |  2 ++
 hw/xfree86/int10/Makefile.am              | 11 ++++++--
 hw/xfree86/os-support/bsd/.gitignore      |  7 +++++
 hw/xfree86/os-support/bsd/Makefile.am     | 43 ++++++++++++++++++++++++-------
 hw/xfree86/os-support/hurd/.gitignore     |  7 +++++
 hw/xfree86/os-support/hurd/Makefile.am    | 30 ++++++++++++++++-----
 hw/xfree86/os-support/linux/.gitignore    |  4 +++
 hw/xfree86/os-support/linux/Makefile.am   | 18 ++++++++++---
 hw/xfree86/os-support/solaris/.gitignore  |  6 +++++
 hw/xfree86/os-support/solaris/Makefile.am | 26 ++++++++++++++-----
 hw/xfree86/os-support/stub/.gitignore     |  8 ++++++
 hw/xfree86/os-support/stub/Makefile.am    | 34 ++++++++++++++++++------
 hw/xfree86/utils/cvt/.gitignore           |  2 ++
 hw/xfree86/utils/cvt/Makefile.am          |  9 +++++--
 hw/xnest/.gitignore                       |  1 +
 hw/xnest/Makefile.am                      |  6 ++++-
 hw/xquartz/.gitignore                     |  1 +
 hw/xquartz/Makefile.am                    |  6 ++++-
 hw/xquartz/mach-startup/.gitignore        |  2 +-
 hw/xquartz/mach-startup/Makefile.am       |  9 +++++--
 hw/xwayland/.gitignore                    |  3 +++
 hw/xwayland/Makefile.am                   | 17 +++++++++---
 hw/xwin/.gitignore                        |  1 +
 hw/xwin/Makefile.am                       |  9 +++++--
 test/.gitignore                           |  1 +
 test/Makefile.am                          |  6 ++++-
 39 files changed, 271 insertions(+), 61 deletions(-)
 create mode 100644 hw/kdrive/src/.gitignore
 create mode 100644 hw/xfree86/dixmods/.gitignore
 create mode 100644 hw/xfree86/glamor_egl/.gitignore
 create mode 100644 hw/xfree86/int10/.gitignore
 create mode 100644 hw/xfree86/os-support/bsd/.gitignore
 create mode 100644 hw/xfree86/os-support/hurd/.gitignore
 create mode 100644 hw/xfree86/os-support/linux/.gitignore
 create mode 100644 hw/xfree86/os-support/solaris/.gitignore
 create mode 100644 hw/xfree86/os-support/stub/.gitignore
 create mode 100644 hw/xquartz/.gitignore

diff --git a/configure.ac b/configure.ac
index 4dcf8b5c27a0..481b28d7d239 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
@@ -2550,6 +2550,9 @@ if test "x$CONFIG_HAL" = xno && test "x$CONFIG_UDEV" = xno; then
              ***********************************************])
 fi
 
+dnl Helper for subdir-objects workaround
+AC_SUBST([LN_THE_FILE], ['@echo "  LN       "$@; $(LN_S) -f $< $@'])
+
 AC_CONFIG_FILES([
 Makefile
 glx/Makefile
diff --git a/hw/dmx/.gitignore b/hw/dmx/.gitignore
index 4dd9b03580cd..d08772b4da5b 100644
--- a/hw/dmx/.gitignore
+++ b/hw/dmx/.gitignore
@@ -1,2 +1,4 @@
 #		Add & Override for this directory and it's subdirectories
 Xdmx
+panoramiX.c
+miinitext.c
diff --git a/hw/dmx/Makefile.am b/hw/dmx/Makefile.am
index 38d6ac409e76..a0eaca511a43 100644
--- a/hw/dmx/Makefile.am
+++ b/hw/dmx/Makefile.am
@@ -2,8 +2,14 @@
 SUBDIRS = input config examples doc doxygen man
 bin_PROGRAMS = Xdmx
 
+CLEANFILES = panoramiX.c miinitext.c
+panoramiX.c: $(top_srcdir)/Xext/panoramiX.c
+	$(LN_THE_FILE)
+miinitext.c: $(top_srcdir)/mi/miinitext.c
+	$(LN_THE_FILE)
+
 if XINERAMA
-PANORAMIX_SRCS = $(top_srcdir)/Xext/panoramiX.c
+PANORAMIX_SRCS = panoramiX.c
 endif
 
 if GLX
@@ -64,7 +70,7 @@ Xdmx_SOURCES = dmx.c \
                dmxvisual.h \
                dmxwindow.c \
                dmxwindow.h \
-               $(top_srcdir)/mi/miinitext.c \
+               miinitext.c \
                $(GLX_SRCS) 
 
 
diff --git a/hw/dmx/config/.gitignore b/hw/dmx/config/.gitignore
index 086062204c6d..977abf0014bc 100644
--- a/hw/dmx/config/.gitignore
+++ b/hw/dmx/config/.gitignore
@@ -5,3 +5,5 @@ parser.h
 scanner.c
 vdltodmx
 xdmxconfig
+strlcpy.c
+dmxlog.c
diff --git a/hw/dmx/config/Makefile.am b/hw/dmx/config/Makefile.am
index 06588e7a140a..b7450e412d8d 100644
--- a/hw/dmx/config/Makefile.am
+++ b/hw/dmx/config/Makefile.am
@@ -19,9 +19,13 @@ scanner.c: scanner.l parser.h
 BUILT_SOURCES = parser.c parser.h scanner.c
 
 MAINTAINERCLEANFILES = $(BUILT_SOURCES)
+CLEANFILES = strlcpy.c dmxlog.c
+
+strlcpy.c: $(top_srcdir)/os/strlcpy.c
+	$(LN_THE_FILE)
 
 libdmxconfig_a_SOURCES = $(LIBSRCS)
-libdmxconfig_a_SOURCES += $(top_srcdir)/os/strlcpy.c
+libdmxconfig_a_SOURCES += strlcpy.c
 
 if GLX
 GLX_DEFS = @GL_CFLAGS@
@@ -38,10 +42,13 @@ AM_CFLAGS = \
 
 bin_PROGRAMS = xdmxconfig vdltodmx dmxtodmx
 
+dmxlog.c: $(top_srcdir)/hw/dmx/dmxlog.c
+	$(LN_THE_FILE)
+
 xdmxconfig_DEPENDENCIES = libdmxconfig.a
 xdmxconfig_SOURCES = \
 	xdmxconfig.c \
-	$(top_srcdir)/hw/dmx/dmxlog.c \
+	dmxlog.c \
 	Canvas.c \
 	Canvas.h \
 	CanvasP.h
diff --git a/hw/kdrive/src/.gitignore b/hw/kdrive/src/.gitignore
new file mode 100644
index 000000000000..7e56ba00a3f9
--- /dev/null
+++ b/hw/kdrive/src/.gitignore
@@ -0,0 +1 @@
+miinitext.c
diff --git a/hw/kdrive/src/Makefile.am b/hw/kdrive/src/Makefile.am
index b7f94b0583c1..44ea3ac67996 100644
--- a/hw/kdrive/src/Makefile.am
+++ b/hw/kdrive/src/Makefile.am
@@ -6,6 +6,10 @@ AM_CFLAGS =	-DHAVE_DIX_CONFIG_H
 
 noinst_LTLIBRARIES = libkdrive.la
 
+CLEANFILES = miinittext.c
+miinitext.c: $(top_srcdir)/mi/miinitext.c
+	$(LN_THE_FILE)
+
 if XV
 KDRIVE_XV_SOURCES =	\
 	kxv.c		\
@@ -22,7 +26,7 @@ libkdrive_la_SOURCES =	\
 	kmode.c		\
 	kshadow.c	\
 	$(KDRIVE_XV_SOURCES) \
-        $(top_srcdir)/mi/miinitext.c
+        miinitext.c
 
 if CONFIG_UDEV
 libkdrive_la_LIBADD = $(top_builddir)/config/libconfig.la
diff --git a/hw/vfb/.gitignore b/hw/vfb/.gitignore
index c04754124bcd..57cdc3e5f874 100644
--- a/hw/vfb/.gitignore
+++ b/hw/vfb/.gitignore
@@ -1 +1,2 @@
 Xvfb
+miinitext.c
diff --git a/hw/vfb/Makefile.am b/hw/vfb/Makefile.am
index f0f9fee478bc..2aba9881001f 100644
--- a/hw/vfb/Makefile.am
+++ b/hw/vfb/Makefile.am
@@ -6,9 +6,13 @@ AM_CFLAGS = -DHAVE_DIX_CONFIG_H \
             $(XVFBMODULES_CFLAGS) \
 	    $(DIX_CFLAGS)
 
+CLEANFILES = miinittext.c
+miinitext.c: $(top_srcdir)/mi/miinitext.c
+	$(LN_THE_FILE)
+
 SRCS =	InitInput.c \
 	InitOutput.c \
-	$(top_srcdir)/mi/miinitext.c
+	miinitext.c
 
 Xvfb_SOURCES = $(SRCS)
 
diff --git a/hw/xfree86/dixmods/.gitignore b/hw/xfree86/dixmods/.gitignore
new file mode 100644
index 000000000000..7e56ba00a3f9
--- /dev/null
+++ b/hw/xfree86/dixmods/.gitignore
@@ -0,0 +1 @@
+miinitext.c
diff --git a/hw/xfree86/dixmods/Makefile.am b/hw/xfree86/dixmods/Makefile.am
index d534c789ba8f..07668784ad13 100644
--- a/hw/xfree86/dixmods/Makefile.am
+++ b/hw/xfree86/dixmods/Makefile.am
@@ -17,6 +17,10 @@ AM_CPPFLAGS = @XORG_INCS@ \
            -I$(top_srcdir)/miext/shadow \
            -I$(top_srcdir)/glx
 
+CLEANFILES = miinitext.c
+miinitext.c: $(top_srcdir)/mi/miinitext.c
+	$(LN_THE_FILE)
+
 libfb_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
 libfb_la_LIBADD = $(top_builddir)/fb/libfb.la
 libfb_la_SOURCES = fbmodule.c
@@ -44,7 +48,7 @@ libshadow_la_LIBADD += libfb.la
 endif
 libshadow_la_SOURCES = shmodule.c
 
-libdixmods_la_SOURCES = $(top_srcdir)/mi/miinitext.c
+libdixmods_la_SOURCES = miinitext.c
 libdixmods_la_CFLAGS = $(AM_CFLAGS)
 
 libxorgxkb_la_SOURCES = xkbVT.c xkbPrivate.c xkbKillSrv.c
diff --git a/hw/xfree86/glamor_egl/.gitignore b/hw/xfree86/glamor_egl/.gitignore
new file mode 100644
index 000000000000..f5ef47bde25e
--- /dev/null
+++ b/hw/xfree86/glamor_egl/.gitignore
@@ -0,0 +1,2 @@
+glamor_egl.c
+glamor_eglmodule.c
diff --git a/hw/xfree86/glamor_egl/Makefile.am b/hw/xfree86/glamor_egl/Makefile.am
index e697c8296195..11b90a8c92cd 100644
--- a/hw/xfree86/glamor_egl/Makefile.am
+++ b/hw/xfree86/glamor_egl/Makefile.am
@@ -21,9 +21,15 @@
 
 module_LTLIBRARIES = libglamoregl.la
 
+CLEANFILES = glamor_egl.c glamor_eglmodule.c
+glamor_egl.c: $(top_srcdir)/glamor/glamor_egl.c
+	$(LN_THE_FILE)
+glamor_eglmodule.c: $(top_srcdir)/glamor/glamor_eglmodule.c
+	$(LN_THE_FILE)
+
 libglamoregl_la_SOURCES = \
-	$(top_srcdir)/glamor/glamor_egl.c \
-	$(top_srcdir)/glamor/glamor_eglmodule.c \
+	glamor_egl.c \
+	glamor_eglmodule.c \
 	glamor_xf86_xv.c \
 	$()
 
diff --git a/hw/xfree86/int10/.gitignore b/hw/xfree86/int10/.gitignore
new file mode 100644
index 000000000000..3f349ef15277
--- /dev/null
+++ b/hw/xfree86/int10/.gitignore
@@ -0,0 +1,2 @@
+linux_vm86.c
+linux.c
diff --git a/hw/xfree86/int10/Makefile.am b/hw/xfree86/int10/Makefile.am
index 66cb14d46152..50c13ff9738f 100644
--- a/hw/xfree86/int10/Makefile.am
+++ b/hw/xfree86/int10/Makefile.am
@@ -3,6 +3,7 @@ module_LTLIBRARIES = libint10.la
 sdk_HEADERS = xf86int10.h
 
 EXTRA_CFLAGS =
+CLEANFILES =
 
 libint10_la_LDFLAGS = -avoid-version
 libint10_la_LIBADD = $(PCIACCESS_LIBS)
@@ -23,8 +24,14 @@ 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.c \
+	linux.c
+
+CLEANFILES += linux_vm86.c linux.c
+linux_vm86.c: $(srcdir)/../os-support/linux/int10/vm86/linux_vm86.c
+	$(LN_THE_FILE)
+linux.c: $(srcdir)/../os-support/linux/int10/linux.c
+	$(LN_THE_FILE)
 endif
 
 if INT10_X86EMU
diff --git a/hw/xfree86/os-support/bsd/.gitignore b/hw/xfree86/os-support/bsd/.gitignore
new file mode 100644
index 000000000000..28bcba73fc5c
--- /dev/null
+++ b/hw/xfree86/os-support/bsd/.gitignore
@@ -0,0 +1,7 @@
+pm_noop.c
+kmod_noop.c
+lnx_agp.c
+ioperm_noop.c
+posix_tty.c
+sigio.c
+vidmem.c
diff --git a/hw/xfree86/os-support/bsd/Makefile.am b/hw/xfree86/os-support/bsd/Makefile.am
index b01ea5bca36e..73180714740b 100644
--- a/hw/xfree86/os-support/bsd/Makefile.am
+++ b/hw/xfree86/os-support/bsd/Makefile.am
@@ -1,26 +1,49 @@
 noinst_LTLIBRARIES = libbsd.la
 
+CLEANFILES = \
+	bsd_kqueue_apm.c bsd_apm.c pm_noop.c kmod_noop.c \
+	lnx_agp.c ioperm_noop.c posix_tty.c sigio.c vidmem.c \
+	$()
+bsd_kqueue_apm.c: $(srcdir)/bsd_kqueue_apm.c
+	$(LN_THE_FILE)
+bsd_apm.c: $(srcdir)/bsd_apm.c
+	$(LN_THE_FILE)
+pm_noop.c: $(srcdir)/../shared/pm_noop.c
+	$(LN_THE_FILE)
+kmod_noop.c: $(srcdir)/../shared/kmod_noop.c
+	$(LN_THE_FILE)
+lnx_agp.c: $(srcdir)/../linux/lnx_agp.c
+	$(LN_THE_FILE)
+ioperm_noop.c: $(srcdir)/../shared/ioperm_noop.c
+	$(LN_THE_FILE)
+posix_tty.c: $(srcdir)/../shared/posix_tty.c
+	$(LN_THE_FILE)
+sigio.c: $(srcdir)/../shared/sigio.c
+	$(LN_THE_FILE)
+vidmem.c: $(srcdir)/../shared/vidmem.c
+	$(LN_THE_FILE)
+
 # 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.c
 endif
 endif
 
 if FREEBSD_KLDLOAD
 KMOD_SOURCES = bsd_kmod.c
 else
-KMOD_SOURCES = $(srcdir)/../shared/kmod_noop.c
+KMOD_SOURCES = kmod_noop.c
 endif
 
 if AGP
-AGP_SOURCES = $(srcdir)/../linux/lnx_agp.c
+AGP_SOURCES = lnx_agp.c
 else
-AGP_SOURCES = $(srcdir)/../shared/agp_noop.c
+AGP_SOURCES = agp_noop.c
 endif
 
 if ALPHA_VIDEO
@@ -46,7 +69,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.c
 endif
 
 # FIXME: NetBSD Aperture defines (configure.ac)
@@ -55,9 +78,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.c \
+	sigio.c \
+	vidmem.c \
 	bsd_VTsw.c \
 	bsd_init.c \
 	bsd_bell.c \
diff --git a/hw/xfree86/os-support/hurd/.gitignore b/hw/xfree86/os-support/hurd/.gitignore
new file mode 100644
index 000000000000..8e4b48445f35
--- /dev/null
+++ b/hw/xfree86/os-support/hurd/.gitignore
@@ -0,0 +1,7 @@
+VTsw_noop.c
+posix_tty.c
+vidmem.c
+sigiostubs.c
+pm_noop.c
+kmod_noop.c
+agp_noop.c
diff --git a/hw/xfree86/os-support/hurd/Makefile.am b/hw/xfree86/os-support/hurd/Makefile.am
index 38660544ad57..7957d5f7b493 100644
--- a/hw/xfree86/os-support/hurd/Makefile.am
+++ b/hw/xfree86/os-support/hurd/Makefile.am
@@ -1,14 +1,30 @@
 noinst_LTLIBRARIES = libhurd.la
 
+CLEANFILES = VTsw_noop.c posix_tty.c vidmem.c sigiostubs.c pm_noop.c kmod_noop.c agp_noop.c
+VTsw_noop.c: $(srcdir)/../shared/VTsw_noop.c
+	$(LN_THE_FILE)
+posix_tty.c: $(srcdir)/../shared/posix_tty.c
+	$(LN_THE_FILE)
+vidmem.c: $(srcdir)/../shared/vidmem.c
+	$(LN_THE_FILE)
+sigiostubs.c: $(srcdir)/../shared/sigiostubs.c
+	$(LN_THE_FILE)
+pm_noop.c: $(srcdir)/../shared/pm_noop.c
+	$(LN_THE_FILE)
+kmod_noop.c: $(srcdir)/../shared/kmod_noop.c
+	$(LN_THE_FILE)
+agp_noop.c: $(srcdir)/../shared/agp_noop.c
+	$(LN_THE_FILE)
+
 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.c \
+		posix_tty.c \
+		vidmem.c \
+		sigiostubs.c \
+		pm_noop.c \
+		kmod_noop.c \
+		agp_noop.c
 
 AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(XORG_CFLAGS) $(DIX_CFLAGS)
 
diff --git a/hw/xfree86/os-support/linux/.gitignore b/hw/xfree86/os-support/linux/.gitignore
new file mode 100644
index 000000000000..712d09c1f2ec
--- /dev/null
+++ b/hw/xfree86/os-support/linux/.gitignore
@@ -0,0 +1,4 @@
+VTsw_usl.c
+posix_tty.c
+vidmem.c
+sigio.c
diff --git a/hw/xfree86/os-support/linux/Makefile.am b/hw/xfree86/os-support/linux/Makefile.am
index 26e40bb935e3..88e8b1216664 100644
--- a/hw/xfree86/os-support/linux/Makefile.am
+++ b/hw/xfree86/os-support/linux/Makefile.am
@@ -1,5 +1,15 @@
 noinst_LTLIBRARIES = liblinux.la
 
+CLEANFILES = VTsw_usl.c posix_tty.c vidmem.c sigio.c
+VTsw_usl.c: $(srcdir)/../shared/VTsw_usl.c
+	$(LN_THE_FILE)
+posix_tty.c: $(srcdir)/../shared/posix_tty.c
+	$(LN_THE_FILE)
+vidmem.c: $(srcdir)/../shared/vidmem.c
+	$(LN_THE_FILE)
+sigio.c: $(srcdir)/../shared/sigio.c
+	$(LN_THE_FILE)
+
 if LINUX_ALPHA
 noinst_LTLIBRARIES += liblinuxev56.la
 
@@ -28,10 +38,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.c \
+		     posix_tty.c \
+                     vidmem.c \
+		     sigio.c \
                      $(ACPI_SRCS) \
                      $(APM_SRCS) \
                      $(LOGIND_SRCS)
diff --git a/hw/xfree86/os-support/solaris/.gitignore b/hw/xfree86/os-support/solaris/.gitignore
new file mode 100644
index 000000000000..e86ab97d9133
--- /dev/null
+++ b/hw/xfree86/os-support/solaris/.gitignore
@@ -0,0 +1,6 @@
+kmod_noop.c
+posix_tty.c
+sigio.c
+vidmem.c
+VTsw_noop.c
+apg_noop.c
diff --git a/hw/xfree86/os-support/solaris/Makefile.am b/hw/xfree86/os-support/solaris/Makefile.am
index e534bc8dc2c6..3e942f88d3ef 100644
--- a/hw/xfree86/os-support/solaris/Makefile.am
+++ b/hw/xfree86/os-support/solaris/Makefile.am
@@ -1,13 +1,27 @@
+CLEANFILES = kmod_noop.c posix_tty.c sigio.c vidmem.c VTsw_noop.c agp_noop.c
+kmod_noop.c: $(srcdir)/../shared/kmod_noop.c
+	$(LN_THE_FILE)
+posix_tty.c: $(srcdir)/../shared/posix_tty.c
+	$(LN_THE_FILE)
+sigio.c: $(srcdir)/../shared/sigio.c
+	$(LN_THE_FILE)
+vidmem.c: $(srcdir)/../shared/vidmem.c
+	$(LN_THE_FILE)
+VTsw_noop.c: $(srcdir)/../shared/VTsw_noop.c
+	$(LN_THE_FILE)
+apg_noop.c: $(srcdir)/../shared/agp_noop.c
+	$(LN_THE_FILE)
+
 if SOLARIS_VT
 VTSW_SRC = sun_VTsw.c
 else
-VTSW_SRC = $(srcdir)/../shared/VTsw_noop.c
+VTSW_SRC = VTsw_noop.c
 endif
 
 if AGP
 AGP_SRC = sun_agp.c
 else
-AGP_SRC = $(srcdir)/../shared/agp_noop.c
+AGP_SRC = agp_noop.c
 endif
 
 SOLARIS_INOUT_SRC = solaris- at SOLARIS_INOUT_ARCH@.S
@@ -19,10 +33,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.c \
+	posix_tty.c \
+	sigio.c \
+	vidmem.c \
 	$(VTSW_SRC)
 nodist_libsolaris_la_SOURCES = $(SOLARIS_INOUT_SRC)
 
diff --git a/hw/xfree86/os-support/stub/.gitignore b/hw/xfree86/os-support/stub/.gitignore
new file mode 100644
index 000000000000..d6916b828cce
--- /dev/null
+++ b/hw/xfree86/os-support/stub/.gitignore
@@ -0,0 +1,8 @@
+VTsw_noop.c
+agp_noop.c
+ioperm_noop.c
+kmod_noop.c
+pm_noop.c
+vidmem.c
+posix_tty.c
+sigio.c
diff --git a/hw/xfree86/os-support/stub/Makefile.am b/hw/xfree86/os-support/stub/Makefile.am
index 19468c6de281..4ae19bf920fb 100644
--- a/hw/xfree86/os-support/stub/Makefile.am
+++ b/hw/xfree86/os-support/stub/Makefile.am
@@ -1,18 +1,36 @@
 noinst_LTLIBRARIES = libstub.la
 
+CLEANFILES = VTsw_noop.c apg_noop.c ioperm_noop.c kmod_noop.c pm_noop.c vidmem.c posix_tty.c sigio.c
+VTsw_noop.c: $(srcdir)/../shared/VTsw_noop.c
+	$(LN_THE_FILE)
+agp_noop.c: $(srcdir)/../shared/agp_noop.c
+	$(LN_THE_FILE)
+ioperm_noop.c: $(srcdir)/../shared/ioperm_noop.c
+	$(LN_THE_FILE)
+kmod_noop.c: $(srcdir)/../shared/kmod_noop.c
+	$(LN_THE_FILE)
+pm_noop.c: $(srcdir)/../shared/pm_noop.c
+	$(LN_THE_FILE)
+vidmem.c: $(srcdir)/../shared/vidmem.c
+	$(LN_THE_FILE)
+posix_tty.c: $(srcdir)/../shared/posix_tty.c
+	$(LN_THE_FILE)
+sigio.c: $(srcdir)/../shared/sigio.c
+	$(LN_THE_FILE)
+
 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.c \
+	agp_noop.c \
+	ioperm_noop.c \
+	kmod_noop.c \
+	pm_noop.c \
+	vidmem.c \
+	posix_tty.c \
+	sigio.c \
 	stub_bell.c \
 	stub_init.c \
 	stub_video.c
diff --git a/hw/xfree86/utils/cvt/.gitignore b/hw/xfree86/utils/cvt/.gitignore
index a217c5563746..45191f12852b 100644
--- a/hw/xfree86/utils/cvt/.gitignore
+++ b/hw/xfree86/utils/cvt/.gitignore
@@ -1 +1,3 @@
 cvt
+xf86cvt.c
+xprintf.c
diff --git a/hw/xfree86/utils/cvt/Makefile.am b/hw/xfree86/utils/cvt/Makefile.am
index 26abeb40be9a..ac709bd251f9 100644
--- a/hw/xfree86/utils/cvt/Makefile.am
+++ b/hw/xfree86/utils/cvt/Makefile.am
@@ -29,7 +29,12 @@ AM_CPPFLAGS = $(XORG_INCS) \
 
 # gah
 cvt_SOURCES = cvt.c \
-	$(top_srcdir)/hw/xfree86/modes/xf86cvt.c \
-	$(top_srcdir)/os/xprintf.c
+	xf86cvt.c \
+	xprintf.c
+CLEANFILES = xf86cvt.c xprintf.c
+xf86cvt.c: $(top_srcdir)/hw/xfree86/modes/xf86cvt.c
+	$(LN_THE_FILE)
+xprintf.c: $(top_srcdir)/os/xprintf.c
+	$(LN_THE_FILE)
 
 cvt_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS)
diff --git a/hw/xnest/.gitignore b/hw/xnest/.gitignore
index b76c5a2d024d..c4a2bcabbdb4 100644
--- a/hw/xnest/.gitignore
+++ b/hw/xnest/.gitignore
@@ -1 +1,2 @@
 Xnest
+miinitext.c
diff --git a/hw/xnest/Makefile.am b/hw/xnest/Makefile.am
index eb550c0f7d67..d0efd83605cc 100644
--- a/hw/xnest/Makefile.am
+++ b/hw/xnest/Makefile.am
@@ -6,6 +6,10 @@ AM_CFLAGS = -DHAVE_XNEST_CONFIG_H \
             $(DIX_CFLAGS) \
             $(XNESTMODULES_CFLAGS)
 
+CLEANFILES = miinitext.c
+miinitext.c: $(top_srcdir)/mi/miinitext.c
+	$(LN_THE_FILE)
+
 SRCS =	Args.c \
 	Args.h \
 	Color.c \
@@ -41,7 +45,7 @@ SRCS =	Args.c \
 	XNPixmap.h \
 	XNWindow.h \
 	xnest-config.h \
-	$(top_srcdir)/mi/miinitext.c
+	miinitext.c
 
 XNEST_LIBS = \
         @XNEST_LIBS@ \
diff --git a/hw/xquartz/.gitignore b/hw/xquartz/.gitignore
new file mode 100644
index 000000000000..7e56ba00a3f9
--- /dev/null
+++ b/hw/xquartz/.gitignore
@@ -0,0 +1 @@
+miinitext.c
diff --git a/hw/xquartz/Makefile.am b/hw/xquartz/Makefile.am
index 4da896d76173..ea892ae8caf2 100644
--- a/hw/xquartz/Makefile.am
+++ b/hw/xquartz/Makefile.am
@@ -19,8 +19,12 @@ SUBDIRS = bundle . $(GL_DIR) xpr pbproxy mach-startup man
 
 DIST_SUBDIRS = bundle . GL xpr pbproxy mach-startup man
 
+CLEANFILES = miinitext.c
+miinitext.c: $(top_srcdir)/mi/miinitext.c
+	$(LN_THE_FILE)
+
 libXquartz_la_SOURCES = \
-	$(top_srcdir)/mi/miinitext.c \
+	miinitext.c \
 	X11Application.m \
 	X11Controller.m \
 	applewm.c \
diff --git a/hw/xquartz/mach-startup/.gitignore b/hw/xquartz/mach-startup/.gitignore
index 374abbfbebe7..9bc6152df62e 100644
--- a/hw/xquartz/mach-startup/.gitignore
+++ b/hw/xquartz/mach-startup/.gitignore
@@ -5,4 +5,4 @@ mach_startupServer.h
 mach_startupUser.c
 X11.bin
 Xquartz
-
+strndup.c
diff --git a/hw/xquartz/mach-startup/Makefile.am b/hw/xquartz/mach-startup/Makefile.am
index 77962b14d19c..71ba3a8195b9 100644
--- a/hw/xquartz/mach-startup/Makefile.am
+++ b/hw/xquartz/mach-startup/Makefile.am
@@ -6,6 +6,8 @@ AM_CPPFLAGS = \
 
 AM_CFLAGS = $(DIX_CFLAGS)
 
+CLEANFILES=
+
 x11appdir = $(APPLE_APPLICATIONS_DIR)/$(APPLE_APPLICATION_NAME).app/Contents/MacOS
 x11app_PROGRAMS = X11.bin
 
@@ -16,8 +18,11 @@ 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.c
 #endif
+strndup.c: $(top_srcdir)/os/strndup.c
+	$(LN_THE_FILE)
+CLEANFILES += strndup.c
 
 nodist_X11_bin_SOURCES = \
 	mach_startupServer.c \
@@ -81,7 +86,7 @@ BUILT_SOURCES = \
 	mach_startupServer.h \
 	mach_startup.h
 
-CLEANFILES = \
+CLEANFILES += \
 	$(BUILT_SOURCES)
 
 $(BUILT_SOURCES): $(srcdir)/mach_startup.defs
diff --git a/hw/xwayland/.gitignore b/hw/xwayland/.gitignore
index 38ada56d1774..3c4c9d5845ac 100644
--- a/hw/xwayland/.gitignore
+++ b/hw/xwayland/.gitignore
@@ -5,3 +5,6 @@ pointer-constraints-unstable-v1-client-protocol.h
 pointer-constraints-unstable-v1-protocol.c
 relative-pointer-unstable-v1-client-protocol.h
 relative-pointer-unstable-v1-protocol.c
+dpmsstubs.c
+stubs.c
+miinitext.c
diff --git a/hw/xwayland/Makefile.am b/hw/xwayland/Makefile.am
index a3c9fce48226..be240d9cff22 100644
--- a/hw/xwayland/Makefile.am
+++ b/hw/xwayland/Makefile.am
@@ -1,4 +1,5 @@
 bin_PROGRAMS = Xwayland
+CLEANFILES=
 
 Xwayland_CFLAGS =				\
 	-I$(top_srcdir)/glamor			\
@@ -9,6 +10,14 @@ Xwayland_CFLAGS =				\
 	$(GLAMOR_CFLAGS)			\
 	$(GBM_CFLAGS)
 
+CLEANFILES += dpmsstubs.c stubs.c miinitext.c
+dpmsstubs.c: $(top_srcdir)/Xext/dpmsstubs.c
+	$(LN_THE_FILE)
+stubs.c: $(top_srcdir)/Xi/stubs.c
+	$(LN_THE_FILE)
+miinitext.c: $(top_srcdir)/mi/miinitext.c
+	$(LN_THE_FILE)
+
 Xwayland_SOURCES =				\
 	xwayland.c				\
 	xwayland-input.c			\
@@ -18,9 +27,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.c		\
+	stubs.c		\
+	miinitext.c
 
 Xwayland_LDADD =				\
 	$(glamor_lib)				\
@@ -59,7 +68,7 @@ Xwayland_built_sources +=					\
 	pointer-constraints-unstable-v1-protocol.c
 
 nodist_Xwayland_SOURCES = $(Xwayland_built_sources)
-CLEANFILES = $(Xwayland_built_sources)
+CLEANFILES += $(Xwayland_built_sources)
 
 EXTRA_DIST = drm.xml
 
diff --git a/hw/xwin/.gitignore b/hw/xwin/.gitignore
index bc4986cb4450..ad3e38120c5c 100644
--- a/hw/xwin/.gitignore
+++ b/hw/xwin/.gitignore
@@ -1,3 +1,4 @@
 winprefslex.c
 winprefsyacc.c
 winprefsyacc.h
+miinitext.c
diff --git a/hw/xwin/Makefile.am b/hw/xwin/Makefile.am
index 0846230b00b2..6a536789ebb9 100644
--- a/hw/xwin/Makefile.am
+++ b/hw/xwin/Makefile.am
@@ -1,4 +1,5 @@
 bin_PROGRAMS = XWin
+CLEANFILES =
 
 if XWIN_CLIPBOARD
 SRCS_CLIPBOARD = \
@@ -112,7 +113,7 @@ SRCS =	InitInput.c \
 	windisplay.c \
 	windisplay.h \
 	XWin.rc \
-	$(top_srcdir)/mi/miinitext.c \
+	miinitext.c \
 	$(SRCS_CLIPBOARD) \
 	$(SRCS_MULTIWINDOW) \
 	$(SRCS_MULTIWINDOWEXTWM) \
@@ -121,6 +122,10 @@ SRCS =	InitInput.c \
 	$(SRCS_RANDR) \
 	$(SRCS_XV)
 
+CLEANFILES += miinitext.c
+miinitext.c: $(top_srcdir)/mi/miinitext.c
+	$(LN_THE_FILE)
+
  DEFS = $(DEFS_CLIPBOARD) \
 	$(DEFS_GLX_WINDOWS) \
 	$(DEFS_MULTIWINDOW) \
@@ -172,7 +177,7 @@ winprefsyacc.h: winprefsyacc.c
 winprefslex.c: winprefslex.l winprefsyacc.c winprefsyacc.h
 
 BUILT_SOURCES = winprefsyacc.h winprefsyacc.c winprefslex.c
-CLEANFILES = $(BUILT_SOURCES)
+CLEANFILES += $(BUILT_SOURCES)
 
 AM_YFLAGS = -d
 AM_LFLAGS = -i
diff --git a/test/.gitignore b/test/.gitignore
index 5fd66e3f4ec7..d3e68ca88a18 100644
--- a/test/.gitignore
+++ b/test/.gitignore
@@ -5,3 +5,4 @@ piglit-results
 simple-xinit
 *.log
 *.trs
+.dirstamp
diff --git a/test/Makefile.am b/test/Makefile.am
index e7fe587bb858..e29421a0ec96 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -85,6 +85,10 @@ if HAVE_LD_WRAP
 
 tests_CPPFLAGS += -DLDWRAP_TESTS
 
+CLEANFILES += miinitext.c
+miinitext.c: $(top_srcdir)/mi/miinitext.c
+	$(LN_THE_FILE)
+
 tests_SOURCES += \
 	xi1/protocol-xchangedevicecontrol.c \
 	xi2/protocol-common.c \
@@ -168,7 +172,7 @@ else !XORG
 
 nodist_tests_SOURCES = \
             ddxstubs.c \
-            $(top_srcdir)/mi/miinitext.c
+            miinitext.c
 
 tests_LDADD += \
             $(top_builddir)/damageext/libdamageext.la \
-- 
2.9.2



More information about the xorg-devel mailing list