include $(top_srcdir)/config/common.am
-noinst_LTLIBRARIES = libcontrollers.la
-
-INCLUDES = -I$(top_srcdir)/src \
- $(BOOST_INCLUDES)
-
-EXTRA_DIST = ButtonController.tmpl ControlDialog.tmpl ControlInset.tmpl
-
-libcontrollers_la_SOURCES= \
- Dialog.C \
- Dialog.h \
- Kernel.C \
- Kernel.h \
- biblio.C \
- biblio.h \
- character.C \
- character.h \
- frnt_lang.C \
- frnt_lang.h \
- tex_helpers.C \
- tex_helpers.h \
- ButtonController.h \
- ButtonControllerBase.C \
- ButtonControllerBase.h \
- ButtonPolicies.C \
- ButtonPolicies.h \
- ControlAboutlyx.C \
- ControlAboutlyx.h \
- ControlBibitem.C \
- ControlBibitem.h \
- ControlBibtex.C \
- ControlBibtex.h \
- ControlButtons.C \
- ControlButtons.h \
- ControlCharacter.C \
- ControlCharacter.h \
- ControlChanges.C \
- ControlChanges.h \
- ControlCitation.C \
- ControlCitation.h \
- ControlCommand.C \
+AM_CPPFLAGS += -I$(top_srcdir)/src $(BOOST_INCLUDES)
+
+EXTRA_DIST = tests/regfiles/biblio
+
+noinst_LTLIBRARIES = liblyxcontrollers.la
+
+SOURCEFILES = \
+ Dialog.cpp \
+ ButtonPolicy.cpp \
+ ControlCommand.cpp \
+ ControlCommandBuffer.cpp \
+ ControlDocument.cpp \
+ ControlExternal.cpp \
+ ControlGraphics.cpp \
+ ControlMath.cpp \
+ ControlParagraph.cpp \
+ ControlPrefs.cpp \
+ ControlPrint.cpp \
+ ControlSearch.cpp \
+ ControlSendto.cpp \
+ ControlThesaurus.cpp \
+ ControlToc.cpp \
+ frontend_helpers.cpp
+
+HEADERFILES = \
+ ButtonPolicy.h \
ControlCommand.h \
- ControlCommandBuffer.C \
ControlCommandBuffer.h \
- ControlConnections.C \
- ControlConnections.h \
- ControlDialog.h \
- ControlDialog_impl.C \
- ControlDialog_impl.h \
- ControlDocument.C \
ControlDocument.h \
- ControlError.C \
- ControlError.h \
- ControlERT.C \
- ControlERT.h \
- ControlExternal.C \
ControlExternal.h \
- ControlFloat.C \
- ControlFloat.h \
- ControlForks.C \
- ControlForks.h \
- ControlGraphics.C \
ControlGraphics.h \
- ControlInclude.C \
- ControlInclude.h \
- ControlIndex.C \
- ControlIndex.h \
- ControlInset.h \
- ControlLog.C \
- ControlLog.h \
- ControlMath.C \
ControlMath.h \
- ControlMinipage.C \
- ControlMinipage.h \
- ControlParagraph.C \
ControlParagraph.h \
- ControlPreamble.C \
- ControlPreamble.h \
- ControlPrefs.C \
ControlPrefs.h \
- ControlPrint.C \
ControlPrint.h \
- ControlRef.C \
- ControlRef.h \
- ControlSearch.C \
ControlSearch.h \
- ControlSendto.C \
ControlSendto.h \
- ControlShowFile.C \
- ControlShowFile.h \
- ControlSpellchecker.C \
- ControlSpellchecker.h \
- ControlTabular.C \
- ControlTabular.h \
- ControlTabularCreate.C \
- ControlTabularCreate.h \
- ControlTexinfo.C \
- ControlTexinfo.h \
- ControlThesaurus.C \
ControlThesaurus.h \
- ControlToc.C \
ControlToc.h \
- ControlUrl.C \
- ControlUrl.h \
- ControlVCLog.C \
- ControlVCLog.h \
- ControlWrap.C \
- ControlWrap.h \
- GUI.h \
- ViewBase.h \
- helper_funcs.C \
- helper_funcs.h
-
-libcontrollers.la: $(libcontrollers_la_OBJECTS) $(libcontrollers_la_DEPENDENCIES)
+ 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