equal
deleted
inserted
replaced
91 echo "$2"; \ |
91 echo "$2"; \ |
92 else \ |
92 else \ |
93 echo "$3"; \ |
93 echo "$3"; \ |
94 fi) |
94 fi) |
95 endef |
95 endef |
|
96 |
|
97 # Select a directory if it exists, or the alternate 2, or the alternate 3, or the alternate 4 |
|
98 define DirExists4 |
|
99 $(shell \ |
|
100 if [ -d "$1" ]; then \ |
|
101 echo "$1"; \ |
|
102 elif [ -d "$2" ]; then \ |
|
103 echo "$2"; \ |
|
104 elif [ -d "$3" ]; then \ |
|
105 echo "$3"; \ |
|
106 else \ |
|
107 echo "$4"; \ |
|
108 fi) |
|
109 endef |
|
110 |
96 |
111 |
97 # Select a writable directory if it exists and is writable, or the alternate |
112 # Select a writable directory if it exists and is writable, or the alternate |
98 define WriteDirExists |
113 define WriteDirExists |
99 $(shell \ |
114 $(shell \ |
100 if [ -d "$1" -a -w "$1" ]; then \ |
115 if [ -d "$1" -a -w "$1" ]; then \ |
355 |
370 |
356 # These are the same on all platforms but require the above platform include 1st |
371 # These are the same on all platforms but require the above platform include 1st |
357 |
372 |
358 # BOOTDIR: Bootstrap JDK, previous released JDK. |
373 # BOOTDIR: Bootstrap JDK, previous released JDK. |
359 # _BOOTDIR1 and _BOOTDIR2 picked by platform |
374 # _BOOTDIR1 and _BOOTDIR2 picked by platform |
|
375 # Platform may optionally define _BOOTDIR3 as well. |
360 ifdef ALT_BOOTDIR |
376 ifdef ALT_BOOTDIR |
361 BOOTDIR =$(ALT_BOOTDIR) |
377 BOOTDIR =$(ALT_BOOTDIR) |
362 else |
378 else |
363 BOOTDIR :=$(call DirExists,$(_BOOTDIR1),$(_BOOTDIR2),/NO_BOOTDIR) |
379 ifdef _BOOTDIR3 |
|
380 BOOTDIR :=$(call DirExists4,$(_BOOTDIR1),$(_BOOTDIR2),$(_BOOTDIR3),/NO_BOOTDIR) |
|
381 else |
|
382 BOOTDIR :=$(call DirExists,$(_BOOTDIR1),$(_BOOTDIR2),/NO_BOOTDIR) |
|
383 endif |
364 endif |
384 endif |
365 export BOOTDIR |
385 export BOOTDIR |
366 BOOTDIR:=$(call AltCheckSpaces,BOOTDIR) |
386 BOOTDIR:=$(call AltCheckSpaces,BOOTDIR) |
367 BOOTDIR:=$(call AltCheckValue,BOOTDIR) |
387 BOOTDIR:=$(call AltCheckValue,BOOTDIR) |
368 |
388 |