]> git.lyx.org Git - lyx.git/blobdiff - src/support/Makefile.am
Transfer tempName() implementation to FileName.
[lyx.git] / src / support / Makefile.am
index 55d486b7d1818466882b372bb38dd94648d10d07..e2b8a3737586f94616e3163894fb8fb2be8b8113 100644 (file)
 include $(top_srcdir)/config/common.am
 
-nodist_include_HEADERS = path_defines.C
-noinst_LTLIBRARIES = libsupport.la
+CLEANFILES += $(BUILT_SOURCES)
 
-CLEANFILES = path_defines.C
+EXTRA_DIST = pch.h \
+       os_cygwin.cpp os_unix.cpp os_win32.cpp os_win32.h
 
-INCLUDES = -I$(srcdir)/../ $(BOOST_INCLUDES)
+noinst_LTLIBRARIES = liblyxsupport.la
 
-EXTRA_DIST = path_defines.C.in lyxstring.C lyxstring.h \
-            os_unix.C os_win32.C os_os2.C
+liblyxsupport_la_LIBADD = $(LIBSHLWAPI) $(QT4_CORE_LIB) $(BOOST_SIGNALS)
+liblyxsupport_la_LDFLAGS = $(QT4_CORE_LDFLAGS)
 
-if USE_LYXSTRING
-LYXSTRING = lyxstring.C lyxstring.h
-endif
+BUILT_SOURCES = $(PCH_FILE)
 
-BUILT_SOURCES = path_defines.C
+#########################  Qt stuff  #############################
+#
 
-libsupport_la_SOURCES = \
-       BoostFormat.h \
-       DebugStream.C \
-       DebugStream.h \
-       FileInfo.C \
-       FileInfo.h \
+CLEANFILES += $(MOCEDFILES)
+BUILT_SOURCES += $(MOCEDFILES)
+
+MOCEDFILES = $(MOCHEADER:%.h=%_moc.cpp)
+
+%_moc.cpp: %.h
+       $(MOC4) -o $@ $<
+
+MOCHEADER =
+
+liblyxsupport_la_DEPENDENCIES = $(MOCEDFILES)
+
+#
+##################################################################
+
+AM_CPPFLAGS += $(PCH_FLAGS) -I$(srcdir)/.. $(BOOST_INCLUDES)
+AM_CPPFLAGS += $(QT4_CPPFLAGS) $(QT4_CORE_INCLUDES) -I$(srcdir)/minizip
+
+# force the use of C++ compiler for minizip/*.c files, because
+# gcc can not go through the included boost files.
+liblyxsupport_la_CFLAGS = -x c++
+
+liblyxsupport_la_SOURCES = \
        FileMonitor.h \
-       FileMonitor.C \
-       LAssert.C \
-       LAssert.h \
-       LIstream.h \
-       LOstream.h \
-       os.C \
-       os.h \
-       abort.C \
-       atoi.C \
-       boost-inst.C \
-       chdir.C \
-       copy.C \
-       filename.C \
-       filename.h \
-       filetools.C \
+       FileMonitor.cpp \
+       RandomAccessList.h \
+       abort.cpp \
+       convert.cpp \
+       convert.h \
+       copied_ptr.h \
+       debug.cpp \
+       debug.h \
+       docstream.cpp \
+       docstream.h \
+       docstring.cpp \
+       docstring.h \
+       environment.h \
+       environment.cpp \
+       ExceptionMessage.h \
+       FileFilterList.cpp \
+       FileFilterList.h \
+       FileName.cpp \
+       FileName.h \
+       filetools.cpp \
        filetools.h \
-       forkedcall.C \
-       forkedcall.h \
-       forkedcallqueue.C \
-       forkedcallqueue.h \
-       forkedcontr.C \
-       forkedcontr.h \
-       getcwd.C \
-       kill.C \
+       ForkedCalls.cpp \
+       ForkedCalls.h \
+       gettext.cpp \
+       gettext.h \
+       getcwd.cpp \
+       gzstream.cpp \
+       gzstream.h \
+       kill.cpp \
        limited_stack.h \
-       lstrings.C \
+       lstrings.cpp \
        lstrings.h \
        lyxalgo.h \
