mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 11:50:28 +02:00
non-srcdir build fixes
* guile-tools.in: Fix the checks to account for non-srcdir builds. * libguile/frames.c: * libguile/objcodes.c: * libguile/programs.c: * libguile/instructions.c: * libguile/vm.c: Fix snarf-includes to cope with non-srcdir builds. * libguile/instructions.h: * libguile/instructions.c: Fix the stubs inclusion to be non-srcdir compatible. * libguile/vm-expand.h (VM_DEFINE_INSTRUCTION): Fix some things so as not to require the instructions.h defintitions, since we have the codes already. Not important tho :) * pre-inst-guile-env.in: Minor tweak that should have no effect. * test-suite/standalone/Makefile.am (all-local): Remove a chmod +x step, the configure.ac rule should do that if necessary.
This commit is contained in:
parent
8992a9e318
commit
aeeff258c6
12 changed files with 26 additions and 27 deletions
|
@ -48,10 +48,13 @@ pkgdatadir="@datadir@/@PACKAGE@"
|
||||||
guileversion="@GUILE_EFFECTIVE_VERSION@"
|
guileversion="@GUILE_EFFECTIVE_VERSION@"
|
||||||
default_scriptsdir=$pkgdatadir/$guileversion/scripts
|
default_scriptsdir=$pkgdatadir/$guileversion/scripts
|
||||||
|
|
||||||
|
top_srcdir="@top_srcdir_absolute@"
|
||||||
|
top_builddir="@top_builddir_absolute@"
|
||||||
|
|
||||||
# pre-install invocation frob
|
# pre-install invocation frob
|
||||||
mydir=`dirname $0`
|
mydir=$(cd $(dirname $0) && pwd)
|
||||||
if [ -d "$mydir/scripts" -a -f "$mydir/scripts/Makefile.am" ] ; then
|
if [ "$mydir" = "$top_builddir" ] ; then
|
||||||
default_scriptsdir=`(cd $mydir/scripts ; pwd)`
|
default_scriptsdir=$top_srcdir/scripts
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# option processing -- basically, you can override either the script dir
|
# option processing -- basically, you can override either the script dir
|
||||||
|
|
|
@ -305,7 +305,7 @@ scm_init_frames (void)
|
||||||
scm_bootstrap_vm ();
|
scm_bootstrap_vm ();
|
||||||
|
|
||||||
#ifndef SCM_MAGIC_SNARFER
|
#ifndef SCM_MAGIC_SNARFER
|
||||||
#include "frames.x"
|
#include "libguile/frames.x"
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -79,10 +79,10 @@ fetch_instruction_table ()
|
||||||
table = malloc (bytes);
|
table = malloc (bytes);
|
||||||
memset (table, 0, bytes);
|
memset (table, 0, bytes);
|
||||||
#define VM_INSTRUCTION_TO_TABLE 1
|
#define VM_INSTRUCTION_TO_TABLE 1
|
||||||
#include "vm-expand.h"
|
#include <libguile/vm-expand.h>
|
||||||
#include "vm-i-system.i"
|
#include <libguile/vm-i-system.i>
|
||||||
#include "vm-i-scheme.i"
|
#include <libguile/vm-i-scheme.i>
|
||||||
#include "vm-i-loader.i"
|
#include <libguile/vm-i-loader.i>
|
||||||
#undef VM_INSTRUCTION_TO_TABLE
|
#undef VM_INSTRUCTION_TO_TABLE
|
||||||
for (i = 0; i < scm_op_last; i++)
|
for (i = 0; i < scm_op_last; i++)
|
||||||
{
|
{
|
||||||
|
@ -223,7 +223,7 @@ scm_init_instructions (void)
|
||||||
scm_bootstrap_vm ();
|
scm_bootstrap_vm ();
|
||||||
|
|
||||||
#ifndef SCM_MAGIC_SNARFER
|
#ifndef SCM_MAGIC_SNARFER
|
||||||
#include "instructions.x"
|
#include "libguile/instructions.x"
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,10 +49,10 @@
|
||||||
|
|
||||||
enum scm_opcode {
|
enum scm_opcode {
|
||||||
#define VM_INSTRUCTION_TO_OPCODE 1
|
#define VM_INSTRUCTION_TO_OPCODE 1
|
||||||
#include "vm-expand.h"
|
#include <libguile/vm-expand.h>
|
||||||
#include "vm-i-system.i"
|
#include <libguile/vm-i-system.i>
|
||||||
#include "vm-i-scheme.i"
|
#include <libguile/vm-i-scheme.i>
|
||||||
#include "vm-i-loader.i"
|
#include <libguile/vm-i-loader.i>
|
||||||
#undef VM_INSTRUCTION_TO_OPCODE
|
#undef VM_INSTRUCTION_TO_OPCODE
|
||||||
scm_op_last = SCM_VM_NUM_INSTRUCTIONS
|
scm_op_last = SCM_VM_NUM_INSTRUCTIONS
|
||||||
};
|
};
|
||||||
|
|
|
@ -282,7 +282,7 @@ scm_init_objcodes (void)
|
||||||
scm_bootstrap_vm ();
|
scm_bootstrap_vm ();
|
||||||
|
|
||||||
#ifndef SCM_MAGIC_SNARFER
|
#ifndef SCM_MAGIC_SNARFER
|
||||||
#include "objcodes.x"
|
#include "libguile/objcodes.x"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
scm_c_define ("word-size", scm_from_size_t (sizeof(SCM)));
|
scm_c_define ("word-size", scm_from_size_t (sizeof(SCM)));
|
||||||
|
|
|
@ -376,7 +376,7 @@ scm_init_programs (void)
|
||||||
scm_bootstrap_vm ();
|
scm_bootstrap_vm ();
|
||||||
|
|
||||||
#ifndef SCM_MAGIC_SNARFER
|
#ifndef SCM_MAGIC_SNARFER
|
||||||
#include "programs.x"
|
#include "libguile/programs.x"
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,6 @@
|
||||||
#include "libguile/strings.h"
|
#include "libguile/strings.h"
|
||||||
#include "libguile/vm.h" /* to capture vm stacks */
|
#include "libguile/vm.h" /* to capture vm stacks */
|
||||||
#include "libguile/frames.h" /* vm frames */
|
#include "libguile/frames.h" /* vm frames */
|
||||||
#include "libguile/instructions.h" /* scm_op_halt */
|
|
||||||
|
|
||||||
#include "libguile/validate.h"
|
#include "libguile/validate.h"
|
||||||
#include "libguile/stacks.h"
|
#include "libguile/stacks.h"
|
||||||
|
|
|
@ -103,10 +103,10 @@ VM_NAME (struct scm_vm *vp, SCM program, SCM *argv, int nargs)
|
||||||
for (i = 0; i < SCM_VM_NUM_INSTRUCTIONS; i++)
|
for (i = 0; i < SCM_VM_NUM_INSTRUCTIONS; i++)
|
||||||
jump_table[i] = &&vm_error_bad_instruction;
|
jump_table[i] = &&vm_error_bad_instruction;
|
||||||
#define VM_INSTRUCTION_TO_LABEL 1
|
#define VM_INSTRUCTION_TO_LABEL 1
|
||||||
#include "vm-expand.h"
|
#include <libguile/vm-expand.h>
|
||||||
#include "vm-i-system.i"
|
#include <libguile/vm-i-system.i>
|
||||||
#include "vm-i-scheme.i"
|
#include <libguile/vm-i-scheme.i>
|
||||||
#include "vm-i-loader.i"
|
#include <libguile/vm-i-loader.i>
|
||||||
#undef VM_INSTRUCTION_TO_LABEL
|
#undef VM_INSTRUCTION_TO_LABEL
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -65,7 +65,7 @@
|
||||||
*/
|
*/
|
||||||
#ifdef VM_INSTRUCTION_TO_TABLE
|
#ifdef VM_INSTRUCTION_TO_TABLE
|
||||||
#define VM_DEFINE_INSTRUCTION(code_,tag_,name_,len_,npop_,npush_) \
|
#define VM_DEFINE_INSTRUCTION(code_,tag_,name_,len_,npop_,npush_) \
|
||||||
table[VM_OPCODE (tag_)].opcode = VM_OPCODE (tag_); \
|
table[VM_OPCODE (tag_)].opcode = code_; \
|
||||||
table[VM_OPCODE (tag_)].name = name_; \
|
table[VM_OPCODE (tag_)].name = name_; \
|
||||||
table[VM_OPCODE (tag_)].len = len_; \
|
table[VM_OPCODE (tag_)].len = len_; \
|
||||||
table[VM_OPCODE (tag_)].npop = npop_; \
|
table[VM_OPCODE (tag_)].npop = npop_; \
|
||||||
|
@ -76,7 +76,7 @@
|
||||||
/*
|
/*
|
||||||
* These will go to jump_table in vm_engine.c
|
* These will go to jump_table in vm_engine.c
|
||||||
*/
|
*/
|
||||||
#define VM_DEFINE_INSTRUCTION(code,tag,name,len,npop,npush) jump_table[VM_OPCODE (tag)] = VM_ADDR (tag);
|
#define VM_DEFINE_INSTRUCTION(code,tag,name,len,npop,npush) jump_table[code] = VM_ADDR (tag);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#ifdef VM_INSTRUCTION_TO_OPCODE
|
#ifdef VM_INSTRUCTION_TO_OPCODE
|
||||||
|
|
|
@ -671,7 +671,7 @@ scm_init_vm (void)
|
||||||
scm_bootstrap_vm ();
|
scm_bootstrap_vm ();
|
||||||
|
|
||||||
#ifndef SCM_MAGIC_SNARFER
|
#ifndef SCM_MAGIC_SNARFER
|
||||||
#include "vm.x"
|
#include "libguile/vm.x"
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ then
|
||||||
if test "${top_srcdir}" != "${top_builddir}"; then
|
if test "${top_srcdir}" != "${top_builddir}"; then
|
||||||
GUILE_LOAD_PATH="${top_builddir}/guile-readline:${top_srcdir}/guile-readline:${top_builddir}:${top_srcdir}:${top_builddir}/module:${top_srcdir}/module"
|
GUILE_LOAD_PATH="${top_builddir}/guile-readline:${top_srcdir}/guile-readline:${top_builddir}:${top_srcdir}:${top_builddir}/module:${top_srcdir}/module"
|
||||||
else
|
else
|
||||||
GUILE_LOAD_PATH="${top_srcdir}/guile-readline:${top_srcdir}:${top_builddir}/module:${top_srcdir}/module"
|
GUILE_LOAD_PATH="${top_srcdir}/guile-readline:${top_srcdir}:${top_srcdir}/module:${top_srcdir}/module"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
for d in "${top_srcdir}" "${top_srcdir}/guile-readline" \
|
for d in "${top_srcdir}" "${top_srcdir}/guile-readline" \
|
||||||
|
|
|
@ -137,7 +137,4 @@ EXTRA_DIST += test-with-guile-module.c test-scm-with-guile.c
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
all-local:
|
|
||||||
cd ${srcdir} && chmod u+x ${check_SCRIPTS}
|
|
||||||
|
|
||||||
EXTRA_DIST += ${check_SCRIPTS}
|
EXTRA_DIST += ${check_SCRIPTS}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue