diff mbox

[04.1/11] SQUASH: tests: misc cleanups

Message ID 1422545241-2861-1-git-send-email-emil.l.velikov@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Emil Velikov Jan. 29, 2015, 3:27 p.m. UTC
Cairo
 - Add cflags only when needed (tests/util).
 - Leave the link against cairo for the final object, not the static
library.
 - Use Makefile.sources for the sources list.
 - Drop unused includes

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 tests/modetest/Makefile.am  |  1 -
 tests/modetest/buffers.c    |  5 -----
 tests/util/Makefile.am      | 12 +++---------
 tests/util/Makefile.sources |  6 ++++++
 4 files changed, 9 insertions(+), 15 deletions(-)
 create mode 100644 tests/util/Makefile.sources
diff mbox

Patch

diff --git a/tests/modetest/Makefile.am b/tests/modetest/Makefile.am
index 88fde2e..40dad3e 100644
--- a/tests/modetest/Makefile.am
+++ b/tests/modetest/Makefile.am
@@ -23,7 +23,6 @@  modetest_LDADD = \
 	-lpthread
 
 if HAVE_CAIRO
-AM_CFLAGS += $(CAIRO_CFLAGS)
 modetest_LDADD += $(CAIRO_LIBS)
 endif
 
diff --git a/tests/modetest/buffers.c b/tests/modetest/buffers.c
index 4db4e9a..2db538c 100644
--- a/tests/modetest/buffers.c
+++ b/tests/modetest/buffers.c
@@ -44,11 +44,6 @@ 
 
 #include "buffers.h"
 
-#ifdef HAVE_CAIRO
-#include <math.h>
-#include <cairo.h>
-#endif
-
 struct bo
 {
 	int fd;
diff --git a/tests/util/Makefile.am b/tests/util/Makefile.am
index 1a2519f..f8e0b17 100644
--- a/tests/util/Makefile.am
+++ b/tests/util/Makefile.am
@@ -1,3 +1,5 @@ 
+include Makefile.sources
+
 noinst_LTLIBRARIES = \
 	libutil.la
 
@@ -8,12 +10,4 @@  libutil_la_CPPFLAGS = \
 libutil_la_CFLAGS = \
 	$(CAIRO_CFLAGS)
 
-libutil_la_SOURCES = \
-	common.h \
-	format.c \
-	format.h \
-	pattern.c \
-	pattern.h
-
-libutil_la_LIBADD = \
-	$(CAIRO_LIBS)
+libutil_la_SOURCES = $(UTIL_FILES)
diff --git a/tests/util/Makefile.sources b/tests/util/Makefile.sources
new file mode 100644
index 0000000..e91fa72
--- /dev/null
+++ b/tests/util/Makefile.sources
@@ -0,0 +1,6 @@ 
+UTIL_FILES := \
+	common.h \
+	format.c \
+	format.h \
+	pattern.c \
+	pattern.h