Makefile.am 5.17 KB
Newer Older
1 2
# Prevent parallel builds for the tests, as e.g. done by make -j check
# The tests must not be run in parallel or in a different order as specified
3
.NOTPARALLEL: check
4

5 6 7 8 9 10
if PLATFORM_OSX
xobjective_c = "-xobjective-c"
xobjective_cxx = "-xobjective-c++"
xnone = "-xnone"
endif

11 12 13 14 15
SUBDIRS = \
	files		\
	gimpdir		\
	gimpdir-empty

16 17 18
# Don't mess with user's gimpdir. Pass in the abs top srcdir to the
# tests through an environment variable so they can set the gimpdir
# they want to use
19
TESTS_ENVIRONMENT = \
20
	GIMP_TESTING_ABS_TOP_SRCDIR=@abs_top_srcdir@ \
21 22 23
	GIMP_TESTING_ABS_TOP_BUILDDIR=@abs_top_builddir@ \
	GIMP_TESTING_PLUGINDIRS=@abs_top_builddir@/plug-ins/common \
	GIMP_TESTING_PLUGINDIRS_BASENAME_IGNORES=mkgen.pl
24

25 26
# Run tests with xvfb-run if available
if HAVE_XVFB_RUN
27
TESTS_ENVIRONMENT += $(XVFB_RUN) --auto-servernum --server-args="-screen 0 1280x1024x24"
28 29 30
endif


Michael Natterer's avatar
Michael Natterer committed
31
TESTS = \
32 33 34 35
	test-core					\
	test-gimpidtable				\
	test-save-and-export				\
	test-session-2-8-compatibility-multi-window	\
36
	test-session-2-8-compatibility-single-window	\
37
	test-single-window-mode				\
38
	test-tools					\
39
	test-ui						\
40
	test-xcf
Michael Natterer's avatar
Michael Natterer committed
41

42
EXTRA_PROGRAMS = $(TESTS)
43
CLEANFILES = $(EXTRA_PROGRAMS)
44

45
$(TESTS): gimpdir-output gimp-test-icon-theme
46

47 48
noinst_LIBRARIES = libgimpapptestutils.a
libgimpapptestutils_a_SOURCES = \
49 50 51 52
	gimp-app-test-utils.c		\
	gimp-app-test-utils.h		\
	gimp-test-session-utils.c	\
	gimp-test-session-utils.h
53

54 55 56 57 58 59 60 61
libgimpbase = $(top_builddir)/libgimpbase/libgimpbase-$(GIMP_API_VERSION).la
libgimpconfig = $(top_builddir)/libgimpconfig/libgimpconfig-$(GIMP_API_VERSION).la
libgimpcolor = $(top_builddir)/libgimpcolor/libgimpcolor-$(GIMP_API_VERSION).la
libgimpmath = $(top_builddir)/libgimpmath/libgimpmath-$(GIMP_API_VERSION).la
libgimpmodule = $(top_builddir)/libgimpmodule/libgimpmodule-$(GIMP_API_VERSION).la
libgimpwidgets = $(top_builddir)/libgimpwidgets/libgimpwidgets-$(GIMP_API_VERSION).la
libgimpthumb = $(top_builddir)/libgimpthumb/libgimpthumb-$(GIMP_API_VERSION).la

Ell's avatar
Ell committed
62 63 64 65
if PLATFORM_LINUX
libdl = -ldl
endif

66 67 68 69 70
if OS_WIN32
else
libm = -lm
endif

71 72 73 74
AM_CPPFLAGS = \
	-I$(top_srcdir)		\
	-I$(top_srcdir)/app	\
	$(PANGOCAIRO_CFLAGS)	\
75 76
	$(GTK_CFLAGS)		\
	$(DBUS_GLIB_CFLAGS)	\
77
	$(GEGL_CFLAGS)		\
78
	$(xobjective_c)		\
79 80
	-I$(includedir)

81
# We need this due to circular dependencies
82
AM_LDFLAGS = \
83 84 85 86
	-Wl,-u,$(SYMPREFIX)gimp_vectors_undo_get_type		\
	-Wl,-u,$(SYMPREFIX)gimp_vectors_mod_undo_get_type	\
	-Wl,-u,$(SYMPREFIX)gimp_param_spec_duplicate		\
	-Wl,-u,$(SYMPREFIX)gimp_operations_init			\
87 88 89 90
	-Wl,-u,$(SYMPREFIX)xcf_init				\
	-Wl,-u,$(SYMPREFIX)internal_procs_init			\
	-Wl,-u,$(SYMPREFIX)gimp_plug_in_manager_restore		\
	-Wl,-u,$(SYMPREFIX)gimp_pdb_compat_param_spec		\
