Merge remote-tracking branch 'origin/stable-2.0'
[bpt/guile.git] / guile-readline / Makefile.am
1 ## Process this file with Automake to create Makefile.in
2 ##
3 ## Copyright (C) 1998, 1999, 2000, 2001, 2004, 2006, 2007, 2008,
4 ## 2009, 2010, 2012 Free Software Foundation, Inc.
5 ##
6 ## This file is part of guile-readline.
7 ##
8 ## guile-readline is free software; you can redistribute it and/or
9 ## modify it under the terms of the GNU General Public License as
10 ## published by the Free Software Foundation; either version 3, or
11 ## (at your option) any later version.
12 ##
13 ## guile-readline is distributed in the hope that it will be useful,
14 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
15 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 ## General Public License for more details.
17 ##
18 ## You should have received a copy of the GNU General Public License
19 ## along with guile-readline; see the file COPYING. If not, write
20 ## to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 ## Floor, Boston, MA 02110-1301 USA
22
23 include $(top_srcdir)/am/snarf
24 include $(top_srcdir)/am/guilec
25
26 ## Prevent automake from adding extra -I options
27 DEFS = @DEFS@ @EXTRA_DEFS@
28
29 # We're at the root of the module hierarchy.
30 modpath =
31 SOURCES =
32
33 if HAVE_READLINE
34
35 SOURCES += ice-9/readline.scm
36
37 ## Check for headers in $(srcdir)/.., so that #include
38 ## <libguile/MUMBLE.h> will find MUMBLE.h in this dir when we're
39 ## building. Also look for Gnulib headers in `lib'.
40 AM_CPPFLAGS = -I. -I.. -I$(srcdir)/.. \
41 -I$(top_srcdir)/lib -I$(top_builddir)/lib
42
43 AM_CFLAGS = $(GCC_CFLAGS)
44
45 lib_LTLIBRARIES = libguilereadline-v-@LIBGUILEREADLINE_MAJOR@.la
46
47 libguilereadline_v_@LIBGUILEREADLINE_MAJOR@_la_SOURCES = readline.c
48 libguilereadline_v_@LIBGUILEREADLINE_MAJOR@_la_LIBADD = \
49 $(READLINE_LIBS) \
50 ../libguile/libguile-@GUILE_EFFECTIVE_VERSION@.la ../lib/libgnu.la
51
52 libguilereadline_v_@LIBGUILEREADLINE_MAJOR@_la_LDFLAGS = \
53 -version-info @LIBGUILEREADLINE_INTERFACE@ -export-dynamic \
54 -no-undefined
55
56
57 BUILT_SOURCES = readline.x
58
59 modincludedir = $(pkgincludedir)/$(GUILE_EFFECTIVE_VERSION)
60 modinclude_HEADERS = readline.h
61
62 snarfcppopts = $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS)
63 SUFFIXES += .x
64 .c.x:
65 $(AM_V_SNARF)$(GUILE_SNARF) -o $@ $< $(snarfcppopts)
66
67 EXTRA_DIST += LIBGUILEREADLINE-VERSION ChangeLog-2008
68
69 ETAGS_ARGS += \
70 $(libguilereadline_v_@LIBGUILEREADLINE_MAJOR@_la_SOURCES)
71
72 CLEANFILES += *.x *.go
73
74 endif HAVE_READLINE
75
76 dist-hook:
77 (temp="/tmp/mangle-deps.$$$$"; \
78 trap "rm -f $$temp" 0 1 2 15; \
79 sed -e 's|\([ ]\)\(\.\./\(\|libguile/\|guile-readline/\)[a-z_-]*\.h\)|\1$$(srcdir)/\2|g' $(distdir)/Makefile.in \
80 | sed -e 's|\$$(srcdir)/\(\.\./libguile/\(libpath\|scmconfig\|versiondat\)\)|\1|g' \
81 | sed -e 's|\.\./guile-readline/\([a-z_-]*\.x\)|\1|g' > $$temp \
82 && chmod u+w $(distdir)/Makefile.in && cp -p $$temp $(distdir)/Makefile.in)
83