]> git.lyx.org Git - lyx.git/blob - src/support/Makefile.am
Fix bugs #6078 and #9364
[lyx.git] / src / support / Makefile.am
1 include $(top_srcdir)/config/common.am
2
3 EXTRA_DIST = os_cygwin.cpp os_unix.cpp os_win32.cpp os_win32.h \
4         CMakeLists.txt tests/CMakeLists.txt tests/supporttest.cmake
5
6 noinst_LIBRARIES = liblyxsupport.a
7
8
9 #########################  Qt stuff  #############################
10 #
11
12 MOCHEADER = \
13         ConsoleApplicationPrivate.h \
14         SystemcallPrivate.h
15
16 MOCEDFILES = $(MOCHEADER:%.h=moc_%.cpp)
17
18 CLEANFILES = $(MOCEDFILES)
19 BUILT_SOURCES = $(MOCEDFILES)
20
21 moc_%.cpp: %.h
22         $(QT_MOC) -o $@ $<
23
24 liblyxsupport_a_DEPENDENCIES = $(MOCEDFILES)
25
26 #
27 ##################################################################
28
29 AM_CPPFLAGS += -I$(srcdir)/.. $(BOOST_INCLUDES) $(QT_CPPFLAGS) $(QT_INCLUDES)
30
31 liblyxsupport_a_SOURCES = \
32         FileMonitor.h \
33         FileMonitor.cpp \
34         RandomAccessList.h \
35         bind.h \
36         ConsoleApplication.cpp \
37         ConsoleApplication.h \
38         ConsoleApplicationPrivate.h \
39         convert.cpp \
40         convert.h \
41         copied_ptr.h \
42         debug.cpp \
43         debug.h \
44         docstream.cpp \
45         docstream.h \
46         docstring.cpp \
47         docstring.h \
48         docstring_list.h \
49         environment.h \
50         environment.cpp \
51         ExceptionMessage.h \
52         FileName.cpp \
53         FileName.h \
54         FileNameList.h \
55         filetools.cpp \
56         filetools.h \
57         foreach.h \
58         ForkedCalls.cpp \
59         ForkedCalls.h \
60         functional.h \
61         gettext.cpp \
62         gettext.h \
63         gzstream.cpp \
64         gzstream.h \
65         kill.cpp \
66         lassert.h \
67         lassert.cpp \
68         limited_stack.h \
69         lstrings.cpp \
70         lstrings.h \
71         lyxalgo.h \
72         lyxlib.h \
73         lyxtime.cpp \
74         lyxtime.h \
75         mutex.h \
76         mutex.cpp \
77         Messages.cpp \
78         Messages.h \
79         numpunct_lyx_char_type.h \
80         os.cpp \
81         os.h \
82         PathChanger.cpp \
83         PathChanger.h \
84         Package.cpp \
85         Package.h \
86         ProgressInterface.h \
87         pmprof.h \
88         qstring_helpers.cpp \
89         qstring_helpers.h \
90         regex.h \
91         socktools.cpp \
92         socktools.h \
93         strfwd.h \
94         Systemcall.cpp \
95         Systemcall.h \
96         SystemcallPrivate.h \
97         shared_ptr.h \
98         TempFile.cpp \
99         TempFile.h \
100         textutils.h \
101         Translator.h \
102         Timeout.cpp \
103         Timeout.h \
104         trivstring.cpp \
105         trivstring.h \
106         types.h \
107         userinfo.cpp \
108         userinfo.h \
109         unicode.cpp \
110         unicode.h \
111         weighted_btree.h
112 if USE_INCLUDED_MYTHES
113 liblyxsupport_a_SOURCES += \
114         mythes/mythes.cxx \
115         mythes/mythes.hxx \
116         mythes/license.readme
117 endif
118
119 #if INSTALL_MACOSX
120 #liblyxsupport_a_SOURCES += \
121 #       AppleSpellChecker.h \
122 #       AppleSpellChecker.mm
123 #endif
124
125 if INSTALL_MACOSX
126 liblyxsupport_a_SOURCES += \
127         AppleSpeller.h \
128         AppleSpeller.m \
129         AppleScript.h \
130         AppleScript.m \
131         AppleScriptProxy.cpp \
132         linkback/LinkBack.h \
133         linkback/LinkBack.m \
134         linkback/LinkBackProxy.h \
135         linkback/LinkBackProxy.m \
136         linkback/LinkBackServer.h \
137         linkback/LinkBackServer.m
138 endif
139
140 ############################## Tests ##################################
141
142 EXTRA_DIST += \
143         tests/test_convert \
144         tests/test_filetools \
145         tests/test_lstrings \
146         tests/test_trivstring \
147         tests/regfiles/convert \
148         tests/regfiles/filetools \
149         tests/regfiles/lstrings \
150         tests/regfiles/trivstring
151
152
153 TESTS = \
154         tests/test_convert \
155         tests/test_filetools \
156         tests/test_lstrings \
157         tests/test_trivstring
158
159 check_PROGRAMS = \
160         check_convert \
161         check_filetools \
162         check_lstrings \
163         check_trivstring
164
165 if INSTALL_MACOSX
166 ADD_FRAMEWORKS = -framework QtCore -framework AppKit -framework ApplicationServices
167 endif
168
169 check_convert_LDADD = liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) $(QT_CORE_LIBS) $(LIBSHLWAPI) @LIBS@
170 check_convert_LDFLAGS = $(QT_CORE_LDFLAGS) $(ADD_FRAMEWORKS)
171 check_convert_SOURCES = \
172         tests/check_convert.cpp \
173         tests/dummy_functions.cpp \
174         tests/boost.cpp
175
176 check_filetools_LDADD = liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) $(QT_CORE_LIBS) $(LIBSHLWAPI) @LIBS@
177 check_filetools_LDFLAGS = $(QT_CORE_LDFLAGS) $(ADD_FRAMEWORKS)
178 check_filetools_SOURCES = \
179         tests/check_filetools.cpp \
180         tests/dummy_functions.cpp \
181         tests/boost.cpp
182
183 check_lstrings_LDADD = liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) $(QT_CORE_LIBS) $(LIBSHLWAPI) @LIBS@
184 check_lstrings_LDFLAGS = $(QT_CORE_LDFLAGS) $(ADD_FRAMEWORKS)
185 check_lstrings_SOURCES = \
186         tests/check_lstrings.cpp \
187         tests/dummy_functions.cpp \
188         tests/boost.cpp
189
190 check_trivstring_LDADD = liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) $(QT_CORE_LIBS) $(LIBSHLWAPI) @LIBS@
191 check_trivstring_LDFLAGS = $(QT_CORE_LDFLAGS) $(ADD_FRAMEWORKS)
192 check_trivstring_SOURCES = \
193         tests/check_trivstring.cpp \
194         tests/dummy_functions.cpp \
195         tests/boost.cpp
196
197 makeregfiles: ${check_PROGRAMS}
198         for all in ${check_PROGRAMS} ; do \
199                 ./$$all > ${srcdir}/tests/regfiles/$$all ; \
200         done