diff options
author | Doug Evans <xdje42@gmail.com> | 2014-07-26 18:16:27 -0700 |
---|---|---|
committer | Doug Evans <xdje42@gmail.com> | 2014-07-26 18:16:27 -0700 |
commit | e76c5d173bbf7137555919dd136004a7c0118af7 (patch) | |
tree | 92e8106c379879427bb0ce570c3d0dece75dc020 /gdb/data-directory/Makefile.in | |
parent | 186fcde0c6134aed28526d925b1360db95d47171 (diff) | |
download | gdb-e76c5d173bbf7137555919dd136004a7c0118af7.zip gdb-e76c5d173bbf7137555919dd136004a7c0118af7.tar.gz gdb-e76c5d173bbf7137555919dd136004a7c0118af7.tar.bz2 |
PR guile/17146
* acinclude.m4 (GDB_GUILE_PROGRAM_NAMES): New macro.
(GDB_GUILD_TARGET_FLAG, GDB_TRY_GUILD): New macros.
* configure.ac: Try to use guild to compile an scm file, if it fails
then disable guile support.
* configure: Regenerate.
* data-directory/Makefile.in (GUILE_SOURCE_FILES): Renamed from
GUILE_FILE_LIST.
(GUILE_COMPILED_FILES): New variable.
(GUILE_FILES) Update.
(GUILD, GUILD_TARGET_FLAG, GUILD_COMPILE_FLAGS): New variables.
(stamp-guile): Compile scm files.
* guile/guile.c (boot_guile_support): New function.
(standard_throw_args_p): New function.
(print_standard_throw_error, print_throw_error): New functions.
(handle_boot_error): New function.
(initialize_scheme_side): Rewrite to call boot_guile_support.
* guile/lib/gdb/boot.scm: Update %load-compiled-path. Load gdb.go.
* guile/lib/gdb/init.scm (%silence-compiler-warnings%): New function.
Diffstat (limited to 'gdb/data-directory/Makefile.in')
-rw-r--r-- | gdb/data-directory/Makefile.in | 40 |
1 files changed, 35 insertions, 5 deletions
diff --git a/gdb/data-directory/Makefile.in b/gdb/data-directory/Makefile.in index b05dba5..509f888 100644 --- a/gdb/data-directory/Makefile.in +++ b/gdb/data-directory/Makefile.in @@ -80,7 +80,8 @@ PYTHON_FILE_LIST = \ GUILE_DIR = guile GUILE_INSTALL_DIR = $(DESTDIR)$(GDB_DATADIR)/$(GUILE_DIR) -GUILE_FILE_LIST = \ + +GUILE_SOURCE_FILES = \ ./gdb.scm \ gdb/boot.scm \ gdb/experimental.scm \ @@ -90,9 +91,31 @@ GUILE_FILE_LIST = \ gdb/support.scm \ gdb/types.scm -@HAVE_GUILE_TRUE@GUILE_FILES = $(GUILE_FILE_LIST) +GUILE_COMPILED_FILES = \ + ./gdb.go \ + gdb/experimental.go \ + gdb/iterator.go \ + gdb/printing.go \ + gdb/support.go \ + gdb/types.go + +@HAVE_GUILE_TRUE@GUILE_FILES = $(GUILE_SOURCE_FILES) $(GUILE_COMPILED_FILES) @HAVE_GUILE_FALSE@GUILE_FILES = +GUILD = @GUILD@ +GUILD_TARGET_FLAG = @GUILD_TARGET_FLAG@ + +# Flags passed to 'guild compile'. +# Note: We can't use -Wunbound-variable because all the variables +# defined in C aren't visible when we compile. +# Note: To work around a guile 2.0.5 issue (it can't find gdb/init.scm even if +# we pass -L <dir>) we have to compile in the directory containing gdb.scm. +# We still need to pass "-L ." so that other modules are found. +GUILD_COMPILE_FLAGS = \ + $(GUILD_TARGET_FLAG) \ + -Warity-mismatch -Wformat -Wunused-toplevel \ + -L . + SYSTEM_GDBINIT_DIR = system-gdbinit SYSTEM_GDBINIT_INSTALL_DIR = $(DESTDIR)$(GDB_DATADIR)/$(SYSTEM_GDBINIT_DIR) SYSTEM_GDBINIT_FILES = \ @@ -222,15 +245,22 @@ uninstall-python: done ; \ fi -stamp-guile: Makefile $(GUILE_FILES) +stamp-guile: Makefile $(GUILE_SOURCE_FILES) rm -rf ./$(GUILE_DIR) - files='$(GUILE_FILES)' ; \ - if test "x$$files" != x ; then \ + if test "x$(GUILE_FILES)" != x ; then \ + files='$(GUILE_SOURCE_FILES)' ; \ for file in $$files ; do \ dir=`echo "$$file" | sed 's,/[^/]*$$,,'` ; \ $(INSTALL_DIR) ./$(GUILE_DIR)/$$dir ; \ $(INSTALL_DATA) $(GUILE_SRCDIR)/$$file ./$(GUILE_DIR)/$$dir ; \ done ; \ + files='$(GUILE_COMPILED_FILES)' ; \ + cd ./$(GUILE_DIR) ; \ + for go in $$files ; do \ + source="`echo $$go | sed 's/\.go$$/.scm/'`" ; \ + echo $(GUILD) compile $(GUILD_COMPILE_FLAGS) -o "$$go" "$$source" ; \ + $(GUILD) compile $(GUILD_COMPILE_FLAGS) -o "$$go" "$$source" || exit 1 ; \ + done ; \ fi touch $@ |