-       lyxfunctional.h \
        lyxlib.h \
-       lyxmanip.h \
-       lyxtime.C \
+       lyxtime.cpp \
        lyxtime.h \
-       $(LYXSTRING) lyxsum.C \
-       mkdir.C \
-       nt_defines.h \
-       os2_defines.h \
-       os2_errortable.h \
-       path.C \
-       path.h \
-       path_defines.C \
-       putenv.C \
-       rename.C \
-       rmdir.C \
-       snprintf.h \
-       snprintf.c \
-       sstream.h \
-       systemcall.C \
-       systemcall.h \
-       tempname.C \
+       lyxsum.cpp \
+       Messages.cpp \
+       Messages.h \
+       os.cpp \
+       os.h \
+       Path.cpp \
+       Path.h \
+       Package.cpp \
+       Package.h \
+       qstring_helpers.h \
+       socktools.cpp \
+       socktools.h \
+       strfwd.h \
+       Systemcall.cpp \
+       Systemcall.h \
+       SignalSlot.cpp \
+       SignalSlot.h \
+       SignalSlotPrivate.h \
        textutils.h \
-       tostr.h \
-       tostr.C \
-       translator.h \
+       Translator.h \
+       Timeout.cpp \
+       Timeout.h \
        types.h \
-       userinfo.C \
+       userinfo.cpp \
        userinfo.h \
-       unlink.C
-
-
-path_defines.C: build_path_defines
-
-build_path_defines: path_defines.C.in
-       @rm -f tmp_path_defines ;\
-       ABS_SRCDIR=`cd $(top_srcdir) && pwd` ;\
-       sed "s,%LYX_DIR%,$(pkgdatadir), ;\
-               s,%LOCALEDIR%,$(datadir)/locale, ;\
-               s,%TOP_SRCDIR%,$${ABS_SRCDIR}," \
-               $(srcdir)/path_defines.C.in > tmp_path_defines ;\
-       if cmp -s tmp_path_defines path_defines.C ; then \
-               rm -f tmp_path_defines ;\
-       else \
-               rm -f path_defines.C ;\
-               mv tmp_path_defines path_defines.C ;\
-       fi
+       unicode.cpp \
+       unicode.h \
+       minizip/crypt.h \
+       minizip/ioapi.c \
+       minizip/ioapi.h \
+       minizip/iowin32.c \
+       minizip/iowin32.h \
+       minizip/unzip.c \
+       minizip/unzip.h \
+       minizip/zip.c \
+       minizip/zip.h \
+       minizip/zipunzip.cpp
+
+############################## Tests ##################################
+
+EXTRA_DIST += \
+       tests/test_convert \
+       tests/test_filetools \
+       tests/test_lstrings \
+       tests/regfiles/convert \
+       tests/regfiles/filetools \
+       tests/regfiles/lstrings
+
+
+TESTS = \
+       test_convert \
+       test_filetools \
+       test_lstrings
+
+check_PROGRAMS = \
+       check_convert \
+       check_filetools \
+       check_lstrings
+
+check_convert_LDADD = ../debug.o convert.o docstring.o lstrings.o unicode.o \
+       $(BOOST_LIBS) $(QT4_CORE_LIB)
+check_convert_LDFLAGS = $(QT4_CORE_LDFLAGS)
+check_convert_SOURCES = \
+       tests/check_convert.cpp \
+       tests/boost.cpp
+
+check_filetools_LDADD = ../debug.o libsupport.la $(BOOST_LIBS)
+check_filetools_SOURCES = \
+       tests/check_filetools.cpp \
+       tests/boost.cpp
+
+check_lstrings_LDADD = ../debug.o lstrings.o convert.o docstring.o unicode.o \
+       $(QT4_CORE_LIB)
+check_lstrings_LDFLAGS = $(QT4_CORE_LDFLAGS)
+check_lstrings_SOURCES = \
+       tests/check_lstrings.cpp \
+       tests/boost.cpp
+
+makeregfiles: ${check_PROGRAMS}
+       for all in ${check_PROGRAMS} ; do \
+               ./$$all > ${srcdir}/regfiles/$$all ; \
+       done