2018-06-29 15:49:06 +08:00
|
|
|
# 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
|
2018-06-29 17:15:44 +08:00
|
|
|
.NOTPARALLEL: check
|
2018-06-29 15:49:06 +08:00
|
|
|
|
2018-11-24 06:06:12 +08:00
|
|
|
if PLATFORM_OSX
|
|
|
|
xobjective_c = "-xobjective-c"
|
|
|
|
xobjective_cxx = "-xobjective-c++"
|
|
|
|
xnone = "-xnone"
|
|
|
|
endif
|
|
|
|
|
2010-01-08 20:37:25 +08:00
|
|
|
SUBDIRS = \
|
|
|
|
files \
|
|
|
|
gimpdir \
|
|
|
|
gimpdir-empty
|
|
|
|
|
2009-12-25 06:01:48 +08:00
|
|
|
# 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
|
2009-09-09 01:32:39 +08:00
|
|
|
TESTS_ENVIRONMENT = \
|
2010-06-20 18:25:32 +08:00
|
|
|
GIMP_TESTING_ABS_TOP_SRCDIR=@abs_top_srcdir@ \
|
2011-04-08 14:01:48 +08:00
|
|
|
GIMP_TESTING_ABS_TOP_BUILDDIR=@abs_top_builddir@ \
|
|
|
|
GIMP_TESTING_PLUGINDIRS=@abs_top_builddir@/plug-ins/common \
|
|
|
|
GIMP_TESTING_PLUGINDIRS_BASENAME_IGNORES=mkgen.pl
|
2009-09-09 01:32:39 +08:00
|
|
|
|
2010-10-31 15:03:51 +08:00
|
|
|
# Run tests with xvfb-run if available
|
|
|
|
if HAVE_XVFB_RUN
|
2013-05-13 07:36:27 +08:00
|
|
|
TESTS_ENVIRONMENT += $(XVFB_RUN) --auto-servernum --server-args="-screen 0 1280x1024x24"
|
2010-10-31 15:03:51 +08:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
2009-09-08 01:09:48 +08:00
|
|
|
TESTS = \
|
2011-05-19 03:06:20 +08:00
|
|
|
test-core \
|
|
|
|
test-gimpidtable \
|
|
|
|
test-save-and-export \
|
|
|
|
test-session-2-8-compatibility-multi-window \
|
2011-05-19 13:10:22 +08:00
|
|
|
test-session-2-8-compatibility-single-window \
|
2011-07-20 22:29:45 +08:00
|
|
|
test-single-window-mode \
|
2011-05-19 03:06:20 +08:00
|
|
|
test-tools \
|
2011-05-19 13:10:22 +08:00
|
|
|
test-ui \
|
2010-01-03 06:10:54 +08:00
|
|
|
test-xcf
|
2009-09-08 01:09:48 +08:00
|
|
|
|
2009-09-05 21:52:01 +08:00
|
|
|
EXTRA_PROGRAMS = $(TESTS)
|
2010-06-21 02:01:19 +08:00
|
|
|
CLEANFILES = $(EXTRA_PROGRAMS)
|
2009-09-05 21:52:01 +08:00
|
|
|
|
2014-08-15 11:25:43 +08:00
|
|
|
$(TESTS): gimpdir-output gimp-test-icon-theme
|
2010-01-30 14:17:35 +08:00
|
|
|
|
2009-12-25 06:01:48 +08:00
|
|
|
noinst_LIBRARIES = libgimpapptestutils.a
|
|
|
|
libgimpapptestutils_a_SOURCES = \
|
2011-05-19 03:06:20 +08:00
|
|
|
gimp-app-test-utils.c \
|
|
|
|
gimp-app-test-utils.h \
|
|
|
|
gimp-test-session-utils.c \
|
|
|
|
gimp-test-session-utils.h
|
2009-12-25 06:01:48 +08:00
|
|
|
|
2009-09-05 21:52:01 +08:00
|
|
|
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
|
|
|
|
|
2018-09-02 16:55:40 +08:00
|
|
|
if PLATFORM_LINUX
|
|
|
|
libdl = -ldl
|
|
|
|
endif
|
|
|
|
|
2015-07-16 20:18:55 +08:00
|
|
|
if OS_WIN32
|
|
|
|
else
|
|
|
|
libm = -lm
|
|
|
|
endif
|
|
|
|
|
2009-09-05 21:52:01 +08:00
|
|
|
AM_CPPFLAGS = \
|
|
|
|
-I$(top_srcdir) \
|
|
|
|
-I$(top_srcdir)/app \
|
|
|
|
$(PANGOCAIRO_CFLAGS) \
|
2009-09-09 01:32:39 +08:00
|
|
|
$(GTK_CFLAGS) \
|
2009-09-05 21:52:01 +08:00
|
|
|
$(GEGL_CFLAGS) \
|
2018-11-24 06:06:12 +08:00
|
|
|
$(xobjective_c) \
|
2009-09-05 21:52:01 +08:00
|
|
|
-I$(includedir)
|
|
|
|
|
2015-08-28 03:44:15 +08:00
|
|
|
# We need this due to circular dependencies
|
2009-09-05 21:52:01 +08:00
|
|
|
AM_LDFLAGS = \
|
2015-08-28 03:44:15 +08:00
|
|
|
-Wl,-u,$(SYMPREFIX)gimp_vectors_undo_get_type \
|
|
|
|
-Wl,-u,$(SYMPREFIX)gimp_vectors_mod_undo_get_type \
|
2020-01-17 18:15:53 +08:00
|
|
|
-Wl,-u,$(SYMPREFIX)gimp_config_param_spec_duplicate \
|
2015-08-28 03:44:15 +08:00
|
|
|
-Wl,-u,$(SYMPREFIX)gimp_operations_init \
|
2012-05-21 01:29:44 +08:00
|
|
|
-Wl,-u,$(SYMPREFIX)xcf_init \
|
|
|
|
-Wl,-u,$(SYMPREFIX)internal_procs_init \
|
2019-08-30 17:42:14 +08:00
|
|
|
-Wl,-u,$(SYMPREFIX)gimp_pdb_compat_procs_register \
|
2012-05-21 01:29:44 +08:00
|
|
|
-Wl,-u,$(SYMPREFIX)gimp_plug_in_manager_restore \
|
2017-01-31 08:43:48 +08:00
|
|
|
-Wl,-u,$(SYMPREFIX)gimp_layer_mode_is_legacy \
|
2012-05-21 01:29:44 +08:00
|
|
|
-Wl,-u,$(SYMPREFIX)gui_init \
|
2018-05-29 06:44:51 +08:00
|
|
|
-Wl,-u,$(SYMPREFIX)gimp_tool_cursors_get_resource \
|
2019-01-06 20:06:49 +08:00
|
|
|
-Wl,-u,$(SYMPREFIX)gimp_lebl_dialog
|
2009-09-05 21:52:01 +08:00
|
|
|
|
2009-09-09 01:32:39 +08:00
|
|
|
# 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
|
2009-09-05 21:52:01 +08:00
|
|
|
LDADD = \
|
2017-01-10 17:43:24 +08:00
|
|
|
../gui/libappgui.a \
|
|
|
|
../tools/libapptools.a \
|
|
|
|
../dialogs/libappdialogs.a \
|
|
|
|
../menus/libappmenus.a \
|
|
|
|
../actions/libappactions.a \
|
|
|
|
../dialogs/libappdialogs.a \
|
|
|
|
../display/libappdisplay.a \
|
2017-07-03 18:29:41 +08:00
|
|
|
../propgui/libapppropgui.a \
|
2017-01-10 17:43:24 +08:00
|
|
|
../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 \
|
2019-02-13 02:53:18 +08:00
|
|
|
../file-data/libappfile-data.a \
|
2017-01-10 17:43:24 +08:00
|
|
|
../text/libapptext.a \
|
|
|
|
../paint/libapppaint.a \
|
|
|
|
../config/libappconfig.a \
|
|
|
|
../libapp.a \
|
|
|
|
../gegl/libappgegl.a \
|
app: layer mode code shuffling
Commit 3635cf04ab69bafb76d7583da804f580f2d5fbf3 moved the special
handling of bottom-layer compositing to GimpOperationLayerMode.
This required giving the op more control over the process()
function of its subclasses. As a temporary workaround, the commit
bypassed the subclasses entirely, using "gimp:layer-mode" for all
modes. This is the reckoning :)
Add a process() virtual function to GimpOperationLayerMode, which
its subclasses should override instead of
GeglOperationPointComposer3's process() functions. Reinstate the
subclasses (by returning the correct op in
gimp_layer_mode_get_oepration()), and have them override this
function.
Improve the way gimp_operation_layer_mode_process() dispatches to
the actual process function, to slightly lower its overhead and
fix some thread-safety issues.
Remove the "function" field of the layer-mode info array, and have
gimp_layer_mode_get_function() return the
GimpOperationLayerMode::process() function of the corresponding
op's class (caching the result, to keep it cheap.) This reduces
redundancy, allows us to make the ops' process() functions private,
and simplifies SSE dispatching (only used by NORMAL mode,
currently.)
Move the blend and composite functions of the non-specialized
layer modes to gimpoperationlayermode-{blend,composite}.[hc],
respectively, to improve code organization.
Move the SSE2 composite functions to a separate file, so that they
can be built as part of libapplayermodes_sse2, allowing
libapplayermodes to be built without SSE2 compiler flags. This
allows building GIMP with SSE acceleration enabled, while running
the resulting binary on a target with no SSE accelration.
Add a "blend_function" field to the layer-mode info array, and use
it to specify the blend function for the non-specialized modes.
This replaces the separate switch() statement that we used
previously.
Remove the "affected_region" field of the layer-mode info array.
We don't need it anymore, since we can go back to using
GimpOperationLayerMode's virtual get_affected_region() function.
Last but not least, a bunch of code cleanups and consistency
adjustments.
2017-08-17 22:26:49 +08:00
|
|
|
../operations/libappoperations.a \
|
2017-01-10 17:43:24 +08:00
|
|
|
../operations/layer-modes/libapplayermodes.a \
|
|
|
|
../operations/layer-modes-legacy/libapplayermodeslegacy.a \
|
|
|
|
libgimpapptestutils.a \
|
|
|
|
$(libgimpwidgets) \
|
|
|
|
$(libgimpconfig) \
|
|
|
|
$(libgimpmath) \
|
|
|
|
$(libgimpthumb) \
|
|
|
|
$(libgimpcolor) \
|
|
|
|
$(libgimpmodule) \
|
|
|
|
$(libgimpbase) \
|
|
|
|
$(GIMPICONRC) \
|
|
|
|
$(GTK_LIBS) \
|
2018-07-06 19:26:07 +08:00
|
|
|
$(APPSTREAM_GLIB_LIBS) \
|
2018-11-23 17:45:39 +08:00
|
|
|
$(GTK_MAC_INTEGRATION_LIBS) \
|
2017-01-10 17:43:24 +08:00
|
|
|
$(GDK_PIXBUF_LIBS) \
|
|
|
|
$(FREETYPE_LIBS) \
|
|
|
|
$(FONTCONFIG_LIBS) \
|
|
|
|
$(PANGOCAIRO_LIBS) \
|
|
|
|
$(HARFBUZZ_LIBS) \
|
|
|
|
$(CAIRO_LIBS) \
|
|
|
|
$(GEGL_LIBS) \
|
|
|
|
$(GIO_LIBS) \
|
|
|
|
$(GEXIV2_LIBS) \
|
|
|
|
$(Z_LIBS) \
|
|
|
|
$(JSON_C_LIBS) \
|
2019-05-25 22:02:00 +08:00
|
|
|
$(LIBARCHIVE_LIBS) \
|
2017-01-10 17:43:24 +08:00
|
|
|
$(LIBMYPAINT_LIBS) \
|
2018-09-23 10:33:44 +08:00
|
|
|
$(LIBBACKTRACE_LIBS) \
|
2018-09-02 16:55:40 +08:00
|
|
|
$(LIBUNWIND_LIBS) \
|
2017-01-10 17:43:24 +08:00
|
|
|
$(INTLLIBS) \
|
|
|
|
$(RT_LIBS) \
|
2018-09-02 16:55:40 +08:00
|
|
|
$(libm) \
|
|
|
|
$(libdl)
|
2009-09-05 21:52:01 +08:00
|
|
|
|
2010-01-30 14:17:35 +08:00
|
|
|
gimpdir-output:
|
|
|
|
mkdir -p gimpdir-output
|
|
|
|
mkdir -p gimpdir-output/brushes
|
|
|
|
mkdir -p gimpdir-output/patterns
|
|
|
|
mkdir -p gimpdir-output/gradients
|
2010-01-30 01:31:55 +08:00
|
|
|
|
2014-08-15 11:25:43 +08:00
|
|
|
gimp-test-icon-theme:
|
2016-01-12 03:35:32 +08:00
|
|
|
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 \
|
2014-08-15 11:25:43 +08:00
|
|
|
(cd gimp-test-icon-theme/hicolor/$${dir}x$${dir}/ && \
|
2016-01-12 03:35:32 +08:00
|
|
|
$(LN_S) $(abs_top_srcdir)/icons/Color/$${dir} apps); \
|
2014-08-15 11:25:43 +08:00
|
|
|
done
|
2016-01-12 03:35:32 +08:00
|
|
|
(cd gimp-test-icon-theme/hicolor && $(LN_S) $(abs_top_srcdir)/icons/Color/index.theme index.theme)
|
2014-08-15 11:25:43 +08:00
|
|
|
|
2010-01-30 01:31:55 +08:00
|
|
|
clean-local:
|
2012-06-17 06:22:48 +08:00
|
|
|
rm -rf gimpdir-output
|
2014-08-15 11:25:43 +08:00
|
|
|
rm -fr gimp-test-icon-theme
|