summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2013-09-30 10:56:20 -0400
committerPaul Smith <psmith@gnu.org>2013-09-30 10:56:20 -0400
commitb1c7f0df4eadf55721902b5cc4236a4aaae7ee6a (patch)
tree6421e9f36eee4122078f5102251aaca80bfb57d1
parent8e12202870d40488cc5899254e227d8038433839 (diff)
downloadgunmake-b1c7f0df4eadf55721902b5cc4236a4aaae7ee6a.tar.gz
Fix portability issues for Guile 1.8.
-rw-r--r--ChangeLog4
-rw-r--r--README.W32.template2
-rw-r--r--guile.c9
-rw-r--r--tests/scripts/variables/GNUMAKEFLAGS6
4 files changed, 14 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index c70cd45..4a23e13 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-09-30 Paul Smith <psmith@gnu.org>
+
+ * guile.c: Portability fixes for Guile 1.8.
+
2013-09-29 Paul Smith <psmith@gnu.org>
* output.c (output_dump): Always write Enter/Leave messages to stdio.
diff --git a/README.W32.template b/README.W32.template
index 3752c14..12de42c 100644
--- a/README.W32.template
+++ b/README.W32.template
@@ -7,7 +7,7 @@ It builds with the MinGW port of GCC (tested with GCC 3.4.2).
It also builds with MSVC 2.x, 4.x, 5.x, 6.x, and 2003 as well as
with .NET 7.x and .NET 2003.
-As of version 3.83, a build with Guile is supported (tested with Guile
+As of version 4.0, a build with Guile is supported (tested with Guile
2.0.3). To build with Guile, you will need, in addition to Guile
itself, its dependency libraries and the pkg-config program. The
latter is used to figure out which compilation and link switches and
diff --git a/guile.c b/guile.c
index 142c321..07a2147 100644
--- a/guile.c
+++ b/guile.c
@@ -26,11 +26,12 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
/* Pre-2.0 versions of Guile don't have a typedef for gsubr function types. */
#if SCM_MAJOR_VERSION < 2
-# define GSUBR_TYPE SCM (*) ()
+# define GSUBR_TYPE SCM (*) ()
/* Guile 1.x doesn't really support i18n. */
-# define scm_from_utf8_string(_s) (_s)
+# define EVAL_STRING(_s) scm_c_eval_string (_s)
#else
-# define GSUBR_TYPE scm_t_subr
+# define GSUBR_TYPE scm_t_subr
+# define EVAL_STRING(_s) scm_eval_string (scm_from_utf8_string (_s))
#endif
static SCM make_mod = SCM_EOL;
@@ -109,7 +110,7 @@ guile_init (void *arg UNUSED)
static void *
internal_guile_eval (void *arg)
{
- return cvt_scm_to_str (scm_eval_string (scm_from_utf8_string (arg)));
+ return cvt_scm_to_str (EVAL_STRING (arg));
}
/* This is the function registered with make */
diff --git a/tests/scripts/variables/GNUMAKEFLAGS b/tests/scripts/variables/GNUMAKEFLAGS
index bd6979c..e9c0d55 100644
--- a/tests/scripts/variables/GNUMAKEFLAGS
+++ b/tests/scripts/variables/GNUMAKEFLAGS
@@ -25,7 +25,9 @@ erR --trace --no-print-directory");
# Verify that re-exec / recursion doesn't duplicate flags from GNUMAKEFLAGS
-$extraENV{GNUMAKEFLAGS} = '-I/tmp -Oline';
+unlink('x.mk');
+
+$extraENV{GNUMAKEFLAGS} = '-Itst/bad -Oline';
run_make_test(q!
recurse: ; @echo $@; echo MAKEFLAGS = $$MAKEFLAGS; echo GNUMAKEFLAGS = $$GNUMAKEFLAGS; #MAKEPATH# -f #MAKEFILE# all
@@ -33,7 +35,7 @@ all: ; @echo $@; echo MAKEFLAGS = $$MAKEFLAGS; echo GNUMAKEFLAGS = $$GNUMAKEFLAG
-include x.mk
x.mk: ; @echo $@; echo MAKEFLAGS = $$MAKEFLAGS; echo GNUMAKEFLAGS = $$GNUMAKEFLAGS; echo > $@
!,
- "", "x.mk\nMAKEFLAGS = -I/tmp -Oline\nGNUMAKEFLAGS =\nrecurse\nMAKEFLAGS = -I/tmp -Oline\nGNUMAKEFLAGS =\n#MAKE#[1]: Entering directory '#PWD#'\nall\nMAKEFLAGS = w -I/tmp -Oline\nGNUMAKEFLAGS =\n#MAKE#[1]: Leaving directory '#PWD#'\n");
+ "", "x.mk\nMAKEFLAGS = -Itst/bad -Oline\nGNUMAKEFLAGS =\nrecurse\nMAKEFLAGS = -Itst/bad -Oline\nGNUMAKEFLAGS =\n#MAKE#[1]: Entering directory '#PWD#'\nall\nMAKEFLAGS = w -Itst/bad -Oline\nGNUMAKEFLAGS =\n#MAKE#[1]: Leaving directory '#PWD#'\n");
unlink('x.mk');