Blame d4_ce/Makefile.am

Packit a4aae4
Packit a4aae4
AUTOMAKE_OPTIONS = foreign
Packit a4aae4
Packit a4aae4
# We need this to make sure that parallel jobs don't fail for 
Packit a4aae4
# lack of stack.hh, ... because those are built by bison in one
Packit a4aae4
# shot.
Packit a4aae4
.NOTPARALLEL:
Packit a4aae4
Packit a4aae4
# Arrange to build with the backward compatibility mode enabled.
Packit Service 680168
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/d4_ce -I$(srcdir) $(XML2_CFLAGS)
Packit a4aae4
AM_CXXFLAGS =  
Packit a4aae4
Packit a4aae4
if COMPILER_IS_GCC
Packit a4aae4
AM_CXXFLAGS += -Wall -W -Wcast-align
Packit a4aae4
endif
Packit a4aae4
Packit a4aae4
# autoconf/automake includes support for yacc and lex so that the input
Packit a4aae4
# files for those compilers can be listed in a _SOURCES variable and the
Packit a4aae4
# build will just work. I had a fair amount of hassle getting that going
Packit a4aae4
# and then realized that cmake might undo all that effort. Also, the
Packit a4aae4
# changes are not local to this dir only since I'd have to edit the DAP2
Packit a4aae4
# grammars as well. I've left the edits in a comments although I'm not sure
Packit a4aae4
# it ever worked correctly. jhrg 10/21/14
Packit a4aae4
#
Packit a4aae4
# AM_YFLAGS= -d
Packit a4aae4
# AM_LFLAGS = -d
Packit a4aae4
Packit a4aae4
CXXFLAGS_DEBUG = -g3 -O0 -Wall -W -Wcast-align
Packit a4aae4
TEST_COV_FLAGS = -ftest-coverage -fprofile-arcs
Packit a4aae4
Packit a4aae4
if BUILD_DEVELOPER
Packit a4aae4
AM_CXXFLAGS += $(CXXFLAGS_DEBUG)
Packit a4aae4
endif
Packit a4aae4
Packit a4aae4
noinst_LTLIBRARIES = libd4_ce_parser.la
Packit a4aae4
pkginclude_HEADERS = D4ConstraintEvaluator.h
Packit a4aae4
Packit a4aae4
# This line forces make to build the grammar files first, which is
Packit a4aae4
# important because some of the cc files include the parser headers.
Packit a4aae4
BUILT_SOURCES = lex.d4_ce.cc d4_ce_parser.tab.hh d4_ce_parser.tab.cc \
Packit a4aae4
	stack.hh location.hh position.hh
Packit a4aae4
Packit a4aae4
libd4_ce_parser_la_SOURCES = lex.d4_ce.cc d4_ce_parser.tab.cc	\
Packit a4aae4
	d4_ce_parser.tab.hh stack.hh location.hh position.hh \
Packit a4aae4
	D4ConstraintEvaluator.cc  D4ConstraintEvaluator.h D4CEScanner.h   
Packit a4aae4
Packit a4aae4
libd4_ce_parser_la_CXXFLAGS=$(AM_CPPFLAGS)
Packit a4aae4
Packit a4aae4
EXTRA_DIST = d4_ce_parser.yy d4_ce_scanner.ll
Packit a4aae4
Packit a4aae4
DISTCLEANFILES = 
Packit a4aae4
Packit a4aae4
clean-local:
Packit a4aae4
	-rm d4_ce_parser.tab.cc	d4_ce_parser.tab.hh lex.d4_ce.cc stack.hh \
Packit a4aae4
		location.hh position.hh
Packit a4aae4
Packit a4aae4
%.tab.cc %.tab.hh: %.yy
Packit a4aae4
	$(YACC) $(YFLAGS) $<
Packit a4aae4
Packit a4aae4
#d4_ce_parser.tab.cc d4_ce_parser.tab.hh stack.hh location.hh position.hh: d4_ce_parser.yy
Packit a4aae4
#	$(YACC) $(YFLAGS) $<
Packit a4aae4
Packit a4aae4
# For now there are two min versions of flex's FlexLexer.h; one that
Packit a4aae4
# defines the LexerInput() method returning int and one returning size_t.
Packit a4aae4
# Including the gnerated lex.*.cc code causes a compilation error when
Packit a4aae4
# the version on the packaging machine differs from the version on the
Packit a4aae4
# building machine. For now I just remove the generated file. However, 
Packit a4aae4
# if a fix can be found, then we can remove the flex requirement from
Packit a4aae4
# a simple (tar.gz) source build. jhrg 7.9.15
Packit a4aae4
dist-hook:
Packit a4aae4
	rm $(distdir)/lex.d4_ce.cc
Packit a4aae4
Packit a4aae4
lex.d4_ce.cc: d4_ce_scanner.ll d4_ce_parser.tab.cc d4_ce_parser.tab.hh
Packit a4aae4
	$(LEX) $(LFLAGS) $<
Packit a4aae4