summaryrefslogtreecommitdiff
path: root/egg
diff options
context:
space:
mode:
authorStef Walter <stefw@gnome.org>2014-03-04 17:50:47 +0100
committerStef Walter <stefw@gnome.org>2014-03-05 13:02:15 +0100
commit0b751a90927f0f9768cd587fe8cab5e72a74517f (patch)
treef7c4e867543c7dab39a6064ad513d1d109989928 /egg
parent9300894079d184a1362e8f80ae695ede6d7e9e75 (diff)
downloadgnome-keyring-0b751a90927f0f9768cd587fe8cab5e72a74517f.tar.gz
Makefile.am: Use a single non-recursive Makefile
This allows all the code to be built in parallel, and only rebuilding stuff that's changed when developing. Much quicker. In the meantime disable the p11-tests checks, which were very rarely used. We'll need to migrate them to TAP.
Diffstat (limited to 'egg')
-rw-r--r--egg/Makefile.am163
-rw-r--r--egg/egg-mkdtemp.c1
-rw-r--r--egg/egg-mkdtemp.h1
-rw-r--r--egg/egg-timegm.c1
-rw-r--r--egg/egg-timegm.h1
-rw-r--r--egg/test-asn1.c2
-rw-r--r--egg/test-asn1x.c14
-rw-r--r--egg/test-dn.c2
-rw-r--r--egg/test-openssl.c2
-rw-r--r--egg/test-spawn.c10
10 files changed, 107 insertions, 90 deletions
diff --git a/egg/Makefile.am b/egg/Makefile.am
index 6b50242d..02570375 100644
--- a/egg/Makefile.am
+++ b/egg/Makefile.am
@@ -1,6 +1,5 @@
-include $(top_srcdir)/Makefile.decl
-noinst_LTLIBRARIES = \
+noinst_LTLIBRARIES += \
libegg.la \
libegg-asn1x.la \
libegg-buffer.la \
@@ -11,72 +10,65 @@ noinst_LTLIBRARIES = \
libegg-hex.la \
libegg-test.la
-INCLUDES = \
- -I$(top_builddir) \
- -I$(top_srcdir) \
- -DSRCDIR="\"@abs_srcdir@\"" \
- $(GLIB_CFLAGS)
-
libegg_la_CFLAGS = \
$(LIBTASN1_CFLAGS) \
$(GLIB_CFLAGS)
libegg_la_SOURCES = \
- dotlock.c dotlock.h \
- egg-armor.c egg-armor.h \
- egg-asn1x.c egg-asn1x.h \
- egg-asn1-defs.c egg-asn1-defs.h \
- egg-buffer.c egg-buffer.h \
- egg-byte-array.c egg-byte-array.h \
- egg-cleanup.c egg-cleanup.h \
- egg-dh.c egg-dh.h \
- egg-dn.c egg-dn.h \
- egg-error.h \
- egg-hex.c egg-hex.h \
- egg-hkdf.c egg-hkdf.h \
- egg-libgcrypt.c egg-libgcrypt.h \
- egg-mkdtemp.c egg-mkdtemp.h \
- egg-oid.c egg-oid.h \
- egg-padding.c egg-padding.h \
- egg-openssl.c egg-openssl.h \
- egg-unix-credentials.c egg-unix-credentials.h \
- egg-secure-memory.c egg-secure-memory.h \
- egg-spawn.c egg-spawn.h \
- egg-symkey.c egg-symkey.h \
- egg-testing.c egg-testing.h \
- egg-timegm.c egg-timegm.h \
- egg-asn1-defs.h \
- pk.asn.h pkix.asn.h \
+ egg/dotlock.c egg/dotlock.h \
+ egg/egg-armor.c egg/egg-armor.h \
+ egg/egg-asn1x.c egg/egg-asn1x.h \
+ egg/egg-asn1-defs.c egg/egg-asn1-defs.h \
+ egg/egg-buffer.c egg/egg-buffer.h \
+ egg/egg-byte-array.c egg/egg-byte-array.h \
+ egg/egg-cleanup.c egg/egg-cleanup.h \
+ egg/egg-dh.c egg/egg-dh.h \
+ egg/egg-dn.c egg/egg-dn.h \
+ egg/egg-error.h \
+ egg/egg-hex.c egg/egg-hex.h \
+ egg/egg-hkdf.c egg/egg-hkdf.h \
+ egg/egg-libgcrypt.c egg/egg-libgcrypt.h \
+ egg/egg-mkdtemp.c egg/egg-mkdtemp.h \
+ egg/egg-oid.c egg/egg-oid.h \
+ egg/egg-padding.c egg/egg-padding.h \
+ egg/egg-openssl.c egg/egg-openssl.h \
+ egg/egg-unix-credentials.c egg/egg-unix-credentials.h \
+ egg/egg-secure-memory.c egg/egg-secure-memory.h \
+ egg/egg-spawn.c egg/egg-spawn.h \
+ egg/egg-symkey.c egg/egg-symkey.h \
+ egg/egg-testing.c egg/egg-testing.h \
+ egg/egg-timegm.c egg/egg-timegm.h \
+ egg/egg-asn1-defs.h \
+ egg/pk.asn.h egg/pkix.asn.h \
$(NULL)
-EXTRA_DIST = \
- pk.asn \
- pkix.asn \
+ASN1_FILES += \
+ egg/pk.asn \
+ egg/pkix.asn \
$(NULL)
# --------------------------------------------------------------------
# COMMON STUFF COMPILED INTO SMALLER COMPONENTS
libegg_asn1x_la_SOURCES = \
- egg-asn1x.c egg-asn1x.h \
- egg-asn1-defs.c egg-asn1-defs.h \
- $(BUILT_SOURCES)
+ egg/egg-asn1x.c egg/egg-asn1x.h \
+ egg/egg-asn1-defs.c egg/egg-asn1-defs.h
libegg_asn1x_la_CFLAGS = \
$(LIBTASN1_CFLAGS) \
$(GLIB_CFLAGS)
libegg_secure_la_SOURCES = \
- egg-secure-memory.c egg-secure-memory.h
+ egg/egg-secure-memory.c egg/egg-secure-memory.h
libegg_buffer_la_SOURCES = \
- egg-buffer.c egg-buffer.h
+ egg/egg-buffer.c egg/egg-buffer.h
libegg_creds_la_SOURCES = \
- egg-unix-credentials.c egg-unix-credentials.h
+ egg/egg-unix-credentials.c egg/egg-unix-credentials.h
libegg_dbus_la_SOURCES = \
- egg-dbus.c egg-dbus.h
+ egg/egg-dbus.c egg/egg-dbus.h
libegg_dbus_la_CFLAGS = \
$(DBUS_CFLAGS) \
@@ -87,12 +79,12 @@ libegg_dbus_la_LIBADD = \
$(GLIB_LIBS)
libegg_prompt_la_SOURCES = \
- egg-dh.c egg-dh.h \
- egg-hex.c egg-hex.h \
- egg-hkdf.c egg-hkdf.h \
- egg-libgcrypt.c egg-libgcrypt.h \
- egg-padding.c egg-padding.h \
- egg-secure-memory.c egg-secure-memory.h
+ egg/egg-dh.c egg/egg-dh.h \
+ egg/egg-hex.c egg/egg-hex.h \
+ egg/egg-hkdf.c egg/egg-hkdf.h \
+ egg/egg-libgcrypt.c egg/egg-libgcrypt.h \
+ egg/egg-padding.c egg/egg-padding.h \
+ egg/egg-secure-memory.c egg/egg-secure-memory.h
libegg_prompt_la_CFLAGS = \
-DEGG_DH_NO_ASN1=1 \
@@ -104,7 +96,7 @@ libegg_prompt_la_LIBS = \
$(GLIB_LIBS)
libegg_hex_la_SOURCES = \
- egg-hex.c egg-hex.h
+ egg/egg-hex.c egg/egg-hex.h
libegg_hex_la_CFLAGS = \
$(GLIB_CFLAGS)
@@ -113,8 +105,8 @@ libegg_hex_la_LIBS = \
$(GLIB_LIBS)
libegg_test_la_SOURCES = \
- egg-mkdtemp.c egg-mkdtemp.h \
- egg-testing.c egg-testing.h
+ egg/egg-mkdtemp.c egg/egg-mkdtemp.h \
+ egg/egg-testing.c egg/egg-testing.h
libegg_test_la_CFLAGS = \
$(GLIB_CFLAGS)
@@ -122,23 +114,23 @@ libegg_test_la_CFLAGS = \
libegg_test_la_LIBS = \
$(GLIB_LIBS)
-asn:
- asn1Parser -o pk.asn.h pk.asn
- asn1Parser -o pkix.asn.h pkix.asn
- sed -i 's|#include.*|/* \0 */|' pk.asn.h pkix.asn.h
- asn1Parser -o test.asn.h test.asn
- sed -i 's|#include.*|/* \0 */|' test.asn.h
+ASN1_FILES += \
+ egg/pk.asn \
+ egg/pkix.asn \
+ egg/test.asn
# -------------------------------------------------------------------
# TESTS
-LDADD = \
- $(top_builddir)/egg/libegg.la \
+EXTRA_DIST += egg/fixtures
+
+egg_LIBS = \
+ libegg.la \
$(LIBGCRYPT_LIBS) \
$(GTHREAD_LIBS) \
$(GLIB_LIBS)
-TEST_PROGS = \
+TEST_PROGS += \
test-asn1 \
test-asn1x \
test-dn \
@@ -154,23 +146,44 @@ TEST_PROGS = \
test-dh \
test-spawn
-test_asn1_SOURCES = \
- test-asn1.c \
- test.asn.h
+test_asn1_SOURCES = egg/test-asn1.c egg/test.asn.h
+test_asn1_LDADD = $(egg_LIBS)
+
+test_asn1x_SOURCES = egg/test-asn1x.c
+test_asn1x_LDADD = libegg-asn1x.la $(egg_LIBS)
+
+test_dn_SOURCES = egg/test-dn.c
+test_dn_LDADD = $(egg_LIBS)
+
+test_cleanup_SOURCES = egg/test-cleanup.c
+test_cleanup_LDADD = $(egg_LIBS)
+
+test_hex_SOURCES = egg/test-hex.c
+test_hex_LDADD = $(egg_LIBS)
+
+test_hkdf_SOURCES = egg/test-hkdf.c
+test_hkdf_LDADD = $(egg_LIBS)
+
+test_oid_SOURCES = egg/test-oid.c
+test_oid_LDADD = $(egg_LIBS)
+
+test_secmem_SOURCES = egg/test-secmem.c
+test_secmem_LDADD = $(egg_LIBS)
-test_asn1x_LDADD = \
- $(top_builddir)/egg/libegg-asn1x.la \
- $(LDADD)
+test_padding_SOURCES = egg/test-padding.c
+test_padding_LDADD = $(egg_LIBS)
-check_PROGRAMS = $(TEST_PROGS)
+test_symkey_SOURCES = egg/test-symkey.c
+test_symkey_LDADD = $(egg_LIBS)
-test: $(TEST_PROGS)
- gtester --verbose -m $(TEST_MODE) --g-fatal-warnings $(TEST_PROGS)
+test_armor_SOURCES = egg/test-armor.c
+test_armor_LDADD = $(egg_LIBS)
-check-local: test
+test_openssl_SOURCES = egg/test-openssl.c
+test_openssl_LDADD = $(egg_LIBS)
-all-local: $(check_PROGRAMS)
+test_dh_SOURCES = egg/test-dh.c
+test_dh_LDADD = $(egg_LIBS)
-EXTRA_DIST += \
- test.asn \
- fixtures
+test_spawn_SOURCES = egg/test-spawn.c
+test_spawn_LDADD = $(egg_LIBS)
diff --git a/egg/egg-mkdtemp.c b/egg/egg-mkdtemp.c
index c452c33e..3aad2480 100644
--- a/egg/egg-mkdtemp.c
+++ b/egg/egg-mkdtemp.c
@@ -14,6 +14,7 @@
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
<http://www.gnu.org/licenses/>.
+*/
/* Extracted from misc/mkdtemp.c and sysdeps/posix/tempname.c. */
diff --git a/egg/egg-mkdtemp.h b/egg/egg-mkdtemp.h
index dde7e02f..b1438382 100644
--- a/egg/egg-mkdtemp.h
+++ b/egg/egg-mkdtemp.h
@@ -15,6 +15,7 @@
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
<http://www.gnu.org/licenses/>.
+*/
/* Extracted from misc/mkdtemp.c and sysdeps/posix/tempname.c. */
diff --git a/egg/egg-timegm.c b/egg/egg-timegm.c
index 79648164..c3effdf3 100644
--- a/egg/egg-timegm.c
+++ b/egg/egg-timegm.c
@@ -14,6 +14,7 @@
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
<http://www.gnu.org/licenses/>.
+*/
/* Extracted from misc/mkdtemp.c and sysdeps/posix/tempname.c. */
diff --git a/egg/egg-timegm.h b/egg/egg-timegm.h
index ae32a1e3..b24c14c0 100644
--- a/egg/egg-timegm.h
+++ b/egg/egg-timegm.h
@@ -15,6 +15,7 @@
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
<http://www.gnu.org/licenses/>.
+*/
/* Extracted from misc/mkdtemp.c and sysdeps/posix/tempname.c. */
diff --git a/egg/test-asn1.c b/egg/test-asn1.c
index 598d26a3..7e03549c 100644
--- a/egg/test-asn1.c
+++ b/egg/test-asn1.c
@@ -1747,7 +1747,7 @@ setup (Test *test, gconstpointer unused)
{
GBytes *bytes;
- if (!g_file_get_contents (SRCDIR "/fixtures/test-certificate-1.der",
+ if (!g_file_get_contents (SRCDIR "/egg/fixtures/test-certificate-1.der",
(gchar**)&test->data, &test->n_data, NULL))
g_assert_not_reached ();
diff --git a/egg/test-asn1x.c b/egg/test-asn1x.c
index 879def2a..fd347e21 100644
--- a/egg/test-asn1x.c
+++ b/egg/test-asn1x.c
@@ -74,11 +74,11 @@ typedef struct {
} Fixture;
static const Fixture parse_test_fixtures[] = {
- { pkix_asn1_tab, SRCDIR "/fixtures/test-certificate-1.der", "Certificate" },
- { pkix_asn1_tab, SRCDIR "/fixtures/test-pkcs8-1.der", "pkcs-8-PrivateKeyInfo" },
- { pk_asn1_tab, SRCDIR "/fixtures/test-rsakey-1.der", "RSAPrivateKey" },
- { pkix_asn1_tab, SRCDIR "/fixtures/test-pkcs7-1.der", "pkcs-7-ContentInfo" },
- { pkix_asn1_tab, SRCDIR "/fixtures/test-pkcs7-2.der", "pkcs-7-ContentInfo" },
+ { pkix_asn1_tab, SRCDIR "/egg/fixtures/test-certificate-1.der", "Certificate" },
+ { pkix_asn1_tab, SRCDIR "/egg/fixtures/test-pkcs8-1.der", "pkcs-8-PrivateKeyInfo" },
+ { pk_asn1_tab, SRCDIR "/egg/fixtures/test-rsakey-1.der", "RSAPrivateKey" },
+ { pkix_asn1_tab, SRCDIR "/egg/fixtures/test-pkcs7-1.der", "pkcs-7-ContentInfo" },
+ { pkix_asn1_tab, SRCDIR "/egg/fixtures/test-pkcs7-2.der", "pkcs-7-ContentInfo" },
};
static void
@@ -191,9 +191,9 @@ main (int argc, char **argv)
g_free (name);
}
- g_test_add ("/asn1x/pkcs12-decode/1", Test, SRCDIR "/fixtures/test-pkcs12-1.der",
+ g_test_add ("/asn1x/pkcs12-decode/1", Test, SRCDIR "/egg/fixtures/test-pkcs12-1.der",
setup, test_pkcs12_decode, teardown);
- g_test_add ("/asn1x/pkcs5-personal-name/invalid", Test, SRCDIR "/fixtures/test-personalname-invalid.der",
+ g_test_add ("/asn1x/pkcs5-personal-name/invalid", Test, SRCDIR "/egg/fixtures/test-personalname-invalid.der",
setup, test_personal_name_invalid, teardown);
return g_test_run ();
diff --git a/egg/test-dn.c b/egg/test-dn.c
index 347a5cdf..d0800797 100644
--- a/egg/test-dn.c
+++ b/egg/test-dn.c
@@ -46,7 +46,7 @@ setup (Test *test, gconstpointer unused)
{
GBytes *bytes;
- if (!g_file_get_contents (SRCDIR "/fixtures/test-certificate-1.der",
+ if (!g_file_get_contents (SRCDIR "/egg/fixtures/test-certificate-1.der",
(gchar**)&test->data, &test->n_data, NULL))
g_assert_not_reached ();
diff --git a/egg/test-openssl.c b/egg/test-openssl.c
index 4f511265..4e417679 100644
--- a/egg/test-openssl.c
+++ b/egg/test-openssl.c
@@ -53,7 +53,7 @@ setup (Test *test, gconstpointer unused)
gchar *contents;
gsize length;
- if (!g_file_get_contents (SRCDIR "/fixtures/pem-rsa-enc.key", &contents, &length, NULL))
+ if (!g_file_get_contents (SRCDIR "/egg/fixtures/pem-rsa-enc.key", &contents, &length, NULL))
g_assert_not_reached ();
test->input = g_bytes_new_take (contents, length);
diff --git a/egg/test-spawn.c b/egg/test-spawn.c
index 347f9ba4..ee63b29d 100644
--- a/egg/test-spawn.c
+++ b/egg/test-spawn.c
@@ -175,7 +175,7 @@ test_sync (void)
data.parent_pid = getpid();
data.index = 80;
- ret = egg_spawn_sync_with_callbacks (SRCDIR "/fixtures",
+ ret = egg_spawn_sync_with_callbacks (SRCDIR "/egg/fixtures",
echo_argv, NULL, 0, &pid,
&echo_callbacks, &data,
&exit_status, &error);
@@ -196,7 +196,7 @@ test_sync_error (void)
GError *error = NULL;
gboolean ret;
- ret = egg_spawn_sync_with_callbacks (SRCDIR "/fixtures",
+ ret = egg_spawn_sync_with_callbacks (SRCDIR "/egg/fixtures",
error_argv, NULL, 0, NULL,
NULL, NULL,
NULL, &error);
@@ -219,7 +219,7 @@ test_async (void)
data.index = 80;
data.is_async = TRUE;
- ret = egg_spawn_async_with_callbacks (SRCDIR "/fixtures",
+ ret = egg_spawn_async_with_callbacks (SRCDIR "/egg/fixtures",
echo_argv, NULL, 0, &pid,
&echo_callbacks, &data,
NULL, &error);
@@ -246,7 +246,7 @@ test_async_none (void)
data.parent_pid = getpid();
data.is_async = TRUE;
- ret = egg_spawn_async_with_callbacks (SRCDIR "/fixtures",
+ ret = egg_spawn_async_with_callbacks (SRCDIR "/egg/fixtures",
echo_argv, NULL, 0, NULL,
&null_callbacks, &data,
NULL, &error);
@@ -267,7 +267,7 @@ test_async_error (void)
GError *error = NULL;
guint ret;
- ret = egg_spawn_async_with_callbacks (SRCDIR "/fixtures",
+ ret = egg_spawn_async_with_callbacks (SRCDIR "/egg/fixtures",
error_argv, NULL, 0, NULL,
NULL, NULL,
NULL, &error);