0311a72136e2937a7c813af589dad4f787f8d757
[bpt/guile.git] / guile-readline / Makefile.am
1 ## Process this file with Automake to create Makefile.in
2 ##
3 ## Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
4 ##
5 ## This file is part of GUILE.
6 ##
7 ## GUILE is free software; you can redistribute it and/or modify
8 ## it under the terms of the GNU General Public License as
9 ## published by the Free Software Foundation; either version 2, or
10 ## (at your option) any later version.
11 ##
12 ## GUILE is distributed in the hope that it will be useful, but
13 ## WITHOUT ANY WARRANTY; without even the implied warranty of
14 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ## GNU General Public License for more details.
16 ##
17 ## You should have received a copy of the GNU General Public
18 ## License along with GUILE; see the file COPYING. If not, write
19 ## to the Free Software Foundation, Inc., 59 Temple Place, Suite
20 ## 330, Boston, MA 02111-1307 USA
21
22 AUTOMAKE_OPTIONS = foreign
23
24 ## Prevent automake from adding extra -I options
25 DEFS = @DEFS@
26 ## Check for headers in $(srcdir)/.., so that #include
27 ## <libguile/MUMBLE.h> will find MUMBLE.h in this dir when we're
28 ## building.
29 INCLUDES = -I.. -I$(srcdir)/..
30
31 GUILE_SNARF = ../libguile/guile-snarf
32
33 lib_LTLIBRARIES = libguilereadline.la
34
35 libguilereadline_la_SOURCES = readline.h readline.c
36
37 BUILT_SOURCES = readline.x
38
39 pkginclude_HEADERS = readline.h
40
41 ice9dir = $(datadir)/guile/$(VERSION)/ice-9
42 ice9_DATA = readline.scm
43
44 SUFFIXES = .x
45 .c.x:
46 $(GUILE_SNARF) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $< > $@ \
47 || { rm $@; false; }
48
49 EXTRA_DIST = readline.scm
50
51 DISTCLEANFILES = *.x
52
53 dist-hook:
54 (temp="/tmp/mangle-deps.$$$$"; \
55 trap "rm -f $$temp" 0 1 2 15; \
56 sed -e 's|\([ ]\)\(\.\./\(\|libguile/\|guile-readline/\)[a-z_-]*\.h\)|\1$$(srcdir)/\2|g' $(distdir)/Makefile.in \
57 | sed -e 's|\$$(srcdir)/\(\.\./libguile/\(libpath\|scmconfig\|versiondat\)\)|\1|g' \
58 | sed -e 's|\.\./guile-readline/\([a-z_-]*\.x\)|\1|g' > $$temp \
59 && cp -p $$temp $(distdir)/Makefile.in)