diff options
Diffstat (limited to 'gck')
-rw-r--r-- | gck/Makefile.am | 293 | ||||
-rw-r--r-- | gck/gck-module.c | 3 | ||||
-rw-r--r-- | gck/gck-modules.c | 3 | ||||
-rw-r--r-- | gck/gck-session.c | 3 | ||||
-rw-r--r-- | gck/gck-uri.c | 3 | ||||
-rw-r--r-- | gck/mock-interaction.c (renamed from gck/tests/mock-interaction.c) | 0 | ||||
-rw-r--r-- | gck/mock-interaction.h (renamed from gck/tests/mock-interaction.h) | 0 | ||||
-rw-r--r-- | gck/mock-test-module.c (renamed from gck/tests/mock-test-module.c) | 0 | ||||
-rw-r--r-- | gck/test-gck-attributes.c (renamed from gck/tests/test-gck-attributes.c) | 0 | ||||
-rw-r--r-- | gck/test-gck-crypto.c (renamed from gck/tests/test-gck-crypto.c) | 0 | ||||
-rw-r--r-- | gck/test-gck-enumerator.c (renamed from gck/tests/test-gck-enumerator.c) | 0 | ||||
-rw-r--r-- | gck/test-gck-module.c (renamed from gck/tests/test-gck-module.c) | 0 | ||||
-rw-r--r-- | gck/test-gck-modules.c (renamed from gck/tests/test-gck-modules.c) | 0 | ||||
-rw-r--r-- | gck/test-gck-object.c (renamed from gck/tests/test-gck-object.c) | 0 | ||||
-rw-r--r-- | gck/test-gck-session.c (renamed from gck/tests/test-gck-session.c) | 0 | ||||
-rw-r--r-- | gck/test-gck-slot.c (renamed from gck/tests/test-gck-slot.c) | 0 | ||||
-rw-r--r-- | gck/test-gck-uri.c (renamed from gck/tests/test-gck-uri.c) | 0 | ||||
-rw-r--r-- | gck/tests/Makefile.am | 67 |
18 files changed, 183 insertions, 189 deletions
diff --git a/gck/Makefile.am b/gck/Makefile.am index 4779c37..8c4951c 100644 --- a/gck/Makefile.am +++ b/gck/Makefile.am @@ -1,116 +1,113 @@ -include $(top_srcdir)/Makefile.decl +# included in top-level Makefile.am + +gck_incdir = $(includedir)/gck-@GCK_MAJOR@/gck + +gck_HEADER_FILES = \ + gck/gck.h \ + gck/gck-deprecated.h + +gck_inc_HEADERS = \ + $(gck_HEADER_FILES) \ + gck/gck-enum-types.h \ + gck/gck-version.h \ + gck/pkcs11.h \ + gck/pkcs11n.h \ + gck/pkcs11x.h + +gck_BUILT_SOURCES = \ + gck/gck-marshal.c gck/gck-marshal.h \ + gck/gck-enum-types.c gck/gck-enum-types.h + +BUILT_SOURCES += $(gck_BUILT_SOURCES) + +lib_LTLIBRARIES += libgck-@GCK_MAJOR@.la + +gck_PUBLIC_FILES = \ + gck/gck.h \ + gck/gck-enum-types.h \ + gck/gck-attributes.c \ + gck/gck-dump.c \ + gck/gck-enumerator.c \ + gck/gck-misc.c \ + gck/gck-module.c \ + gck/gck-modules.c \ + gck/gck-object.c \ + gck/gck-object-cache.c \ + gck/gck-password.c \ + gck/gck-session.c \ + gck/gck-slot.c \ + gck/gck-uri.c \ + gck/gck-version.h + +gck_INTERNAL_FILES = \ + gck/gck-call.c \ + gck/gck-debug.c gck/gck-debug.h \ + gck/gck-deprecated.h \ + gck/gck-interaction.c \ + gck/gck-private.h \ + gck/pkcs11.h -SUBDIRS = . tests - -incdir = $(includedir)/gck-@GCK_MAJOR@/gck - -HEADER_FILES = \ - gck.h \ - gck-deprecated.h +libgck_@GCK_MAJOR@_la_SOURCES = \ + $(gck_PUBLIC_FILES) \ + $(gck_INTERNAL_FILES) -inc_HEADERS = \ - $(HEADER_FILES) \ - gck-enum-types.h \ - gck-version.h \ - pkcs11.h \ - pkcs11n.h \ - pkcs11x.h +nodist_libgck_@GCK_MAJOR@_la_SOURCES = \ + $(gck_BUILT_SOURCES) -AM_CPPFLAGS = \ - -I$(top_builddir) \ - -I$(top_srcdir)/gcr \ - -I$(top_srcdir) \ +libgck_@GCK_MAJOR@_la_CFLAGS = \ $(P11_KIT_CFLAGS) \ - $(GTHREAD_CFLAGS) \ - $(GLIB_CFLAGS) \ -DG_LOG_DOMAIN=\"Gck\" \ -DGCK_API_SUBJECT_TO_CHANGE \ -DP11_KIT_API_SUBJECT_TO_CHANGE \ -DPKCS11_REGISTRY_DIR=\"$(libdir)/pkcs11\" -BUILT_SOURCES = \ - gck-marshal.c gck-marshal.h \ - gck-enum-types.c gck-enum-types.h - -lib_LTLIBRARIES = libgck-@GCK_MAJOR@.la - -PUBLIC_FILES = \ - gck.h \ - gck-enum-types.h \ - gck-attributes.c \ - gck-dump.c \ - gck-enumerator.c \ - gck-misc.c \ - gck-module.c \ - gck-modules.c \ - gck-object.c \ - gck-object-cache.c \ - gck-password.c \ - gck-session.c \ - gck-slot.c \ - gck-uri.c \ - gck-version.h - -INTERNAL_FILES = \ - gck-call.c \ - gck-debug.c gck-debug.h \ - gck-deprecated.h \ - gck-interaction.c \ - gck-private.h \ - pkcs11.h - -libgck_@GCK_MAJOR@_la_SOURCES = \ - $(PUBLIC_FILES) \ - $(INTERNAL_FILES) - -nodist_libgck_@GCK_MAJOR@_la_SOURCES = \ - $(BUILT_SOURCES) - libgck_@GCK_MAJOR@_la_LDFLAGS = \ -version-info $(GCK_LT_RELEASE) \ -no-undefined \ -export-symbols-regex '^gck_.*|^SECMEM_.*' libgck_@GCK_MAJOR@_la_LIBADD = \ - $(top_builddir)/egg/libegg-hex.la \ - $(top_builddir)/egg/libegg-secmem.la \ + libegg-hex.la \ + libegg-secmem.la \ $(P11_KIT_LIBS) \ - $(GTHREAD_LIBS) \ $(GIO_LIBS) \ $(GLIB_LIBS) -noinst_LTLIBRARIES = libgck-testable.la +noinst_LTLIBRARIES += libgck-testable.la libgck_testable_la_SOURCES = \ - gck-mock.c \ - gck-mock.h \ - gck-test.c \ - gck-test.h -libgck_testable_la_LIBADD = $(libgck_@GCK_MAJOR@_la_OBJECTS) \ + gck/gck-mock.c gck/gck-mock.h \ + gck/gck-test.c gck/gck-test.h + +libgck_testable_la_CFLAGS = \ + $(libgck_@GCK_MAJOR@_la_CFLAGS) + +libgck_testable_la_LIBADD = \ + $(libgck_@GCK_MAJOR@_la_OBJECTS) \ $(libgck_@GCK_MAJOR@_la_LIBADD) libgck_testable_la_DEPENDENCIES = $(libgck_@GCK_MAJOR@_la_OBJECTS) -gck-marshal.h: gck-marshal.list $(GLIB_GENMARSHAL) +gck/gck-marshal.h: gck/gck-marshal.list $(GLIB_GENMARSHAL) $(AM_V_GEN) $(GLIB_GENMARSHAL) $< --header --prefix=_gck_marshal > $@ -gck-marshal.c: gck-marshal.list $(GLIB_GENMARSHAL) - $(AM_V_GEN) echo "#include \"gck-marshal.h\"" > $@ && \ +gck/gck-marshal.c: gck/gck-marshal.list $(GLIB_GENMARSHAL) + $(AM_V_GEN) echo "#include \"gck/gck-marshal.h\"" > $@ && \ $(GLIB_GENMARSHAL) $< --body --prefix=_gck_marshal >> $@ -gck-enum-types.h: $(ENUM_TEMPLATE_H) $(HEADER_FILES) +gck/gck-enum-types.h: $(ENUM_TEMPLATE_H) $(gck_HEADER_FILES) $(AM_V_GEN) $(GLIB_MKENUMS) --template $^ > $@ -gck-enum-types.c: $(ENUM_TEMPLATE_C) $(HEADER_FILES) +gck/gck-enum-types.c: $(ENUM_TEMPLATE_C) $(gck_HEADER_FILES) $(AM_V_GEN) $(GLIB_MKENUMS) --template $^ > $@ -EXTRA_DIST = \ - gck.pc.in \ - gck-marshal.list \ - gck-version.h \ - gck.symbols \ - pkcs11-trust-assertions.h \ - pkcs11i.h +EXTRA_DIST += \ + gck/gck.pc.in \ + gck/gck-marshal.list \ + gck/gck-version.h \ + gck/gck.symbols \ + gck/pkcs11-trust-assertions.h \ + gck/pkcs11i.h -CLEANFILES = \ +CLEANFILES += \ gck-$(GCK_MAJOR).pc \ $(gir_DATA) \ $(typelibs_DATA) \ @@ -123,11 +120,7 @@ CLEANFILES = \ if HAVE_INTROSPECTION -include $(INTROSPECTION_MAKEFILE) - -INTROSPECTION_GIRS = Gck-@GCK_MAJOR@.gir -INTROSPECTION_SCANNER_ARGS = $(INTROSPECTION_FLAGS) --warn-all --add-include-path=$(srcdir) --add-include-path=. -INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir) --includedir=. +INTROSPECTION_GIRS += Gck-@GCK_MAJOR@.gir Gck-@GCK_MAJOR@.gir: libgck-@GCK_MAJOR@.la @@ -135,45 +128,30 @@ Gck_@GCK_MAJOR@_gir_PACKAGES = gobject-2.0 gio-2.0 p11-kit-1 Gck_@GCK_MAJOR@_gir_EXPORT_PACKAGES = gck-@GCK_MAJOR@ Gck_@GCK_MAJOR@_gir_INCLUDES = GObject-2.0 Gio-2.0 Gck_@GCK_MAJOR@_gir_LIBS = libgck-@GCK_MAJOR@.la -Gck_@GCK_MAJOR@_gir_CFLAGS = -I$(top_srcdir) -I$(top_builddir) -DGCK_COMPILATION -DGCK_API_SUBJECT_TO_CHANGE -Gck_@GCK_MAJOR@_gir_FILES = $(PUBLIC_FILES) -Gck_@GCK_MAJOR@_gir_SCANNERFLAGS = --c-include "gck/gck.h" +Gck_@GCK_MAJOR@_gir_CFLAGS = -I$(srcdir) -I$(builddir) -DGCK_COMPILATION -DGCK_API_SUBJECT_TO_CHANGE +Gck_@GCK_MAJOR@_gir_FILES = $(gck_PUBLIC_FILES) +Gck_@GCK_MAJOR@_gir_SCANNERFLAGS = --add-include-path=$(srcdir)/gck --c-include "gck/gck.h" -girdir = $(datadir)/gir-1.0 -gir_DATA = $(INTROSPECTION_GIRS) - -typelibsdir = $(libdir)/girepository-1.0 -typelibs_DATA = $(INTROSPECTION_GIRS:.gir=.typelib) +gir_DATA += Gck-@GCK_MAJOR@.gir if ENABLE_VAPIGEN -include $(VAPIGEN_MAKEFILE) -gck-@GCK_MAJOR@.vapi: Gck-@GCK_MAJOR@.gir Gck-@GCK_MAJOR@.metadata gck-@GCK_MAJOR@.deps +gck-@GCK_MAJOR@.vapi: Gck-@GCK_MAJOR@.gir gck/Gck-@GCK_MAJOR@.metadata gck-@GCK_MAJOR@.deps -VAPIGEN_VAPIS = gck-@GCK_MAJOR@.vapi +VAPIGEN_VAPIS += gck-@GCK_MAJOR@.vapi gck_@GCK_MAJOR@_vapi_DEPS = glib-2.0 gio-2.0 gck_@GCK_MAJOR@_vapi_METADATADIRS = $(srcdir) gck_@GCK_MAJOR@_vapi_FILES = Gck-@GCK_MAJOR@.gir -VAPI_DEPS = $(VAPIGEN_VAPIS:.vapi=.deps) - gck-$(GCK_MAJOR).deps: Makefile.am $(AM_V_GEN) echo $(gck_@GCK_MAJOR@_vapi_DEPS) | tr ' ' '\n' > $@ -vapidir = $(datadir)/vala/vapi -vapi_DATA = \ - pkcs11.vapi \ - $(VAPIGEN_VAPIS) \ - $(VAPI_DEPS) +vapi_DATA += gck/pkcs11.vapi EXTRA_DIST += \ - Gck-@GCK_MAJOR@.metadata \ - pkcs11.vapi - -CLEANFILES += \ - $(VAPIGEN_VAPIS) \ - $(VAPI_DEPS) + gck/Gck-@GCK_MAJOR@.metadata \ + gck/pkcs11.vapi endif # ENABLE_VAPIGEN @@ -181,24 +159,103 @@ endif # ---------------------------------------------------------------- -pkgconfig_DATA = gck-$(GCK_MAJOR).pc +pkgconfig_DATA += gck-$(GCK_MAJOR).pc -gck-$(GCK_MAJOR).pc: gck.pc - $(AM_V_GEN) cp gck.pc gck-$(GCK_MAJOR).pc +gck-$(GCK_MAJOR).pc: gck/gck.pc + $(AM_V_GEN) cp gck/gck.pc gck-$(GCK_MAJOR).pc -gck-expected.abi: gck.symbols +gck-expected.abi: gck/gck.symbols $(AM_V_GEN) cpp -P $< | sort > $@ gck-actual.abi: $(builddir)/.libs/libgck-@GCK_MAJOR@.so $(AM_V_GEN) $(NM) -D -g --defined-only $< | \ cut -d ' ' -f 3 | grep -Ev '^(__bss_start|_edata|_end)' | sort > $@ -check-symbols: gck-expected.abi gck-actual.abi +check-gck-symbols: gck-expected.abi gck-actual.abi $(AM_V_GEN) diff -U0 --ignore-blank-lines gck-expected.abi gck-actual.abi || \ (echo "check-symbols: Symbols have CHANGED. Fix gck.symbols"; exit 1) -check-local: check-symbols +gck_CFLAGS = \ + -I$(top_builddir) \ + -I$(top_srcdir) \ + -DGCK_API_SUBJECT_TO_CHANGE \ + -DG_LOG_DOMAIN=\"Gck\" \ + $(P11_KIT_CFLAGS) \ + $(GLIB_CFLAGS) + +gck_LIBS = \ + libgck-testable.la \ + libegg-test.la \ + libegg-hex.la \ + $(GLIB_LIBS) \ + $(P11_KIT_LIBS) \ + $(GIO_LIBS) + +gck_TESTS = \ + test-gck-attributes \ + test-gck-module \ + test-gck-slot \ + test-gck-session \ + test-gck-object \ + test-gck-crypto \ + test-gck-uri \ + test-gck-enumerator \ + test-gck-modules + +test_gck_attributes_SOURCES = gck/test-gck-attributes.c +test_gck_attributes_CFLAGS = $(gck_CFLAGS) +test_gck_attributes_LDADD = $(gck_LIBS) + +test_gck_crypto_SOURCES = gck/test-gck-crypto.c +test_gck_crypto_CFLAGS = $(gck_CFLAGS) +test_gck_crypto_LDADD = $(gck_LIBS) + +test_gck_enumerator_SOURCES = \ + gck/test-gck-enumerator.c \ + gck/mock-interaction.c gck/mock-interaction.h +test_gck_enumerator_CFLAGS = $(gck_CFLAGS) +test_gck_enumerator_LDADD = $(gck_LIBS) + +test_gck_object_SOURCES = gck/test-gck-object.c +test_gck_object_CFLAGS = $(gck_CFLAGS) +test_gck_object_LDADD = $(gck_LIBS) + +test_gck_module_SOURCES = gck/test-gck-module.c +test_gck_module_CFLAGS = $(gck_CFLAGS) +test_gck_module_LDADD = $(gck_LIBS) + +test_gck_modules_SOURCES = gck/test-gck-modules.c +test_gck_modules_CFLAGS = $(gck_CFLAGS) +test_gck_modules_LDADD = $(gck_LIBS) + +test_gck_session_SOURCES = \ + gck/test-gck-session.c \ + gck/mock-interaction.c gck/mock-interaction.h +test_gck_session_CFLAGS = $(gck_CFLAGS) +test_gck_session_LDADD = $(gck_LIBS) + +test_gck_slot_SOURCES = gck/test-gck-slot.c +test_gck_slot_CFLAGS = $(gck_CFLAGS) +test_gck_slot_LDADD = $(gck_LIBS) + +test_gck_uri_SOURCES = gck/test-gck-uri.c +test_gck_uri_CFLAGS = $(gck_CFLAGS) +test_gck_uri_LDADD = $(gck_LIBS) + +check_PROGRAMS += $(gck_TESTS) +TESTS += $(gck_TESTS) + +check_LTLIBRARIES += libmock-test-module.la + +libmock_test_module_la_LDFLAGS = \ + -module -avoid-version -shared -rpath $(abs_builddir) + +libmock_test_module_la_CFLAGS = \ + -DGCK_API_SUBJECT_TO_CHANGE \ + $(gck_CFLAGS) -check-memory: - make -C tests check-memory +libmock_test_module_la_SOURCES = \ + gck/mock-test-module.c +libmock_test_module_la_LIBADD = \ + libgck-testable.la diff --git a/gck/gck-module.c b/gck/gck-module.c index 257e88b..71c2832 100644 --- a/gck/gck-module.c +++ b/gck/gck-module.c @@ -24,7 +24,8 @@ #include "gck.h" #include "gck-private.h" -#include "gck-marshal.h" + +#include "gck/gck-marshal.h" #include <glib/gi18n-lib.h> diff --git a/gck/gck-modules.c b/gck/gck-modules.c index 64ee63d..9b59ba8 100644 --- a/gck/gck-modules.c +++ b/gck/gck-modules.c @@ -24,7 +24,8 @@ #include "gck.h" #include "gck-private.h" -#include "gck-marshal.h" + +#include "gck/gck-marshal.h" #include <glib/gi18n-lib.h> diff --git a/gck/gck-session.c b/gck/gck-session.c index 5df0020..7e635c3 100644 --- a/gck/gck-session.c +++ b/gck/gck-session.c @@ -25,9 +25,10 @@ #include "gck.h" #define DEBUG_FLAG GCK_DEBUG_SESSION #include "gck-debug.h" -#include "gck-marshal.h" #include "gck-private.h" +#include "gck/gck-marshal.h" + #include <string.h> #include <glib/gi18n-lib.h> diff --git a/gck/gck-uri.c b/gck/gck-uri.c index 6ab71b7..29caeba 100644 --- a/gck/gck-uri.c +++ b/gck/gck-uri.c @@ -24,7 +24,8 @@ #include "gck.h" #include "gck-private.h" -#include "gck-marshal.h" + +#include "gck/gck-marshal.h" #include <glib/gi18n-lib.h> diff --git a/gck/tests/mock-interaction.c b/gck/mock-interaction.c index c431454..c431454 100644 --- a/gck/tests/mock-interaction.c +++ b/gck/mock-interaction.c diff --git a/gck/tests/mock-interaction.h b/gck/mock-interaction.h index 5053cd2..5053cd2 100644 --- a/gck/tests/mock-interaction.h +++ b/gck/mock-interaction.h diff --git a/gck/tests/mock-test-module.c b/gck/mock-test-module.c index 7d6ba2c..7d6ba2c 100644 --- a/gck/tests/mock-test-module.c +++ b/gck/mock-test-module.c diff --git a/gck/tests/test-gck-attributes.c b/gck/test-gck-attributes.c index 0cfd95e..0cfd95e 100644 --- a/gck/tests/test-gck-attributes.c +++ b/gck/test-gck-attributes.c diff --git a/gck/tests/test-gck-crypto.c b/gck/test-gck-crypto.c index f2bd7f9..f2bd7f9 100644 --- a/gck/tests/test-gck-crypto.c +++ b/gck/test-gck-crypto.c diff --git a/gck/tests/test-gck-enumerator.c b/gck/test-gck-enumerator.c index 9d01c4c..9d01c4c 100644 --- a/gck/tests/test-gck-enumerator.c +++ b/gck/test-gck-enumerator.c diff --git a/gck/tests/test-gck-module.c b/gck/test-gck-module.c index 068423f..068423f 100644 --- a/gck/tests/test-gck-module.c +++ b/gck/test-gck-module.c diff --git a/gck/tests/test-gck-modules.c b/gck/test-gck-modules.c index 4307408..4307408 100644 --- a/gck/tests/test-gck-modules.c +++ b/gck/test-gck-modules.c diff --git a/gck/tests/test-gck-object.c b/gck/test-gck-object.c index 9622bb2..9622bb2 100644 --- a/gck/tests/test-gck-object.c +++ b/gck/test-gck-object.c diff --git a/gck/tests/test-gck-session.c b/gck/test-gck-session.c index 19c3361..19c3361 100644 --- a/gck/tests/test-gck-session.c +++ b/gck/test-gck-session.c diff --git a/gck/tests/test-gck-slot.c b/gck/test-gck-slot.c index 4661d49..4661d49 100644 --- a/gck/tests/test-gck-slot.c +++ b/gck/test-gck-slot.c diff --git a/gck/tests/test-gck-uri.c b/gck/test-gck-uri.c index 39ef9f1..39ef9f1 100644 --- a/gck/tests/test-gck-uri.c +++ b/gck/test-gck-uri.c diff --git a/gck/tests/Makefile.am b/gck/tests/Makefile.am deleted file mode 100644 index 60da135..0000000 --- a/gck/tests/Makefile.am +++ /dev/null @@ -1,67 +0,0 @@ -include $(top_srcdir)/Makefile.decl - -AM_CPPFLAGS = \ - -I$(top_builddir) \ - -I$(top_srcdir) \ - -DSRCDIR="\"@abs_srcdir@\"" \ - -DBUILDDIR="\"@abs_builddir@\"" \ - -DGCK_API_SUBJECT_TO_CHANGE \ - -DG_LOG_DOMAIN=\"Gck\" \ - $(P11_KIT_CFLAGS) \ - $(GLIB_CFLAGS) - -LDADD = \ - $(top_builddir)/gck/libgck-testable.la \ - $(top_builddir)/egg/libegg-test.la \ - $(top_builddir)/egg/libegg-hex.la \ - $(GTHREAD_LIBS) \ - $(GLIB_LIBS) \ - $(P11_KIT_LIBS) \ - $(GIO_LIBS) - -TEST_PROGS = \ - test-gck-attributes \ - test-gck-module \ - test-gck-slot \ - test-gck-session \ - test-gck-object \ - test-gck-crypto \ - test-gck-uri \ - test-gck-enumerator \ - test-gck-modules - -test_gck_enumerator_SOURCES = \ - test-gck-enumerator.c \ - mock-interaction.c mock-interaction.h - -test_gck_session_SOURCES = \ - test-gck-session.c \ - mock-interaction.c mock-interaction.h - -check_PROGRAMS = $(TEST_PROGS) - -test: $(TEST_PROGS) - gtester --verbose -m $(TEST_MODE) --g-fatal-warnings $(TEST_PROGS) - -check-local: test - -check-memory: perform-memcheck - -all-local: $(check_PROGRAMS) $(check_LTLIBRARIES) - -check_LTLIBRARIES = libmock-test-module.la - -libmock_test_module_la_LDFLAGS = \ - -module -avoid-version -shared -rpath $(abs_builddir) - -libmock_test_module_la_CFLAGS = \ - -I$(top_srcdir)/gck \ - -I$(top_srcdir) \ - $(GLIB_CFLAGS) \ - -DGCK_API_SUBJECT_TO_CHANGE - -libmock_test_module_la_SOURCES = \ - mock-test-module.c - -libmock_test_module_la_LIBADD = \ - $(top_builddir)/gck/libgck-testable.la |