Initial db4 logging.
[nvi.git] / dist / Makefile.am
blob0b5f3fd8e47e20c70520f013ee45b2a219ca3fb1
1 visrcdir= @srcdir@/..
3 lib_LTLIBRARIES = libvi.la
4 libvi_la_SOURCES = \
5         $(visrcdir)/common/api.c \
6         $(visrcdir)/common/conv.c \
7         $(visrcdir)/common/conv.h \
8         $(visrcdir)/common/cut.c \
9         $(visrcdir)/common/delete.c \
10         $(visrcdir)/common/args.h \
11         $(visrcdir)/common/common.h \
12         $(visrcdir)/common/cut.h \
13         $(visrcdir)/common/db.h \
14         $(visrcdir)/common/exf.h \
15         $(visrcdir)/common/gs.h \
16         $(visrcdir)/common/key.h \
17         $(visrcdir)/common/log.h \
18         $(visrcdir)/common/mark.h \
19         $(visrcdir)/common/mem.h \
20         $(visrcdir)/common/multibyte.h \
21         $(visrcdir)/common/msg.h \
22         $(visrcdir)/common/options.h \
23         $(visrcdir)/common/options_def.h \
24         $(visrcdir)/common/screen.h \
25         $(visrcdir)/common/seq.h \
26         $(visrcdir)/common/util.h \
27         $(visrcdir)/ex/ex.c \
28         $(visrcdir)/ex/ex_abbrev.c \
29         $(visrcdir)/ex/ex_append.c \
30         $(visrcdir)/ex/ex_args.c \
31         $(visrcdir)/ex/ex_argv.c \
32         $(visrcdir)/ex/ex_at.c \
33         $(visrcdir)/ex/ex_bang.c \
34         $(visrcdir)/ex/ex_cd.c \
35         $(visrcdir)/ex/ex_cmd.c \
36         $(visrcdir)/ex/ex_cscope.c \
37         $(visrcdir)/ex/ex_delete.c \
38         $(visrcdir)/ex/ex_display.c \
39         $(visrcdir)/ex/ex_edit.c \
40         $(visrcdir)/ex/ex_equal.c \
41         $(visrcdir)/ex/ex_file.c \
42         $(visrcdir)/ex/ex_filter.c \
43         $(visrcdir)/ex/ex_global.c \
44         $(visrcdir)/ex/ex_init.c \
45         $(visrcdir)/ex/ex_join.c \
46         $(visrcdir)/ex/ex_map.c \
47         $(visrcdir)/ex/ex_mark.c \
48         $(visrcdir)/ex/ex_mkexrc.c \
49         $(visrcdir)/ex/ex_move.c \
50         $(visrcdir)/ex/ex_open.c \
51         $(visrcdir)/ex/ex_perl.c \
52         $(visrcdir)/ex/ex_preserve.c \
53         $(visrcdir)/ex/ex_print.c \
54         $(visrcdir)/ex/ex_put.c \
55         $(visrcdir)/ex/ex_quit.c \
56         $(visrcdir)/ex/ex_read.c \
57         $(visrcdir)/ex/ex_screen.c \
58         $(visrcdir)/ex/ex_script.c \
59         $(visrcdir)/ex/ex_set.c \
60         $(visrcdir)/ex/ex_shell.c \
61         $(visrcdir)/ex/ex_shift.c \
62         $(visrcdir)/ex/ex_source.c \
63         $(visrcdir)/ex/ex_stop.c \
64         $(visrcdir)/ex/ex_subst.c \
65         $(visrcdir)/ex/ex_tag.c \
66         $(visrcdir)/ex/ex_tcl.c \
67         $(visrcdir)/ex/ex_txt.c \
68         $(visrcdir)/ex/ex_undo.c \
69         $(visrcdir)/ex/ex_usage.c \
70         $(visrcdir)/ex/ex_util.c \
71         $(visrcdir)/ex/ex_version.c \
72         $(visrcdir)/ex/ex_visual.c \
73         $(visrcdir)/ex/ex_write.c \
74         $(visrcdir)/ex/ex_yank.c \
75         $(visrcdir)/ex/ex_z.c \
76         $(visrcdir)/ex/ex.h \
77         $(visrcdir)/ex/ex_def.h \
78         $(visrcdir)/ex/script.h \
79         $(visrcdir)/ex/tag.h \
80         $(visrcdir)/ex/version.h \
81         $(visrcdir)/common/exf.c \
82         $(visrcdir)/vi/getc.c \
83         $(visrcdir)/vi/vi.h \
84         $(visrcdir)/common/gs.c \
85         $(visrcdir)/common/key.c \
86         $(visrcdir)/common/db.c \
87         $(visrcdir)/common/main.c \
88         $(visrcdir)/common/mark.c \
89         $(visrcdir)/common/msg.c \
90         $(visrcdir)/common/options.c \
91         $(visrcdir)/common/options_f.c \
92         $(visrcdir)/common/put.c \
93         $(visrcdir)/common/recover.c \
94         $(visrcdir)/common/screen.c \
95         $(visrcdir)/common/search.c \
96         $(visrcdir)/common/seq.c \
97         $(visrcdir)/common/trace.c \
98         $(visrcdir)/common/util.c \
99         $(visrcdir)/common/util2.c \
100         $(visrcdir)/vi/v_at.c \
101         $(visrcdir)/vi/v_ch.c \
102         $(visrcdir)/vi/v_cmd.c \
103         $(visrcdir)/vi/v_delete.c \
104         $(visrcdir)/vi/v_event.c \
105         $(visrcdir)/vi/v_ex.c \
106         $(visrcdir)/vi/v_increment.c \
107         $(visrcdir)/vi/v_init.c \
108         $(visrcdir)/vi/v_itxt.c \
109         $(visrcdir)/vi/v_left.c \
110         $(visrcdir)/vi/v_mark.c \
111         $(visrcdir)/vi/v_match.c \
112         $(visrcdir)/vi/v_paragraph.c \
113         $(visrcdir)/vi/v_put.c \
114         $(visrcdir)/vi/v_redraw.c \
115         $(visrcdir)/vi/v_replace.c \
116         $(visrcdir)/vi/v_right.c \
117         $(visrcdir)/vi/v_screen.c \
118         $(visrcdir)/vi/v_scroll.c \
119         $(visrcdir)/vi/v_search.c \
120         $(visrcdir)/vi/v_section.c \
121         $(visrcdir)/vi/v_sentence.c \
122         $(visrcdir)/vi/v_status.c \
123         $(visrcdir)/vi/v_txt.c \
124         $(visrcdir)/vi/v_ulcase.c \
125         $(visrcdir)/vi/v_undo.c \
126         $(visrcdir)/vi/v_util.c \
127         $(visrcdir)/vi/v_word.c \
128         $(visrcdir)/vi/v_xchar.c \
129         $(visrcdir)/vi/v_yank.c \
130         $(visrcdir)/vi/v_z.c \
131         $(visrcdir)/vi/v_zexit.c \
132         $(visrcdir)/vi/vi.c \
133         $(visrcdir)/vi/vs_line.c \
134         $(visrcdir)/vi/vs_msg.c \
135         $(visrcdir)/vi/vs_refresh.c \
136         $(visrcdir)/vi/vs_relative.c \
137         $(visrcdir)/vi/vs_smap.c \
138         $(visrcdir)/vi/vs_split.c
139 EXTRA_libvi_la_SOURCES = \
140         $(visrcdir)/regex/regcomp.c \
141         $(visrcdir)/regex/regerror.c \
142         $(visrcdir)/regex/regexec.c \
143         $(visrcdir)/regex/regfree.c \
144         $(visrcdir)/regex/cclass.h \
145         $(visrcdir)/regex/cname.h \
146         $(visrcdir)/regex/regex.h \
147         $(visrcdir)/regex/regex2.h \
148         $(visrcdir)/regex/utils.h \
149         $(visrcdir)/common/dldb.c \
150         $(visrcdir)/common/log.c \
151         $(visrcdir)/common/log4.c \
152         $(visrcdir)/clib/bsearch.c \
153         $(visrcdir)/clib/env.c \
154         $(visrcdir)/clib/gethostname.c \
155         $(visrcdir)/clib/iswblank.c \
156         $(visrcdir)/clib/memchr.c \
157         $(visrcdir)/clib/memset.c \
158         $(visrcdir)/clib/mkstemp.c \
159         $(visrcdir)/clib/mmap.c \
160         $(visrcdir)/clib/snprintf.c \
161         $(visrcdir)/clib/strdup.c \
162         $(visrcdir)/clib/strpbrk.c \
163         $(visrcdir)/clib/strsep.c \
164         $(visrcdir)/clib/strtol.c \
165         $(visrcdir)/clib/strtoul.c \
166         $(visrcdir)/clib/vsnprintf.c \
167         $(visrcdir)/common/pthread.c \
168         $(visrcdir)/common/vi_auto.c \
169         $(visrcdir)/common/vi_rec.c \
170         $(visrcdir)/perl_api/perl.xs \
171         $(visrcdir)/perl_api/perlsfio.c \
172         $(visrcdir)/tcl_api/tcl.c \
173         perl.c \
174         perlxsi.c
175 # Is this the way to do it ?
176 REOBJS= regcomp.lo regerror.lo regexec.lo regfree.lo
177 libvi_la_DEPENDENCIES = @LTLIBOBJS@
178 libvi_la_LIBADD = @LTLIBOBJS@
180 bin_PROGRAMS = @vi_programs@ @vi_ipc@
181 EXTRA_PROGRAMS = vi vi-ipc vi-motif vi-gtk
183 vi_SOURCES = \
184         $(visrcdir)/cl/cl.h \
185         $(visrcdir)/cl/cl_bsd.c \
186         $(visrcdir)/cl/cl_funcs.c \
187         $(visrcdir)/cl/cl_main.c \
188         $(visrcdir)/cl/cl_read.c \
189         $(visrcdir)/cl/cl_screen.c \
190         $(visrcdir)/cl/cl_term.c \
191         $(visrcdir)/common/nothread.c
192 vi_LDADD = libvi.la @perllibs@ @CURSLIBS@
193 vi_CPPFLAGS = @CURSCPPFLAGS@ @perlldflags@
194 vi_LDFLAGS = @CURSLDFLAGS@ @perlldflags@
196 vi_ipc_SOURCES = \
197         $(visrcdir)/ip/ip_funcs.c \
198         $(visrcdir)/ip/ip_main.c \
199         $(visrcdir)/ip/ip_read.c \
200         $(visrcdir)/ip/ip_screen.c \
201         $(visrcdir)/ipc/ip_send.c \
202         $(visrcdir)/ipc/ip.h \
203         $(visrcdir)/ip/ip_term.c 
204 vi_ipc_LDADD = libvi.la @perllibs@ @IPCOBJS@
205 vi_ipc_LDFLAGS = @perlldflags@
206 vi_ipc_DEPENDENCIES = @IPCOBJS@
208 vi_gtk_SOURCES = \
209         $(visrcdir)/common/util2.c \
210         $(visrcdir)/ipc/ip_run.c \
211         $(visrcdir)/ipc/ip_send.c \
212         $(visrcdir)/ipc/ip_trans.c \
213         $(visrcdir)/ipc/ipc_cmd.c \
214         $(visrcdir)/ipc/ipc_method.c \
215         $(visrcdir)/gtk/gtk_main.c \
216         $(visrcdir)/gtk/gtkvi.c \
217         $(visrcdir)/gtk/gtkviscreen.c \
218         $(visrcdir)/gtk/gtkviwindow.c
219 vi_gtk_LDADD = @GTKLIBS@ @LIBOBJS@
220 vi_gtk_CFLAGS = @GTKINCS@ @XINCS@
222 vi_motif_SOURCES = \
223         $(visrcdir)/ipc/ip_run.c \
224         $(visrcdir)/ipc/ip_send.c \
225         $(visrcdir)/ipc/ip_trans.c \
226         $(visrcdir)/ipc/ipc_cmd.c \
227         $(visrcdir)/ipc/ipc_method.c \
228         $(visrcdir)/motif/m_main.c \
229         $(visrcdir)/motif/m_cde.c \
230         $(visrcdir)/common/trace.c \
231         $(visrcdir)/motif_l/m_copypaste.c \
232         $(visrcdir)/motif_l/m_func.c \
233         $(visrcdir)/motif_l/m_menu.c \
234         $(visrcdir)/motif_l/m_options.c \
235         $(visrcdir)/motif_l/m_prompt.c \
236         $(visrcdir)/motif_l/m_ruler.c \
237         $(visrcdir)/motif_l/m_search.c \
238         $(visrcdir)/motif_l/m_tags.c \
239         $(visrcdir)/motif_l/m_util.c \
240         $(visrcdir)/motif_l/m_vi.c \
241         $(visrcdir)/motif_l/xtabbed.c
242 vi_motif_LDADD = @MOTIFLIBS@ @LIBOBJS@
243 vi_motif_CFLAGS = @XINCS@
245 VI=-DVI=\"$(bindir)/`echo vi-ipc | sed '$(transform)'`\"
246 CFLAGS=  -D__REGEX_PRIVATE $(OPTFLAG) @CFLAGS@ -I. -I$(visrcdir)/include \
247             @CPPFLAGS@ $(VI)
248 PERL=   @vi_cv_path_perl@
249 PERLLIB=@vi_cv_perllib@
250 SHRPENV=@shrpenv@
252 perl.c: $(visrcdir)/perl_api/perl.xs $(visrcdir)/perl_api/typemap
253         echo "#define _PATH_PERLSCRIPTS \"$(datadir)/vi/perl\"" > $@
254         $(PERL) -e 'unless ($$] >= 5.005) {' \
255                 -e   'for (qw(incgv sv_undef errgv na)) {' \
256                 -e     'print "#define PL_$$_ $$_\n" }} ' >> $@
257         $(PERL) $(PERLLIB)/ExtUtils/xsubpp -typemap \
258             $(PERLLIB)/ExtUtils/typemap $(visrcdir)/perl_api/perl.xs >> $@
259         ($(PERL) -ne 'print "sub $$1 {\$$curscr->$$1(\@_)}\n"' \
260                   -e   'if /newXS\("VI::([^\":]*)"/;' $@ ; echo "1;") > VI.pm
261 perlxsi.c:
262         perl -MExtUtils::Embed -e xsinit -- -std VI
264 chmod=  @vi_cv_path_chmod@
265 cp=     @vi_cv_path_cp@
266 ln=     @vi_cv_path_ln@
267 mkdir=  @vi_cv_path_mkdir@
268 rm=     @vi_cv_path_rm@
269 strip=  @vi_cv_path_strip@
271 dmode=  755
272 emode=  555
273 fmode=  444
275 install-exec-local:
276         cd $(DESTDIR)$(bindir) && $(rm) -f `echo ex | sed '$(transform)'`
277         cd $(DESTDIR)$(bindir) && $(rm) -f `echo view | sed '$(transform)'`
278         cd $(DESTDIR)$(bindir) && $(ln) \
279                 `echo vi | sed '$(transform)'` `echo ex | sed '$(transform)'`
280         cd $(DESTDIR)$(bindir) && $(ln) \
281                 `echo vi | sed '$(transform)'` `echo view | sed '$(transform)'`
283 install-data-local: install_common
284         @[ -d $(DESTDIR)$(mandir) ] || \
285             ($(mkdir) $(DESTDIR)$(mandir) && \
286              $(chmod) $(dmode) $(DESTDIR)$(mandir))
287         @[ -d $(DESTDIR)$(mandir)/cat1 ] || \
288             ($(mkdir) $(DESTDIR)$(mandir)/cat1 && \
289              $(chmod) $(dmode) $(DESTDIR)$(mandir)/cat1)
290         @echo "Installing man pages: $(DESTDIR)$(mandir) ..."
291         @cd $(DESTDIR)$(mandir)/cat1 && \
292             $(rm) -f `echo vi.0 | sed '$(transform)'`
293         @$(cp) $(visrcdir)/docs/vi.man/vi.0 \
294             $(DESTDIR)$(mandir)/cat1/`echo vi.0 | sed '$(transform)'`
295         @cd $(DESTDIR)$(mandir)/cat1 && \
296             $(chmod) $(fmode) `echo vi.0 | sed '$(transform)'`
297         @cd $(DESTDIR)$(mandir)/cat1 && \
298             $(rm) -f `echo ex.0 | sed '$(transform)'`
299         @cd $(DESTDIR)$(mandir)/cat1 && \
300             $(rm) -f `echo view.0 | sed '$(transform)'`
301         @cd $(DESTDIR)$(mandir)/cat1 && $(ln) \
302             `echo vi.0 | sed '$(transform)'` `echo ex.0 | sed '$(transform)'`
303         @cd $(DESTDIR)$(mandir)/cat1 && $(ln) \
304             `echo vi.0 | sed '$(transform)'` `echo view.0 | sed '$(transform)'`
305         @[ -d $(DESTDIR)$(mandir)/man1 ] || \
306             ($(mkdir) $(DESTDIR)$(mandir)/man1 && \
307              $(chmod) $(dmode) $(DESTDIR)$(mandir)/man1)
308         @cd $(DESTDIR)$(mandir)/man1 && \
309             $(rm) -f `echo vi.1 | sed '$(transform)'`
310         @$(cp) $(visrcdir)/docs/vi.man/vi.1 \
311             $(DESTDIR)$(mandir)/man1/`echo vi.1 | sed '$(transform)'`
312         @cd $(DESTDIR)$(mandir)/man1 && \
313             $(chmod) $(fmode) `echo vi.1 | sed '$(transform)'`
314         @cd $(DESTDIR)$(mandir)/man1 && \
315             $(rm) -f `echo ex.1 | sed '$(transform)'`
316         @cd $(DESTDIR)$(mandir)/man1 && \
317             $(rm) -f `echo view.1 | sed '$(transform)'`
318         @cd $(DESTDIR)$(mandir)/man1 && $(ln) \
319             `echo vi.1 | sed '$(transform)'` `echo ex.1 | sed '$(transform)'`
320         @cd $(DESTDIR)$(mandir)/man1 && $(ln) \
321             `echo vi.1 | sed '$(transform)'` `echo view.1 | sed '$(transform)'`
323 cat=    dutch english french german ru_SU.KOI8-R spanish swedish
324 install_common:
325         @[ -f $(chmod) ] || (echo 'chmod not found.'; exit 1)
326         @[ -f $(cp) ] || (echo 'cp not found.'; exit 1)
327         @[ -f $(ln) ] || (echo 'ln not found.'; exit 1)
328         @[ -f $(mkdir) ] || (echo 'mkdir not found.'; exit 1)
329         @[ -f $(rm) ] || (echo 'rm not found.'; exit 1)
330         @[ -d $(DESTDIR)$(prefix) ] || \
331             ($(mkdir) $(DESTDIR)$(prefix) && \
332                 $(chmod) $(dmode) $(DESTDIR)$(prefix))
333         @[ -d $(DESTDIR)$(exec_prefix) ] || \
334             ($(mkdir) $(DESTDIR)$(exec_prefix) && \
335                 $(chmod) $(dmode) $(DESTDIR)$(exec_prefix))
336         @[ -d $(DESTDIR)$(datadir) ] || \
337             ($(mkdir) $(DESTDIR)$(datadir) && \
338                 $(chmod) $(dmode) $(DESTDIR)$(datadir))
339         @$(rm) -rf $(DESTDIR)$(datadir)/vi
340         @$(mkdir) $(DESTDIR)$(datadir)/vi && \
341             $(chmod) $(dmode) $(DESTDIR)$(datadir)/vi
342         @echo "Installing message catalogs: $(datadir)/vi/catalog ..."
343         @$(mkdir) $(DESTDIR)$(datadir)/vi/catalog && \
344             $(chmod) $(dmode) $(DESTDIR)$(datadir)/vi/catalog
345         @(cd $(visrcdir)/catalog && \
346             $(cp) $(cat) $(DESTDIR)$(datadir)/vi/catalog && \
347             cd $(DESTDIR)$(datadir)/vi/catalog && $(chmod) $(fmode) *)
348         @echo "Installing Perl scripts: $(datadir)/vi/perl ..."
349         @$(mkdir) $(DESTDIR)$(datadir)/vi/perl && \
350             $(chmod) $(dmode) $(DESTDIR)$(datadir)/vi/perl
351         @[ ! -f VI.pm ] || \
352             ($(cp) VI.pm $(DESTDIR)$(datadir)/vi/perl && \
353             (cd $(DESTDIR)$(datadir)/vi/perl && $(chmod) $(fmode) VI.pm))
354         @(cd $(visrcdir)/perl_scripts && \
355             $(cp) *.pl $(DESTDIR)$(datadir)/vi/perl && \
356             cd $(DESTDIR)$(datadir)/vi/perl && $(chmod) $(fmode) *.pl)
357         @echo "Installing Tcl scripts: $(datadir)/vi/tcl ..."
358         @$(mkdir) $(DESTDIR)$(datadir)/vi/tcl && \
359             $(chmod) $(dmode) $(DESTDIR)$(datadir)/vi/tcl
360         @(cd $(visrcdir)/tcl_scripts && \
361             $(cp) *.tcl $(DESTDIR)$(datadir)/vi/tcl && \
362             cd $(DESTDIR)$(datadir)/vi/tcl && $(chmod) $(fmode) *.tcl)
363         @echo "Installing recover script: $(datadir)/vi/recover ..."
364         @($(cp) recover $(DESTDIR)$(datadir)/vi/recover && \
365             $(chmod) $(emode) $(DESTDIR)$(datadir)/vi/recover)
367 uninstall-local:
368         $(rm) -rf $(DESTDIR)$(datadir)/vi
369         cd $(DESTDIR)$(bindir) && $(rm) -f `echo ex | sed '$(transform)'`
370         cd $(DESTDIR)$(bindir) && $(rm) -f `echo view | sed '$(transform)'`
371         cd $(DESTDIR)$(mandir)/cat1 && \
372             $(rm) -f `echo ex.0 | sed '$(transform)'`
373         cd $(DESTDIR)$(mandir)/cat1 && \
374             $(rm) -f `echo vi.0 | sed '$(transform)'`
375         cd $(DESTDIR)$(mandir)/cat1 && \
376             $(rm) -f `echo view.0 | sed '$(transform)'`
377         cd $(DESTDIR)$(mandir)/man1 && \
378             $(rm) -f `echo ex.1 | sed '$(transform)'`
379         cd $(DESTDIR)$(mandir)/man1 && \
380             $(rm) -f `echo vi.1 | sed '$(transform)'`
381         cd $(DESTDIR)$(mandir)/man1 && \
382             $(rm) -f `echo view.1 | sed '$(transform)'`