include $(top_srcdir)/config/common.am
-SUBDIRS = tests
+AM_CPPFLAGS += -I$(top_srcdir)/src $(BOOST_INCLUDES)
-EXTRA_DIST = pch.h BCView.tmpl
+EXTRA_DIST = tests/regfiles/biblio
-BUILT_SOURCES = $(PCH_FILE)
-
-noinst_LTLIBRARIES = libcontrollers.la
-
-AM_CPPFLAGS += $(PCH_FLAGS) -I$(top_srcdir)/src $(BOOST_INCLUDES)
+noinst_LTLIBRARIES = liblyxcontrollers.la
-libcontrollers_la_SOURCES= \
+SOURCEFILES = \
Dialog.cpp \
- Dialog.h \
- Kernel.cpp \
- Kernel.h \
- BCView.h \
- BCView.cpp \
- ButtonController.cpp \
- ButtonController.h \
- ButtonPolicies.cpp \
- ButtonPolicies.h \
- ControlAboutlyx.cpp \
- ControlAboutlyx.h \
- ControlBibtex.cpp \
- ControlBibtex.h \
- ControlBox.cpp \
- ControlBox.h \
- ControlBranch.cpp \
- ControlBranch.h \
- ControlCharacter.cpp \
- ControlCharacter.h \
- ControlChanges.cpp \
- ControlChanges.h \
- ControlCitation.cpp \
- ControlCitation.h \
+ ButtonPolicy.cpp \
ControlCommand.cpp \
- ControlCommand.h \
ControlCommandBuffer.cpp \
- ControlCommandBuffer.h \
ControlDocument.cpp \
- ControlDocument.h \
- ControlErrorList.cpp \
- ControlErrorList.h \
- ControlERT.cpp \
- ControlERT.h \
ControlExternal.cpp \
- ControlExternal.h \
- ControlFloat.cpp \
- ControlFloat.h \
ControlGraphics.cpp \
- ControlGraphics.h \
- ControlInclude.cpp \
- ControlInclude.h \
- ControlLog.cpp \
- ControlLog.h \
- ControlViewSource.cpp \
- ControlViewSource.h \
ControlMath.cpp \
- ControlMath.h \
- ControlNote.cpp \
- ControlNote.h \
ControlParagraph.cpp \
- ControlParagraph.h \
ControlPrefs.cpp \
- ControlPrefs.h \
ControlPrint.cpp \
- ControlPrint.h \
- ControlRef.cpp \
- ControlRef.h \
ControlSearch.cpp \
- ControlSearch.h \
ControlSendto.cpp \
- ControlSendto.h \
- ControlShowFile.cpp \
- ControlShowFile.h \
- ControlSpellchecker.cpp \
- ControlSpellchecker.h \
- ControlTabular.cpp \
- ControlTabular.h \
- ControlTabularCreate.cpp \
- ControlTabularCreate.h \
- ControlTexinfo.cpp \
- ControlTexinfo.h \
ControlThesaurus.cpp \
- ControlThesaurus.h \
ControlToc.cpp \
+ frontend_helpers.cpp
+
+HEADERFILES = \
+ ButtonPolicy.h \
+ ControlCommand.h \
+ ControlCommandBuffer.h \
+ ControlDocument.h \
+ ControlExternal.h \
+ ControlGraphics.h \
+ ControlMath.h \
+ ControlParagraph.h \
+ ControlPrefs.h \
+ ControlPrint.h \
+ ControlSearch.h \
+ ControlSendto.h \
+ ControlThesaurus.h \
ControlToc.h \
- ControlVSpace.cpp \
- ControlVSpace.h \
- ControlWrap.cpp \
- ControlWrap.h \
- frontend_helpers.cpp \
frontend_helpers.h
+
+if MONOLITHIC_CONTROLLERS
+
+lyxcontrollers.cpp:
+ @echo -e '$(SOURCEFILES:%=\n#include "%")\n' > $@
+
+BUILT_SOURCES = lyxcontrollers.cpp
+
+liblyxcontrollers_la_SOURCES = lyxcontrollers.cpp $(HEADERFILES)
+
+else
+
+EXTRA_DIST += pch.h
+BUILT_SOURCES = $(PCH_FILE)
+AM_CPPFLAGS += $(PCH_FLAGS)
+
+liblyxcontrollers_la_SOURCES = $(SOURCEFILES) $(HEADERFILES)
+
+endif
+
+
+################################# Tests ################################
+
+EXTRA_DIST += tests/test_biblio
+
+TESTS = \
+ test_biblio
+
+check_PROGRAMS = \
+ biblio
+
+biblio_LDADD = $(BOOST_REGEX)
+biblio_SOURCES = \
+ tests/biblio.cpp \
+ tests/boost.cpp
+
+makeregfiles: ${check_PROGRAMS}
+ for all in ${check_PROGRAMS} ; do \
+ ./$$all > ${srcdir}/regfiles/$$all ; \
+ done