diff options
author | Andy Wingo <wingo@pobox.com> | 2009-08-20 17:56:44 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2009-08-20 18:52:38 +0200 |
commit | 48a0fe4d6bd105bcf959752df4ac8704c9bb218a (patch) | |
tree | c220a4d3a037c2fdfaa641781af4880631d9d1fb | |
parent | 53a468dd8c2d8a6552b1b7ed4025414fc219d21d (diff) |
autocompiled files before installation go to a cache dir in the builddir
* libguile/load.c (scm_init_load_path): Append a slash after
XDG_CACHE_HOME.
* meta/gdb-uninstalled-guile.in:
* meta/guile.in (XDG_CACHE_HOME): Export this var so we write to a cache
within the build directory. Probably we should have a GUILE_CACHE_DIR
to be more specific, though.
* Makefile.am (clean-local): Clear the cache when making clean.
-rw-r--r-- | Makefile.am | 3 | ||||
-rw-r--r-- | libguile/load.c | 2 | ||||
-rw-r--r-- | meta/gdb-uninstalled-guile.in | 4 | ||||
-rw-r--r-- | meta/guile.in | 4 |
4 files changed, 10 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am index 4562dddf3..80231bb37 100644 --- a/Makefile.am +++ b/Makefile.am @@ -42,6 +42,9 @@ DISTCLEANFILES = check-guile.log dist-hook: gen-ChangeLog +clean-local: + rm -rf cache/ + gen_start_rev = 61db429e251bfd2f75cb4632972e0238056eb24b .PHONY: gen-ChangeLog gen-ChangeLog: diff --git a/libguile/load.c b/libguile/load.c index 8a6fadb33..9e54dfab9 100644 --- a/libguile/load.c +++ b/libguile/load.c @@ -257,7 +257,7 @@ scm_init_load_path () "guile/ccache/" SCM_EFFECTIVE_VERSION "-" SCM_OBJCODE_MACHINE_VERSION_STRING if ((e = getenv ("XDG_CACHE_HOME"))) - snprintf (cachedir, sizeof(cachedir), "%s" FALLBACK_DIR, e); + snprintf (cachedir, sizeof(cachedir), "%s/" FALLBACK_DIR, e); else if ((e = getenv ("HOME"))) snprintf (cachedir, sizeof(cachedir), "%s/.cache/" FALLBACK_DIR, e); #ifdef HAVE_GETPWENT diff --git a/meta/gdb-uninstalled-guile.in b/meta/gdb-uninstalled-guile.in index 1151dbc3a..d55e215cb 100644 --- a/meta/gdb-uninstalled-guile.in +++ b/meta/gdb-uninstalled-guile.in @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright (C) 2002, 2006, 2008 Free Software Foundation +# Copyright (C) 2002, 2006, 2008, 2009 Free Software Foundation # # This file is part of GUILE. # @@ -34,5 +34,7 @@ set -e # env (set by configure) top_builddir="@top_builddir_absolute@" +XDG_CACHE_HOME=${top_builddir}/cache +export XDG_CACHE_HOME exec ${top_builddir}/meta/uninstalled-env libtool --mode=execute \ gdb --args ${top_builddir}/libguile/guile "$@" diff --git a/meta/guile.in b/meta/guile.in index ab1fe3706..d1ae0d4fa 100644 --- a/meta/guile.in +++ b/meta/guile.in @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright (C) 2002, 2006, 2008 Free Software Foundation +# Copyright (C) 2002, 2006, 2008, 2009 Free Software Foundation # # This file is part of GUILE. # @@ -41,6 +41,8 @@ top_builddir="@top_builddir_absolute@" # set GUILE (clobber) GUILE=${top_builddir}/libguile/guile export GUILE +XDG_CACHE_HOME=${top_builddir}/cache +export XDG_CACHE_HOME # do it exec ${top_builddir}/meta/uninstalled-env $GUILE "$@" |