mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
src/cmd/INIT: allow compiling on system with noexec /tmp
Some systems disallow executing files in /tmp and there is nothing regular users can do about it. The build would fail with a misleading error message about cc being a cross-compiler. This commit makes the build system consistently use $TMPDIR with /tmp as a fallback if that variable is not defined. This allows the user to use another temporary directory with execute permission. The error message in bin/package is also extended to signal the possibility of a noexec temp dir.
This commit is contained in:
parent
aa4669ad17
commit
07b240d4f9
6 changed files with 40 additions and 28 deletions
|
|
@ -197,7 +197,7 @@ esac
|
|||
|
||||
case $info in
|
||||
-) ;;
|
||||
*) tmp=/tmp/mam$$
|
||||
*) tmp=${TMPDIR:-/tmp}/mam$$
|
||||
trap "exec >/dev/null; rm -f $tmp" 0 1 2 3 15
|
||||
exec > $tmp
|
||||
echo "probing C language processor $cc for mam information" >&2
|
||||
|
|
@ -268,8 +268,8 @@ done
|
|||
case $info in
|
||||
-) ;;
|
||||
*) exec >/dev/null
|
||||
test -f $info && rm -f $info
|
||||
cp $tmp $info
|
||||
chmod -w $info
|
||||
test -f "$info" && rm -f "$info"
|
||||
cp "$tmp" "$info"
|
||||
chmod -w "$info"
|
||||
;;
|
||||
esac
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue