* generate_dist_headers.sh: generate the list of distributed headers.
* Makefile.am: include generate_dist_headers.sh in the distribution
tarball.
* headers.mk: Add comment saying that it is generated.
* doc/tutorial/samples/fill-subdomain-shorter.cc: fix a warning.
---
milena/ChangeLog | 13 +++++++++++++
milena/Makefile.am | 2 ++
.../doc/tutorial/samples/fill-subdomain-shorter.cc | 2 +-
milena/generate_dist_headers.sh | 18 ++++++++++++++++++
milena/headers.mk | 2 ++
5 files changed, 36 insertions(+), 1 deletions(-)
create mode 100755 milena/generate_dist_headers.sh
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 495e558..1255d74 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,18 @@
2008-12-16 Guillaume Lazzara <z(a)lrde.epita.fr>
+ Generate the distributed header list thanks to a specific script.
+
+ * generate_dist_headers.sh: generate the list of distributed headers.
+
+ * Makefile.am: include generate_dist_headers.sh in the distribution
+ tarball.
+
+ * headers.mk: Add comment saying that it is generated.
+
+ * doc/tutorial/samples/fill-subdomain-shorter.cc: fix a warning.
+
+2008-12-16 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Quick cleanup in io.
* milena/tests/io/off/load_bin.cc,
diff --git a/milena/Makefile.am b/milena/Makefile.am
index 64d0365..485c4bd 100644
--- a/milena/Makefile.am
+++ b/milena/Makefile.am
@@ -35,3 +35,5 @@ img/small.pbm \
img/lena.ppm \
img/small.pgm
+EXTRA_DIST += \
+generate_dist_headers.sh
diff --git a/milena/doc/tutorial/samples/fill-subdomain-shorter.cc
b/milena/doc/tutorial/samples/fill-subdomain-shorter.cc
index da3ce7b..7526682 100644
--- a/milena/doc/tutorial/samples/fill-subdomain-shorter.cc
+++ b/milena/doc/tutorial/samples/fill-subdomain-shorter.cc
@@ -28,6 +28,6 @@ int main()
initialize(ima2, ima);
level::fill(ima2, literal::black);
- level::fill((ima2 | pw::value(lab) == pw::cst(2u)).rw(), literal::red);
+ level::fill((ima2 | (pw::value(lab) == pw::cst(2u))).rw(), literal::red);
// \}
}
diff --git a/milena/generate_dist_headers.sh b/milena/generate_dist_headers.sh
new file mode 100755
index 0000000..bb5bb30
--- /dev/null
+++ b/milena/generate_dist_headers.sh
@@ -0,0 +1,18 @@
+#/bin/sh
+#
+# Generate milena/headers.mk
+# ------------------------------
+# List all the headers in order to make them part of distribution.
+
+echo "## Generated by ./generate_dist_headers, do not modify ##" >
headers.mk
+echo "" >> headers.mk
+echo "nobase_include_HEADERS = \\" >> headers.mk
+echo "generating headers.mk"
+
+find mln -type f | grep -v "\.svn" | sed -e 's/$/ \\/g' >>
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.
+
diff --git a/milena/headers.mk b/milena/headers.mk
index 240f896..146e616 100644
--- a/milena/headers.mk
+++ b/milena/headers.mk
@@ -1,3 +1,5 @@
+## Generated by ./generate_dist_headers, do not modify ##
+
nobase_include_HEADERS = \
mln/histo/all.hh \
mln/histo/data.hh \
--
1.5.6.5
Show replies by date