>>> On 22.05.18 at 02:53, <sstabell...@kernel.org> wrote: > --- a/xen/Makefile > +++ b/xen/Makefile > @@ -267,3 +267,14 @@ $(KCONFIG_CONFIG): > include/config/auto.conf.cmd: ; > > -include $(BASEDIR)/include/config/auto.conf.cmd > + > +.PHONY: cloc > +cloc: build
Not sure here - wouldn't it be reasonable to have no dependency here at all, and just have the rule act on whatever is in the tree at present (from whatever prior invocation of make)? > + $(eval tmpfile := $(shell mktemp)) > + $(foreach f, $(shell find $(BASEDIR) -name *.o.d), \ > + $(eval path := $(dir $(f))) \ > + $(eval name := $(shell cat $(f) | head -1 | cut -d " " -f 2)) \ > + $(shell if test -f $(path)/$(name) ; then echo $(path)/$(name) > >> $(tmpfile); fi;)) > + cloc --list-file=$(tmpfile) > + rm $(tmpfile) I think you also want to "rm -f $(tmpfile)" first thing in case a prior "make cloc" was interrupted. Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel