]> git.lyx.org Git - lyx.git/blobdiff - src/support/Makefile.am
prepare Qt 5.6 builds
[lyx.git] / src / support / Makefile.am
index 4670add509981d2a6a48ea3b8a0dc477ec51803e..ed6af579d18f2204306fce362fcd49db24517652 100644 (file)
-AUTOMAKE_OPTIONS = foreign
-DISTCLEANFILES= *.orig *.rej *~ *.bak core
-MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
-noinst_LTLIBRARIES = libsupport.la
-LIBS =
-ETAGS_ARGS = --lang=c++
-BOOST_INCLUDES = -I$(top_srcdir)/boost
-INCLUDES = -I${srcdir}/../ $(BOOST_INCLUDES)
-
-EXTRA_DIST = lyxstring.C lyxstring.h regex.c lyxregex.h \
-             os_unix.C os_win32.C os_os2.C
-
-if USE_LYXSTRING
-LYXSTRING = lyxstring.C lyxstring.h
-endif
-if USE_REGEX
-REGEX = regex.c lyxregex.h
-endif
+include $(top_srcdir)/config/common.am
 
-libsupport_la_SOURCES = \
-       DebugStream.C \
-       DebugStream.h \
-       FileInfo.C \
-       FileInfo.h \
-       LAssert.C \
-       LAssert.h \
-       LIstream.h \
-       LOstream.h \
-       LRegex.C \
-       LRegex.h \
-       LSubstring.C \
-       LSubstring.h \
-       os.C \
-       os.h \
-       StrPool.C \
-       StrPool.h \
-       abort.C \
-       atoi.C \
-       chdir.C \
-       copy.C \
-       date.C \
-       filetools.C \
+EXTRA_DIST = os_cygwin.cpp os_unix.cpp os_win32.cpp os_win32.h \
+       CMakeLists.txt tests/CMakeLists.txt tests/supporttest.cmake
+
+noinst_LIBRARIES = liblyxsupport.a
+
+
+#########################  Qt stuff  #############################
+#
+
+MOCHEADER = \
+       ConsoleApplicationPrivate.h \
+       SystemcallPrivate.h
+
+MOCEDFILES = $(MOCHEADER:%.h=moc_%.cpp)
+
+CLEANFILES = $(MOCEDFILES)
+BUILT_SOURCES = $(MOCEDFILES)
+
+moc_%.cpp: %.h
+       $(QT_MOC) -o $@ $<
+
+liblyxsupport_a_DEPENDENCIES = $(MOCEDFILES)
+
+#
+##################################################################
+
+AM_CPPFLAGS += -I$(srcdir)/.. $(BOOST_INCLUDES) $(QT_CPPFLAGS) $(QT_INCLUDES)
+
+liblyxsupport_a_SOURCES = \
+       FileMonitor.h \
+       FileMonitor.cpp \
+       RandomAccessList.h \
+       bind.h \
+       ConsoleApplication.cpp \
+       ConsoleApplication.h \
+       ConsoleApplicationPrivate.h \
+       convert.cpp \
+       convert.h \
+       copied_ptr.h \
+       debug.cpp \
+       debug.h \
+       docstream.cpp \
+       docstream.h \
+       docstring.cpp \
+       docstring.h \
+       docstring_list.h \
+       environment.h \
+       environment.cpp \
+       ExceptionMessage.h \
+       FileName.cpp \
+       FileName.h \
+       FileNameList.h \
+       filetools.cpp \
        filetools.h \
-       fmt.C \
-       getUserName.C \
-       getcwd.C \
-       kill.C \
-       lstrings.C \
+       foreach.h \
+       ForkedCalls.cpp \
+       ForkedCalls.h \
+       functional.h \
+       gettext.cpp \
+       gettext.h \
+       gzstream.cpp \
+       gzstream.h \
+       kill.cpp \
+       lassert.h \
+       lassert.cpp \
+       limited_stack.h \
+       lstrings.cpp \
        lstrings.h \
-       lxtl.h \
        lyxalgo.h \
-       lyxfunctional.h \
        lyxlib.h \
