]> git.lyx.org Git - features.git/blob - src/Makefile.am
InsetIndex: hide printTree behind a LYX_INSET_INDEX_DEBUG flag
[features.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         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         RowFlags.h \
277         RowPainter.h \
278         Server.h \
279         ServerSocket.h \
280         Session.h \
281         xml.h \
282         Spacing.h \
283         SpellChecker.h \
284         TexRow.h \
285         texstream.h \
286         Text.h \
287         TextClass.h \
288         TextMetrics.h \
289         Toc.h \
290         TocBackend.h \
291         TocBuilder.h \
292         Trans.h \
293         Undo.h \
294         update_flags.h \
295         VCBackend.h \
296         version.h \
297         VSpace.h \
298         WordLangTuple.h \
299         WordList.h
300
301 STANDALONEFILES = \
302         Layout.cpp
303
304
305 .PHONY: update_commit_hash
306
307 LCH_V_CHK = $(lch__v_CHK_@AM_V@)
308 lch__v_CHK_ = $(lch__v_CHK_@AM_DEFAULT_V@)
309 lch__v_CHK_0 = @echo "  CHK      lyx_commit_hash.h";
310 lch__v_CHK_1 =
311
312 update_commit_hash:
313         $(LCH_V_CHK)rm -f hash-temp ; \
314         hash=`cd "$(top_srcdir)" && git log -1 --pretty=format:%H 2>/dev/null || echo none` ; \
315         sed s/@LYX_GIT_COMMIT_HASH@/$$hash/ "$(srcdir)"/lyx_commit_hash.h.in >hash-temp ; \
316         cmp -s lyx_commit_hash.h hash-temp || cp hash-temp lyx_commit_hash.h ; \
317         rm -f hash-temp
318
319 lyx_commit_hash.h: update_commit_hash
320
321 BUILT_SOURCES = lyx_commit_hash.h
322 CLEANFILES = lyx_commit_hash.h
323
324 liblyxcore_a_SOURCES = $(SOURCEFILESCORE) $(STANDALONEFILES) $(HEADERFILESCORE)
325
326
327 #########################  Qt stuff  ##############################
328
329 MOCHEADER = Compare.h PreviewLoader.h
330
331 if INSTALL_WINDOWS
332
333 MOCHEADER += Server.h
334 MOCFLAG = -D_WIN32
335
336 endif
337
338 MOCEDFILES = $(MOCHEADER:%.h=moc_%.cpp)
339
340 BUILT_SOURCES += $(MOCEDFILES)
341 CLEANFILES += $(MOCEDFILES)
342
343 moc_PreviewLoader.cpp: graphics/PreviewLoader.h
344         $(AM_V_GEN)$(QT_MOC) $(MOCFLAG) -o $@ $<
345
346 moc_%.cpp: %.h
347         $(AM_V_GEN)$(QT_MOC) $(MOCFLAG) -o $@ $<
348
349 liblyxcore_a_DEPENDENCIES = $(MOCEDFILES)
350
351 ############################### Graphics ##############################
352
353 noinst_LIBRARIES += liblyxgraphics.a
354
355 liblyxgraphics_a_SOURCES = \
356         graphics/epstools.h \
357         graphics/epstools.cpp \
358         graphics/GraphicsCache.h \
359         graphics/GraphicsCache.cpp \
360         graphics/GraphicsCacheItem.h \
361         graphics/GraphicsCacheItem.cpp \
362         graphics/GraphicsConverter.h \
363         graphics/GraphicsConverter.cpp \
364         graphics/GraphicsImage.h \
365         graphics/GraphicsLoader.h \
366         graphics/GraphicsLoader.cpp \
367         graphics/GraphicsParams.cpp \
368         graphics/GraphicsParams.h \
369         graphics/GraphicsTypes.h \
370         graphics/PreviewImage.h \
371         graphics/PreviewImage.cpp \
372         graphics/PreviewLoader.h \
373         graphics/PreviewLoader.cpp
374
375
376 ############################### Mathed  ##############################
377
378 noinst_LIBRARIES += liblyxmathed.a
379
380 SOURCEFILESMATHED = \
381         mathed/InsetMathAMSArray.cpp \
382         mathed/InsetMathArray.cpp \
383         mathed/InsetMathBig.cpp \
384         mathed/InsetMathBoldSymbol.cpp \
385         mathed/InsetMathBox.cpp \
386         mathed/InsetMathBrace.cpp \
387         mathed/InsetMath.cpp \
388         mathed/InsetMathCancel.cpp \
389         mathed/InsetMathCancelto.cpp \
390         mathed/InsetMathCases.cpp \
391         mathed/InsetMathChar.cpp \
392         mathed/InsetMathClass.cpp \
393         mathed/InsetMathColor.cpp \
394         mathed/InsetMathCommand.cpp \
395         mathed/InsetMathComment.cpp \
396         mathed/InsetMathDecoration.cpp \
397         mathed/InsetMathDecoration.h \
398         mathed/InsetMathDelim.cpp \
399         mathed/InsetMathDiagram.cpp \
400         mathed/InsetMathDiff.cpp \
401         mathed/InsetMathDots.cpp \
402         mathed/InsetMathEnsureMath.cpp \
403         mathed/InsetMathEnv.cpp \
404         mathed/InsetMathExFunc.cpp \
405         mathed/InsetMathExInt.cpp \
406         mathed/InsetMathFont.cpp \
407         mathed/InsetMathFontOld.cpp \
408         mathed/InsetMathFrac.cpp \
409         mathed/InsetMathGrid.cpp \
410         mathed/InsetMathHull.cpp \
411         mathed/InsetMathKern.cpp \
412         mathed/InsetMathLefteqn.cpp \
413         mathed/InsetMathLim.cpp \
414         mathed/InsetMathMacro.cpp \
415         mathed/InsetMathMacroArgument.cpp \
416         mathed/InsetMathMacroTemplate.cpp \
417         mathed/InsetMathMatrix.cpp \
418         mathed/InsetMathNest.cpp \
419         mathed/InsetMathNumber.cpp \
420         mathed/InsetMathOverset.cpp \
421         mathed/InsetMathPar.cpp \
422         mathed/InsetMathPhantom.cpp \
423         mathed/InsetMathRef.cpp \
424         mathed/InsetMathRoot.cpp \
425         mathed/InsetMathScript.cpp \
426         mathed/InsetMathSideset.cpp \
427         mathed/InsetMathSize.cpp \
428         mathed/InsetMathSpace.cpp \
429         mathed/InsetMathSpecialChar.cpp \
430         mathed/InsetMathSplit.cpp \
431         mathed/InsetMathSqrt.cpp \
432         mathed/InsetMathStackrel.cpp \
433         mathed/InsetMathString.cpp \
434         mathed/InsetMathSubstack.cpp \
435         mathed/InsetMathSymbol.cpp \
436         mathed/InsetMathTabular.cpp \
437         mathed/InsetMathUnderset.cpp \
438         mathed/InsetMathUnknown.cpp \
439         mathed/InsetMathXArrow.cpp \
440         mathed/InsetMathXYMatrix.cpp \
441         mathed/MacroTable.cpp \
442         mathed/MathAtom.cpp \
443         mathed/MathAutoCorrect.cpp \
444         mathed/MathClass.cpp \
445         mathed/MathData.cpp \
446         mathed/MathExtern.cpp \
447         mathed/MathFactory.cpp \
448         mathed/MathParser.cpp \
449         mathed/MathRow.cpp \
450         mathed/MathStream.cpp \
451         mathed/MathSupport.cpp \
452         mathed/TextPainter.cpp
453
454 HEADERFILESMATHED = \
455         mathed/InsetMathAMSArray.h \
456         mathed/InsetMathArray.h \
457         mathed/InsetMathBig.h \
458         mathed/InsetMathBoldSymbol.h \
459         mathed/InsetMathBox.h \
460         mathed/InsetMathBrace.h \
461         mathed/InsetMathCancel.h \
462         mathed/InsetMathCancelto.h \
463         mathed/InsetMathCases.h \
464         mathed/InsetMathChar.h \
465         mathed/InsetMathClass.h \
466         mathed/InsetMathColor.h \
467         mathed/InsetMathCommand.h \
468         mathed/InsetMathComment.h \
469         mathed/InsetMathDelim.h \
470         mathed/InsetMathDiff.h \
471         mathed/InsetMathDots.h \
472         mathed/InsetMathEnsureMath.h \
473         mathed/InsetMathEnv.h \
474         mathed/InsetMathExFunc.h \
475         mathed/InsetMathExInt.h \
476         mathed/InsetMathFont.h \
477         mathed/InsetMathFontOld.h \
478         mathed/InsetMathFrac.h \
479         mathed/InsetMathGrid.h \
480         mathed/InsetMath.h \
481         mathed/InsetMathHull.h \
482         mathed/InsetMathKern.h \
483         mathed/InsetMathLefteqn.h \
484         mathed/InsetMathLim.h \
485         mathed/InsetMathMacro.h \
486         mathed/InsetMathMacroArgument.h \
487         mathed/InsetMathMacroTemplate.h \
488         mathed/InsetMathMatrix.h \
489         mathed/InsetMathNest.h \
490         mathed/InsetMathNumber.h \
491         mathed/InsetMathOverset.h \
492         mathed/InsetMathPar.h \
493         mathed/InsetMathPhantom.h \
494         mathed/InsetMathRef.h \
495         mathed/InsetMathRoot.h \
496         mathed/InsetMathScript.h \
497         mathed/InsetMathSideset.h \
498         mathed/InsetMathSize.h \
499         mathed/InsetMathSpace.h \
500         mathed/InsetMathSpecialChar.h \
501         mathed/InsetMathSplit.h \
502         mathed/InsetMathSqrt.h \
503         mathed/InsetMathStackrel.h \
504         mathed/InsetMathString.h \
505         mathed/InsetMathSubstack.h \
506         mathed/InsetMathSymbol.h \
507         mathed/InsetMathTabular.h \
508         mathed/InsetMathUnderset.h \
509         mathed/InsetMathUnknown.h \
510         mathed/InsetMathXArrow.h \
511         mathed/InsetMathXYMatrix.h \
512         mathed/InsetMathDiagram.h \
513         mathed/MathAtom.h \
514         mathed/MathAutoCorrect.h \
515         mathed/MathClass.h \
516         mathed/MathData.h \
517         mathed/MathCompletionList.h \
518         mathed/MathExtern.h \
519         mathed/MathFactory.h \
520         mathed/MacroTable.h \
521         mathed/MathParser.h \
522         mathed/MathParser_flags.h \
523         mathed/MathRow.h \
524         mathed/ReplaceData.h \
525         mathed/MathStream.h \
526         mathed/MathSupport.h \
527         mathed/TextPainter.h
528
529 liblyxmathed_a_SOURCES = $(SOURCEFILESMATHED) $(HEADERFILESMATHED)
530
531
532 ############################### Insets  ##############################
533
534 noinst_LIBRARIES += liblyxinsets.a
535
536 SOURCEFILESINSETS = \
537         insets/ExternalSupport.cpp \
538         insets/ExternalTemplate.cpp \
539         insets/ExternalTransforms.cpp \
540         insets/RenderButton.cpp \
541         insets/RenderGraphic.cpp \
542         insets/RenderPreview.cpp \
543         insets/Inset.cpp \
544         insets/InsetArgument.cpp \
545         insets/InsetBibitem.cpp \
546         insets/InsetBibtex.cpp \
547         insets/InsetBox.cpp \
548         insets/InsetBranch.cpp \
549         insets/InsetCaption.cpp \
550         insets/InsetCaptionable.cpp \
551         insets/InsetCitation.cpp \
552         insets/InsetCollapsible.cpp \
553         insets/InsetCommand.cpp \
554         insets/InsetCommandParams.cpp \
555         insets/InsetCounter.cpp \
556         insets/InsetERT.cpp \
557         insets/InsetExternal.cpp \
558         insets/InsetFlex.cpp \
559         insets/InsetFloat.cpp \
560         insets/InsetFloatList.cpp \
561         insets/InsetFoot.cpp \
562         insets/InsetFootlike.cpp \
563         insets/InsetGraphicsParams.cpp \
564         insets/InsetGraphics.cpp \
565         insets/InsetHyperlink.cpp \
566         insets/InsetInclude.cpp \
567         insets/InsetIndex.cpp \
568         insets/InsetIndexMacro.cpp \
569         insets/InsetInfo.cpp \
570         insets/InsetIPA.cpp \
571         insets/InsetIPAMacro.cpp \
572         insets/InsetLabel.cpp \
573         insets/InsetLayout.cpp \
574         insets/InsetLine.cpp \
575         insets/InsetListings.cpp \
576         insets/InsetListingsParams.cpp \
577         insets/InsetMarginal.cpp \
578         insets/InsetNewline.cpp \
579         insets/InsetNewpage.cpp \
580         insets/InsetNomencl.cpp \
581         insets/InsetNote.cpp \
582         insets/InsetPhantom.cpp \
583         insets/InsetPreview.cpp \
584         insets/InsetQuotes.cpp \
585         insets/InsetRef.cpp \
586         insets/InsetScript.cpp \
587         insets/InsetSeparator.cpp \
588         insets/InsetSpace.cpp \
589         insets/InsetSpecialChar.cpp \
590         insets/InsetTabular.cpp \
591         insets/InsetText.cpp \
592         insets/InsetTOC.cpp \
593         insets/InsetVSpace.cpp \
594         insets/InsetWrap.cpp
595
596 HEADERFILESINSETS = \
597         insets/ExternalSupport.h \
598         insets/ExternalTemplate.h \
599         insets/ExternalTransforms.h \
600         insets/RenderBase.h \
601         insets/RenderButton.h \
602         insets/RenderGraphic.h \
603         insets/RenderPreview.h \
604         insets/Inset.h \
605         insets/InsetArgument.h \
606         insets/InsetBibitem.h \
607         insets/InsetBibtex.h \
608         insets/InsetBox.h \
609         insets/InsetBranch.h \
610         insets/InsetCaption.h \
611         insets/InsetCaptionable.h \
612         insets/InsetCitation.h \
613         insets/InsetCode.h \
614         insets/InsetCollapsible.h \
615         insets/InsetCommand.h \
616         insets/InsetCommandParams.h \
617         insets/InsetCounter.h \
618         insets/InsetERT.h \
619         insets/InsetExternal.h \
620         insets/InsetFlex.h \
621         insets/InsetFloat.h \
622         insets/InsetFoot.h \
623         insets/InsetFloatList.h \
624         insets/InsetFootlike.h \
625         insets/InsetGraphicsParams.h \
626         insets/InsetGraphics.h \
627         insets/InsetHyperlink.h \
628         insets/InsetInclude.h \
629         insets/InsetIndex.h \
630         insets/InsetInfo.h \
631         insets/InsetIPA.h \
632         insets/InsetIPAMacro.h \
633         insets/InsetPreview.h \
634         insets/InsetLabel.h \
635         insets/InsetLayout.h \
636         insets/InsetLine.h \
637         insets/InsetListings.h \
638         insets/InsetListingsParams.h \
639         insets/InsetMarginal.h \
640         insets/InsetNewline.h \
641         insets/InsetNewpage.h \
642         insets/InsetNomencl.h \
643         insets/InsetNote.h \
644         insets/InsetPhantom.h \
645         insets/InsetQuotes.h \
646         insets/InsetRef.h \
647         insets/InsetScript.h \
648         insets/InsetSeparator.h \
649         insets/InsetSpace.h \
650         insets/InsetSpecialChar.h \
651         insets/InsetTabular.h \
652         insets/InsetText.h \
653         insets/InsetTOC.h \
654         insets/InsetVSpace.h \
655         insets/InsetWrap.h
656
657 liblyxinsets_a_SOURCES = $(SOURCEFILESINSETS) $(HEADERFILESINSETS)
658
659
660 ############################## Tests ##################################
661
662 EXTRA_DIST += \
663         tests/test_ExternalTransforms \
664         tests/test_ListingsCaption \
665         tests/test_layout \
666         tests/test_Length \
667         tests/regfiles/ExternalTransforms \
668         tests/regfiles/Length \
669         tests/regfiles/ListingsCaption \
670         tests/dummy_functions.cpp \
671         tests/boost.cpp
672
673 TESTS = tests/test_ExternalTransforms tests/test_ListingsCaption \
674         tests/test_layout tests/test_Length
675
676 alltests: check alltests-recursive
677
678 alltests-recursive: check_layout
679         @srcdir=$(srcdir) $(srcdir)/tests/test_layout; \
680         if test $$? -eq 0; then \
681                 echo -e "====================\nlayout tests passed.\n===================="; \
682         else \
683                 echo -e "====================\nlayout tests failed.\n===================="; \
684         fi
685         cd tex2lyx; $(MAKE) alltests-recursive
686
687 updatetests:
688         cd tex2lyx; $(MAKE) updatetests
689
690 check_PROGRAMS = \
691         check_ExternalTransforms \
692         check_Length \
693         check_ListingsCaption \
694         check_layout
695
696 if INSTALL_MACOSX
697 ADD_FRAMEWORKS = -framework QtGui -framework QtCore -framework AppKit -framework ApplicationServices
698 endif
699
700 TESTS_LIBS = support/liblyxsupport.a \
701         $(LIBICONV) @LIBS@ \
702         $(ICONV_LIBS) $(ZLIB_LIBS) $(QT_LIB) $(LIBSHLWAPI)
703
704 check_layout_CPPFLAGS = $(AM_CPPFLAGS)
705 check_layout_LDADD = $(check_layout_LYX_OBJS) $(TESTS_LIBS)
706 check_layout_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
707 check_layout_SOURCES = \
708         tests/check_layout.cpp \
709         tests/dummy_functions.cpp \
710         tests/boost.cpp
711 check_layout_LYX_OBJS = \
712         insets/InsetLayout.o \
713         CiteEnginesList.o \
714         Color.o \
715         Counters.o \
716         Floating.o \
717         FloatList.o \
718         FontInfo.o \
719         Layout.o \
720         LayoutFile.o \
721         Lexer.o \
722         ModuleList.o \
723         Spacing.o \
724         TextClass.o
725
726 check_ExternalTransforms_CPPFLAGS = $(AM_CPPFLAGS)
727 check_ExternalTransforms_LDADD = $(check_ExternalTransforms_LYX_OBJS) $(TESTS_LIBS)
728 check_ExternalTransforms_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
729 check_ExternalTransforms_SOURCES = \
730         tests/check_ExternalTransforms.cpp \
731         tests/dummy_functions.cpp \
732         tests/boost.cpp
733 check_ExternalTransforms_LYX_OBJS = \
734         graphics/GraphicsParams.o \
735         insets/ExternalTransforms.o
736
737 check_Length_CPPFLAGS = $(AM_CPPFLAGS)
738 check_Length_LDADD = $(TESTS_LIBS)
739 check_Length_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
740 check_Length_SOURCES = \
741         tests/check_Length.cpp \
742         tests/dummy_functions.cpp \
743         tests/boost.cpp
744
745 check_ListingsCaption_CPPFLAGS = $(AM_CPPFLAGS)
746 check_ListingsCaption_LDADD = $(check_ListingsCaption_LYX_OBJS) $(TESTS_LIBS)
747 check_ListingsCaption_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
748 check_ListingsCaption_SOURCES = \
749         tests/check_ListingsCaption.cpp \
750         tests/dummy_functions.cpp \
751         tests/boost.cpp
752 check_ListingsCaption_LYX_OBJS =
753
754 .PHONY: alltests alltests-recursive updatetests