[beast: 1/11] RES: add toplevel res/ directory for internal program resources
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast: 1/11] RES: add toplevel res/ directory for internal program resources
- Date: Sat, 30 Sep 2017 00:09:13 +0000 (UTC)
commit 27a90b7c0f65bd4e152d1d52fb05a0f5a6f45d5f
Author: Tim Janik <timj gnu org>
Date: Mon Sep 18 16:41:36 2017 +0200
RES: add toplevel res/ directory for internal program resources
Implementation is based on Rapicorn commit id:
bf228016cba3f6d252ee2cc38e1ed32607f37bf0
Signed-off-by: Tim Janik <timj gnu org>
Makefile.am | 3 +++
misc/reslist.sh | 28 ++++++++++++++++++++++++++++
res/Makefile.sub | 3 +++
res/resfiles.list | 1 +
4 files changed, 35 insertions(+), 0 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 580a29b..475de25 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5,6 +5,9 @@ topdir = $(abs_top_srcdir)
SUBDIRS = . sfi bse plugins drivers pybeast beast-gtk launchers library tools ebeast po docs
data tests
+# == res/ ==
+# define res_resfiles_list
+include res/Makefile.sub
# == doc/ install ==
projectdocsdir = $(beastdocdir)/
diff --git a/misc/reslist.sh b/misc/reslist.sh
new file mode 100755
index 0000000..011ce16
--- /dev/null
+++ b/misc/reslist.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+set -e
+
+# "Usage: reslist.sh"
+# Update and display res/resfiles.list
+
+SCRIPTNAME="$(basename "$0")" ; die() { e="$1"; shift; echo "$SCRIPTNAME: $*" >&2; exit "$e"; }
+SCRIPTDIR="$(dirname "$(readlink -f "$0")")"
+
+cd "$SCRIPTDIR/../res/"
+
+RESFILES_LIST="$(cat resfiles.list)"
+FILE_LIST="$(find -type f |
+ grep -Ev '/Makefile[^/]*$|/GNUmakefile|/meson.build|/resfiles.list$' |
+ sed 's,^[.]/,,' |
+ sort)"
+
+for f in $FILE_LIST ; do
+ ! test "$f" -nt "resfiles.list" ||
+ RESFILES_LIST=" " # force (timestamp) update
+done
+
+if [ "$FILE_LIST" != "$RESFILES_LIST" ] ; then
+ echo " UPDATE res/resfiles.list" >&2
+ echo "$FILE_LIST" >resfiles.list
+fi
+
+cat resfiles.list
diff --git a/res/Makefile.sub b/res/Makefile.sub
new file mode 100644
index 0000000..2a2f6f0
--- /dev/null
+++ b/res/Makefile.sub
@@ -0,0 +1,3 @@
+# BEAST - non-recursive Makefile
+
+res_resfiles_list ::= $(shell $(topdir)/misc/reslist.sh)
diff --git a/res/resfiles.list b/res/resfiles.list
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/res/resfiles.list
@@ -0,0 +1 @@
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]