summaryrefslogtreecommitdiff
path: root/makefiles
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2011-02-05 10:14:02 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2011-02-05 10:14:02 +0000
commit6933505522c12afb65007bfca69f5e85d50ffc62 (patch)
treecace48c36892f798be5c39d2997ddbfa8384984e /makefiles
parent10d3f2bbae3dc57e2238ffdb16081e1b0140570c (diff)
downloadbuildsystem-6933505522c12afb65007bfca69f5e85d50ffc62.tar.gz
buildsystem-6933505522c12afb65007bfca69f5e85d50ffc62.tar.bz2
Ensure that perl is invoked using its absolute path on RISC OS
svn path=/trunk/tools/buildsystem/; revision=11611
Diffstat (limited to 'makefiles')
-rw-r--r--makefiles/Makefile.tools16
1 files changed, 16 insertions, 0 deletions
diff --git a/makefiles/Makefile.tools b/makefiles/Makefile.tools
index 6ac78a5..59203ec 100644
--- a/makefiles/Makefile.tools
+++ b/makefiles/Makefile.tools
@@ -96,6 +96,22 @@ ifeq ($(TARGET),riscos)
GENHTML ?= echo
LCOV ?= echo
PKGCONFIG ?=
+ # On certain versions of RISC OS (<>4 || kernel < 8.75),
+ # the kernel will clean up the current redirection on
+ # OS_Exit, including closing the associated file handles.
+ # This is problematic for UnixLib, as it's invariably using
+ # those filehandles in a pipe between parent and child processes.
+ # This affects us as, anywhere where we shell out and want to
+ # capture the output of the child process may fail.
+ # Fortunately, if we know the child process is built against
+ # UnixLib, then we also know that it won't call OS_Exit when it
+ # exits, instead returning directly to our exit handler (and thus
+ # preserving the redirection). This only works, however, if the
+ # child application is specified using its absolute path, or
+ # found in Run$Path. In the case of Perl, it does not appear in
+ # Run$Path, so we must invoke it using its absolute path so that
+ # the SharedUnixLibrary successfully detects it as a child process.
+ PERL ?= <Perl$$Dir>.bin.perl
# This is nasty, but needed because $(CURDIR) will
# contain colons, and thus confuse make mightily