X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=Makefile;h=b60874d787d7522c8da54df581946b02d8b6a3d4;hp=2e12ce83cbe4cc10897d29f8f88cedaec9f29cca;hb=0c59d978243663d3b8033b0f190367450efba078;hpb=7bbd49fdb03503688dd34ab860e0e02e852ed267 diff --git a/Makefile b/Makefile index 2e12ce83..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,11 +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 -clean: ccan_tools-clean - rm -f `find . -name '*.o'` +ccanlint: tools/ccanlint/ccanlint -include ccan_tools/Makefile +clean: tools-clean + rm -f `find . -name '*.o'` `find . -name '.depends'` + +include tools/Makefile