* common.mk (AM_CPPFLAGS): Remove -I$(top_builddir)/scribo and
I$(top_builddir)/milena.
Include this file...
* doc/Makefile.am: ...here.
(AM_CPPFLAGS): Remove.
* tests/tests.mk (AM_CPPFLAGS): Add -I$(top_builddir)/scribo.
---
scribo/ChangeLog | 11 +++++++++++
scribo/common.mk | 6 ++----
scribo/doc/Makefile.am | 4 +---
scribo/tests/tests.mk | 3 +++
4 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index 78069ac..7f4e150 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,3 +1,14 @@
+2013-09-13 Roland Levillain <roland(a)lrde.epita.fr>
+
+ Scribo: Define flags in proper Makefile helpers.
+
+ * common.mk (AM_CPPFLAGS): Remove -I$(top_builddir)/scribo and
+ I$(top_builddir)/milena.
+ Include this file...
+ * doc/Makefile.am: ...here.
+ (AM_CPPFLAGS): Remove.
+ * tests/tests.mk (AM_CPPFLAGS): Add -I$(top_builddir)/scribo.
+
2013-09-12 Roland Levillain <roland(a)lrde.epita.fr>
Scribo: Remove `return 0;' statements at end of main().
diff --git a/scribo/common.mk b/scribo/common.mk
index 9350738..5e821be 100644
--- a/scribo/common.mk
+++ b/scribo/common.mk
@@ -22,7 +22,5 @@
# C++ sources.
AM_DEFAULT_SOURCE_EXT = .cc
-# Add paths to Scribo's and Milena's headers.
-AM_CPPFLAGS = \
- -I$(top_srcdir)/scribo -I$(top_builddir)/scribo \
- -I$(top_srcdir)/milena -I$(top_builddir)/milena
+# Find Scribo and Milena headers.
+AM_CPPFLAGS = -I$(top_srcdir)/scribo -I$(top_srcdir)/milena
diff --git a/scribo/doc/Makefile.am b/scribo/doc/Makefile.am
index 18df048..ea60133 100644
--- a/scribo/doc/Makefile.am
+++ b/scribo/doc/Makefile.am
@@ -15,9 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with Olena. If not, see <http://www.gnu.org/licenses/>.
-
-# Find Scribo headers.
-AM_CPPFLAGS = -I$(top_srcdir)/scribo
+include $(top_srcdir)/scribo/common.mk
DOXYGEN = doxygen
diff --git a/scribo/tests/tests.mk b/scribo/tests/tests.mk
index 2e876a6..3250dae 100644
--- a/scribo/tests/tests.mk
+++ b/scribo/tests/tests.mk
@@ -21,6 +21,9 @@
include $(top_srcdir)/scribo/common.mk
+# Find test/data.hh (generated header).
+AM_CPPFLAGS += -I$(top_builddir)/scribo
+
AM_CXXFLAGS = $(SCRIBO_TESTS_CXXFLAGS)
# Inject rules to compile tests (recursively), without running them.
--
1.7.10.4