91
	-Wl,-u,$(SYMPREFIX)gimp_layer_mode_is_legacy		\
92
	-Wl,-u,$(SYMPREFIX)gui_init				\
93
	-Wl,-u,$(SYMPREFIX)gimp_tool_cursors_get_resource	\
94
	-Wl,-u,$(SYMPREFIX)gimp_lebl_dialog
95

96 97 98
# Note that we have some duplicate entries here too to work around
# circular dependencies and systems on the same architectural layer as
# an alternative to LDFLAGS above
99
LDADD = \
100 101 102 103 104 105 106
	../gui/libappgui.a						\
	../tools/libapptools.a						\
	../dialogs/libappdialogs.a					\
	../menus/libappmenus.a						\
	../actions/libappactions.a					\
	../dialogs/libappdialogs.a					\
	../display/libappdisplay.a					\
107
	../propgui/libapppropgui.a					\
108 109 110 111 112 113 114 115 116 117 118 119 120
	../widgets/libappwidgets.a					\
	../xcf/libappxcf.a						\
	../pdb/libappinternal-procs.a					\
	../pdb/libapppdb.a						\
	../plug-in/libappplug-in.a					\
	../vectors/libappvectors.a					\
	../core/libappcore.a						\
	../file/libappfile.a						\
	../text/libapptext.a						\
	../paint/libapppaint.a						\
	../config/libappconfig.a					\
	../libapp.a							\
	../gegl/libappgegl.a						\
Ell's avatar
Ell committed
121
	../operations/libappoperations.a				\
122 123 124 125 126 127 128 129 130 131 132 133
	../operations/layer-modes/libapplayermodes.a			\
	../operations/layer-modes-legacy/libapplayermodeslegacy.a	\
	libgimpapptestutils.a						\
	$(libgimpwidgets)						\
	$(libgimpconfig)						\
	$(libgimpmath)							\
	$(libgimpthumb)							\
	$(libgimpcolor)							\
	$(libgimpmodule)						\
	$(libgimpbase)							\
	$(GIMPICONRC)							\
	$(GTK_LIBS)							\
134
	$(APPSTREAM_GLIB_LIBS)						\
135
	$(GTK_MAC_INTEGRATION_LIBS)					\
136 137 138 139 140 141 142 143 144 145 146 147 148
	$(DBUS_GLIB_LIBS)						\
	$(GDK_PIXBUF_LIBS)						\
	$(FREETYPE_LIBS)						\
	$(FONTCONFIG_LIBS)						\
	$(PANGOCAIRO_LIBS)						\
	$(HARFBUZZ_LIBS)						\
	$(CAIRO_LIBS)							\
	$(GEGL_LIBS)							\
	$(GIO_LIBS)							\
	$(GEXIV2_LIBS)							\
	$(Z_LIBS)							\
	$(JSON_C_LIBS)							\
	$(LIBMYPAINT_LIBS)						\
149
	$(LIBBACKTRACE_LIBS)						\
Ell's avatar
Ell committed
150
	$(LIBUNWIND_LIBS)						\
151 152
	$(INTLLIBS)							\
	$(RT_LIBS)							\
Ell's avatar
Ell committed
153 154
	$(libm)								\
	$(libdl)
155

156 157 158 159 160
gimpdir-output:
	mkdir -p gimpdir-output
	mkdir -p gimpdir-output/brushes
	mkdir -p gimpdir-output/patterns
	mkdir -p gimpdir-output/gradients
161

162
gimp-test-icon-theme:
163 164
	mkdir -p $$(echo $$(find $(top_srcdir)/icons/Color -name [0-9][0-9] -type d | sed 's@.*/\([0-9][0-9]\)$$@gimp-test-icon-theme/hicolor/\1x\1@'))
	for dir in $$(echo $$(find $(top_srcdir)/icons/Color/ -name [0-9][0-9] -type d | sed 's@.*/\([0-9][0-9]\)$$@\1@')); do \
165
		(cd gimp-test-icon-theme/hicolor/$${dir}x$${dir}/ && \
166
		$(LN_S) $(abs_top_srcdir)/icons/Color/$${dir} apps); \
167
	done
168
	(cd gimp-test-icon-theme/hicolor && $(LN_S) $(abs_top_srcdir)/icons/Color/index.theme index.theme)
169

170
clean-local:
171
	rm -rf gimpdir-output
172
	rm -fr gimp-test-icon-theme