X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=Makefile;h=c1f5ea8f6d78a17d8c5dd4cb087e4b4092726fb0;hp=4bdbf89c7fbb10422a1a2fb9b12d6a9fac58237e;hb=d1cea3ebf96f61b5bbac1e74975700770e06add6;hpb=021e03c4186bde630b1b4912afaab1e7f8417c1e diff --git a/Makefile b/Makefile index 4bdbf89c..c1f5ea8f 100644 --- a/Makefile +++ b/Makefile @@ -71,21 +71,21 @@ distclean: clean rm -f $(ALL_DEPENDS) $(ALL_DEPENDS): %/.depends: %/_info tools/ccan_depends - @tools/ccan_depends $* > $@ || ( rm -f $@; exit 1 ) + tools/ccan_depends $* > $@ || ( rm -f $@; exit 1 ) # Actual dependencies are created in inter-depends check-%: tools/ccanlint/ccanlint - @tools/ccanlint/ccanlint -d ccan/$* + tools/ccanlint/ccanlint -d ccan/$* fastcheck-%: tools/ccanlint/ccanlint - @tools/ccanlint/ccanlint -t $(FASTTIMEOUT) -d ccan/$* + tools/ccanlint/ccanlint -t $(FASTTIMEOUT) -d ccan/$* # Doesn't test dependencies, doesn't print verbose fail results. summary-check-%: tools/ccanlint/ccanlint $(OBJFILES) - @tools/ccanlint/ccanlint -s -d ccan/$* + tools/ccanlint/ccanlint -s -d ccan/$* summary-fastcheck-%: tools/ccanlint/ccanlint $(OBJFILES) - @tools/ccanlint/ccanlint -t $(FASTTIMEOUT) -s -d ccan/$* + tools/ccanlint/ccanlint -t $(FASTTIMEOUT) -s -d ccan/$* ccan/%/info: ccan/%/_info $(CC) $(CFLAGS) -o $@ -x c $< @@ -94,17 +94,17 @@ libccan.a(%.o): ccan/%.o $(AR) r $@ $< clean: tools-clean - $(RM) `find . -name '*.o'` `find . -name '.depends'` `find . -name '*.a'` `find . -name info` `find . -name '*.d'` + $(RM) `find * -name '*.o'` `find * -name '.depends'` `find * -name '*.a'` `find * -name info` `find * -name '*.d'` $(RM) inter-depends lib-depends test-depends ccan/*-Makefile # Creates a dependency from the tests to the object files which it needs. inter-depends: $(ALL_DEPENDS) Makefile - @for f in $(ALL_DEPENDS); do echo check-$$(basename $$(dirname $$f) ): $$(for dir in $$(cat $$f) $$(dirname $$f); do [ "$$(echo $$dir/*.c)" = "$$dir/*.c" ] || echo ccan/"$$(basename $$dir)".o; done); done > $@ + for f in $(ALL_DEPENDS); do echo check-$$(basename $$(dirname $$f) ): $$(for dir in $$(cat $$f) $$(dirname $$f); do [ "$$(echo $$dir/*.c)" = "$$dir/*.c" ] || echo ccan/"$$(basename $$dir)".o; done); done > $@ # Creates dependencies between tests, so if foo depends on bar, bar is tested # first test-depends: $(ALL_DEPENDS) Makefile - @for f in $(ALL_DEPENDS); do echo check-`basename \`dirname $$f\``: `sed -n 's,ccan/\(.*\),check-\1,p' < $$f`; done > $@ + for f in $(ALL_DEPENDS); do echo check-`basename \`dirname $$f\``: `sed -n 's,ccan/\(.*\),check-\1,p' < $$f`; done > $@ include tools/Makefile -include inter-depends