]> git.ozlabs.org Git - ccan/blobdiff - tools/manifest.c
rfc822: Update rfc822 module to use testdepends
[ccan] / tools / manifest.c
index e41c7abc371b8d1b80dcf41ab67b126b09fbcf93..e368b4ed1e2a8b0470218cc30a42aa7f5da3547d 100644 (file)
@@ -23,8 +23,6 @@
 #include <stdarg.h>
 #include <assert.h>
 
-const char *ccan_dir;
-
 static size_t dir_hash(const char *name)
 {
        return hash(name, strlen(name), 0);
@@ -239,6 +237,7 @@ struct manifest *get_manifest(const void *ctx, const char *dir)
        list_head_init(&m->examples);
        list_head_init(&m->mangled_examples);
        list_head_init(&m->deps);
+       list_head_init(&m->test_deps);
 
        len = strlen(m->dir);
        while (len && m->dir[len-1] == '/')
@@ -249,21 +248,6 @@ struct manifest *get_manifest(const void *ctx, const char *dir)
                errx(1, "I don't expect to be run from the root directory");
        m->basename++;
 
-       /* We expect the ccan dir to be two levels above module dir. */
-       if (!ccan_dir) {
-               char *p, *dir;
-               dir = talloc_strdup(NULL, m->dir);
-               p = strrchr(dir, '/');
-               if (!p)
-                       errx(1, "I expect the ccan root directory in ../..");
-               *p = '\0';
-               p = strrchr(dir, '/');
-               if (!p)
-                       errx(1, "I expect the ccan root directory in ../..");
-               *p = '\0';
-               ccan_dir = dir;
-       }
-
        add_files(m, "");
 
        /* Nicer to run tests in a predictable order. */