]> git.lyx.org Git - lyx.git/blob - src/support/Makefile.am
8dd8cbc26a9056ad9d0895ca9d3be3d405e50850
[lyx.git] / src / support / Makefile.am
1 include $(top_srcdir)/config/common.am
2
3 noinst_LTLIBRARIES = libsupport.la
4
5 CLEANFILES += path_defines.C
6
7 INCLUDES = -I$(srcdir)/../ $(BOOST_INCLUDES)
8
9 EXTRA_DIST = path_defines.C.in os_unix.C os_win32.C os_os2.C
10
11 if USE_COMPRESSION
12 COMPRESSION = gzstream.C gzstream.h
13 endif
14
15 BUILT_SOURCES = path_defines.C
16
17 AM_CXXFLAGS = $(PCH_FLAGS)
18
19 libsupport_la_SOURCES = \
20         FileInfo.C \
21         FileInfo.h \
22         FileMonitor.h \
23         FileMonitor.C \
24         abort.C \
25         atoi.C \
26         chdir.C \
27         copy.C \
28         copied_ptr.h \
29         cow_ptr.h \
30         debugstream.h \
31         filename.C \
32         filename.h \
33         filetools.C \
34         filetools.h \
35         forkedcall.C \
36         forkedcall.h \
37         forkedcallqueue.C \
38         forkedcallqueue.h \
39         forkedcontr.C \
40         forkedcontr.h \
41         getcwd.C \
42         globbing.C \
43         globbing.h \
44         $(COMPRESSION) kill.C \
45         limited_stack.h \
46         lstrings.C \
47         lstrings.h \
48         lyxalgo.h \
49         lyxlib.h \
50         lyxmanip.h \
51         lyxtime.C \
52         lyxtime.h \
53         lyxsum.C \
54         mkdir.C \
55         os.C \
56         os.h \
57         os2_defines.h \
58         os2_errortable.h \
59         path.C \
60         path.h \
61         path_defines.C \
62         path_defines.h \
63         putenv.C \
64         rename.C \
65         rmdir.C \
66         socktools.C \
67         socktools.h \
68         std_istream.h \
69         std_ostream.h \
70         systemcall.C \
71         systemcall.h \
72         tempname.C \
73         textutils.h \
74         tostr.h \
75         tostr.C \
76         translator.h \
77         types.h \
78         userinfo.C \
79         userinfo.h \
80         unlink.C
81
82
83 path_defines.C: build_path_defines
84
85 build_path_defines: path_defines.C.in
86         @rm -f tmp_path_defines ;\
87         ABS_SRCDIR=`cd $(top_srcdir) && pwd` ;\
88         ABS_BUILDDIR=`cd ../.. && pwd` ;\
89         sed "s,%LYX_DIR%,$(pkgdatadir), ;\
90                 s,%LOCALEDIR%,$(datadir)/locale, ;\
91                 s,%BUILDDIR%,$${ABS_BUILDDIR}, ;\
92                 s,%TOP_SRCDIR%,$${ABS_SRCDIR}," \
93                 $(srcdir)/path_defines.C.in > tmp_path_defines ;\
94         if cmp -s tmp_path_defines path_defines.C ; then \
95                 rm -f tmp_path_defines ;\
96         else \
97                 rm -f path_defines.C ;\
98                 mv tmp_path_defines path_defines.C ;\
99         fi