From: Andy Wingo Date: Sat, 2 Aug 2008 10:17:27 +0000 (+0200) Subject: Fixes to make guile-vm compile in guile source tree X-Git-Url: https://git.hcoop.net/bpt/guile.git/commitdiff_plain/d351811347b3bbc2c0b8fbada5335392772079b8 Fixes to make guile-vm compile in guile source tree * 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. --- diff --git a/INSTALL b/INSTALL index 5458714e1..d3c5b40a9 100644 --- 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 ===================== diff --git a/Makefile.am b/Makefile.am index 93e7e5e7b..5c395f88a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 diff --git a/guilec.mk b/guilec.mk index 57336c151..c1606b59d 100644 --- 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 $< diff --git a/libguile/Makefile.am b/libguile/Makefile.am index 3444f5d70..74ed806dd 100644 --- a/libguile/Makefile.am +++ b/libguile/Makefile.am @@ -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. diff --git a/m4/gnulib-cache.m4 b/m4/gnulib-cache.m4 index a72d1dcea..5145d01df 100644 --- a/m4/gnulib-cache.m4 +++ b/m4/gnulib-cache.m4 @@ -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 diff --git a/src/Makefile.am b/src/Makefile.am index 6938b020d..0cc2617e8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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 diff --git a/src/vm.c b/src/vm.c index 8fce929b5..d9535ba48 100644 --- 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