ia64/xen-unstable

changeset 9477:b579cf0ad753

[IA64] make xen-mkbuildtree-pre robust a bit

make linux-2.6-xen-sparse/arch/ia64/xen-mkbuildtree-pre robust a bit.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author awilliam@xenbuild.aw
date Wed Mar 29 12:40:01 2006 -0700 (2006-03-29)
parents d75a6cc5e68a
children 986538da9be0
files linux-2.6-xen-sparse/arch/ia64/xen-mkbuildtree-pre
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/ia64/xen-mkbuildtree-pre	Tue Mar 28 08:54:58 2006 -0700
     1.2 +++ b/linux-2.6-xen-sparse/arch/ia64/xen-mkbuildtree-pre	Wed Mar 29 12:40:01 2006 -0700
     1.3 @@ -6,21 +6,31 @@
     1.4  # for building (as all files in mv'd directories are thought by hg
     1.5  # to have been deleted).  I don't know how to avoid this right now,
     1.6  # but if someone has a better way, I'm all ears
     1.7 -if [ ! -e mm.xen-x86 ]
     1.8 -then
     1.9 -	mv mm mm.xen-x86
    1.10 -	mkdir mm
    1.11 -	mv net net.xen-x86
    1.12 -	mv kernel kernel.xen-x86
    1.13 -	mv drivers/acpi/tables.c drivers/acpi/tables.c.xen-x86
    1.14 -#	mv arch/xen/kernel drivers/xen/core
    1.15 -#	mv arch/xen arch/xen.xen-x86
    1.16 -#	mkdir arch/xen
    1.17 -#	mv arch/xen.xen-x86/configs arch/xen
    1.18 -#	mv include/asm-generic include/asm-generic.xen-x86
    1.19 -	mv include/linux include/linux.xen-x86
    1.20 -	mkdir include/linux
    1.21 -fi
    1.22 +
    1.23 +function try_to_mv() {
    1.24 +	if [ ! -e $2 ]
    1.25 +	then
    1.26 +		mv $1 $2
    1.27 +	fi
    1.28 +}
    1.29 +
    1.30 +function try_to_mkdir() {
    1.31 +	if [ ! -e $2 ]
    1.32 +	then
    1.33 +		mv $1 $2
    1.34 +		mkdir $1
    1.35 +	fi
    1.36 +}
    1.37 +
    1.38 +try_to_mkdir mm mm.xen-x86
    1.39 +try_to_mv net net.xen-x86
    1.40 +try_to_mv kernel kernel.xen-x86
    1.41 +try_to_mv drivers/acpi/tables.c drivers/acpi/tables.c.xen-x86
    1.42 +#try_to_mv arch/xen/kernel drivers/xen/core
    1.43 +#try_to_mkdir arch/xen arch/xen.xen-x86
    1.44 +#try_to_mv arch/xen.xen-x86/configs arch/xen
    1.45 +#try_to_mv include/asm-generic include/asm-generic.xen-x86
    1.46 +try_to_mkdir include/linux include/linux.xen-x86
    1.47  
    1.48  # need to grab a couple of xen-modified files for generic_page_range and
    1.49  # typedef pte_fn_t which are used by driver/xen blkif