-       lyxmanip.h \
-       $(LYXSTRING) lyxsum.C \
-       mkdir.C \
-       nt_defines.h \
-       os2_defines.h \
-       os2_errortable.h \
-       path.C \
-       path.h \
-       putenv.C \
-       rename.C \
-       rmdir.C \
-       smart_ptr.h \
-       snprintf.h \
-       snprintf.c \
-       sstream.h \
-       $(REGEX) systemcall.C \
-       systemcall.h \
-       tempname.C \
+       lyxtime.cpp \
+       lyxtime.h \
+       mutex.h \
+       mutex.cpp \
+       Messages.cpp \
+       Messages.h \
+       numpunct_lyx_char_type.h \
+       os.cpp \
+       os.h \
+       PathChanger.cpp \
+       PathChanger.h \
+       Package.cpp \
+       Package.h \
+       ProgressInterface.h \
+       pmprof.h \
+       qstring_helpers.cpp \
+       qstring_helpers.h \
+       regex.h \
+       socktools.cpp \
+       socktools.h \
+       strfwd.h \
+       Systemcall.cpp \
+       Systemcall.h \
+       SystemcallPrivate.h \
+       shared_ptr.h \
+       TempFile.cpp \
+       TempFile.h \
        textutils.h \
-       translator.h \
+       Translator.h \
+       Timeout.cpp \
+       Timeout.h \
+       trivstring.cpp \
+       trivstring.h \
        types.h \
-       unlink.C \
-       utility.h
+       userinfo.cpp \
+       userinfo.h \
+       unicode.cpp \
+       unicode.h \
+       weighted_btree.h
+if USE_INCLUDED_MYTHES
+liblyxsupport_a_SOURCES += \
+       mythes/mythes.cxx \
+       mythes/mythes.hxx \
+       mythes/license.readme
+endif
+
+#if INSTALL_MACOSX
+#liblyxsupport_a_SOURCES += \
+#      AppleSpellChecker.h \
+#      AppleSpellChecker.mm
+#endif
+
+if INSTALL_MACOSX
+liblyxsupport_a_SOURCES += \
+       AppleSpeller.h \
+       AppleSpeller.m \
+       AppleScript.h \
+       AppleScript.m \
+       AppleScriptProxy.cpp \
+       linkback/LinkBack.h \
+       linkback/LinkBack.m \
+       linkback/LinkBackProxy.h \
+       linkback/LinkBackProxy.m \
+       linkback/LinkBackServer.h \
+       linkback/LinkBackServer.m
+endif
+
+############################## Tests ##################################
+
+EXTRA_DIST += \
+       tests/test_convert \
+       tests/test_filetools \
+       tests/test_lstrings \
+       tests/test_trivstring \
+       tests/regfiles/convert \
+       tests/regfiles/filetools \
+       tests/regfiles/lstrings \
+       tests/regfiles/trivstring
+
+
+TESTS = \
+       tests/test_convert \
+       tests/test_filetools \
+       tests/test_lstrings \
+       tests/test_trivstring
+
+check_PROGRAMS = \
+       check_convert \
+       check_filetools \
+       check_lstrings \
+       check_trivstring
+
+if INSTALL_MACOSX
+ADD_FRAMEWORKS = -framework QtCore -framework AppKit -framework ApplicationServices
+endif
+
+check_convert_LDADD = liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) $(QT_CORE_LIBS) $(LIBSHLWAPI) @LIBS@
+check_convert_LDFLAGS = $(QT_CORE_LDFLAGS) $(ADD_FRAMEWORKS)
+check_convert_SOURCES = \
+       tests/check_convert.cpp \
+       tests/dummy_functions.cpp \
+       tests/boost.cpp
+
+check_filetools_LDADD = liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) $(QT_CORE_LIBS) $(LIBSHLWAPI) @LIBS@
+check_filetools_LDFLAGS = $(QT_CORE_LDFLAGS) $(ADD_FRAMEWORKS)
+check_filetools_SOURCES = \
+       tests/check_filetools.cpp \
+       tests/dummy_functions.cpp \
+       tests/boost.cpp
+
+check_lstrings_LDADD = liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) $(QT_CORE_LIBS) $(LIBSHLWAPI) @LIBS@
+check_lstrings_LDFLAGS = $(QT_CORE_LDFLAGS) $(ADD_FRAMEWORKS)
+check_lstrings_SOURCES = \
+       tests/check_lstrings.cpp \
+       tests/dummy_functions.cpp \
+       tests/boost.cpp
 
-libsupport.la: libsupport.o
+check_trivstring_LDADD = liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) $(QT_CORE_LIBS) $(LIBSHLWAPI) @LIBS@
+check_trivstring_LDFLAGS = $(QT_CORE_LDFLAGS) $(ADD_FRAMEWORKS)
+check_trivstring_SOURCES = \
+       tests/check_trivstring.cpp \
+       tests/dummy_functions.cpp \
+       tests/boost.cpp
 
-libsupport.o: $(libsupport_la_OBJECTS) $(libsupport_la_DEPENDENCIES)
-       $(CXXLINK) $(libsupport_la_OBJECTS)
+makeregfiles: ${check_PROGRAMS}
+       for all in ${check_PROGRAMS} ; do \
+               ./$$all > ${srcdir}/tests/regfiles/$$all ; \
+       done