*** empty log message ***
[bpt/guile.git] / guile-readline / Makefile.am
index 0311a72..5f54930 100644 (file)
@@ -1,19 +1,19 @@
 ## Process this file with Automake to create Makefile.in
 ##
-##     Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+##     Copyright (C) 1998, 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
 ##
 ##   This file is part of GUILE.
-##   
+##
 ##   GUILE 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 2, or
 ##   (at your option) any later version.
-##   
+##
 ##   GUILE 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; see the file COPYING.  If not, write
 ##   to the Free Software Foundation, Inc., 59 Temple Place, Suite
@@ -22,7 +22,7 @@
 AUTOMAKE_OPTIONS = foreign
 
 ## Prevent automake from adding extra -I options
-DEFS = @DEFS@
+DEFS = @DEFS@ @EXTRA_DEFS@
 ## Check for headers in $(srcdir)/.., so that #include
 ## <libguile/MUMBLE.h> will find MUMBLE.h in this dir when we're
 ## building.
@@ -32,23 +32,42 @@ GUILE_SNARF = ../libguile/guile-snarf
 
 lib_LTLIBRARIES = libguilereadline.la
 
-libguilereadline_la_SOURCES = readline.h readline.c
+libguilereadline_la_SOURCES = readline.c
+libguilereadline_la_LIBADD = ../libguile/libguile.la
+libguilereadline_la_LDFLAGS = -version-info @LIBGUILEREADLINE_INTERFACE@ \
+  -export-dynamic -no-undefined
+
 
 BUILT_SOURCES = readline.x
 
 pkginclude_HEADERS = readline.h
 
-ice9dir = $(datadir)/guile/$(VERSION)/ice-9
+ice9dir = $(datadir)/guile/$(GUILE_EFFECTIVE_VERSION)/ice-9
 ice9_DATA = readline.scm
 
+snarfcppopts = $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
 SUFFIXES = .x
 .c.x:
-       $(GUILE_SNARF) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $< > $@ \
-       || { rm $@; false; }
+       $(GUILE_SNARF) -o $@ $< $(snarfcppopts)
+
+EXTRA_DIST = $(ice9_DATA) LIBGUILEREADLINE-VERSION
+TAGS_FILES = $(ice9_DATA)
+
+MKDEP = gcc -M -MG $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
+
+CLEANFILES = *.x
+
+ice-9/readline.scm:
+       -rm ice-9/readline.scm
+       -rmdir ice-9
+       mkdir ice-9
+       cd ice-9 && ln -s ../readline.scm
 
-EXTRA_DIST = readline.scm
+all-local: ice-9/readline.scm
 
-DISTCLEANFILES = *.x
+clean-local:
+       rm -f ice-9/readline.scm
+       -rmdir ice-9
 
 dist-hook:
        (temp="/tmp/mangle-deps.$$$$"; \
@@ -56,4 +75,4 @@ dist-hook:
         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 \
-        && cp -p $$temp $(distdir)/Makefile.in)
+        && chmod u+w $(distdir)/Makefile.in && cp -p $$temp $(distdir)/Makefile.in)