summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile16
-rw-r--r--README4
-rw-r--r--ccan/alignof/_info.c (renamed from alignof/_info.c)2
-rw-r--r--ccan/alignof/alignof.h (renamed from alignof/alignof.h)0
-rw-r--r--ccan/alignof/test/run.c (renamed from alignof/test/run.c)0
-rw-r--r--ccan/alloc/_info.c (renamed from alloc/_info.c)2
-rw-r--r--ccan/alloc/alloc.c (renamed from alloc/alloc.c)0
-rw-r--r--ccan/alloc/alloc.h (renamed from alloc/alloc.h)0
-rw-r--r--ccan/alloc/test/run.c (renamed from alloc/test/run.c)0
-rw-r--r--ccan/build_assert/_info.c (renamed from build_assert/_info.c)0
-rw-r--r--ccan/build_assert/build_assert.h (renamed from build_assert/build_assert.h)0
-rw-r--r--ccan/build_assert/test/compile_fail-expr.c (renamed from build_assert/test/compile_fail-expr.c)0
-rw-r--r--ccan/build_assert/test/compile_fail.c (renamed from build_assert/test/compile_fail.c)0
-rw-r--r--ccan/build_assert/test/compile_ok.c (renamed from build_assert/test/compile_ok.c)0
-rw-r--r--ccan/build_assert/test/run-EXPR_BUILD_ASSERT.c (renamed from build_assert/test/run-EXPR_BUILD_ASSERT.c)0
-rw-r--r--ccan/check_type/_info.c (renamed from check_type/_info.c)2
-rw-r--r--ccan/check_type/check_type.h (renamed from check_type/check_type.h)0
-rw-r--r--ccan/check_type/test/compile_fail-check_type.c (renamed from check_type/test/compile_fail-check_type.c)0
-rw-r--r--ccan/check_type/test/compile_fail-check_type_unsigned.c (renamed from check_type/test/compile_fail-check_type_unsigned.c)0
-rw-r--r--ccan/check_type/test/compile_fail-check_types_match.c (renamed from check_type/test/compile_fail-check_types_match.c)0
-rw-r--r--ccan/check_type/test/run.c (renamed from check_type/test/run.c)0
-rw-r--r--ccan/container_of/_info.c (renamed from container_of/_info.c)2
-rw-r--r--ccan/container_of/container_of.h (renamed from container_of/container_of.h)0
-rw-r--r--ccan/container_of/test/compile_fail-bad-type.c (renamed from container_of/test/compile_fail-bad-type.c)0
-rw-r--r--ccan/container_of/test/compile_fail-types.c (renamed from container_of/test/compile_fail-types.c)0
-rw-r--r--ccan/container_of/test/compile_fail-var-types.c (renamed from container_of/test/compile_fail-var-types.c)0
-rw-r--r--ccan/container_of/test/run.c (renamed from container_of/test/run.c)0
-rw-r--r--ccan/list/_info.c (renamed from list/_info.c)2
-rw-r--r--ccan/list/list.c (renamed from list/list.c)0
-rw-r--r--ccan/list/list.h (renamed from list/list.h)0
-rw-r--r--ccan/list/test/run.c (renamed from list/test/run.c)0
-rw-r--r--ccan/noerr/_info.c (renamed from noerr/_info.c)0
-rw-r--r--ccan/noerr/noerr.c (renamed from noerr/noerr.c)0
-rw-r--r--ccan/noerr/noerr.h (renamed from noerr/noerr.h)0
-rw-r--r--ccan/noerr/test/run.c (renamed from noerr/test/run.c)0
-rw-r--r--ccan/string/_info.c (renamed from string/_info.c)2
-rw-r--r--ccan/string/string.h (renamed from string/string.h)0
-rw-r--r--ccan/string/test/run.c (renamed from string/test/run.c)0
-rw-r--r--ccan/talloc/TODO (renamed from talloc/TODO)0
-rw-r--r--ccan/talloc/_info.c (renamed from talloc/_info.c)2
-rw-r--r--ccan/talloc/talloc.3.xml (renamed from talloc/talloc.3.xml)0
-rw-r--r--ccan/talloc/talloc.c (renamed from talloc/talloc.c)0
-rw-r--r--ccan/talloc/talloc.h (renamed from talloc/talloc.h)2
-rw-r--r--ccan/talloc/test/run.c (renamed from talloc/test/run.c)0
-rw-r--r--ccan/tap/_info.c (renamed from tap/_info.c)3
-rw-r--r--ccan/tap/tap.3 (renamed from tap/tap.3)0
-rw-r--r--ccan/tap/tap.c (renamed from tap/tap.c)0
-rw-r--r--ccan/tap/tap.h (renamed from tap/tap.h)0
-rw-r--r--ccan/tap/test/run.c (renamed from tap/test/run.c)21
-rw-r--r--ccan/typesafe_cb/_info.c (renamed from typesafe_cb/_info.c)0
-rw-r--r--ccan/typesafe_cb/test/compile_fail-cast_if_type.c (renamed from typesafe_cb/test/compile_fail-cast_if_type.c)0
-rw-r--r--ccan/typesafe_cb/test/compile_fail-typesafe_cb-int.c (renamed from typesafe_cb/test/compile_fail-typesafe_cb-int.c)0
-rw-r--r--ccan/typesafe_cb/test/compile_fail-typesafe_cb.c (renamed from typesafe_cb/test/compile_fail-typesafe_cb.c)0
-rw-r--r--ccan/typesafe_cb/test/compile_fail-typesafe_cb_postargs.c (renamed from typesafe_cb/test/compile_fail-typesafe_cb_postargs.c)0
-rw-r--r--ccan/typesafe_cb/test/compile_fail-typesafe_cb_preargs.c (renamed from typesafe_cb/test/compile_fail-typesafe_cb_preargs.c)0
-rw-r--r--ccan/typesafe_cb/test/run.c (renamed from typesafe_cb/test/run.c)0
-rw-r--r--ccan/typesafe_cb/typesafe_cb.h (renamed from typesafe_cb/typesafe_cb.h)0
-rw-r--r--ccan_tools/Makefile10
-rw-r--r--ccan_tools/ccanlint/Makefile31
-rw-r--r--tools/Makefile10
-rw-r--r--tools/ccanlint/Makefile32
-rw-r--r--tools/ccanlint/ccanlint.c (renamed from ccan_tools/ccanlint/ccanlint.c)0
-rw-r--r--tools/ccanlint/ccanlint.h (renamed from ccan_tools/ccanlint/ccanlint.h)0
-rw-r--r--tools/ccanlint/file_analysis.c (renamed from ccan_tools/ccanlint/file_analysis.c)0
-rw-r--r--tools/ccanlint/get_file_lines.c (renamed from ccan_tools/ccanlint/get_file_lines.c)0
-rw-r--r--tools/ccanlint/get_file_lines.h (renamed from ccan_tools/ccanlint/get_file_lines.h)0
-rw-r--r--tools/ccanlint/has_main_header.c (renamed from ccan_tools/ccanlint/has_main_header.c)0
-rw-r--r--tools/ccanlint/has_tests.c (renamed from ccan_tools/ccanlint/has_tests.c)0
-rw-r--r--tools/ccanlint/idempotent.c (renamed from ccan_tools/ccanlint/idempotent.c)0
-rw-r--r--tools/ccanlint/no_info.c (renamed from ccan_tools/ccanlint/no_info.c)0
-rw-r--r--tools/ccanlint/trailing_whitespace.c (renamed from ccan_tools/ccanlint/trailing_whitespace.c)0
-rw-r--r--tools/doc_extract.c (renamed from ccan_tools/doc_extract.c)0
-rw-r--r--tools/namespacize.c (renamed from ccan_tools/namespacize.c)0
-rw-r--r--tools/run_tests.c (renamed from ccan_tools/run_tests.c)10
-rwxr-xr-xtools/test_all.sh (renamed from ccan_tools/test_all.sh)0
75 files changed, 76 insertions, 77 deletions
diff --git a/Makefile b/Makefile
index 76b79e33..b60874d7 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,9 @@
# Hacky makefile to compile everything and run the tests in some kind of sane order.
# V=--verbose for verbose tests.
-CFLAGS=-O3 -Wall -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Werror -I.
+CFLAGS=-O3 -Wall -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Werror -Iccan -I.
-ALL=$(patsubst %/test, %, $(wildcard */test))
+ALL=$(patsubst ccan/%/test, ccan/%, $(wildcard ccan/*/test))
ALL_DEPENDS=$(patsubst %, %/.depends, $(ALL))
test-all: $(ALL_DEPENDS)
@@ -16,13 +16,13 @@ distclean: clean
$(ALL_DEPENDS): %/.depends: %/_info
@$< depends > $@ || ( rm -f $@; exit 1 )
-test-%: ccan_tools/run_tests
+test-ccan/%: tools/run_tests
@echo Testing $*...
- @if ccan_tools/run_tests $(V) $* | grep ^'not ok'; then exit 1; else exit 0; fi
+ @if tools/run_tests $(V) ccan/$* | grep ^'not ok'; then exit 1; else exit 0; fi
-ccanlint: ccan_tools/ccanlint/ccanlint
+ccanlint: tools/ccanlint/ccanlint
-clean: ccan_tools-clean
- rm -f `find . -name '*.o'`
+clean: tools-clean
+ rm -f `find . -name '*.o'` `find . -name '.depends'`
-include ccan_tools/Makefile
+include tools/Makefile
diff --git a/README b/README
index 65bb8531..9019fbb2 100644
--- a/README
+++ b/README
@@ -1,8 +1,8 @@
-ccan_tools:
+tools:
This is currently a bootstrap junkyard for ccan tools.
It is expected that some of this code, being generally useful, will be
shuffled out to their own modules over time.
-other:
+ccan:
The beginnings of a ccan repository.
diff --git a/alignof/_info.c b/ccan/alignof/_info.c
index b5afa025..4cccba33 100644
--- a/alignof/_info.c
+++ b/ccan/alignof/_info.c
@@ -37,7 +37,7 @@ int main(int argc, char *argv[])
return 1;
if (strcmp(argv[1], "depends") == 0) {
- printf("build_assert\n");
+ printf("ccan/build_assert\n");
return 0;
}
diff --git a/alignof/alignof.h b/ccan/alignof/alignof.h
index d146e4cd..d146e4cd 100644
--- a/alignof/alignof.h
+++ b/ccan/alignof/alignof.h
diff --git a/alignof/test/run.c b/ccan/alignof/test/run.c
index f76fb669..f76fb669 100644
--- a/alignof/test/run.c
+++ b/ccan/alignof/test/run.c
diff --git a/alloc/_info.c b/ccan/alloc/_info.c
index 59a66380..03e20afc 100644
--- a/alloc/_info.c
+++ b/ccan/alloc/_info.c
@@ -95,7 +95,7 @@ int main(int argc, char *argv[])
return 1;
if (strcmp(argv[1], "depends") == 0) {
- printf("build_assert\n");
+ printf("ccan/build_assert\n");
return 0;
}
diff --git a/alloc/alloc.c b/ccan/alloc/alloc.c
index f7a05e2d..f7a05e2d 100644
--- a/alloc/alloc.c
+++ b/ccan/alloc/alloc.c
diff --git a/alloc/alloc.h b/ccan/alloc/alloc.h
index 29c29d07..29c29d07 100644
--- a/alloc/alloc.h
+++ b/ccan/alloc/alloc.h
diff --git a/alloc/test/run.c b/ccan/alloc/test/run.c
index 8cfe8b42..8cfe8b42 100644
--- a/alloc/test/run.c
+++ b/ccan/alloc/test/run.c
diff --git a/build_assert/_info.c b/ccan/build_assert/_info.c
index 555aae21..555aae21 100644
--- a/build_assert/_info.c
+++ b/ccan/build_assert/_info.c
diff --git a/build_assert/build_assert.h b/ccan/build_assert/build_assert.h
index 4b0d75e4..4b0d75e4 100644
--- a/build_assert/build_assert.h
+++ b/ccan/build_assert/build_assert.h
diff --git a/build_assert/test/compile_fail-expr.c b/ccan/build_assert/test/compile_fail-expr.c
index 41cdc0f8..41cdc0f8 100644
--- a/build_assert/test/compile_fail-expr.c
+++ b/ccan/build_assert/test/compile_fail-expr.c
diff --git a/build_assert/test/compile_fail.c b/ccan/build_assert/test/compile_fail.c
index a6867db5..a6867db5 100644
--- a/build_assert/test/compile_fail.c
+++ b/ccan/build_assert/test/compile_fail.c
diff --git a/build_assert/test/compile_ok.c b/ccan/build_assert/test/compile_ok.c
index bc5541f5..bc5541f5 100644
--- a/build_assert/test/compile_ok.c
+++ b/ccan/build_assert/test/compile_ok.c
diff --git a/build_assert/test/run-EXPR_BUILD_ASSERT.c b/ccan/build_assert/test/run-EXPR_BUILD_ASSERT.c
index 7fd0c49f..7fd0c49f 100644
--- a/build_assert/test/run-EXPR_BUILD_ASSERT.c
+++ b/ccan/build_assert/test/run-EXPR_BUILD_ASSERT.c
diff --git a/check_type/_info.c b/ccan/check_type/_info.c
index 06e90eb4..176e445a 100644
--- a/check_type/_info.c
+++ b/ccan/check_type/_info.c
@@ -21,7 +21,7 @@ int main(int argc, char *argv[])
if (strcmp(argv[1], "depends") == 0) {
#if !HAVE_TYPEOF
- printf("build_assert\n");
+ printf("ccan/build_assert\n");
#endif
return 0;
}
diff --git a/check_type/check_type.h b/ccan/check_type/check_type.h
index e05236f8..e05236f8 100644
--- a/check_type/check_type.h
+++ b/ccan/check_type/check_type.h
diff --git a/check_type/test/compile_fail-check_type.c b/ccan/check_type/test/compile_fail-check_type.c
index d19fe86f..d19fe86f 100644
--- a/check_type/test/compile_fail-check_type.c
+++ b/ccan/check_type/test/compile_fail-check_type.c
diff --git a/check_type/test/compile_fail-check_type_unsigned.c b/ccan/check_type/test/compile_fail-check_type_unsigned.c
index 6b18acb5..6b18acb5 100644
--- a/check_type/test/compile_fail-check_type_unsigned.c
+++ b/ccan/check_type/test/compile_fail-check_type_unsigned.c
diff --git a/check_type/test/compile_fail-check_types_match.c b/ccan/check_type/test/compile_fail-check_types_match.c
index bc1f9c31..bc1f9c31 100644
--- a/check_type/test/compile_fail-check_types_match.c
+++ b/ccan/check_type/test/compile_fail-check_types_match.c
diff --git a/check_type/test/run.c b/ccan/check_type/test/run.c
index f4b33c16..f4b33c16 100644
--- a/check_type/test/run.c
+++ b/ccan/check_type/test/run.c
diff --git a/container_of/_info.c b/ccan/container_of/_info.c
index 7705e38c..96c12d88 100644
--- a/container_of/_info.c
+++ b/ccan/container_of/_info.c
@@ -39,7 +39,7 @@ int main(int argc, char *argv[])
return 1;
if (strcmp(argv[1], "depends") == 0) {
- printf("check_type\n");
+ printf("ccan/check_type\n");
return 0;
}
diff --git a/container_of/container_of.h b/ccan/container_of/container_of.h
index 1f4b18e4..1f4b18e4 100644
--- a/container_of/container_of.h
+++ b/ccan/container_of/container_of.h
diff --git a/container_of/test/compile_fail-bad-type.c b/ccan/container_of/test/compile_fail-bad-type.c
index 01dfd454..01dfd454 100644
--- a/container_of/test/compile_fail-bad-type.c
+++ b/ccan/container_of/test/compile_fail-bad-type.c
diff --git a/container_of/test/compile_fail-types.c b/ccan/container_of/test/compile_fail-types.c
index 69f02daf..69f02daf 100644
--- a/container_of/test/compile_fail-types.c
+++ b/ccan/container_of/test/compile_fail-types.c
diff --git a/container_of/test/compile_fail-var-types.c b/ccan/container_of/test/compile_fail-var-types.c
index 5c776798..5c776798 100644
--- a/container_of/test/compile_fail-var-types.c
+++ b/ccan/container_of/test/compile_fail-var-types.c
diff --git a/container_of/test/run.c b/ccan/container_of/test/run.c
index dd57204d..dd57204d 100644
--- a/container_of/test/run.c
+++ b/ccan/container_of/test/run.c
diff --git a/list/_info.c b/ccan/list/_info.c
index 0402b490..dc3c3e64 100644
--- a/list/_info.c
+++ b/ccan/list/_info.c
@@ -55,7 +55,7 @@ int main(int argc, char *argv[])
return 1;
if (strcmp(argv[1], "depends") == 0) {
- printf("container_of\n");
+ printf("ccan/container_of\n");
return 0;
}
diff --git a/list/list.c b/ccan/list/list.c
index b72f8f67..b72f8f67 100644
--- a/list/list.c
+++ b/ccan/list/list.c
diff --git a/list/list.h b/ccan/list/list.h
index c664d834..c664d834 100644
--- a/list/list.h
+++ b/ccan/list/list.h
diff --git a/list/test/run.c b/ccan/list/test/run.c
index 66b9630d..66b9630d 100644
--- a/list/test/run.c
+++ b/ccan/list/test/run.c
diff --git a/noerr/_info.c b/ccan/noerr/_info.c
index 96fbbcd1..96fbbcd1 100644
--- a/noerr/_info.c
+++ b/ccan/noerr/_info.c
diff --git a/noerr/noerr.c b/ccan/noerr/noerr.c
index d6df81f7..d6df81f7 100644
--- a/noerr/noerr.c
+++ b/ccan/noerr/noerr.c
diff --git a/noerr/noerr.h b/ccan/noerr/noerr.h
index 559ba613..559ba613 100644
--- a/noerr/noerr.h
+++ b/ccan/noerr/noerr.h
diff --git a/noerr/test/run.c b/ccan/noerr/test/run.c
index 6d3c6837..6d3c6837 100644
--- a/noerr/test/run.c
+++ b/ccan/noerr/test/run.c
diff --git a/string/_info.c b/ccan/string/_info.c
index 2d1709f7..9cb691ce 100644
--- a/string/_info.c
+++ b/ccan/string/_info.c
@@ -9,7 +9,7 @@
* the standard string.h.
*
* Example:
- * #include "ccan/string.h"
+ * #include "string/string.h"
*
* int main(int argc, char *argv[])
* {
diff --git a/string/string.h b/ccan/string/string.h
index f4997c69..f4997c69 100644
--- a/string/string.h
+++ b/ccan/string/string.h
diff --git a/string/test/run.c b/ccan/string/test/run.c
index fded0e49..fded0e49 100644
--- a/string/test/run.c
+++ b/ccan/string/test/run.c
diff --git a/talloc/TODO b/ccan/talloc/TODO
index 0671a6dd..0671a6dd 100644
--- a/talloc/TODO
+++ b/ccan/talloc/TODO
diff --git a/talloc/_info.c b/ccan/talloc/_info.c
index 18da417f..bc48736f 100644
--- a/talloc/_info.c
+++ b/ccan/talloc/_info.c
@@ -95,7 +95,7 @@ int main(int argc, char *argv[])
return 1;
if (strcmp(argv[1], "depends") == 0) {
- printf("typesafe_cb\n");
+ printf("ccan/typesafe_cb\n");
return 0;
}
diff --git a/talloc/talloc.3.xml b/ccan/talloc/talloc.3.xml
index 83ca67a4..83ca67a4 100644
--- a/talloc/talloc.3.xml
+++ b/ccan/talloc/talloc.3.xml
diff --git a/talloc/talloc.c b/ccan/talloc/talloc.c
index d624b917..d624b917 100644
--- a/talloc/talloc.c
+++ b/ccan/talloc/talloc.c
diff --git a/talloc/talloc.h b/ccan/talloc/talloc.h
index 5566a040..7da8d975 100644
--- a/talloc/talloc.h
+++ b/ccan/talloc/talloc.h
@@ -27,7 +27,7 @@
#include <stdio.h>
#include <stdarg.h>
#include "config.h"
-#include "typesafe_cb/typesafe_cb.h"
+#include "ccan/typesafe_cb/typesafe_cb.h"
/*
this uses a little trick to allow __LINE__ to be stringified
diff --git a/talloc/test/run.c b/ccan/talloc/test/run.c
index 7369186c..7369186c 100644
--- a/talloc/test/run.c
+++ b/ccan/talloc/test/run.c
diff --git a/tap/_info.c b/ccan/tap/_info.c
index 7f415a23..2e628914 100644
--- a/tap/_info.c
+++ b/ccan/tap/_info.c
@@ -51,8 +51,5 @@ int main(int argc, char *argv[])
if (strcmp(argv[1], "depends") == 0)
return 0;
- if (strcmp(argv[1], "license") == 0)
- return "BSD";
-
return 1;
}
diff --git a/tap/tap.3 b/ccan/tap/tap.3
index 5395aef7..5395aef7 100644
--- a/tap/tap.3
+++ b/ccan/tap/tap.3
diff --git a/tap/tap.c b/ccan/tap/tap.c
index 4bbd977b..4bbd977b 100644
--- a/tap/tap.c
+++ b/ccan/tap/tap.c
diff --git a/tap/tap.h b/ccan/tap/tap.h
index f854d3e3..f854d3e3 100644
--- a/tap/tap.h
+++ b/ccan/tap/tap.h
diff --git a/tap/test/run.c b/ccan/tap/test/run.c
index 97af45c8..2f718cc2 100644
--- a/tap/test/run.c
+++ b/ccan/tap/test/run.c
@@ -11,6 +11,7 @@
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>
+#include <fnmatch.h>
/* We dup stderr to here. */
static int stderrfd;
@@ -32,18 +33,18 @@ static void failmsg(const char *fmt, ...)
_exit(1);
}
-static void expect(int fd, const char *str)
+static void expect(int fd, const char *pattern)
{
- char buffer[PIPE_BUF];
+ char buffer[PIPE_BUF+1];
int r;
- r = read(fd, buffer, sizeof(buffer));
+ r = read(fd, buffer, sizeof(buffer)-1);
if (r < 0)
failmsg("reading from pipe");
+ buffer[r] = '\0';
- if (strlen(str) != r || strncmp(str, buffer, r) != 0)
- failmsg("Expected '%s' got '%.*s'",
- str, r, buffer);
+ if (fnmatch(pattern, buffer, 0) != 0)
+ failmsg("Expected '%s' got '%s'", pattern, buffer);
}
int main(int argc, char *argv[])
@@ -75,21 +76,21 @@ int main(int argc, char *argv[])
ok(0, "msg2");
expect(p[0], "not ok 2 - msg2\n"
- "# Failed test (tap/test/run.c:main() at line 76)\n");
+ "# Failed test (*tap/test/run.c:main() at line 77)\n");
ok1(true);
expect(p[0], "ok 3 - true\n");
ok1(false);
expect(p[0], "not ok 4 - false\n"
- "# Failed test (tap/test/run.c:main() at line 83)\n");
+ "# Failed test (*tap/test/run.c:main() at line 84)\n");
pass("passed");
expect(p[0], "ok 5 - passed\n");
fail("failed");
expect(p[0], "not ok 6 - failed\n"
- "# Failed test (tap/test/run.c:main() at line 90)\n");
+ "# Failed test (*tap/test/run.c:main() at line 91)\n");
skip(2, "skipping %s", "test");
expect(p[0], "ok 7 # skip skipping test\n"
@@ -98,7 +99,7 @@ int main(int argc, char *argv[])
todo_start("todo");
ok1(false);
expect(p[0], "not ok 9 - false # TODO todo\n"
- "# Failed (TODO) test (tap/test/run.c:main() at line 99)\n");
+ "# Failed (TODO) test (*tap/test/run.c:main() at line 100)\n");
ok1(true);
expect(p[0], "ok 10 - true # TODO todo\n");
todo_end();
diff --git a/typesafe_cb/_info.c b/ccan/typesafe_cb/_info.c
index 725b2665..725b2665 100644
--- a/typesafe_cb/_info.c
+++ b/ccan/typesafe_cb/_info.c
diff --git a/typesafe_cb/test/compile_fail-cast_if_type.c b/ccan/typesafe_cb/test/compile_fail-cast_if_type.c
index 1e417cba..1e417cba 100644
--- a/typesafe_cb/test/compile_fail-cast_if_type.c
+++ b/ccan/typesafe_cb/test/compile_fail-cast_if_type.c
diff --git a/typesafe_cb/test/compile_fail-typesafe_cb-int.c b/ccan/typesafe_cb/test/compile_fail-typesafe_cb-int.c
index 54d0e7ba..54d0e7ba 100644
--- a/typesafe_cb/test/compile_fail-typesafe_cb-int.c
+++ b/ccan/typesafe_cb/test/compile_fail-typesafe_cb-int.c
diff --git a/typesafe_cb/test/compile_fail-typesafe_cb.c b/ccan/typesafe_cb/test/compile_fail-typesafe_cb.c
index d305d5fb..d305d5fb 100644
--- a/typesafe_cb/test/compile_fail-typesafe_cb.c
+++ b/ccan/typesafe_cb/test/compile_fail-typesafe_cb.c
diff --git a/typesafe_cb/test/compile_fail-typesafe_cb_postargs.c b/ccan/typesafe_cb/test/compile_fail-typesafe_cb_postargs.c
index 099eb257..099eb257 100644
--- a/typesafe_cb/test/compile_fail-typesafe_cb_postargs.c
+++ b/ccan/typesafe_cb/test/compile_fail-typesafe_cb_postargs.c
diff --git a/typesafe_cb/test/compile_fail-typesafe_cb_preargs.c b/ccan/typesafe_cb/test/compile_fail-typesafe_cb_preargs.c
index 38daec51..38daec51 100644
--- a/typesafe_cb/test/compile_fail-typesafe_cb_preargs.c
+++ b/ccan/typesafe_cb/test/compile_fail-typesafe_cb_preargs.c
diff --git a/typesafe_cb/test/run.c b/ccan/typesafe_cb/test/run.c
index b04fae88..b04fae88 100644
--- a/typesafe_cb/test/run.c
+++ b/ccan/typesafe_cb/test/run.c
diff --git a/typesafe_cb/typesafe_cb.h b/ccan/typesafe_cb/typesafe_cb.h
index cc4ea8ad..cc4ea8ad 100644
--- a/typesafe_cb/typesafe_cb.h
+++ b/ccan/typesafe_cb/typesafe_cb.h
diff --git a/ccan_tools/Makefile b/ccan_tools/Makefile
deleted file mode 100644
index 7cf228ee..00000000
--- a/ccan_tools/Makefile
+++ /dev/null
@@ -1,10 +0,0 @@
-ccan_tools/run_tests: ccan_tools/run_tests.o tap/tap.o talloc/talloc.o
-
-ccan_tools/doc_extract: ccan_tools/doc_extract.c talloc/talloc.o
-
-ccan_tools/namespacize: ccan_tools/namespacize.c talloc/talloc.o
-
-ccan_tools-clean: ccanlint-clean
- rm -f run_tests doc_extract
-
-include ccan_tools/ccanlint/Makefile
diff --git a/ccan_tools/ccanlint/Makefile b/ccan_tools/ccanlint/Makefile
deleted file mode 100644
index ddc5534b..00000000
--- a/ccan_tools/ccanlint/Makefile
+++ /dev/null
@@ -1,31 +0,0 @@
-OBJS := ccan_tools/ccanlint/no_info.o \
- ccan_tools/ccanlint/has_main_header.o \
- ccan_tools/ccanlint/has_tests.o \
- ccan_tools/ccanlint/trailing_whitespace.o \
- ccan_tools/ccanlint/idempotent.o \
-
-FUTURE:=ccan_tools/ccanlint/if_have_not_ifdef.o \
- ccan_tools/ccanlint/needs_depends.o \
- ccan_tools/ccanlint/has_info_documentation.o \
- ccan_tools/ccanlint/has_header_documentation.o \
- ccan_tools/ccanlint/has_tests.o \
- ccan_tools/ccanlint/builds_ok.o \
- ccan_tools/ccanlint/builds_ok_all_have_variants.o \
- ccan_tools/ccanlint/run_tests.o \
- ccan_tools/ccanlint/test_coverage.o \
-
-ccan_tools/ccanlint/generated-init-tests: $(OBJS)
- cat $(OBJS:.o=.c) | sed -n 's/^struct ccanlint \([A-Za-z0-9_]*\) = {/{ extern struct ccanlint \1; list_add(\&tests, \&\1.list); }/p' >$@
-
-ccan_tools/ccanlint/ccanlint.o: ccan_tools/ccanlint/generated-init-tests
-
-ccan_tools/ccanlint/ccanlint: \
- $(OBJS) \
- ccan_tools/ccanlint/ccanlint.o \
- ccan_tools/ccanlint/get_file_lines.o \
- ccan_tools/ccanlint/file_analysis.o \
- talloc/talloc.o noerr/noerr.o
-
-ccanlint-clean:
- $(RM) ccan_tools/ccanlint/generated-init-tests
-
diff --git a/tools/Makefile b/tools/Makefile
new file mode 100644
index 00000000..a9ed7fd6
--- /dev/null
+++ b/tools/Makefile
@@ -0,0 +1,10 @@
+tools/run_tests: tools/run_tests.o ccan/tap/tap.o ccan/talloc/talloc.o
+
+tools/doc_extract: tools/doc_extract.c ccan/talloc/talloc.o
+
+tools/namespacize: tools/namespacize.c ccan/talloc/talloc.o
+
+tools-clean: ccanlint-clean
+ rm -f run_tests doc_extract namespacize
+
+include tools/ccanlint/Makefile
diff --git a/tools/ccanlint/Makefile b/tools/ccanlint/Makefile
new file mode 100644
index 00000000..f3f00a6f
--- /dev/null
+++ b/tools/ccanlint/Makefile
@@ -0,0 +1,32 @@
+OBJS := tools/ccanlint/no_info.o \
+ tools/ccanlint/has_main_header.o \
+ tools/ccanlint/has_tests.o \
+ tools/ccanlint/trailing_whitespace.o \
+ tools/ccanlint/idempotent.o \
+
+FUTURE:=tools/ccanlint/if_have_not_ifdef.o \
+ tools/ccanlint/needs_depends.o \
+ tools/ccanlint/has_info_documentation.o \
+ tools/ccanlint/has_header_documentation.o \
+ tools/ccanlint/has_tests.o \
+ tools/ccanlint/builds_ok.o \
+ tools/ccanlint/builds_ok_all_have_variants.o \
+ tools/ccanlint/run_tests.o \
+ tools/ccanlint/test_coverage.o \
+
+tools/ccanlint/generated-init-tests: $(OBJS)
+ cat $(OBJS:.o=.c) | sed -n 's/^struct ccanlint \([A-Za-z0-9_]*\) = {/{ extern struct ccanlint \1; list_add(\&tests, \&\1.list); }/p' >$@
+
+tools/ccanlint/ccanlint.o: tools/ccanlint/generated-init-tests
+
+tools/ccanlint/ccanlint: \
+ $(OBJS) \
+ tools/ccanlint/ccanlint.o \
+ tools/ccanlint/get_file_lines.o \
+ tools/ccanlint/file_analysis.o \
+ talloc/talloc.o noerr/noerr.o
+
+ccanlint-clean:
+ $(RM) tools/ccanlint/generated-init-tests
+ $(RM) tools/ccanlint/ccanlint
+
diff --git a/ccan_tools/ccanlint/ccanlint.c b/tools/ccanlint/ccanlint.c
index 001ee689..001ee689 100644
--- a/ccan_tools/ccanlint/ccanlint.c
+++ b/tools/ccanlint/ccanlint.c
diff --git a/ccan_tools/ccanlint/ccanlint.h b/tools/ccanlint/ccanlint.h
index 51f555ec..51f555ec 100644
--- a/ccan_tools/ccanlint/ccanlint.h
+++ b/tools/ccanlint/ccanlint.h
diff --git a/ccan_tools/ccanlint/file_analysis.c b/tools/ccanlint/file_analysis.c
index 1341e57b..1341e57b 100644
--- a/ccan_tools/ccanlint/file_analysis.c
+++ b/tools/ccanlint/file_analysis.c
diff --git a/ccan_tools/ccanlint/get_file_lines.c b/tools/ccanlint/get_file_lines.c
index e9ef302b..e9ef302b 100644
--- a/ccan_tools/ccanlint/get_file_lines.c
+++ b/tools/ccanlint/get_file_lines.c
diff --git a/ccan_tools/ccanlint/get_file_lines.h b/tools/ccanlint/get_file_lines.h
index 2f8455a5..2f8455a5 100644
--- a/ccan_tools/ccanlint/get_file_lines.h
+++ b/tools/ccanlint/get_file_lines.h
diff --git a/ccan_tools/ccanlint/has_main_header.c b/tools/ccanlint/has_main_header.c
index 75e3f91d..75e3f91d 100644
--- a/ccan_tools/ccanlint/has_main_header.c
+++ b/tools/ccanlint/has_main_header.c
diff --git a/ccan_tools/ccanlint/has_tests.c b/tools/ccanlint/has_tests.c
index 7a187ab2..7a187ab2 100644
--- a/ccan_tools/ccanlint/has_tests.c
+++ b/tools/ccanlint/has_tests.c
diff --git a/ccan_tools/ccanlint/idempotent.c b/tools/ccanlint/idempotent.c
index 44565575..44565575 100644
--- a/ccan_tools/ccanlint/idempotent.c
+++ b/tools/ccanlint/idempotent.c
diff --git a/ccan_tools/ccanlint/no_info.c b/tools/ccanlint/no_info.c
index 9ee5f709..9ee5f709 100644
--- a/ccan_tools/ccanlint/no_info.c
+++ b/tools/ccanlint/no_info.c
diff --git a/ccan_tools/ccanlint/trailing_whitespace.c b/tools/ccanlint/trailing_whitespace.c
index 3aeec6e5..3aeec6e5 100644
--- a/ccan_tools/ccanlint/trailing_whitespace.c
+++ b/tools/ccanlint/trailing_whitespace.c
diff --git a/ccan_tools/doc_extract.c b/tools/doc_extract.c
index b4ac0d3e..b4ac0d3e 100644
--- a/ccan_tools/doc_extract.c
+++ b/tools/doc_extract.c
diff --git a/ccan_tools/namespacize.c b/tools/namespacize.c
index e4a3973f..e4a3973f 100644
--- a/ccan_tools/namespacize.c
+++ b/tools/namespacize.c
diff --git a/ccan_tools/run_tests.c b/tools/run_tests.c
index c7526449..1a8d75ea 100644
--- a/ccan_tools/run_tests.c
+++ b/tools/run_tests.c
@@ -4,11 +4,11 @@
#include <dirent.h>
#include <assert.h>
#include <unistd.h>
-#include "tap/tap.h"
-#include "talloc/talloc.h"
-#include "../string/string.h"
+#include "ccan/tap/tap.h"
+#include "ccan/talloc/talloc.h"
+#include "ccan/string/string.h"
-#define CFLAGS "-O3 -Wall -Wundef -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Werror -I."
+#define CFLAGS "-O3 -Wall -Wundef -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Werror -Iccan -I."
/* FIXME: Use build bug later. */
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
@@ -56,7 +56,7 @@ static char *obj_list(void)
list = talloc_asprintf_append(list, "%s ", i->name);
/* FIXME */
- list = talloc_asprintf_append(list, "tap/tap.o");
+ list = talloc_asprintf_append(list, "ccan/tap/tap.o");
return list;
}
diff --git a/ccan_tools/test_all.sh b/tools/test_all.sh
index 3c65c21c..3c65c21c 100755
--- a/ccan_tools/test_all.sh
+++ b/tools/test_all.sh