ia64/xen-unstable

view netbsd-2.0-xen-sparse/nbmake-xen @ 6966:a5d67e3fbff1

Make xs_mkdir an xs_rm idempotent.
When modifying libxenstore to transparently restart when the daemon dies,
it became apparent that life is simpler when all commands can simply be
restarted. So this patch makes a slight semantic change to xs_rm and xs_mkdir:
xs_rm now succeeds if the file doesn't exist (as long as the parent exists),
and xs_mkdir succeeds if the directory already exists.
Noone should notice.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author cl349@firebug.cl.cam.ac.uk
date Mon Sep 19 14:25:29 2005 +0000 (2005-09-19)
parents 0a4b76b6b5a0
children
line source
1 #! /bin/sh
2 # Set proper variables to allow easy "make" building of a NetBSD subtree.
3 # Generated from: $NetBSD: build.sh,v 1.126 2004/02/04 11:23:40 lukem Exp $
4 #
6 : ${HOS:=$(uname -s | tr /A-Z/ /a-z/)}
7 : ${HARCH:=$(uname -m 2>/dev/null || echo i386)}
8 : ${NETBSD_RELEASE:=$(basename $(cd $(dirname $0) && pwd) | sed 's/netbsd-\([0-9]\+\.[0-9]\+\).*/\1/')}
9 : ${NETBSD_VERSION:=$(basename $(cd $(dirname $0) && pwd) | sed 's/netbsd-\([0-9]\+\.[0-9]\+.*\)-xen.*/\1/')}
10 : ${TOPDIR:=$(cd $(dirname $0) && pwd | sed 's/\(netbsd-[0-9]\+\.[0-9]\+.*-xen[^/]*\)/\1/')}
12 case "$HARCH" in
13 i586|i686)
14 HARCH=i386
15 ;;
16 esac
18 NETBSDSRCDIR="$TOPDIR"; export NETBSDSRCDIR
19 DESTDIR="$TOPDIR/root"; export DESTDIR
20 unset MAKEOBJDIRPREFIX
21 MAKEOBJDIR='${.CURDIR:C,^'"$TOPDIR,$TOPDIR/obj,}"; export MAKEOBJDIR
22 RELEASEDIR="$TOPDIR/release"; export RELEASEDIR
23 MKUNPRIVED='yes'; export MKUNPRIVED
24 MAKEVERBOSE='1'; export MAKEVERBOSE
25 LC_ALL='C'; export LC_ALL
26 TOOLDIR="$TOPDIR/../netbsd-${NETBSD_RELEASE}-tools/$HOS-$HARCH"; export TOOLDIR
27 MACHINE='i386'; export MACHINE
28 MACHINE_ARCH='i386'; export MACHINE_ARCH
29 MAKEFLAGS="-de -m $TOPDIR/share/mk MKOBJDIRS=yes"; export MAKEFLAGS
30 BUILDID="${NETBSD_RELEASE}"; export BUILDID
31 USETOOLS=yes; export USETOOLS
33 exec "${TOOLDIR}/bin/nbmake" ${1+"$@"}