2011-09-25 06:22:36 +00:00
|
|
|
include $(top_srcdir)/Makefile.decl
|
|
|
|
|
|
|
|
INCLUDES = \
|
2012-02-02 13:14:58 +00:00
|
|
|
-I$(top_srcdir) \
|
2011-09-25 06:22:36 +00:00
|
|
|
-I$(top_srcdir)/library \
|
2011-09-25 16:39:03 +00:00
|
|
|
-DSRCDIR="\"@abs_srcdir@\"" \
|
2012-02-02 12:40:47 +00:00
|
|
|
-DSECRET_COMPILATION \
|
2011-09-25 06:22:36 +00:00
|
|
|
$(NULL)
|
|
|
|
|
2012-01-23 08:36:36 +00:00
|
|
|
noinst_LTLIBRARIES = libmock_service.la
|
|
|
|
|
|
|
|
libmock_service_la_SOURCES = \
|
2012-06-28 09:48:45 +00:00
|
|
|
mock-service.c \
|
|
|
|
mock-service.h \
|
2012-01-23 08:36:36 +00:00
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
libmock_service_la_CFLAGS = \
|
|
|
|
$(LIBGCRYPT_CFLAGS)
|
|
|
|
|
2012-03-11 08:06:40 +00:00
|
|
|
libmock_service_la_LDFLAGS = \
|
|
|
|
-rpath /force/shared
|
|
|
|
|
2012-01-23 08:36:36 +00:00
|
|
|
libmock_service_la_LIBADD = \
|
|
|
|
$(top_builddir)/egg/libegg.la \
|
2012-02-02 12:40:47 +00:00
|
|
|
$(top_builddir)/library/libsecret-@SECRET_MAJOR@.la \
|
2012-01-23 08:36:36 +00:00
|
|
|
$(LIBGCRYPT_LIBS)
|
|
|
|
|
2011-09-25 06:22:36 +00:00
|
|
|
LDADD = \
|
|
|
|
$(top_builddir)/egg/libegg.la \
|
2012-02-02 12:40:47 +00:00
|
|
|
$(top_builddir)/library/libsecret-@SECRET_MAJOR@.la \
|
2012-03-29 10:58:01 +00:00
|
|
|
libmock_service.la \
|
2011-09-25 06:22:36 +00:00
|
|
|
$(NULL)
|
|
|
|
|
2012-06-28 09:48:45 +00:00
|
|
|
C_TESTS = \
|
2012-01-23 16:20:18 +00:00
|
|
|
test-value \
|
2012-01-11 06:44:32 +00:00
|
|
|
test-prompt \
|
2011-11-05 20:50:01 +00:00
|
|
|
test-service \
|
2011-09-25 16:39:03 +00:00
|
|
|
test-session \
|
2012-07-05 14:41:28 +00:00
|
|
|
test-paths \
|
2012-01-30 13:26:44 +00:00
|
|
|
test-methods \
|
2012-01-11 06:44:32 +00:00
|
|
|
test-password \
|
2012-01-23 16:20:18 +00:00
|
|
|
test-item \
|
|
|
|
test-collection \
|
2011-09-25 06:22:36 +00:00
|
|
|
$(NULL)
|
|
|
|
|
2012-06-28 09:48:45 +00:00
|
|
|
TEST_PROGS = \
|
|
|
|
$(C_TESTS) \
|
|
|
|
$(NULL)
|
|
|
|
|
2011-09-25 06:22:36 +00:00
|
|
|
check_PROGRAMS = \
|
|
|
|
$(TEST_PROGS)
|
|
|
|
|
|
|
|
noinst_PROGRAMS = \
|
|
|
|
$(NULL)
|
|
|
|
|
2012-03-11 12:35:43 +00:00
|
|
|
JS_TESTS = \
|
|
|
|
test-lookup-password.js \
|
|
|
|
test-remove-password.js \
|
2012-07-13 07:35:26 +00:00
|
|
|
test-store-password.js \
|
|
|
|
test-unstable.js
|
2011-09-25 06:22:36 +00:00
|
|
|
|
2012-03-11 12:35:43 +00:00
|
|
|
JS_ENV = \
|
2012-06-28 08:38:17 +00:00
|
|
|
LD_LIBRARY_PATH=$(builddir)/../.libs:$(builddir)/.libs \
|
2012-03-11 12:35:43 +00:00
|
|
|
GI_TYPELIB_PATH=$(builddir)/..:$(builddir)
|
|
|
|
|
2012-03-17 12:27:42 +00:00
|
|
|
PY_TESTS = \
|
|
|
|
test-lookup-password.py \
|
|
|
|
test-remove-password.py \
|
|
|
|
test-store-password.py
|
|
|
|
|
|
|
|
PY_ENV = $(JS_ENV)
|
2012-03-11 12:35:43 +00:00
|
|
|
|
2012-06-28 09:48:45 +00:00
|
|
|
if HAVE_VALAC
|
|
|
|
|
|
|
|
VALA_V = $(VALA_V_$(V))
|
|
|
|
VALA_V_ = $(VALA_V_$(AM_DEFAULT_VERBOSITY))
|
|
|
|
VALA_V_0 = @echo " VALAC " $^;
|
|
|
|
|
2012-07-08 16:00:43 +00:00
|
|
|
if HAVE_INTROSPECTION
|
|
|
|
if ENABLE_VAPIGEN
|
|
|
|
|
2012-06-28 09:48:45 +00:00
|
|
|
VALA_TESTS = \
|
|
|
|
test-vala-lang \
|
2012-07-13 07:04:55 +00:00
|
|
|
test-vala-unstable \
|
2012-06-28 09:48:45 +00:00
|
|
|
$(NULL)
|
|
|
|
|
2012-07-08 16:00:43 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2012-07-13 07:04:55 +00:00
|
|
|
VALA_FLAGS = \
|
|
|
|
--vapidir=$(builddir)/.. \
|
|
|
|
--pkg gio-2.0
|
|
|
|
|
|
|
|
VALA_TESTS_VAPIS = \
|
|
|
|
$(builddir)/../libsecret-unstable.vapi \
|
|
|
|
$(builddir)/../libsecret-@SECRET_MAJOR@.vapi \
|
|
|
|
mock-service-0.vapi
|
|
|
|
|
|
|
|
test-vala-lang.c: test-vala-lang.vala $(VALA_TESTS_VAPIS)
|
|
|
|
$(VALA_V)$(VALAC) $(VALA_FLAGS) -C $^
|
|
|
|
test-vala-unstable.c: test-vala-unstable.vala $(VALA_TESTS_VAPIS)
|
|
|
|
$(VALA_V)$(VALAC) $(VALA_FLAGS) -C $^
|
2012-06-28 09:48:45 +00:00
|
|
|
|
|
|
|
TEST_PROGS += $(VALA_TESTS)
|
|
|
|
|
|
|
|
test_vala_lang_CFLAGS = -w
|
2012-07-13 07:35:26 +00:00
|
|
|
test_vala_unstable_CFLAGS = -DSECRET_WITH_UNSTABLE -w
|
2012-06-28 09:48:45 +00:00
|
|
|
|
2012-07-13 07:35:26 +00:00
|
|
|
DISTCLEANFILES = \
|
|
|
|
test-vala-lang.c \
|
|
|
|
test-vala-unstable.c
|
2012-06-28 09:48:45 +00:00
|
|
|
|
|
|
|
test-vala: $(VALA_TESTS)
|
|
|
|
@gtester --verbose -m $(TEST_MODE) --g-fatal-warnings $(VALA_TESTS)
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
test-vala:
|
|
|
|
|
|
|
|
endif # HAVE_VALAC
|
|
|
|
|
|
|
|
test-c: $(C_TESTS)
|
|
|
|
@gtester --verbose -m $(TEST_MODE) --g-fatal-warnings $(C_TESTS)
|
2012-03-11 12:35:43 +00:00
|
|
|
|
|
|
|
test-js:
|
2012-03-25 11:48:29 +00:00
|
|
|
@for js in $(JS_TESTS); do echo "TEST: $$js"; $(JS_ENV) gjs $(srcdir)/$$js; done
|
2012-03-11 08:06:40 +00:00
|
|
|
|
2012-03-17 12:27:42 +00:00
|
|
|
test-py:
|
2012-03-25 11:48:29 +00:00
|
|
|
@for py in $(PY_TESTS); do echo "TEST: $$py"; $(PY_ENV) python $(srcdir)/$$py; done
|
2012-03-17 12:27:42 +00:00
|
|
|
|
2012-06-28 09:48:45 +00:00
|
|
|
test: test-c test-py test-js test-vala
|
2012-03-17 12:27:42 +00:00
|
|
|
|
2012-03-11 08:06:40 +00:00
|
|
|
# ------------------------------------------------------------------
|
|
|
|
# INTROSPECTION
|
|
|
|
|
|
|
|
if HAVE_INTROSPECTION
|
|
|
|
|
|
|
|
include $(INTROSPECTION_MAKEFILE)
|
|
|
|
|
|
|
|
INTROSPECTION_GIRS = MockService-0.gir
|
|
|
|
INTROSPECTION_SCANNER_ARGS = $(INTROSPECTION_FLAGS) --warn-all --add-include-path=$(srcdir) --add-include-path=.
|
|
|
|
INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir) --includedir=.
|
|
|
|
|
|
|
|
MockService-0.gir: libmock_service.la
|
|
|
|
|
|
|
|
MockService_0_gir_PACKAGES = gobject-2.0 gio-2.0
|
|
|
|
MockService_0_gir_EXPORT_PACKAGES = mock-service-0
|
|
|
|
MockService_0_gir_INCLUDES = GObject-2.0 Gio-2.0
|
|
|
|
MockService_0_gir_LIBS = libmock_service.la
|
2012-06-28 09:48:45 +00:00
|
|
|
MockService_0_gir_CFLAGS = -I$(top_srcdir) -I$(top_builddir) -I$(srcdir)
|
2012-03-11 08:06:40 +00:00
|
|
|
MockService_0_gir_FILES = $(libmock_service_la_SOURCES)
|
|
|
|
MockService_0_gir_SCANNERFLAGS = --c-include "mock-service.h"
|
|
|
|
|
|
|
|
noinst_DATA = \
|
|
|
|
$(INTROSPECTION_GIRS) \
|
|
|
|
$(INTROSPECTION_GIRS:.gir=.typelib)
|
|
|
|
|
2012-06-28 09:48:45 +00:00
|
|
|
if ENABLE_VAPIGEN
|
|
|
|
include $(VAPIGEN_MAKEFILE)
|
|
|
|
|
2012-07-13 07:35:26 +00:00
|
|
|
mock-service-0.vapi: MockService-0.gir $(builddir)/../libsecret-@SECRET_MAJOR@.vapi
|
2012-06-28 09:48:45 +00:00
|
|
|
|
|
|
|
VAPIGEN_VAPIS = mock-service-0.vapi
|
|
|
|
|
|
|
|
mock_service_0_vapi_DEPS = gio-2.0 libsecret-@SECRET_MAJOR@
|
|
|
|
mock_service_0_vapi_METADATADIRS = $(builddir)
|
|
|
|
mock_service_0_vapi_VAPIDIRS = $(builddir)
|
|
|
|
mock_service_0_vapi_FILES = MockService-0.gir
|
|
|
|
|
|
|
|
vapidir = $(datadir)/vala/vapi
|
|
|
|
vapi_DATA = mock-service-0.vapi
|
|
|
|
|
|
|
|
noinst_DATA += $(VAPIGEN_VAPIS)
|
|
|
|
|
|
|
|
endif # ENABLE_VAPIGEN
|
|
|
|
endif # HAVE_INTROSPECTION
|
2012-03-11 08:06:40 +00:00
|
|
|
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
|
2012-03-25 11:48:29 +00:00
|
|
|
EXTRA_DIST = \
|
|
|
|
mock \
|
|
|
|
mock-service-delete.py \
|
|
|
|
mock-service-lock.py \
|
|
|
|
mock-service-normal.py \
|
|
|
|
mock-service-only-plain.py \
|
|
|
|
mock-service-prompt.py \
|
2012-06-28 09:48:45 +00:00
|
|
|
Secret-@SECRET_MAJOR@.metadata \
|
|
|
|
test-vala-lang.vala \
|
2012-03-25 11:48:29 +00:00
|
|
|
$(JS_TESTS) \
|
|
|
|
$(PY_TESTS) \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
CLEANFILES = \
|
|
|
|
$(noinst_DATA) \
|
|
|
|
$(NULL)
|
|
|
|
|
2011-09-25 06:22:36 +00:00
|
|
|
all-local: $(check_PROGRAMS)
|
|
|
|
|
2011-11-06 12:41:21 +00:00
|
|
|
check-local: test
|
|
|
|
|
|
|
|
check-memory: perform-memcheck
|
|
|
|
|
2012-03-25 11:48:29 +00:00
|
|
|
.PHONY: check-memory
|