Fixes to make guile-vm compile in guile source tree
authorAndy Wingo <wingo@pobox.com>
Sat, 2 Aug 2008 10:17:27 +0000 (12:17 +0200)
committerAndy Wingo <wingo@pobox.com>
Sat, 2 Aug 2008 10:17:27 +0000 (12:17 +0200)
* INSTALL: Updated.
* m4/gnulib-cache.m4: Regenerated.

* Makefile.am: Spelling fix.

* guilec.mk:
* src/Makefile.am:
* src/vm.c: Update to actually work inside a guile source tree.

* libguile/Makefile.am: Don't error on warnings in the flex-generated
  c-tokenize function.

INSTALL
Makefile.am
guilec.mk
libguile/Makefile.am
m4/gnulib-cache.m4
src/Makefile.am
src/vm.c

diff --git a/INSTALL b/INSTALL
index 5458714..d3c5b40 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -2,7 +2,7 @@ Installation Instructions
 *************************
 
 Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
-2006 Free Software Foundation, Inc.
+2006, 2007 Free Software Foundation, Inc.
 
 This file is free documentation; the Free Software Foundation gives
 unlimited permission to copy, distribute and modify it.
@@ -67,6 +67,9 @@ The simplest way to compile this package is:
      all sorts of other programs in order to regenerate files that came
      with the distribution.
 
+  6. Often, you can also type `make uninstall' to remove the installed
+     files again.
+
 Compilers and Options
 =====================
 
index 93e7e5e..5c395f8 100644 (file)
@@ -26,7 +26,7 @@ AUTOMAKE_OPTIONS = 1.10
 
 SUBDIRS = lib oop libguile ice-9 guile-config guile-readline emacs \
          scripts srfi doc examples test-suite benchmark-suite lang am \
-         src modules testsuite
+         src module testsuite
 
 bin_SCRIPTS = guile-tools
 
index 57336c1..c1606b5 100644 (file)
--- a/guilec.mk
+++ b/guilec.mk
@@ -7,4 +7,7 @@ CLEANFILES = $(GOBJECTS)
 
 SUFFIXES = .scm .go
 .scm.go:
-       $(GUILEC) $<
+       GUILE_LOAD_PATH=\$(top_srcdir)/module \
+       LD_LIBRARY_PATH=\$(top_builddir)/src/.libs \
+       $(top_builddir)/pre-inst-guile-env \
+         guile -s \$(top_builddir)/src/guilec $<
index 3444f5d..74ed806 100644 (file)
@@ -77,7 +77,7 @@ c-tokenize.$(OBJEXT): c-tokenize.c
        if [ "$(cross_compiling)" = "yes" ]; then \
                $(CC_FOR_BUILD) $(DEFS) $(INCLUDES) -c -o $@ $<; \
        else \
-               $(COMPILE) -c -o $@ $<; \
+               $(filter-out -Werror,$(COMPILE)) -c -o $@ $<; \
        fi
 
 ## Override default rule; this should run on BUILD host.
index a72d1dc..5145d01 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 2002-2008 Free Software Foundation, Inc.
 #
 # This file is free software, distributed under the terms of the GNU
 # General Public License.  As a special exception to the GNU General
index 6938b02..0cc2617 100644 (file)
@@ -1,11 +1,12 @@
 bin_PROGRAMS = guile-vm
 bin_SCRIPTS = guilec guile-disasm
 guile_vm_SOURCES = guile-vm.c
-guile_vm_LDADD = libguile-vm.la 
-guile_vm_LDFLAGS = $(GUILE_LDFLAGS)
+guile_vm_LDADD = libguile-vm.la ../libguile/libguile.la
 
 AM_CFLAGS = -Wall -g
 
+CFLAGS:=$(filter-out -Wmissing-prototypes,$(CFLAGS))
+
 lib_LTLIBRARIES = libguile-vm.la
 libguile_vm_la_SOURCES =                                               \
        envs.c frames.c instructions.c objcodes.c programs.c vm.c       \
@@ -17,15 +18,14 @@ EXTRA_DIST = vm_engine.c vm_system.c vm_scheme.c vm_loader.c \
 BUILT_SOURCES = vm_system.i vm_scheme.i vm_loader.i \
        envs.x frames.x instructions.x objcodes.x programs.x vm.x
 
-INCLUDES = $(GUILE_CFLAGS)
+INCLUDES =
 CLEANFILES = guilec guile-disasm
 DISTCLEANFILES = $(BUILT_SOURCES)
-MAINTAINERCLEANFILES = Makefile.in config.h.in stamp-h.in
 
 ETAGS_ARGS = --regex='/SCM_\(SYMBOL\|VCELL\).*\"\([^\"]\)*\"/\3/' \
    --regex='/SCM_DEFINE[ \t]*(\([^,]*\),[^,]*/\1/'
 
-SNARF = guile-snarf
+SNARF = $(top_builddir)/pre-inst-guile-env guile-snarf
 SUFFIXES = .i .x
 
 .c.i:
@@ -46,7 +46,7 @@ SUFFIXES = .i .x
 
 
 %: %.in
-       sed "s!@guile@!$(GUILE)!" $^ > $@
+       sed "s!@guile@!$(bindir)/guile!" $^ > $@
        @chmod 755 $@
 
-$(BUILT_SOURCES): config.h vm_expand.h
+$(BUILT_SOURCES): vm_expand.h
index 8fce929..d9535ba 100644 (file)
--- a/src/vm.c
+++ b/src/vm.c
@@ -305,7 +305,7 @@ SCM_DEFINE (scm_vm_version, "vm-version", 0, 0, 0,
            "")
 #define FUNC_NAME s_scm_vm_version
 {
-  return scm_from_locale_string (VERSION);
+  return scm_from_locale_string (PACKAGE_VERSION);
 }
 #undef FUNC_NAME