From 5fee4451816ab63111d2675b3999b96a4b8b16af Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 6 Jan 2009 21:19:33 -0800 Subject: rejigger directory layout --- update-file-lists.mk | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 update-file-lists.mk (limited to 'update-file-lists.mk') diff --git a/update-file-lists.mk b/update-file-lists.mk new file mode 100755 index 0000000..4922758 --- /dev/null +++ b/update-file-lists.mk @@ -0,0 +1,30 @@ +#!/usr/bin/make -srf + +summary := $(wildcard */summary) + +which ?= all + +ifeq (,$(summary)) + +dirs := $(wildcard */) + +$(which).list: $(dirs:=$(which).list) + cat -- $^ > $@.new + mv -f $@.new $@ + +me := $(MAKEFILE_LIST) + +FORCE:; +$(dirs:=$(which).list): FORCE + $(MAKE) -f `(cd $(dir $(me)); pwd)`/$(notdir $(me)) \ + -C $(@D) which=$(which) + +else + +$(which).list: %.list: $(summary) + (echo 'all:\'; \ + list-files.sh $* | sed 's,^.*$$,test@/&\\,'; \ + echo \;) > $@.new + mv -f $@.new $@ + +endif -- cgit