* Makefile.am ($(srcdir)/mln/version.hh): New target, generating
mln/version.hh in the source tree using make instead of configure.
(edit): New.
(EXTRA_DIST): Add mln/version.hh.in
(nobase_nodist_include_HEADERS): Remove mln/version.hh.
* mln/version.hh: New (generated).
* headers.mk: Regen.
---
milena/ChangeLog | 12 ++++++++++++
milena/Makefile.am | 28 ++++++++++++++++++++++++----
milena/headers.mk | 1 +
milena/mln/{version.hh.in => version.hh} | 10 +++++-----
4 files changed, 42 insertions(+), 9 deletions(-)
copy milena/mln/{version.hh.in => version.hh} (83%)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 0e0442b..700a6f4 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,15 @@
+2013-09-06 Roland Levillain <roland(a)lrde.epita.fr>
+
+ Generate Milena's mln/version.hh in the source tree.
+
+ * Makefile.am ($(srcdir)/mln/version.hh): New target, generating
+ mln/version.hh in the source tree using make instead of configure.
+ (edit): New.
+ (EXTRA_DIST): Add mln/version.hh.in
+ (nobase_nodist_include_HEADERS): Remove mln/version.hh.
+ * mln/version.hh: New (generated).
+ * headers.mk: Regen.
+
2013-09-05 Roland Levillain <roland(a)lrde.epita.fr>
Remove an unnecessary #include from an example of the tutorial.
diff --git a/milena/Makefile.am b/milena/Makefile.am
index f65a8cf..058cadd 100644
--- a/milena/Makefile.am
+++ b/milena/Makefile.am
@@ -1,4 +1,4 @@
-# Copyright (C) 2007, 2008, 2009, 2012 EPITA Research and Development
+# Copyright (C) 2007, 2008, 2009, 2012, 2013 EPITA Research and Development
# Laboratory (LRDE).
#
# This file is part of Olena.
@@ -76,8 +76,28 @@ $(srcdir)/headers.mk: $(top_srcdir)/build-aux/generate_dist_headers.sh
include $(srcdir)/headers.mk
-# Generated by configure from mln/version.hh.in.
-nobase_nodist_include_HEADERS = mln/version.hh
+
+# Package metadata (mln/version.hh).
+#
+# Note that contrary to $(top_srcdir)/config.h, mln/version.hh is
+# meant to be installed and is part of the library.
+
+edit = sed -e 's,@PACKAGE_BUGREPORT[@],$(PACKAGE_BUGREPORT),g' \
+ -e 's,@PACKAGE_NAME[@],$(PACKAGE_NAME),g' \
+ -e 's,@PACKAGE_STRING[@],$(PACKAGE_STRING),g' \
+ -e 's,@PACKAGE_VERSION[@],$(PACKAGE_VERSION),g' \
+ -e 's,@PACKAGE_URL[@],$(PACKAGE_URL),g' \
+ -e 's,@PACKAGE_AUTHORS[@],$(PACKAGE_AUTHORS),g'
+
+EXTRA_DIST = mln/version.hh.in
+$(srcdir)/mln/version.hh: mln/version.hh.in $(top_srcdir)/configure.ac Makefile.am
+ rm -f $@ $@.tmp
+ srcdir=''; \
+ test -f ./$@.in || srcdir=$(srcdir)/; \
+ $(edit) $${srcdir}$@.in >$@.tmp
+ chmod a-w $@.tmp
+ mv $@.tmp $@
+
imgdir = $(pkgdatadir)/images
dist_img_DATA = \
@@ -107,7 +127,7 @@ dist_img_DATA = \
img/tiny.ppm \
img/toto.pbm
-EXTRA_DIST = \
+EXTRA_DIST += \
tests/img/test_rgb8.tif \
tests/img/test_bw.tif \
tests/img/test_gl.tif
diff --git a/milena/headers.mk b/milena/headers.mk
index f313fab..5321e76 100644
--- a/milena/headers.mk
+++ b/milena/headers.mk
@@ -1298,6 +1298,7 @@ mln/value/sign.hh \
mln/value/super_value.hh \
mln/value/value_array.hh \
mln/value/viter.hh \
+mln/version.hh \
mln/win/all.hh \
mln/win/backdiag2d.hh \
mln/win/ball.hh \
diff --git a/milena/mln/version.hh.in b/milena/mln/version.hh
similarity index 83%
copy from milena/mln/version.hh.in
copy to milena/mln/version.hh
index 6612aa2..a043ae2 100644
--- a/milena/mln/version.hh.in
+++ b/milena/mln/version.hh
@@ -21,19 +21,19 @@
# define MLN_VERSION_HH
/// The address where bug reports should be sent.
-#define OLN_PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@"
+#define OLN_PACKAGE_BUGREPORT "olena(a)lrde.epita.fr"
/// The full name of this package.
-#define OLN_PACKAGE_NAME "@PACKAGE_NAME@"
+#define OLN_PACKAGE_NAME "Olena"
// The full name and version of this package.
-#define OLN_PACKAGE_STRING "@PACKAGE_STRING@"
+#define OLN_PACKAGE_STRING "Olena 2.0a"
/// The version of this package.
-#define OLN_PACKAGE_VERSION "@PACKAGE_VERSION@"
+#define OLN_PACKAGE_VERSION "2.0a"
/// Home page for this package.
-#define OLN_PACKAGE_URL "@PACKAGE_URL@"
+#define OLN_PACKAGE_URL "http://olena.lrde.epita.fr"
/// Authors of the package.
#define OLN_PACKAGE_AUTHORS "EPITA Research and Development Laboratory (LRDE)"
--
1.7.10.4