-AUTOMAKE_OPTIONS = foreign 1.4
-DISTCLEANFILES= *.orig *.rej *~ *.bak core
-MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
-noinst_LTLIBRARIES = libcontrollers.la
-BOOST_INCLUDES = -I$(top_srcdir)/boost
-INCLUDES = -I${top_srcdir}/src/ \
- -I${top_srcdir}/src/frontends/ \
- ${SIGC_CFLAGS} $(BOOST_INCLUDES)
-LIBS =
-SUBDIRS =
-ETAGS_ARGS = --lang=c++
-libcontrollers_la_SOURCES=\
- biblio.C \
- biblio.h \
- character.C \
- character.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 \
- ControlCitation.C \
- ControlCitation.h \
- ControlCommand.C \
+include $(top_srcdir)/config/common.am
+
+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 \
- ControlConnections.C \
- ControlConnections.h \
- ControlDialogs.h \
- ControlError.h \
- ControlError.C \
+ ControlCommandBuffer.h \
+ ControlDocument.h \
ControlExternal.h \
- ControlExternal.C \
ControlGraphics.h \
- ControlGraphics.C \
- ControlInclude.C \
- ControlInclude.h \
- ControlIndex.C \
- ControlIndex.h \
- ControlInset.h \
- ControlLog.C \
- ControlLog.h \
- ControlMinipage.C \
- ControlMinipage.h \
- ControlPreamble.C \
- ControlPreamble.h \
- ControlPrint.C \
+ ControlMath.h \
+ ControlParagraph.h \
+ ControlPrefs.h \
ControlPrint.h \
- ControlRef.C \
- ControlRef.h \
- ControlSearch.C \
ControlSearch.h \
- ControlSpellchecker.C \
- ControlSpellchecker.h \
- ControlSplash.C \
- ControlSplash.h \
- ControlTabularCreate.C \
- ControlTabularCreate.h \
- ControlThesaurus.C \
+ ControlSendto.h \
ControlThesaurus.h \
- ControlToc.C \
ControlToc.h \
- ControlUrl.C \
- ControlUrl.h \
- ControlVCLog.C \
- ControlVCLog.h \
- GUI.h \
- ViewBase.h \
- helper_funcs.C \
- helper_funcs.h
-
-# just copied from old lyx repository
-dist-hook:
- for subdir in $(LYXDATADIRS) ; do \
- test -d $(distdir)/$$subdir \
- || mkdir $(distdir)/$$subdir \
- || exit 1; \
- chmod 777 $(distdir)/$$subdir; \
- list=`(cd $(srcdir)/$$subdir && ls -1 | grep -v CVS)`; \
- echo $$list ; \
- for fil in $$list ; do \
- cp -p $(srcdir)/$$subdir/$$fil $(distdir)/$$subdir ; \
- done ; \
+ 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