From 9e73eec31bbcb6d339fa96d39d7dc4979dffe204 Mon Sep 17 00:00:00 2001
From: sebastien <sebastien@ac1d8469-bf42-47a9-8791-bf33cf982152>
Date: Mon, 21 Sep 2009 10:00:47 +0000
Subject: [PATCH] Build system: fix for FlexLexer.h

git-svn-id: https://www.dynare.org/svn/dynare/trunk@2954 ac1d8469-bf42-47a9-8791-bf33cf982152
---
 Makefile.am          | 3 ++-
 ParsingDriver.hh     | 2 +-
 macro/MacroDriver.hh | 2 +-
 macro/Makefile.am    | 3 +++
 4 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 22871df2..6eed01f7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -52,7 +52,8 @@ dynare_m_SOURCES = \
 	CodeInterpreter.hh \
 	FlexLexer.h
 
-dynare_m_CPPFLAGS = $(BOOST_CPPFLAGS)
+# The -I. is for <FlexLexer.h>
+dynare_m_CPPFLAGS = $(BOOST_CPPFLAGS) -I.
 dynare_m_LDFLAGS = $(BOOST_LDFLAGS)
 dynare_m_LDADD = macro/libmacro.a
 
diff --git a/ParsingDriver.hh b/ParsingDriver.hh
index 6fc8b046..60411469 100644
--- a/ParsingDriver.hh
+++ b/ParsingDriver.hh
@@ -46,7 +46,7 @@ using namespace std;
 // Declare DynareFlexLexer class
 #ifndef __FLEX_LEXER_H
 # define yyFlexLexer DynareFlexLexer
-# include "FlexLexer.h"
+# include <FlexLexer.h>
 # undef yyFlexLexer
 #endif
 
diff --git a/macro/MacroDriver.hh b/macro/MacroDriver.hh
index 24c9e245..1a6ce998 100644
--- a/macro/MacroDriver.hh
+++ b/macro/MacroDriver.hh
@@ -38,7 +38,7 @@ using namespace std;
 // Declare MacroFlexLexer class
 #ifndef __FLEX_LEXER_H
 # define yyFlexLexer MacroFlexLexer
-# include "../FlexLexer.h"
+# include <FlexLexer.h>
 # undef yyFlexLexer
 #endif
 
diff --git a/macro/Makefile.am b/macro/Makefile.am
index ca0e8344..1fb836a3 100644
--- a/macro/Makefile.am
+++ b/macro/Makefile.am
@@ -10,6 +10,9 @@ libmacro_a_SOURCES = \
 	MacroValue.cc \
 	MacroValue.hh
 
+# The -I.. is for <FlexLexer.h>
+libmacro_a_CPPFLAGS = -I..
+
 MacroFlex.cc: MacroFlex.ll
 	$(LEX) -oMacroFlex.cc MacroFlex.ll
 
-- 
GitLab