diff options
author | Ludovic Courtès <ludo@gnu.org> | 2008-02-12 14:26:37 +0000 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2008-02-12 14:26:37 +0000 |
commit | 5b5179f895ec199596a66e0fc6876ed088a66485 (patch) | |
tree | 85b3a970815cadd6654ca74b35678c0a16e39e05 /libguile/guile-snarf.in | |
parent | 8c726cf0b48d7ca7e7dae4e803e4f53e926eadb3 (diff) | |
download | guile-5b5179f895ec199596a66e0fc6876ed088a66485.tar.gz |
guile-snarf: Honor $TMPDIR.
Diffstat (limited to 'libguile/guile-snarf.in')
-rw-r--r-- | libguile/guile-snarf.in | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libguile/guile-snarf.in b/libguile/guile-snarf.in index 89ef79092..617bad822 100644 --- a/libguile/guile-snarf.in +++ b/libguile/guile-snarf.in @@ -1,7 +1,7 @@ #!/bin/sh # Extract the initialization actions from source files. # -# Copyright (C) 1996, 97, 98, 99, 2000, 2001, 2002, 2004, 2006 Free Software Foundation, Inc. +# Copyright (C) 1996, 97, 98, 99, 2000, 2001, 2002, 2004, 2006, 2008 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -69,9 +69,12 @@ fi # set vars and handler -- handle CPP override cpp_ok_p=false -tempdir="/tmp/snarf.$$" + +if [ x"$TMPDIR" = x ]; then TMPDIR="/tmp" ; else : ; fi +tempdir="$TMPDIR/guile-snarf.$$" (umask 077 && mkdir $tempdir) || exit 1 temp="$tempdir/tmp" + if [ x"$CPP" = x ] ; then cpp="@CPP@" ; else cpp="$CPP" ; fi trap "rm -rf $tempdir" 0 1 2 15 |