Browse Source

stringbuilder: fix ccan/str test dependency.

It's a test dependency, not a core one, so it belongs under "testdepends".

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Rusty Russell 11 years ago
parent
commit
c1bace5e73
2 changed files with 6 additions and 11 deletions
  1. 5 4
      ccan/stringbuilder/_info
  2. 1 7
      ccan/stringbuilder/test/run.c

+ 5 - 4
ccan/stringbuilder/_info

@@ -48,10 +48,11 @@ int main(int argc, char *argv[])
 		return 1;
 
 	if (strcmp(argv[1], "depends") == 0) {
-		/*
-		 * This triggers a circular dependency!
-		 * printf("ccan/str\n");
-		 */
+		return 0;
+	}
+
+	if (strcmp(argv[1], "testdepends") == 0) {
+		printf("ccan/str\n");
 		return 0;
 	}
 

+ 1 - 7
ccan/stringbuilder/test/run.c

@@ -1,15 +1,9 @@
 #include <ccan/stringbuilder/stringbuilder.h>
 #include <ccan/stringbuilder/stringbuilder.c>
+#include <ccan/str/str.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <errno.h>
-/*
- * This triggers a circular dependency
- * #include <ccan/str/str.h>
- *
- * We only want the following macro:
- */
-#define streq(s1,s2) (!strcmp(s1,s2))
 
 #include <ccan/tap/tap.h>