gimp/app/tests/Makefile.am

174 lines
5.2 KiB
Makefile
Raw Normal View History

# 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
if PLATFORM_OSX
xobjective_c = "-xobjective-c"
xobjective_cxx = "-xobjective-c++"
xnone = "-xnone"
endif
SUBDIRS = \
files \
gimpdir \
gimpdir-empty
# 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
TESTS_ENVIRONMENT = \
GIMP_TESTING_ABS_TOP_SRCDIR=@abs_top_srcdir@ \
GIMP_TESTING_ABS_TOP_BUILDDIR=@abs_top_builddir@ \
GIMP_TESTING_PLUGINDIRS=@abs_top_builddir@/plug-ins/common \
GIMP_TESTING_PLUGINDIRS_BASENAME_IGNORES=mkgen.pl
# Run tests with xvfb-run if available
if HAVE_XVFB_RUN
TESTS_ENVIRONMENT += $(XVFB_RUN) --auto-servernum --server-args="-screen 0 1280x1024x24"
endif
TESTS = \
test-core \
test-gimpidtable \
test-save-and-export \
test-session-2-8-compatibility-multi-window \
test-session-2-8-compatibility-single-window \
test-single-window-mode \
test-tools \
test-ui \
2010-01-03 06:10:54 +08:00
test-xcf
EXTRA_PROGRAMS = $(TESTS)
CLEANFILES = $(EXTRA_PROGRAMS)
$(TESTS): gimpdir-output gimp-test-icon-theme
noinst_LIBRARIES = libgimpapptestutils.a
libgimpapptestutils_a_SOURCES = \
gimp-app-test-utils.c \
gimp-app-test-utils.h \
gimp-test-session-utils.c \
gimp-test-session-utils.h
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
if PLATFORM_LINUX
libdl = -ldl
endif
if OS_WIN32
else
libm = -lm
endif
AM_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_srcdir)/app \
$(PANGOCAIRO_CFLAGS) \
$(GTK_CFLAGS) \
$(DBUS_GLIB_CFLAGS) \
$(GEGL_CFLAGS) \
$(xobjective_c) \
-I$(includedir)
# We need this due to circular dependencies
AM_LDFLAGS = \
-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 \
-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 \
-Wl,-u,$(SYMPREFIX)gimp_layer_mode_is_legacy \
-Wl,-u,$(SYMPREFIX)gui_init \
-Wl,-u,$(SYMPREFIX)gimp_tool_cursors_get_resource \
-Wl,-u,$(SYMPREFIX)gimp_lebl_dialog
# 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
LDADD = \
../gui/libappgui.a \
../tools/libapptools.a \
../dialogs/libappdialogs.a \
../menus/libappmenus.a \
../actions/libappactions.a \
../dialogs/libappdialogs.a \
../display/libappdisplay.a \
../propgui/libapppropgui.a \
../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 \
../file-data/libappfile-data.a \
../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 \
../operations/layer-modes/libapplayermodes.a \
../operations/layer-modes-legacy/libapplayermodeslegacy.a \
libgimpapptestutils.a \
$(libgimpwidgets) \
$(libgimpconfig) \
$(libgimpmath) \
$(libgimpthumb) \
$(libgimpcolor) \
$(libgimpmodule) \
$(libgimpbase) \
$(GIMPICONRC) \
$(GTK_LIBS) \
$(APPSTREAM_GLIB_LIBS) \
$(GTK_MAC_INTEGRATION_LIBS) \
$(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) \
$(LIBBACKTRACE_LIBS) \
$(LIBUNWIND_LIBS) \
$(INTLLIBS) \
$(RT_LIBS) \
$(libm) \
$(libdl)
gimpdir-output:
mkdir -p gimpdir-output
mkdir -p gimpdir-output/brushes
mkdir -p gimpdir-output/patterns
mkdir -p gimpdir-output/gradients
gimp-test-icon-theme:
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 \
(cd gimp-test-icon-theme/hicolor/$${dir}x$${dir}/ && \
$(LN_S) $(abs_top_srcdir)/icons/Color/$${dir} apps); \
done
(cd gimp-test-icon-theme/hicolor && $(LN_S) $(abs_top_srcdir)/icons/Color/index.theme index.theme)
clean-local:
rm -rf gimpdir-output
rm -fr gimp-test-icon-theme