]> git.lyx.org Git - lyx.git/blob - src/support/Makefile.am
disable some tests for standard C++ features; add a line counting stream for lates...
[lyx.git] / src / support / Makefile.am
1 include $(top_srcdir)/config/common.am
2
3 CLEANFILES += $(BUILT_SOURCES)
4
5 EXTRA_DIST = Package.cpp.in pch.h \
6         os_cygwin.cpp os_unix.cpp os_win32.cpp os_win32.h
7
8 pkglib_LTLIBRARIES = liblyxsupport.la
9
10 liblyxsupport_la_LIBADD = $(LIBSHLWAPI) $(QT4_CORE_LIB) $(BOOST_SIGNALS)
11 liblyxsupport_la_LDFLAGS = $(QT4_CORE_LDFLAGS)
12
13 BUILT_SOURCES = $(PCH_FILE) Package.cpp
14
15 AM_CPPFLAGS += $(PCH_FLAGS) -I$(srcdir)/.. $(BOOST_INCLUDES)
16 AM_CPPFLAGS += $(QT4_CPPFLAGS) $(QT4_CORE_INCLUDES)
17
18 liblyxsupport_la_SOURCES = \
19         FileMonitor.h \
20         FileMonitor.cpp \
21         RandomAccessList.h \
22         abort.cpp \
23         chdir.cpp \
24         convert.cpp \
25         convert.h \
26         copy.cpp \
27         copied_ptr.h \
28         cow_ptr.h \
29         debugstream.h \
30         docstream.cpp \
31         docstream.h \
32         docstring.cpp \
33         docstring.h \
34         environment.h \
35         environment.cpp \
36         ExceptionMessage.h \
37         FileFilterList.cpp \
38         FileFilterList.h \
39         FileName.cpp \
40         FileName.h \
41         filetools.cpp \
42         filetools.h \
43         Forkedcall.cpp \
44         Forkedcall.h \
45         ForkedCallQueue.cpp \
46         ForkedCallQueue.h \
47         ForkedcallsController.cpp \
48         ForkedcallsController.h \
49         fs_extras.cpp \
50         fs_extras.h \
51         getcwd.cpp \
52         gzstream.cpp \
53         gzstream.h \
54         kill.cpp \
55         LaTeXStream.cpp \
56         LaTeXStream.h \
57         limited_stack.h \
58         lstrings.cpp \
59         lstrings.h \
60         lyxalgo.h \
61         lyxlib.h \
62         lyxmanip.h \
63         lyxtime.cpp \
64         lyxtime.h \
65         lyxsum.cpp \
66         mkdir.cpp \
67         os.cpp \
68         os.h \
69         Path.cpp \
70         Path.h \
71         Package.cpp \
72         Package.h \
73         qstring_helpers.cpp \
74         qstring_helpers.h \
75         rename.cpp \
76         socktools.cpp \
77         socktools.h \
78         std_istream.h \
79         std_ostream.h \
80         Systemcall.cpp \
81         Systemcall.h \
82         tempname.cpp \
83         textutils.cpp \
84         textutils.h \
85         Translator.h \
86         Timeout.cpp \
87         Timeout.h \
88         types.h \
89         userinfo.cpp \
90         userinfo.h \
91         unicode.cpp \
92         unicode.h \
93         unlink.cpp
94
95
96 Package.cpp: build_package
97
98 # Solaris sed does not like spaces bewteen the ;-delimited commands
99 build_package: Package.cpp.in
100         @rm -f tmp_package ;\
101         sed "s,@LYX_DIR@,$(LYX_ABS_INSTALLED_DATADIR),;\
102 s,@LOCALEDIR@,$(LYX_ABS_INSTALLED_LOCALEDIR),;\
103 s,@TOP_SRCDIR@,$(LYX_ABS_TOP_SRCDIR),;\
104 s,@PROGRAM_SUFFIX@,$(program_suffix)," \
105                 $(srcdir)/Package.cpp.in > tmp_package ;\
106         if cmp -s tmp_package Package.cpp ; then \
107                 rm -f tmp_package ;\
108         else \
109                 rm -f Package.cpp ;\
110                 mv tmp_package Package.cpp ;\
111         fi
112
113
114 ############################## Tests ##################################
115
116 EXTRA_DIST += test_convert test_filetools test_lstrings regfiles
117
118 TESTS = \
119         test_convert \
120         test_filetools \
121         test_lstrings
122
123 check_PROGRAMS = \
124         check_convert \
125         check_filetools \
126         check_lstrings
127
128 check_convert_LDADD = ../debug.o convert.o docstring.o lstrings.o unicode.o \
129         qstring_helpers.o $(BOOST_LIBS) $(QT4_CORE_LIB)
130 check_convert_LDFLAGS = $(QT4_CORE_LDFLAGS)
131 check_convert_SOURCES = \
132         tests/check_convert.cpp \
133         tests/boost.cpp
134
135 check_filetools_LDADD = ../debug.o libsupport.la $(BOOST_LIBS)
136 check_filetools_SOURCES = \
137         tests/check_filetools.cpp \
138         tests/boost.cpp
139
140 check_lstrings_LDADD = ../debug.o lstrings.o convert.o docstring.o unicode.o \
141         qstring_helpers.o $(QT4_CORE_LIB)
142 check_lstrings_LDFLAGS = $(QT4_CORE_LDFLAGS)
143 check_lstrings_SOURCES = \
144         tests/check_lstrings.cpp \
145         tests/boost.cpp
146
147 makeregfiles: ${check_PROGRAMS}
148         for all in ${check_PROGRAMS} ; do \
149                 ./$$all > ${srcdir}/regfiles/$$all ; \
150         done