summaryrefslogtreecommitdiffstats
path: root/update-file-lists.mk
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2009-01-06 21:19:33 -0800
committerRoland McGrath <roland@redhat.com>2009-01-06 21:19:33 -0800
commit5fee4451816ab63111d2675b3999b96a4b8b16af (patch)
treede34878ae714fe9f485083beb864781181729e9f /update-file-lists.mk
parent23fc1b5ab44476fe22a9bf1de337a263c87a5b74 (diff)
downloaddebuginfo-test-scripts-5fee4451816ab63111d2675b3999b96a4b8b16af.tar.gz
debuginfo-test-scripts-5fee4451816ab63111d2675b3999b96a4b8b16af.tar.xz
debuginfo-test-scripts-5fee4451816ab63111d2675b3999b96a4b8b16af.zip
rejigger directory layout
Diffstat (limited to 'update-file-lists.mk')
-rwxr-xr-xupdate-file-lists.mk30
1 files changed, 30 insertions, 0 deletions
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