[PATCH 1/3] Don't use empty source files

Dan Nicholson dbn.lists at gmail.com
Tue Jun 14 20:20:33 PDT 2011


When an empty _SOURCES variable is declared, automake will recognize that
only linking is needed.

Signed-off-by: Dan Nicholson <dbn.lists at gmail.com>
---
 dix/.gitignore                    |    1 -
 dix/Makefile.am                   |    6 ++----
 hw/xfree86/.gitignore             |    2 --
 hw/xfree86/Makefile.am            |   11 +++--------
 hw/xfree86/os-support/.gitignore  |    2 --
 hw/xfree86/os-support/Makefile.am |    7 +------
 os/Makefile.am                    |    6 +-----
 test/.gitignore                   |    2 --
 test/Makefile.am                  |    6 +-----
 9 files changed, 8 insertions(+), 35 deletions(-)
 delete mode 100644 hw/xfree86/os-support/.gitignore

diff --git a/dix/.gitignore b/dix/.gitignore
index 63ee767..c1b4f20 100644
--- a/dix/.gitignore
+++ b/dix/.gitignore
@@ -1,3 +1,2 @@
 #		Add & Override for this directory and it's subdirectories
-dix.c
 Xserver-dtrace.h
diff --git a/dix/Makefile.am b/dix/Makefile.am
index 59e512b..a0eff46 100644
--- a/dix/Makefile.am
+++ b/dix/Makefile.am
@@ -65,11 +65,9 @@ dtrace-dix.o: $(top_srcdir)/dix/Xserver.d $(am_libdix_la_OBJECTS)
 
 noinst_PROGRAMS = dix.O
 
+dix_O_SOURCES =
 dix.O: dtrace-dix.o $(am_libdix_la_OBJECTS)
 	$(AM_V_GEN)ld -r -o $@ $(am_libdix_la_OBJECTS:%.lo=.libs/%.o)
 endif
 
-dix.c:
-	touch $@
-
-CLEANFILES = dix.c Xserver-dtrace.h
+CLEANFILES = Xserver-dtrace.h
diff --git a/hw/xfree86/.gitignore b/hw/xfree86/.gitignore
index 2ddca49..f9b3f4a 100644
--- a/hw/xfree86/.gitignore
+++ b/hw/xfree86/.gitignore
@@ -1,4 +1,2 @@
-libxorg.c
 Xorg
-xorg.c
 xorg.conf.example
diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am
index c23b1fd..ab79873 100644
--- a/hw/xfree86/Makefile.am
+++ b/hw/xfree86/Makefile.am
@@ -40,13 +40,13 @@ DIST_SUBDIRS = common ddc i2c x86emu int10 fbdevhw os-support \
 	       utils doc
 
 bin_PROGRAMS = Xorg
-Xorg_SOURCES = xorg.c
+Xorg_SOURCES =
 
 AM_CFLAGS = $(DIX_CFLAGS) @XORG_CFLAGS@
 INCLUDES = @XORG_INCS@ 
 
 noinst_LTLIBRARIES = libxorg.la
-libxorg_la_SOURCES = libxorg.c
+libxorg_la_SOURCES =
 libxorg_la_LIBADD = \
             $(XSERVER_LIBS) \
             loader/libloader.la \
@@ -65,18 +65,13 @@ libxorg_la_LIBADD = \
 
 libxorg_la_DEPENDENCIES = $(libxorg_la_LIBADD)
 
-libxorg.c xorg.c:
-	touch $@
-
-DISTCLEANFILES = libxorg.c xorg.c
-
 Xorg_DEPENDENCIES = libxorg.la
 Xorg_LDADD = $(MAIN_LIB) libxorg.la $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS)
 
 Xorg_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
 
 BUILT_SOURCES = xorg.conf.example
-DISTCLEANFILES += xorg.conf.example
+DISTCLEANFILES = xorg.conf.example
 EXTRA_DIST = xorgconf.cpp
 
 if SPECIAL_DTRACE_OBJECTS
diff --git a/hw/xfree86/os-support/.gitignore b/hw/xfree86/os-support/.gitignore
deleted file mode 100644
index f2206cd..0000000
--- a/hw/xfree86/os-support/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-#		Add & Override for this directory and it's subdirectories
-xorgos.c
diff --git a/hw/xfree86/os-support/Makefile.am b/hw/xfree86/os-support/Makefile.am
index 3af4328..348b7ff 100644
--- a/hw/xfree86/os-support/Makefile.am
+++ b/hw/xfree86/os-support/Makefile.am
@@ -9,18 +9,13 @@ EXTRA_DIST = int10Defines.h xf86OSpriv.h
 # as one library, otherwise libtool will actively defeat your attempts to
 # list them multiple times on the link line.
 noinst_LTLIBRARIES = libxorgos.la
-libxorgos_la_SOURCES = xorgos.c
+libxorgos_la_SOURCES =
 libxorgos_la_LIBADD = @XORG_OS_SUBDIR@/lib at XORG_OS_SUBDIR@.la \
                       bus/libbus.la \
                       misc/libmisc.la
 
 AM_CFLAGS = $(DIX_CFLAGS) 
 
-xorgos.c:
-	touch $@
-
-DISTCLEANFILES = xorgos.c
-
 # FIXME: These don't seem to be used anywhere
 EXTRA_DIST += \
 	shared/bios_devmem.c
diff --git a/os/Makefile.am b/os/Makefile.am
index 3e4f2c5..3411f0b 100644
--- a/os/Makefile.am
+++ b/os/Makefile.am
@@ -57,11 +57,7 @@ dtrace.o: $(top_srcdir)/dix/Xserver.d $(am_libos_la_OBJECTS)
 
 noinst_PROGRAMS = os.O
 
+os_O_SOURCES =
 os.O: dtrace.o $(am_libos_la_OBJECTS)
 	$(AM_V_GEN)ld -r -o $@ dtrace.o .libs/*.o
 endif
-
-os.c:
-	touch $@
-
-CLEANFILES = os.c
diff --git a/test/.gitignore b/test/.gitignore
index db8c5f3..2c7f6d9 100644
--- a/test/.gitignore
+++ b/test/.gitignore
@@ -1,6 +1,4 @@
 #		Add & Override for this directory and it's subdirectories
-libxservertest.c
-
 input
 xkb
 xtest
diff --git a/test/Makefile.am b/test/Makefile.am
index 456221e..4094f7b 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -17,6 +17,7 @@ xkb_LDADD=$(TEST_LDADD)
 input_LDADD=$(TEST_LDADD)
 xtest_LDADD=$(TEST_LDADD)
 
+libxservertest_la_SOURCES =
 libxservertest_la_LIBADD = \
             $(XSERVER_LIBS) \
             $(top_builddir)/hw/xfree86/loader/libloader.la \
@@ -34,8 +35,3 @@ libxservertest_la_LIBADD = \
             $(top_builddir)/os/libos.la \
             @XORG_LIBS@
 endif
-
-CLEANFILES=libxservertest.c
-
-libxservertest.c:
-	touch $@
-- 
1.7.3.4



More information about the xorg-devel mailing list