* generate_dist_headers.sh: new. Generate distributed file list.
---
scribo/ChangeLog | 6 ++++++
scribo/generate_dist_headers.sh | 21 +++++++++++++++++++++
2 files changed, 27 insertions(+), 0 deletions(-)
create mode 100755 scribo/generate_dist_headers.sh
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index a4cbdbd..33a4ef4 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,5 +1,11 @@
2009-06-11 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
+ Generate list of distributed headers for Scribo.
+
+ * generate_dist_headers.sh: new. Generate distributed file list.
+
+2009-06-11 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
+
Small fixes in Scribo.
* Makefile.am: Improve generation of headers.mk.
diff --git a/scribo/generate_dist_headers.sh b/scribo/generate_dist_headers.sh
new file mode 100755
index 0000000..a6dd8d5
--- /dev/null
+++ b/scribo/generate_dist_headers.sh
@@ -0,0 +1,21 @@
+#! /bin/sh
+
+# Generate scribo/headers.mk
+# ------------------------------
+# List all the headers in order to make them part of distribution.
+
+# Use the C locale to have a deterministic sort.
+export LC_ALL=C
+
+echo "## Generated by ./generate_dist_headers, do not modify ##" >
headers.mk
+echo "" >> headers.mk
+echo "noinst_HEADERS = \\" >> headers.mk
+echo "generating headers.mk"
+
+find . -type f -name '*.hh'| grep -v "\.svn" | sed -e 's/$/
\\/g' | sort >> headers.mk
+find . -type f -name '*.hxx'| grep -v "\.svn" | sed -e 's/$/
\\/g'| sort >> headers.mk
+
+last_line=`tail -n 1 headers.mk | sed -e 's/\\\//g'` # remove '\' in last
line
+sed '$d' < headers.mk > headers.mk.tmp # remove last line
+mv headers.mk.tmp headers.mk
+echo $last_line >> headers.mk # put the cleaned last line back.
--
1.5.6.5