]> git.lyx.org Git - lyx.git/blob - src/Makefile.am
Center correctly top labels like Abstract.
[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 += $(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 = $(BOOST_LIBS) $(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         Lexer.cpp \
151         LyX.cpp \
152         LyXAction.cpp \
153         lyxfind.cpp \
154         LyXRC.cpp \
155         LyXVC.cpp \
156         MetricsInfo.cpp \
157         ModuleList.cpp \
158         Mover.cpp \
159         output_docbook.cpp \
160         output.cpp \
161         output_latex.cpp \
162         output_xhtml.cpp \
163         OutputParams.cpp \
164         output_plaintext.cpp \
165         Paragraph.cpp \
166         ParagraphMetrics.cpp \
167         ParagraphParameters.cpp \
168         ParIterator.cpp \
169         PDFOptions.cpp \
170         Row.cpp \
171         RowPainter.cpp \
172         Server.cpp \
173         ServerSocket.cpp \
174         xml.cpp \
175         Session.cpp \
176         Spacing.cpp \
177         TexRow.cpp \
178         texstream.cpp \
179         Text.cpp \
180         Text2.cpp \
181         Text3.cpp \
182         TextClass.cpp \
183         TextMetrics.cpp \
184         TocBackend.cpp \
185         TocBuilder.cpp \
186         Trans.cpp \
187         Undo.cpp \
188         VCBackend.cpp \
189         version.cpp \
190         VSpace.cpp \
191         WordList.cpp
192
193 HEADERFILESCORE = \
194         Author.h \
195         BranchList.h \
196         buffer_funcs.h \
197         Buffer.h \
198         BufferEncodings.h \
199         BufferList.h \
200         BufferParams.h \
201         BufferView.h \
202         Bullet.h \
203         Citation.h \
204         CiteEnginesList.h \
205         Changes.h \
206         Chktex.h \
207         CmdDef.h \
208         ColorCode.h \
209         Color.h \
210         ColorSet.h \
211         CompletionList.h \
212         ConverterCache.h \
213         Converter.h \
214         CoordCache.h \
215         Counters.h \
216         Cursor.h \
217         CursorSlice.h \
218         CutAndPaste.h \
219         DepTable.h \
220         DispatchResult.h \
221         DocIterator.h \
222         DocumentClassPtr.h \
223         Encoding.h \
224         ErrorList.h \
225         Exporter.h \
226         factory.h \
227         Floating.h \
228         FloatList.h \
229         Font.h \
230         FontEnums.h \
231         FontInfo.h \
232         FontList.h \
233         Format.h \
234         FuncCode.h \
235         FuncRequest.h \
236         FuncStatus.h \
237         Graph.h \
238         IndicesList.h \
239         InsetIterator.h \
240         InsetList.h \
241         Intl.h \
242         KeyMap.h \
243         KeySequence.h \
244         Language.h \
245         LaTeXFeatures.h \
246         LaTeXPackages.h \
247         LaTeX.h \
248         Layout.h \
249         LayoutEnums.h \
250         LayoutFile.h \
251         LayoutModuleList.h \
252         Lexer.h \
253         LyXAction.h \
254         lyxfind.h \
255         LyX.h \
256         LyXRC.h \
257         LyXVC.h \
258         MetricsInfo.h \
259         ModuleList.h \
260         Mover.h \
261         output_docbook.h \
262         output.h \
263         OutputEnums.h \
264         output_latex.h \
265         output_xhtml.h \
266         OutputParams.h \
267         output_plaintext.h \
268         paper.h \
269         Paragraph.h \
270         ParagraphList.h \
271         ParagraphMetrics.h \
272         ParagraphParameters.h \
273         ParIterator.h \
274         PDFOptions.h \
275         Row.h \
276         RowPainter.h \
277         Server.h \
278         ServerSocket.h \
279         Session.h \
280         xml.h \
281         Spacing.h \
282         SpellChecker.h \
283         TexRow.h \
284         texstream.h \
285         Text.h \
286         TextClass.h \
287         TextMetrics.h \
288         Toc.h \
289         TocBackend.h \
290         TocBuilder.h \
291         Trans.h \
292         Undo.h \
293         update_flags.h \
294         VCBackend.h \
295         version.h \
296         VSpace.h \
297         WordLangTuple.h \
298         WordList.h
299
300 STANDALONEFILES = \
301         Layout.cpp
302
303
304 .PHONY: update_commit_hash
305
306 LCH_V_CHK = $(lch__v_CHK_@AM_V@)
307 lch__v_CHK_ = $(lch__v_CHK_@AM_DEFAULT_V@)
308 lch__v_CHK_0 = @echo "  CHK      lyx_commit_hash.h";
309 lch__v_CHK_1 =
310
311 update_commit_hash:
312         $(LCH_V_CHK)rm -f hash-temp ; \
313         hash=`cd "$(top_srcdir)" && git log -1 --pretty=format:%H 2>/dev/null || echo none` ; \
314         sed s/@LYX_GIT_COMMIT_HASH@/$$hash/ "$(srcdir)"/lyx_commit_hash.h.in >hash-temp ; \
315         cmp -s lyx_commit_hash.h hash-temp || cp hash-temp lyx_commit_hash.h ; \
316         rm -f hash-temp
317
318 lyx_commit_hash.h: update_commit_hash
319
320 BUILT_SOURCES = lyx_commit_hash.h
321 CLEANFILES = lyx_commit_hash.h
322
323 liblyxcore_a_SOURCES = $(SOURCEFILESCORE) $(STANDALONEFILES) $(HEADERFILESCORE)
324
325
326 #########################  Qt stuff  ##############################
327
328 MOCHEADER = Compare.h PreviewLoader.h
329
330 if INSTALL_WINDOWS
331
332 MOCHEADER += Server.h
333 MOCFLAG = -D_WIN32
334
335 endif
336
337 MOCEDFILES = $(MOCHEADER:%.h=moc_%.cpp)
338
339 BUILT_SOURCES += $(MOCEDFILES)
340 CLEANFILES += $(MOCEDFILES)
341
342 moc_PreviewLoader.cpp: graphics/PreviewLoader.h
343         $(AM_V_GEN)$(QT_MOC) $(MOCFLAG) -o $@ $<
344
345 moc_%.cpp: %.h
346         $(AM_V_GEN)$(QT_MOC) $(MOCFLAG) -o $@ $<
347
348 liblyxcore_a_DEPENDENCIES = $(MOCEDFILES)
349
350 ############################### Graphics ##############################
351
352 noinst_LIBRARIES += liblyxgraphics.a
353
354 liblyxgraphics_a_SOURCES = \
355         graphics/epstools.h \
356         graphics/epstools.cpp \
357         graphics/GraphicsCache.h \
358         graphics/GraphicsCache.cpp \
359         graphics/GraphicsCacheItem.h \
360         graphics/GraphicsCacheItem.cpp \
361         graphics/GraphicsConverter.h \
362         graphics/GraphicsConverter.cpp \
363         graphics/GraphicsImage.h \
364         graphics/GraphicsLoader.h \
365         graphics/GraphicsLoader.cpp \
366         graphics/GraphicsParams.cpp \
367         graphics/GraphicsParams.h \
368         graphics/GraphicsTypes.h \
369         graphics/PreviewImage.h \
370         graphics/PreviewImage.cpp \
371         graphics/PreviewLoader.h \
372         graphics/PreviewLoader.cpp
373
374
375 ############################### Mathed  ##############################
376
377 noinst_LIBRARIES += liblyxmathed.a
378
379 SOURCEFILESMATHED = \
380         mathed/InsetMathAMSArray.cpp \
381         mathed/InsetMathArray.cpp \
382         mathed/InsetMathBig.cpp \
383         mathed/InsetMathBoldSymbol.cpp \
384         mathed/InsetMathBox.cpp \
385         mathed/InsetMathBrace.cpp \
386         mathed/InsetMath.cpp \
387         mathed/InsetMathCancel.cpp \
388         mathed/InsetMathCancelto.cpp \
389         mathed/InsetMathCases.cpp \
390         mathed/InsetMathChar.cpp \
391         mathed/InsetMathClass.cpp \
392         mathed/InsetMathColor.cpp \
393         mathed/InsetMathCommand.cpp \
394         mathed/InsetMathComment.cpp \
395         mathed/InsetMathDecoration.cpp \
396         mathed/InsetMathDecoration.h \
397         mathed/InsetMathDelim.cpp \
398         mathed/InsetMathDiagram.cpp \
399         mathed/InsetMathDiff.cpp \
400         mathed/InsetMathDots.cpp \
401         mathed/InsetMathEnsureMath.cpp \
402         mathed/InsetMathEnv.cpp \
403         mathed/InsetMathExFunc.cpp \
404         mathed/InsetMathExInt.cpp \
405         mathed/InsetMathFont.cpp \
406         mathed/InsetMathFontOld.cpp \
407         mathed/InsetMathFrac.cpp \
408         mathed/InsetMathGrid.cpp \
409         mathed/InsetMathHull.cpp \
410         mathed/InsetMathKern.cpp \
411         mathed/InsetMathLefteqn.cpp \
412         mathed/InsetMathLim.cpp \
413         mathed/InsetMathMacro.cpp \
414         mathed/InsetMathMacroArgument.cpp \
415         mathed/InsetMathMacroTemplate.cpp \
416         mathed/InsetMathMatrix.cpp \
417         mathed/InsetMathNest.cpp \
418         mathed/InsetMathNumber.cpp \
419         mathed/InsetMathOverset.cpp \
420         mathed/InsetMathPar.cpp \
421         mathed/InsetMathPhantom.cpp \
422         mathed/InsetMathRef.cpp \
423         mathed/InsetMathRoot.cpp \
424         mathed/InsetMathScript.cpp \
425         mathed/InsetMathSideset.cpp \
426         mathed/InsetMathSize.cpp \
427         mathed/InsetMathSpace.cpp \
428         mathed/InsetMathSpecialChar.cpp \
429         mathed/InsetMathSplit.cpp \
430         mathed/InsetMathSqrt.cpp \
431         mathed/InsetMathStackrel.cpp \
432         mathed/InsetMathString.cpp \
433         mathed/InsetMathSubstack.cpp \
434         mathed/InsetMathSymbol.cpp \
435         mathed/InsetMathTabular.cpp \
436         mathed/InsetMathUnderset.cpp \
437         mathed/InsetMathUnknown.cpp \
438         mathed/InsetMathXArrow.cpp \
439         mathed/InsetMathXYMatrix.cpp \
440         mathed/MacroTable.cpp \
441         mathed/MathAtom.cpp \
442         mathed/MathAutoCorrect.cpp \
443         mathed/MathClass.cpp \
444         mathed/MathData.cpp \
445         mathed/MathExtern.cpp \
446         mathed/MathFactory.cpp \
447         mathed/MathParser.cpp \
448         mathed/MathRow.cpp \
449         mathed/MathStream.cpp \
450         mathed/MathSupport.cpp \
451         mathed/TextPainter.cpp
452
453 HEADERFILESMATHED = \
454         mathed/InsetMathAMSArray.h \
455         mathed/InsetMathArray.h \
456         mathed/InsetMathBig.h \
457         mathed/InsetMathBoldSymbol.h \
458         mathed/InsetMathBox.h \
459         mathed/InsetMathBrace.h \
460         mathed/InsetMathCancel.h \
461         mathed/InsetMathCancelto.h \
462         mathed/InsetMathCases.h \
463         mathed/InsetMathChar.h \
464         mathed/InsetMathClass.h \
465         mathed/InsetMathColor.h \
466         mathed/InsetMathCommand.h \
467         mathed/InsetMathComment.h \
468         mathed/InsetMathDelim.h \
469         mathed/InsetMathDiff.h \
470         mathed/InsetMathDots.h \
471         mathed/InsetMathEnsureMath.h \
472         mathed/InsetMathEnv.h \
473         mathed/InsetMathExFunc.h \
474         mathed/InsetMathExInt.h \
475         mathed/InsetMathFont.h \
476         mathed/InsetMathFontOld.h \
477         mathed/InsetMathFrac.h \
478         mathed/InsetMathGrid.h \
479         mathed/InsetMath.h \
480         mathed/InsetMathHull.h \
481         mathed/InsetMathKern.h \
482         mathed/InsetMathLefteqn.h \
483         mathed/InsetMathLim.h \
484         mathed/InsetMathMacro.h \
485         mathed/InsetMathMacroArgument.h \
486         mathed/InsetMathMacroTemplate.h \
487         mathed/InsetMathMatrix.h \
488         mathed/InsetMathNest.h \
489         mathed/InsetMathNumber.h \
490         mathed/InsetMathOverset.h \
491         mathed/InsetMathPar.h \
492         mathed/InsetMathPhantom.h \
493         mathed/InsetMathRef.h \
494         mathed/InsetMathRoot.h \
495         mathed/InsetMathScript.h \
496         mathed/InsetMathSideset.h \
497         mathed/InsetMathSize.h \
498         mathed/InsetMathSpace.h \
499         mathed/InsetMathSpecialChar.h \
500         mathed/InsetMathSplit.h \
501         mathed/InsetMathSqrt.h \
502         mathed/InsetMathStackrel.h \
503         mathed/InsetMathString.h \
504         mathed/InsetMathSubstack.h \
505         mathed/InsetMathSymbol.h \
506         mathed/InsetMathTabular.h \
507         mathed/InsetMathUnderset.h \
508         mathed/InsetMathUnknown.h \
509         mathed/InsetMathXArrow.h \
510         mathed/InsetMathXYMatrix.h \
511         mathed/InsetMathDiagram.h \
512         mathed/MathAtom.h \
513         mathed/MathAutoCorrect.h \
514         mathed/MathClass.h \
515         mathed/MathData.h \
516         mathed/MathCompletionList.h \
517         mathed/MathExtern.h \
518         mathed/MathFactory.h \
519         mathed/MacroTable.h \
520         mathed/MathParser.h \
521         mathed/MathParser_flags.h \
522         mathed/MathRow.h \
523         mathed/ReplaceData.h \
524         mathed/MathStream.h \
525         mathed/MathSupport.h \
526         mathed/TextPainter.h
527
528 liblyxmathed_a_SOURCES = $(SOURCEFILESMATHED) $(HEADERFILESMATHED)
529
530
531 ############################### Insets  ##############################
532
533 noinst_LIBRARIES += liblyxinsets.a
534
535 SOURCEFILESINSETS = \
536         insets/ExternalSupport.cpp \
537         insets/ExternalTemplate.cpp \
538         insets/ExternalTransforms.cpp \
539         insets/RenderButton.cpp \
540         insets/RenderGraphic.cpp \
541         insets/RenderPreview.cpp \
542         insets/Inset.cpp \
543         insets/InsetArgument.cpp \
544         insets/InsetBibitem.cpp \
545         insets/InsetBibtex.cpp \
546         insets/InsetBox.cpp \
547         insets/InsetBranch.cpp \
548         insets/InsetCaption.cpp \
549         insets/InsetCaptionable.cpp \
550         insets/InsetCitation.cpp \
551         insets/InsetCollapsible.cpp \
552         insets/InsetCommand.cpp \
553         insets/InsetCommandParams.cpp \
554         insets/InsetCounter.cpp \
555         insets/InsetERT.cpp \
556         insets/InsetExternal.cpp \
557         insets/InsetFlex.cpp \
558         insets/InsetFloat.cpp \
559         insets/InsetFloatList.cpp \
560         insets/InsetFoot.cpp \
561         insets/InsetFootlike.cpp \
562         insets/InsetGraphicsParams.cpp \
563         insets/InsetGraphics.cpp \
564         insets/InsetHyperlink.cpp \
565         insets/InsetInclude.cpp \
566         insets/InsetIndex.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/InsetInfo.h \
629         insets/InsetIPA.h \
630         insets/InsetIPAMacro.h \
631         insets/InsetPreview.h \
632         insets/InsetLabel.h \
633         insets/InsetLayout.h \
634         insets/InsetLine.h \
635         insets/InsetListings.h \
636         insets/InsetListingsParams.h \
637         insets/InsetMarginal.h \
638         insets/InsetNewline.h \
639         insets/InsetNewpage.h \
640         insets/InsetNomencl.h \
641         insets/InsetNote.h \
642         insets/InsetPhantom.h \
643         insets/InsetQuotes.h \
644         insets/InsetRef.h \
645         insets/InsetScript.h \
646         insets/InsetSeparator.h \
647         insets/InsetSpace.h \
648         insets/InsetSpecialChar.h \
649         insets/InsetTabular.h \
650         insets/InsetText.h \
651         insets/InsetTOC.h \
652         insets/InsetVSpace.h \
653         insets/InsetWrap.h
654
655 liblyxinsets_a_SOURCES = $(SOURCEFILESINSETS) $(HEADERFILESINSETS)
656
657
658 ############################## Tests ##################################
659
660 EXTRA_DIST += \
661         tests/test_ExternalTransforms \
662         tests/test_ListingsCaption \
663         tests/test_layout \
664         tests/test_Length \
665         tests/regfiles/ExternalTransforms \
666         tests/regfiles/Length \
667         tests/regfiles/ListingsCaption \
668         tests/dummy_functions.cpp \
669         tests/boost.cpp
670
671 TESTS = tests/test_ExternalTransforms tests/test_ListingsCaption \
672         tests/test_layout tests/test_Length
673
674 alltests: check alltests-recursive
675
676 alltests-recursive: check_layout
677         @srcdir=$(srcdir) $(srcdir)/tests/test_layout; \
678         if test $$? -eq 0; then \
679                 echo -e "====================\nlayout tests passed.\n===================="; \
680         else \
681                 echo -e "====================\nlayout tests failed.\n===================="; \
682         fi
683         cd tex2lyx; $(MAKE) alltests-recursive
684
685 updatetests:
686         cd tex2lyx; $(MAKE) updatetests
687
688 check_PROGRAMS = \
689         check_ExternalTransforms \
690         check_Length \
691         check_ListingsCaption \
692         check_layout
693
694 if INSTALL_MACOSX
695 ADD_FRAMEWORKS = -framework QtGui -framework QtCore -framework AppKit -framework ApplicationServices
696 endif
697
698 TESTS_LIBS = support/liblyxsupport.a \
699         $(LIBICONV) $(BOOST_LIBS) @LIBS@ \
700         $(ICONV_LIBS) $(ZLIB_LIBS) $(QT_LIB) $(LIBSHLWAPI)
701
702 check_layout_CPPFLAGS = $(AM_CPPFLAGS)
703 check_layout_LDADD = $(check_layout_LYX_OBJS) $(TESTS_LIBS)
704 check_layout_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
705 check_layout_SOURCES = \
706         tests/check_layout.cpp \
707         tests/dummy_functions.cpp \
708         tests/boost.cpp
709 check_layout_LYX_OBJS = \
710         insets/InsetLayout.o \
711         CiteEnginesList.o \
712         Color.o \
713         Counters.o \
714         Floating.o \
715         FloatList.o \
716         FontInfo.o \
717         Layout.o \
718         LayoutFile.o \
719         Lexer.o \
720         ModuleList.o \
721         Spacing.o \
722         TextClass.o
723
724 check_ExternalTransforms_CPPFLAGS = $(AM_CPPFLAGS)
725 check_ExternalTransforms_LDADD = $(check_ExternalTransforms_LYX_OBJS) $(TESTS_LIBS)
726 check_ExternalTransforms_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
727 check_ExternalTransforms_SOURCES = \
728         tests/check_ExternalTransforms.cpp \
729         tests/dummy_functions.cpp \
730         tests/boost.cpp
731 check_ExternalTransforms_LYX_OBJS = \
732         graphics/GraphicsParams.o \
733         insets/ExternalTransforms.o
734
735 check_Length_CPPFLAGS = $(AM_CPPFLAGS)
736 check_Length_LDADD = $(TESTS_LIBS)
737 check_Length_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
738 check_Length_SOURCES = \
739         tests/check_Length.cpp \
740         tests/dummy_functions.cpp \
741         tests/boost.cpp
742
743 check_ListingsCaption_CPPFLAGS = $(AM_CPPFLAGS)
744 check_ListingsCaption_LDADD = $(check_ListingsCaption_LYX_OBJS) $(TESTS_LIBS)
745 check_ListingsCaption_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
746 check_ListingsCaption_SOURCES = \
747         tests/check_ListingsCaption.cpp \
748         tests/dummy_functions.cpp \
749         tests/boost.cpp
750 check_ListingsCaption_LYX_OBJS =
751
752 .PHONY: alltests alltests-recursive updatetests