]> git.lyx.org Git - lyx.git/blob - src/Makefile.am
Avoid full metrics computation with Update:FitCursor
[lyx.git] / src / Makefile.am
1 include $(top_srcdir)/config/common.am
2
3 ############################### Core  ##############################
4
5 AM_CPPFLAGS += -I$(top_srcdir)/src
6 AM_CPPFLAGS += $(BOOST_INCLUDES) $(ICONV_INCLUDES) $(ZLIB_INCLUDES)
7 AM_CPPFLAGS += $(ENCHANT_CFLAGS) $(HUNSPELL_CFLAGS) $(MYTHES_INCLUDES)
8 AM_CPPFLAGS += $(NOD_INCLUDES) $(QT_CPPFLAGS) $(QT_CORE_INCLUDES)
9
10 if BUILD_CLIENT_SUBDIR
11 CLIENT = client
12 endif
13
14 SUBDIRS = support frontends . $(CLIENT) tex2lyx convert
15
16 EXTRA_DIST = lyx_commit_hash.h.in \
17         CMakeLists.txt \
18         graphics/CMakeLists.txt \
19         insets/CMakeLists.txt \
20         mathed/CMakeLists.txt \
21         tests/CMakeLists.txt
22
23 OTHERLIBS = $(MYTHES_LIBS) $(ENCHANT_LIBS) $(HUNSPELL_LIBS) \
24             @LIBS@ $(ICONV_LIBS) $(ZLIB_LIBS) $(SOCKET_LIBS) \
25             $(LIBSHLWAPI) $(LIBPSAPI)
26
27 noinst_LIBRARIES = liblyxcore.a
28 bin_PROGRAMS = lyx
29
30 lyx_LDFLAGS = $(AM_LDFLAGS) $(QT_LDFLAGS)
31
32 lyx_LDADD = \
33         liblyxcore.a \
34         liblyxmathed.a \
35         liblyxinsets.a \
36         frontends/liblyxfrontends.a \
37         frontends/qt/liblyxqt.a \
38         liblyxgraphics.a \
39         support/liblyxsupport.a \
40         $(OTHERLIBS) \
41         $(QT_LIB)
42
43 if LYX_WIN_RESOURCE
44 .rc.o:
45         cp $(top_srcdir)/development/Win32/packaging/icons/lyx.ico .
46         cp $(top_srcdir)/development/Win32/packaging/icons/lyx_doc.ico .
47         $(RC) -I$(top_builddir) --preprocessor "$(CPP) -xc-header -DRC_INVOKED" $< -o $@
48 endif
49
50 if INSTALL_MACOSX
51 lyx_LDFLAGS += -framework AppKit -framework ApplicationServices \
52         -Wl,-rpath,@loader_path/../Frameworks \
53         -Wl,-rpath,@executable_path/../Frameworks \
54         -Wl,-headerpad_max_install_names
55 endif
56
57 if INSTALL_MACOSX
58 APPLESPELL = AppleSpellChecker.cpp AppleSpellChecker.h
59 endif
60
61 if USE_ASPELL
62 ASPELL = AspellChecker.cpp AspellChecker.h
63 PWL = PersonalWordList.cpp PersonalWordList.h
64 endif
65
66 if USE_ENCHANT
67 ENCHANT = EnchantChecker.cpp EnchantChecker.h
68 PWL = PersonalWordList.cpp PersonalWordList.h
69 endif
70
71 if USE_HUNSPELL
72 HUNSPELL = HunspellChecker.cpp HunspellChecker.h
73 PWL = PersonalWordList.cpp PersonalWordList.h
74 endif
75
76 lyx_SOURCES = \
77         main.cpp \
78         $(APPLESPELL) \
79         $(ASPELL) \
80         BiblioInfo.h \
81         BiblioInfo.cpp \
82         Box.cpp \
83         Box.h \
84         Compare.cpp \
85         Compare.h \
86         Dimension.cpp \
87         Dimension.h \
88         $(ENCHANT) \
89         $(HUNSPELL) \
90         $(PWL) \
91         LaTeXFonts.cpp \
92         LaTeXFonts.h \
93         Thesaurus.cpp \
94         Thesaurus.h
95
96 if LYX_WIN_RESOURCE
97 lyx_SOURCES += lyxwinres.rc
98 endif
99
100 SOURCEFILESCORE = \
101         Author.cpp \
102         boost.cpp \
103         BranchList.cpp \
104         Buffer.cpp \
105         buffer_funcs.cpp \
106         BufferList.cpp \
107         BufferParams.cpp \
108         BufferView.cpp \
109         Bullet.cpp \
110         Changes.cpp \
111         Chktex.cpp \
112         CiteEnginesList.cpp \
113         CmdDef.cpp \
114         Color.cpp \
115         ConverterCache.cpp \
116         Converter.cpp \
117         CoordCache.cpp \
118         Counters.cpp \
119         Cursor.cpp \
120         CursorSlice.cpp \
121         CutAndPaste.cpp \
122         DepTable.cpp \
123         DocIterator.cpp \
124         Encoding.cpp \
125         BufferEncodings.cpp \
126         ErrorList.cpp \
127         Exporter.cpp \
128         factory.cpp \
129         Floating.cpp \
130         FloatList.cpp \
131         FontInfo.cpp \
132         FontList.cpp \
133         Font.cpp \
134         Format.cpp \
135         FuncRequest.cpp \
136         FuncStatus.cpp \
137         Graph.cpp \
138         IndicesList.cpp \
139         InsetIterator.cpp \
140         InsetList.cpp \
141         Intl.cpp \
142         KeyMap.cpp \
143         KeySequence.cpp \
144         Language.cpp \
145         LaTeX.cpp \
146         LaTeXFeatures.cpp \
147         LaTeXPackages.cpp \
148         LayoutFile.cpp \
149         LayoutModuleList.cpp \
150         LyX.cpp \
151         LyXAction.cpp \
152         lyxfind.cpp \
153         LyXRC.cpp \
154         LyXVC.cpp \
155         MetricsInfo.cpp \
156         ModuleList.cpp \
157         Mover.cpp \
158         output_docbook.cpp \
159         output.cpp \
160         output_latex.cpp \
161         output_xhtml.cpp \
162         OutputParams.cpp \
163         output_plaintext.cpp \
164         Paragraph.cpp \
165         ParagraphMetrics.cpp \
166         ParagraphParameters.cpp \
167         ParIterator.cpp \
168         PDFOptions.cpp \
169         Row.cpp \
170         RowPainter.cpp \
171         Server.cpp \
172         ServerSocket.cpp \
173         xml.cpp \
174         Session.cpp \
175         Spacing.cpp \
176         TexRow.cpp \
177         texstream.cpp \
178         Text.cpp \
179         TextClass.cpp \
180         TextMetrics.cpp \
181         TocBackend.cpp \
182         TocBuilder.cpp \
183         Trans.cpp \
184         Undo.cpp \
185         VCBackend.cpp \
186         version.cpp \
187         VSpace.cpp \
188         WordList.cpp
189
190 HEADERFILESCORE = \
191         Author.h \
192         BranchList.h \
193         buffer_funcs.h \
194         Buffer.h \
195         BufferEncodings.h \
196         BufferList.h \
197         BufferParams.h \
198         BufferView.h \
199         Bullet.h \
200         Citation.h \
201         CiteEnginesList.h \
202         Changes.h \
203         Chktex.h \
204         CmdDef.h \
205         ColorCode.h \
206         Color.h \
207         ColorSet.h \
208         CompletionList.h \
209         ConverterCache.h \
210         Converter.h \
211         CoordCache.h \
212         Counters.h \
213         Cursor.h \
214         CursorSlice.h \
215         CutAndPaste.h \
216         DepTable.h \
217         DispatchResult.h \
218         DocIterator.h \
219         DocumentClassPtr.h \
220         Encoding.h \
221         ErrorList.h \
222         Exporter.h \
223         factory.h \
224         Floating.h \
225         FloatList.h \
226         Font.h \
227         FontEnums.h \
228         FontInfo.h \
229         FontList.h \
230         Format.h \
231         FuncCode.h \
232         FuncRequest.h \
233         FuncStatus.h \
234         Graph.h \
235         IndicesList.h \
236         InsetIterator.h \
237         InsetList.h \
238         Intl.h \
239         KeyMap.h \
240         KeySequence.h \
241         Language.h \
242         LaTeXFeatures.h \
243         LaTeXPackages.h \
244         LaTeX.h \
245         Layout.h \
246         LayoutEnums.h \
247         LayoutFile.h \
248         LayoutModuleList.h \
249         LyXAction.h \
250         lyxfind.h \
251         LyX.h \
252         LyXRC.h \
253         LyXVC.h \
254         MetricsInfo.h \
255         ModuleList.h \
256         Mover.h \
257         output_docbook.h \
258         output.h \
259         OutputEnums.h \
260         output_latex.h \
261         output_xhtml.h \
262         OutputParams.h \
263         output_plaintext.h \
264         paper.h \
265         Paragraph.h \
266         ParagraphList.h \
267         ParagraphMetrics.h \
268         ParagraphParameters.h \
269         ParIterator.h \
270         PDFOptions.h \
271         Row.h \
272         RowFlags.h \
273         RowPainter.h \
274         Server.h \
275         ServerSocket.h \
276         Session.h \
277         xml.h \
278         Spacing.h \
279         SpellChecker.h \
280         TexRow.h \
281         texstream.h \
282         Text.h \
283         TextClass.h \
284         TextMetrics.h \
285         Toc.h \
286         TocBackend.h \
287         TocBuilder.h \
288         Trans.h \
289         Undo.h \
290         update_flags.h \
291         VCBackend.h \
292         version.h \
293         VSpace.h \
294         WordLangTuple.h \
295         WordList.h
296
297 STANDALONEFILES = \
298         Layout.cpp
299
300
301 .PHONY: update_commit_hash
302
303 LCH_V_CHK = $(lch__v_CHK_@AM_V@)
304 lch__v_CHK_ = $(lch__v_CHK_@AM_DEFAULT_V@)
305 lch__v_CHK_0 = @echo "  CHK      lyx_commit_hash.h";
306 lch__v_CHK_1 =
307
308 update_commit_hash:
309         $(LCH_V_CHK)rm -f hash-temp ; \
310         hash=`cd "$(top_srcdir)" && git log -1 --pretty=format:%H 2>/dev/null || echo none` ; \
311         sed s/@LYX_GIT_COMMIT_HASH@/$$hash/ "$(srcdir)"/lyx_commit_hash.h.in >hash-temp ; \
312         cmp -s lyx_commit_hash.h hash-temp || cp hash-temp lyx_commit_hash.h ; \
313         rm -f hash-temp
314
315 lyx_commit_hash.h: update_commit_hash
316
317 BUILT_SOURCES = lyx_commit_hash.h
318 CLEANFILES = lyx_commit_hash.h
319
320 liblyxcore_a_SOURCES = $(SOURCEFILESCORE) $(STANDALONEFILES) $(HEADERFILESCORE)
321
322
323 #########################  Qt stuff  ##############################
324
325 MOCHEADER = Compare.h PreviewLoader.h
326
327 if INSTALL_WINDOWS
328
329 MOCHEADER += Server.h
330 MOCFLAG = -D_WIN32
331
332 endif
333
334 MOCEDFILES = $(MOCHEADER:%.h=moc_%.cpp)
335
336 BUILT_SOURCES += $(MOCEDFILES)
337 CLEANFILES += $(MOCEDFILES)
338
339 moc_PreviewLoader.cpp: graphics/PreviewLoader.h
340         $(AM_V_GEN)$(QT_MOC) $(MOCFLAG) -o $@ $<
341
342 moc_%.cpp: %.h
343         $(AM_V_GEN)$(QT_MOC) $(MOCFLAG) -o $@ $<
344
345 liblyxcore_a_DEPENDENCIES = $(MOCEDFILES)
346
347 ############################### Graphics ##############################
348
349 noinst_LIBRARIES += liblyxgraphics.a
350
351 liblyxgraphics_a_SOURCES = \
352         graphics/epstools.h \
353         graphics/epstools.cpp \
354         graphics/GraphicsCache.h \
355         graphics/GraphicsCache.cpp \
356         graphics/GraphicsCacheItem.h \
357         graphics/GraphicsCacheItem.cpp \
358         graphics/GraphicsConverter.h \
359         graphics/GraphicsConverter.cpp \
360         graphics/GraphicsImage.h \
361         graphics/GraphicsLoader.h \
362         graphics/GraphicsLoader.cpp \
363         graphics/GraphicsParams.cpp \
364         graphics/GraphicsParams.h \
365         graphics/GraphicsTypes.h \
366         graphics/PreviewImage.h \
367         graphics/PreviewImage.cpp \
368         graphics/PreviewLoader.h \
369         graphics/PreviewLoader.cpp
370
371
372 ############################### Mathed  ##############################
373
374 noinst_LIBRARIES += liblyxmathed.a
375
376 SOURCEFILESMATHED = \
377         mathed/InsetMathAMSArray.cpp \
378         mathed/InsetMathArray.cpp \
379         mathed/InsetMathBig.cpp \
380         mathed/InsetMathBoldSymbol.cpp \
381         mathed/InsetMathBox.cpp \
382         mathed/InsetMathBrace.cpp \
383         mathed/InsetMath.cpp \
384         mathed/InsetMathCancel.cpp \
385         mathed/InsetMathCancelto.cpp \
386         mathed/InsetMathCases.cpp \
387         mathed/InsetMathChar.cpp \
388         mathed/InsetMathClass.cpp \
389         mathed/InsetMathColor.cpp \
390         mathed/InsetMathCommand.cpp \
391         mathed/InsetMathComment.cpp \
392         mathed/InsetMathDecoration.cpp \
393         mathed/InsetMathDecoration.h \
394         mathed/InsetMathDelim.cpp \
395         mathed/InsetMathDiagram.cpp \
396         mathed/InsetMathDiff.cpp \
397         mathed/InsetMathDots.cpp \
398         mathed/InsetMathEnsureMath.cpp \
399         mathed/InsetMathEnv.cpp \
400         mathed/InsetMathExFunc.cpp \
401         mathed/InsetMathExInt.cpp \
402         mathed/InsetMathFont.cpp \
403         mathed/InsetMathFontOld.cpp \
404         mathed/InsetMathFrac.cpp \
405         mathed/InsetMathGrid.cpp \
406         mathed/InsetMathHull.cpp \
407         mathed/InsetMathKern.cpp \
408         mathed/InsetMathLefteqn.cpp \
409         mathed/InsetMathLim.cpp \
410         mathed/InsetMathMacro.cpp \
411         mathed/InsetMathMacroArgument.cpp \
412         mathed/InsetMathMacroTemplate.cpp \
413         mathed/InsetMathMatrix.cpp \
414         mathed/InsetMathNest.cpp \
415         mathed/InsetMathNumber.cpp \
416         mathed/InsetMathOverset.cpp \
417         mathed/InsetMathPar.cpp \
418         mathed/InsetMathPhantom.cpp \
419         mathed/InsetMathRef.cpp \
420         mathed/InsetMathRoot.cpp \
421         mathed/InsetMathScript.cpp \
422         mathed/InsetMathSideset.cpp \
423         mathed/InsetMathSize.cpp \
424         mathed/InsetMathSpace.cpp \
425         mathed/InsetMathSpecialChar.cpp \
426         mathed/InsetMathSplit.cpp \
427         mathed/InsetMathSqrt.cpp \
428         mathed/InsetMathStackrel.cpp \
429         mathed/InsetMathString.cpp \
430         mathed/InsetMathSubstack.cpp \
431         mathed/InsetMathSymbol.cpp \
432         mathed/InsetMathTabular.cpp \
433         mathed/InsetMathTextsize.cpp \
434         mathed/InsetMathUnderset.cpp \
435         mathed/InsetMathUnknown.cpp \
436         mathed/InsetMathXArrow.cpp \
437         mathed/InsetMathXYMatrix.cpp \
438         mathed/MacroTable.cpp \
439         mathed/MathAtom.cpp \
440         mathed/MathAutoCorrect.cpp \
441         mathed/MathClass.cpp \
442         mathed/MathData.cpp \
443         mathed/MathExtern.cpp \
444         mathed/MathFactory.cpp \
445         mathed/MathParser.cpp \
446         mathed/MathRow.cpp \
447         mathed/MathStream.cpp \
448         mathed/MathSupport.cpp \
449         mathed/TextPainter.cpp
450
451 HEADERFILESMATHED = \
452         mathed/InsetMathAMSArray.h \
453         mathed/InsetMathArray.h \
454         mathed/InsetMathBig.h \
455         mathed/InsetMathBoldSymbol.h \
456         mathed/InsetMathBox.h \
457         mathed/InsetMathBrace.h \
458         mathed/InsetMathCancel.h \
459         mathed/InsetMathCancelto.h \
460         mathed/InsetMathCases.h \
461         mathed/InsetMathChar.h \
462         mathed/InsetMathClass.h \
463         mathed/InsetMathColor.h \
464         mathed/InsetMathCommand.h \
465         mathed/InsetMathComment.h \
466         mathed/InsetMathDelim.h \
467         mathed/InsetMathDiff.h \
468         mathed/InsetMathDots.h \
469         mathed/InsetMathEnsureMath.h \
470         mathed/InsetMathEnv.h \
471         mathed/InsetMathExFunc.h \
472         mathed/InsetMathExInt.h \
473         mathed/InsetMathFont.h \
474         mathed/InsetMathFontOld.h \
475         mathed/InsetMathFrac.h \
476         mathed/InsetMathGrid.h \
477         mathed/InsetMath.h \
478         mathed/InsetMathHull.h \
479         mathed/InsetMathKern.h \
480         mathed/InsetMathLefteqn.h \
481         mathed/InsetMathLim.h \
482         mathed/InsetMathMacro.h \
483         mathed/InsetMathMacroArgument.h \
484         mathed/InsetMathMacroTemplate.h \
485         mathed/InsetMathMatrix.h \
486         mathed/InsetMathNest.h \
487         mathed/InsetMathNumber.h \
488         mathed/InsetMathOverset.h \
489         mathed/InsetMathPar.h \
490         mathed/InsetMathPhantom.h \
491         mathed/InsetMathRef.h \
492         mathed/InsetMathRoot.h \
493         mathed/InsetMathScript.h \
494         mathed/InsetMathSideset.h \
495         mathed/InsetMathSize.h \
496         mathed/InsetMathSpace.h \
497         mathed/InsetMathSpecialChar.h \
498         mathed/InsetMathSplit.h \
499         mathed/InsetMathSqrt.h \
500         mathed/InsetMathStackrel.h \
501         mathed/InsetMathString.h \
502         mathed/InsetMathSubstack.h \
503         mathed/InsetMathSymbol.h \
504         mathed/InsetMathTabular.h \
505         mathed/InsetMathTextsize.h \
506         mathed/InsetMathUnderset.h \
507         mathed/InsetMathUnknown.h \
508         mathed/InsetMathXArrow.h \
509         mathed/InsetMathXYMatrix.h \
510         mathed/InsetMathDiagram.h \
511         mathed/MathAtom.h \
512         mathed/MathAutoCorrect.h \
513         mathed/MathClass.h \
514         mathed/MathData.h \
515         mathed/MathCompletionList.h \
516         mathed/MathExtern.h \
517         mathed/MathFactory.h \
518         mathed/MacroTable.h \
519         mathed/MathParser.h \
520         mathed/MathParser_flags.h \
521         mathed/MathRow.h \
522         mathed/ReplaceData.h \
523         mathed/MathStream.h \
524         mathed/MathSupport.h \
525         mathed/TextPainter.h
526
527 liblyxmathed_a_SOURCES = $(SOURCEFILESMATHED) $(HEADERFILESMATHED)
528
529
530 ############################### Insets  ##############################
531
532 noinst_LIBRARIES += liblyxinsets.a
533
534 SOURCEFILESINSETS = \
535         insets/ExternalSupport.cpp \
536         insets/ExternalTemplate.cpp \
537         insets/ExternalTransforms.cpp \
538         insets/RenderButton.cpp \
539         insets/RenderGraphic.cpp \
540         insets/RenderPreview.cpp \
541         insets/Inset.cpp \
542         insets/InsetArgument.cpp \
543         insets/InsetBibitem.cpp \
544         insets/InsetBibtex.cpp \
545         insets/InsetBox.cpp \
546         insets/InsetBranch.cpp \
547         insets/InsetCaption.cpp \
548         insets/InsetCaptionable.cpp \
549         insets/InsetCitation.cpp \
550         insets/InsetCollapsible.cpp \
551         insets/InsetCommand.cpp \
552         insets/InsetCommandParams.cpp \
553         insets/InsetCounter.cpp \
554         insets/InsetERT.cpp \
555         insets/InsetExternal.cpp \
556         insets/InsetFlex.cpp \
557         insets/InsetFloat.cpp \
558         insets/InsetFloatList.cpp \
559         insets/InsetFoot.cpp \
560         insets/InsetFootlike.cpp \
561         insets/InsetGraphicsParams.cpp \
562         insets/InsetGraphics.cpp \
563         insets/InsetHyperlink.cpp \
564         insets/InsetInclude.cpp \
565         insets/InsetIndex.cpp \
566         insets/InsetIndexMacro.cpp \
567         insets/InsetInfo.cpp \
568         insets/InsetIPA.cpp \
569         insets/InsetIPAMacro.cpp \
570         insets/InsetLabel.cpp \
571         insets/InsetLayout.cpp \
572         insets/InsetLine.cpp \
573         insets/InsetListings.cpp \
574         insets/InsetListingsParams.cpp \
575         insets/InsetMarginal.cpp \
576         insets/InsetNewline.cpp \
577         insets/InsetNewpage.cpp \
578         insets/InsetNomencl.cpp \
579         insets/InsetNote.cpp \
580         insets/InsetPhantom.cpp \
581         insets/InsetPreview.cpp \
582         insets/InsetQuotes.cpp \
583         insets/InsetRef.cpp \
584         insets/InsetScript.cpp \
585         insets/InsetSeparator.cpp \
586         insets/InsetSpace.cpp \
587         insets/InsetSpecialChar.cpp \
588         insets/InsetTabular.cpp \
589         insets/InsetText.cpp \
590         insets/InsetTOC.cpp \
591         insets/InsetVSpace.cpp \
592         insets/InsetWrap.cpp
593
594 HEADERFILESINSETS = \
595         insets/ExternalSupport.h \
596         insets/ExternalTemplate.h \
597         insets/ExternalTransforms.h \
598         insets/RenderBase.h \
599         insets/RenderButton.h \
600         insets/RenderGraphic.h \
601         insets/RenderPreview.h \
602         insets/Inset.h \
603         insets/InsetArgument.h \
604         insets/InsetBibitem.h \
605         insets/InsetBibtex.h \
606         insets/InsetBox.h \
607         insets/InsetBranch.h \
608         insets/InsetCaption.h \
609         insets/InsetCaptionable.h \
610         insets/InsetCitation.h \
611         insets/InsetCode.h \
612         insets/InsetCollapsible.h \
613         insets/InsetCommand.h \
614         insets/InsetCommandParams.h \
615         insets/InsetCounter.h \
616         insets/InsetERT.h \
617         insets/InsetExternal.h \
618         insets/InsetFlex.h \
619         insets/InsetFloat.h \
620         insets/InsetFoot.h \
621         insets/InsetFloatList.h \
622         insets/InsetFootlike.h \
623         insets/InsetGraphicsParams.h \
624         insets/InsetGraphics.h \
625         insets/InsetHyperlink.h \
626         insets/InsetInclude.h \
627         insets/InsetIndex.h \
628         insets/InsetIndexMacro.h \
629         insets/InsetInfo.h \
630         insets/InsetIPA.h \
631         insets/InsetIPAMacro.h \
632         insets/InsetPreview.h \
633         insets/InsetLabel.h \
634         insets/InsetLayout.h \
635         insets/InsetLine.h \
636         insets/InsetListings.h \
637         insets/InsetListingsParams.h \
638         insets/InsetMarginal.h \
639         insets/InsetNewline.h \
640         insets/InsetNewpage.h \
641         insets/InsetNomencl.h \
642         insets/InsetNote.h \
643         insets/InsetPhantom.h \
644         insets/InsetQuotes.h \
645         insets/InsetRef.h \
646         insets/InsetScript.h \
647         insets/InsetSeparator.h \
648         insets/InsetSpace.h \
649         insets/InsetSpecialChar.h \
650         insets/InsetTabular.h \
651         insets/InsetText.h \
652         insets/InsetTOC.h \
653         insets/InsetVSpace.h \
654         insets/InsetWrap.h
655
656 liblyxinsets_a_SOURCES = $(SOURCEFILESINSETS) $(HEADERFILESINSETS)
657
658
659 ############################## Tests ##################################
660
661 EXTRA_DIST += \
662         tests/test_ExternalTransforms \
663         tests/test_ListingsCaption \
664         tests/test_layout \
665         tests/test_Length \
666         tests/regfiles/ExternalTransforms \
667         tests/regfiles/Length \
668         tests/regfiles/ListingsCaption \
669         tests/dummy_functions.cpp \
670         tests/boost.cpp
671
672 TESTS = tests/test_ExternalTransforms tests/test_ListingsCaption \
673         tests/test_layout tests/test_Length
674
675 alltests: check alltests-recursive
676
677 alltests-recursive: check_layout
678         @srcdir=$(srcdir) $(srcdir)/tests/test_layout; \
679         if test $$? -eq 0; then \
680                 echo -e "====================\nlayout tests passed.\n===================="; \
681         else \
682                 echo -e "====================\nlayout tests failed.\n===================="; \
683         fi
684         cd tex2lyx; $(MAKE) alltests-recursive
685
686 updatetests:
687         cd tex2lyx; $(MAKE) updatetests
688
689 check_PROGRAMS = \
690         check_ExternalTransforms \
691         check_Length \
692         check_ListingsCaption \
693         check_layout
694
695 if INSTALL_MACOSX
696 ADD_FRAMEWORKS = -framework QtGui -framework QtCore -framework AppKit -framework ApplicationServices
697 endif
698
699 TESTS_LIBS = support/liblyxsupport.a \
700         $(LIBICONV) @LIBS@ \
701         $(ICONV_LIBS) $(ZLIB_LIBS) $(QT_LIB) $(LIBSHLWAPI)
702
703 check_layout_CPPFLAGS = $(AM_CPPFLAGS)
704 check_layout_LDADD = $(check_layout_LYX_OBJS) $(TESTS_LIBS)
705 check_layout_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
706 check_layout_SOURCES = \
707         tests/check_layout.cpp \
708         tests/dummy_functions.cpp \
709         tests/boost.cpp
710 check_layout_LYX_OBJS = \
711         insets/InsetLayout.o \
712         CiteEnginesList.o \
713         Color.o \
714         Counters.o \
715         Floating.o \
716         FloatList.o \
717         FontInfo.o \
718         Layout.o \
719         LayoutFile.o \
720         Lexer.o \
721         ModuleList.o \
722         Spacing.o \
723         TextClass.o
724
725 check_ExternalTransforms_CPPFLAGS = $(AM_CPPFLAGS)
726 check_ExternalTransforms_LDADD = $(check_ExternalTransforms_LYX_OBJS) $(TESTS_LIBS)
727 check_ExternalTransforms_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
728 check_ExternalTransforms_SOURCES = \
729         tests/check_ExternalTransforms.cpp \
730         tests/dummy_functions.cpp \
731         tests/boost.cpp
732 check_ExternalTransforms_LYX_OBJS = \
733         graphics/GraphicsParams.o \
734         insets/ExternalTransforms.o
735
736 check_Length_CPPFLAGS = $(AM_CPPFLAGS)
737 check_Length_LDADD = $(TESTS_LIBS)
738 check_Length_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
739 check_Length_SOURCES = \
740         tests/check_Length.cpp \
741         tests/dummy_functions.cpp \
742         tests/boost.cpp
743
744 check_ListingsCaption_CPPFLAGS = $(AM_CPPFLAGS)
745 check_ListingsCaption_LDADD = $(check_ListingsCaption_LYX_OBJS) $(TESTS_LIBS)
746 check_ListingsCaption_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
747 check_ListingsCaption_SOURCES = \
748         tests/check_ListingsCaption.cpp \
749         tests/dummy_functions.cpp \
750         tests/boost.cpp
751 check_ListingsCaption_LYX_OBJS =
752
753 .PHONY: alltests alltests-recursive updatetests