summaryrefslogtreecommitdiff
path: root/guile-readline/Makefile.am
blob: ade7dd09d17fcb51c5a55f7d3fb8f0f2b9a85d96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
## Process this file with Automake to create Makefile.in
##
##   Copyright (C) 1998, 1999, 2000, 2001, 2004, 2006, 2007, 2008,
##     2009, 2010, 2012, 2013 Free Software Foundation, Inc.
##
##   This file is part of guile-readline.
##
##   guile-readline is free software; you can redistribute it and/or
##   modify it under the terms of the GNU General Public License as
##   published by the Free Software Foundation; either version 3, or
##   (at your option) any later version.
##
##   guile-readline is distributed in the hope that it will be useful,
##   but WITHOUT ANY WARRANTY; without even the implied warranty of
##   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
##   General Public License for more details.
##
##   You should have received a copy of the GNU General Public License
##   along with guile-readline; see the file COPYING.  If not, write
##   to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
##   Floor, Boston, MA 02110-1301 USA

include $(top_srcdir)/am/snarf
include $(top_srcdir)/am/guilec

## Prevent automake from adding extra -I options
DEFS = @DEFS@ @EXTRA_DEFS@

# We're at the root of the module hierarchy.
modpath =
SOURCES =

if HAVE_READLINE

SOURCES += ice-9/readline.scm

## Check for headers in $(srcdir)/.., so that #include
## <libguile/MUMBLE.h> will find MUMBLE.h in this dir when we're
## building.  Also look for Gnulib headers in `lib'.
AM_CPPFLAGS = -I. -I.. -I$(srcdir)/..			\
	      -I$(top_srcdir)/lib -I$(top_builddir)/lib

AM_CFLAGS = $(GCC_CFLAGS)

extensionsdir=$(pkglibdir)/$(GUILE_EFFECTIVE_VERSION)/extensions

extensions_LTLIBRARIES = guile-readline.la

guile_readline_la_SOURCES = readline.c
guile_readline_la_LIBADD =				\
  $(READLINE_LIBS)					\
  ../libguile/libguile-@GUILE_EFFECTIVE_VERSION@.la ../lib/libgnu.la

guile_readline_la_LDFLAGS = -export-dynamic -no-undefined -module

BUILT_SOURCES = readline.x

modincludedir = $(pkgincludedir)/$(GUILE_EFFECTIVE_VERSION)
modinclude_HEADERS = readline.h

snarfcppopts = $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS)
SUFFIXES += .x
.c.x:
	$(AM_V_SNARF)$(GUILE_SNARF) -o $@ $< $(snarfcppopts)

EXTRA_DIST += ChangeLog-2008

ETAGS_ARGS += $(guile_readline_la_SOURCES)

CLEANFILES += *.x *.go

endif HAVE_READLINE

dist-hook:
	(temp="/tmp/mangle-deps.$$$$"; \
	 trap "rm -f $$temp" 0 1 2 15; \
	 sed -e 's|\([ 	]\)\(\.\./\(\|libguile/\|guile-readline/\)[a-z_-]*\.h\)|\1$$(srcdir)/\2|g' $(distdir)/Makefile.in \
	 | sed -e 's|\$$(srcdir)/\(\.\./libguile/\(libpath\|scmconfig\|versiondat\)\)|\1|g' \
	 | sed -e 's|\.\./guile-readline/\([a-z_-]*\.x\)|\1|g' > $$temp \
	 && chmod u+w $(distdir)/Makefile.in && cp -p $$temp $(distdir)/Makefile.in)