Browse code

Started conversion to 3.0. Tests pass again. Not there yet though.

Nat! authored on 14-01-2017 15:04:33
Showing 31 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,82 @@
1
+---
2
+layout: post
3
+author: Nat!
4
+title:
5
+open_comments: true
6
+date: 2017-01-13 12:07
7
+---
8
+# mulle-bootstrap 3.0
9
+
10
+What I want is to share fetched repositories and builds, especially
11
+dependencies and addictions with multiple repositories.
12
+
13
+mulle-bootstrap 2.0 does this already, though it's not convenient.
14
+
15
+### How does 2.0 do it ?
16
+
17
+Just create a new .bootstrap in top level and build
18
+constituents. The merge algorithm uniques fetches and builds.
19
+
20
+### Why is it not convenient ?
21
+
22
+1. repositories are hidden inside .repos
23
+2. repositories have to be part of .bootstrap/repositories of master
24
+
25
+### How it would be ideal for me
26
+
27
+```console
28
+$ mulle-bootstrap seize /Volumes/Source/srcM/slave
29
+#
30
+# link up a slave to a master, updating  .bootstrap.local/repositories
31
+# bail if we are not a master. How do we know we are a master ? It has
32
+# no .bootstrap just a .bootstrap.local
33
+#
34
+$ mulle-bootstrap fetch
35
+# defer to master... master will fetch my embedded repositories and
36
+# my dependencies and addictions
37
+$ mulle-bootstrap status
38
+This is a minion to master /Volumes/Source/srcM
39
+Master needs to a rebuild
40
+```
41
+
42
+```
43
+$ CFLAGS=`mulle-bootstrap config --cflags`
44
+$ CXXLAGS=`mulle-bootstrap config --cxxflags`
45
+$ LDFLAGS=`mulle-bootstrap config --ldflags`
46
+```
47
+
48
+
49
+## Problems
50
+
51
+* Need an unseize command
52
+* Need an info command to show if linked or not
53
+* Rememeber the golden rule, nothing gets produced "outside" the project
54
+
55
+
56
+## Thoughts
57
+
58
+* We still need a .repos folder inside a local mulle-bootstrap for embedded
59
+repositories. but it is managed by the master
60
+* Call it .bootstrap.repos ? Nah.
61
+
62
+
63
+## Solutions
64
+
65
+### .bootstrap.local/minion
66
+
67
+* minion defers to parent to build
68
+* parent merges contents of minion (how is this different from .repos)
69
+* parent detects presence of minion and adds it to .repos with a symlink. Then
70
+marks it with .bootstrap.local minion
71
+
72
+
73
+### .repos becomes .
74
+
75
+* problems adding repositories to .gitignore
76
+* problems rm -rf .repos
77
+
78
+
79
+### .repos/<repos> get symlinked to .
80
+
81
+* problems removing symlinks
82
+
... ...
@@ -1,8 +1,27 @@
1
+# 3.0
2
+
3
+* config now returns the default value, if nothing is configured
4
+* various changes in variables
5
+
6
+Now               | Before              | Description
7
+------------------|---------------------|--------------------------
8
+DEPENDENCIES_DIR  | DEPENDENCIES_DIR    |
9
+ADDICTIONS_DIR    | ADDICTIONS_DIR      |
10
+BOOTSTRAP_DIR     | BOOTSTRAP_SUBDIR    |
11
+REPOS_DIR         | CLONES_SUBDIR       |
12
+                  | CLONESFETCH_SUBDIR  | Does not exist anymore
13
+
14
+
15
+* libexec is now found relative to $0 so the install script does not need to
16
+patch anymore. It's also convenient for the test scripts
17
+* various status files are now prefixed with .bootstrap_
18
+* **tag** as a setting does not exist anymore. Now its part of the repositories line
19
+* renamed -u fetch option to -us and exposed it on refresh too
20
+
1 21
 ### 2.6.1
2 22
 
3 23
 * fix bug with absolute paths
4 24
 
5
-
6 25
 ## 2.6.0
7 26
 
8 27
 * mulle-bootstrap announces itself to cmake with -DMULLE_BOOTSTRAP_VERSION
... ...
@@ -375,7 +394,7 @@ eliminated.
375 394
 
376 395
 ## 0.20
377 396
 
378
-*  Replace `CLONES_FETCH_SUBDIR` with `CLONESFETCH_SUBDIR`.
397
+*  Replace `CLONES_FETCH_SUBDIR` with `REPOS_DIR`.
379 398
 *  mulle-bootstrap now uses the zombie repository detection to actually bury
380 399
    unused repositories. Check out "tests/refresh/refresh.sh" how this
381 400
    actually works. The upshot is, all changes in the repositories settings
... ...
@@ -163,8 +163,6 @@ in the environment. These can only be specified locally. They are not inherited.
163 163
 
164 164
 Setting Name                      |  Description                                  | Default
165 165
 ----------------------------------|-----------------------------------------------|--------------
166
-`repos_foldername`                | Where to place cloned repositories            | `.repos`
167
-`output_foldername`               | DSTROOT, --prefix of headers and libraries    | `dependencies`
168 166
 `no_warn_environment_setting`     | don't warn when a setting is defined by       |
169 167
                                   | environment                                   | NO
170 168
 `no_warn_local_setting`           | don't warn when a setting is defined by       |
... ...
@@ -142,10 +142,9 @@ prefix="`realpath "${prefix}"`"
142 142
 
143 143
 mode=${1:-755}
144 144
 [ $# -eq 0 ] || shift
145
-bin=${1:-"${prefix}/bin"}
146
-[ $# -eq 0 ] || shift
147
-libexec=${1:-"${prefix}/libexec/mulle-bootstrap"}
148
-[ $# -eq 0 ] || shift
145
+
146
+bin="${prefix}/bin"
147
+libexec="${prefix}/libexec/mulle-bootstrap"
149 148
 
150 149
 if [ "$prefix" = "" ] || [ "$bin" = "" ] || [ "$libexec" = "" ] || [ "$mode" = "" ]
151 150
 then
... ...
@@ -165,17 +164,16 @@ fi
165 164
 
166 165
 for i in mulle*bootstrap
167 166
 do
168
-   sed "s|/usr/local/libexec/mulle-bootstrap|${libexec}|g" < "${i}" > "${bin}/$i" || exit 1
169
-   chmod "${mode}" "${bin}/${i}" || exit 1
167
+   install -m "${mode}" "${i}" "${bin}/$i" || exit 1
170 168
    printf "install: ${C_MAGENTA}${C_BOLD}%s${C_RESET}\n" "$bin/$i" >&2
171 169
 done
172 170
 
171
+
173 172
 case `uname` in
174 173
    MINGW*)
175 174
       for i in mulle-mingw-*sh
176 175
       do
177
-         sed "s|/usr/local/libexec/mulle-bootstrap|${libexec}|g" < "${i}" > "${bin}/$i" || exit 1
178
-         chmod "${mode}" "${bin}/${i}" || exit 1
176
+         install -m "${mode}" "${i}" "${bin}/$i" || exit 1
179 177
          printf "install: ${C_MAGENTA}${C_BOLD}%s${C_RESET}\n" "$bin/$i" >&2
180 178
       done
181 179
 
... ...
@@ -195,7 +193,7 @@ esac
195 193
 for i in src/mulle*.sh
196 194
 do
197 195
    mkdir -p "${libexec}" 2> /dev/null
198
-   install -v -m "${mode}" "$i" "${libexec}" || exit 1
196
+   install -v -m "${mode}" "${i}" "${libexec}" || exit 1
199 197
 done
200 198
 
201 199
 if [ -d "test" ]
... ...
@@ -1,6 +1,6 @@
1 1
 #! /bin/sh
2 2
 #
3
-#   Copyright (c) 2015 Nat! - Mulle kybernetiK
3
+#   Copyright (c) 2015-2017 Nat! - Mulle kybernetiK
4 4
 #   All rights reserved.
5 5
 #
6 6
 #   Redistribution and use in source and binary forms, with or without
... ...
@@ -28,9 +28,9 @@
28 28
 #   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 29
 #   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 30
 #   POSSIBILITY OF SUCH DAMAGE.
31
-MULLE_BOOTSTRAP_VERSION_MAJOR=2
32
-MULLE_BOOTSTRAP_VERSION_MINOR=6
33
-MULLE_BOOTSTRAP_VERSION_PATCH=1
31
+MULLE_BOOTSTRAP_VERSION_MAJOR=3
32
+MULLE_BOOTSTRAP_VERSION_MINOR=0
33
+MULLE_BOOTSTRAP_VERSION_PATCH=2
34 34
 
35 35
 MULLE_BOOTSTRAP_VERSION="${MULLE_BOOTSTRAP_VERSION_MAJOR}.${MULLE_BOOTSTRAP_VERSION_MINOR}.${MULLE_BOOTSTRAP_VERSION_PATCH}"
36 36
 MULLE_BOOTSTRAP_FAIL_PREFIX="mulle-bootstrap"
... ...
@@ -65,7 +65,7 @@ EOF
65 65
    -l        : be more optimistic and faster
66 66
    -ig       : ignore .repos/.graveyard
67 67
    -te       : trace execution
68
-   -tm       : trace merge and dependency
68
+   -tm       : trace merge and dependencies
69 69
    -ts       : trace scripts
70 70
    -tit      : don't trace settings
71 71
    -tip      : don't trace path functionality
... ...
@@ -113,7 +113,7 @@ ensure_consistency()
113 113
 
114 114
    owd="`pwd -P`"
115 115
 
116
-   if [ -f "${CLONESFETCH_SUBDIR}/.fetch_update_started" ]
116
+   if [ -f "${REPOS_DIR}/.bootstrap_fetch_started" ]
117 117
    then
118 118
       log_error "A previous fetch or update was incomplete.
119 119
 Suggested resolution (in $owd):
... ...
@@ -157,7 +157,7 @@ define_local_keyvalue()
157 157
 
158 158
    local path
159 159
 
160
-   path="${BOOTSTRAP_SUBDIR}.local/${key}"
160
+   path="${BOOTSTRAP_DIR}.local/${key}"
161 161
    mkdir_if_missing "`dirname -- "${path}"`"
162 162
    redirect_exekutor "${path}" echo "# commandline argument -D${keyvalue}
163 163
 ${value}"
... ...
@@ -187,7 +187,7 @@ bootstrap_nomagic_main()
187 187
    # used for option handling only
188 188
    MULLE_BOOTSTRAP_WILL_BUILD="YES"
189 189
 
190
-   warn_scripts_main "${BOOTSTRAP_SUBDIR}" || exit 1
190
+   warn_scripts_main "${BOOTSTRAP_DIR}" || exit 1
191 191
 
192 192
    if fetch_needed
193 193
    then
... ...
@@ -212,22 +212,77 @@ bootstrap_nomagic_main()
212 212
 }
213 213
 
214 214
 
215
+bootstrap_execute_in_master()
216
+{
217
+   local masterpath
218
+
219
+   masterpath="$1"
220
+   shift
221
+
222
+   local master
223
+
224
+   master="`head -1 "${masterpath}" 2>/dev/null`"
225
+   [ -d "${master}" ] || fail "master \"${master}\" is gone ($masterpath)"
226
+
227
+   (
228
+      cd "${master}" && mulle-bootstrap "$@"
229
+   ) || fail "master failed"
230
+}
231
+
232
+
233
+bootstrap_libexec_path()
234
+{
235
+   local exedir
236
+   local exedirpath
237
+   local prefix
238
+   local libexecpath
239
+
240
+   exedir="`dirname "$1"`"
241
+   exedirpath="`( cd "${exedir}" ; pwd -P )`"
242
+   prefix="`dirname "${exedirpath}"`"
243
+   libexecpath="${prefix}/libexec/mulle-bootstrap"
244
+
245
+   if [ ! -x "${libexecpath}/mulle-bootstrap-functions.sh" ]
246
+   then
247
+      libexecpath="${exedirpath}/src"
248
+   fi
249
+
250
+   if [ -x "${libexecpath}/mulle-bootstrap-functions.sh" ]
251
+   then
252
+      echo "${libexecpath}"
253
+   fi
254
+}
255
+
256
+
215 257
 bootstrap_main()
216 258
 {
217 259
    local command
260
+   local libexecpath
261
+
262
+   BOOTSTRAP_DIR=.bootstrap
218 263
 
219
-   BOOTSTRAP_SUBDIR=.bootstrap
264
+   libexecpath="`bootstrap_libexec_path "$0"`"
265
+   if [ -z "${libexecpath}" ]
266
+   then
267
+      echo "could not find libexec for mulle-bootstrap" >&2
268
+      exit 1
269
+   fi
220 270
 
221
-   PATH="/usr/local/libexec/mulle-bootstrap:$PATH"
271
+   PATH="${libexecpath}:$PATH"
222 272
    export PATH
223 273
 
274
+   if [ ! -z "${MULLE_BOOTSTRAP_LIBEXEC_TRACE}" ]
275
+   then
276
+      echo "PATH=$PATH" >&2
277
+   fi
278
+
224 279
    #
225 280
    # shell export commands with minimal
226 281
    # trap setup
227 282
    #
228 283
    case "${1}" in
229 284
       library-path)
230
-         echo "$PATH" | tr ':' '\012' | head -1
285
+         echo "$libexecpath}"
231 286
          exit 0
232 287
       ;;
233 288
 
... ...
@@ -411,10 +466,6 @@ bootstrap_main()
411 466
 
412 467
    local_environment_main
413 468
 
414
-   PATH="`make_executable_search_path "$PATH"`"
415
-   export PATH
416
-
417
-   log_fluff "PATH set to: $PATH"
418 469
 
419 470
    #
420 471
    # some commands only run when we have a .bootstrap folder
... ...
@@ -422,11 +473,44 @@ bootstrap_main()
422 473
    command=${1:-"bootstrap"}
423 474
    [ $# -eq 0 ] || shift
424 475
 
425
-   if [ ! -d "${BOOTSTRAP_SUBDIR}" ]
476
+   if [ ! -d "${BOOTSTRAP_DIR}" ]
426 477
    then
427 478
       case "${command}" in
428
-         bootstrap|nomagic|build|ibuild|refresh|dist|clean|dist-clean|fetch|update|setup-xcode|xcode|tag)
429
-            fail "There is no ${BOOTSTRAP_SUBDIR} folder here, can't continue"
479
+         bootstrap|nomagic|build|refresh|dist|clean|dist-clean|fetch|update|setup-xcode|xcode|tag)
480
+            fail "There is no ${BOOTSTRAP_DIR} folder here, can't continue"
481
+      esac
482
+   fi
483
+
484
+   #
485
+   # if we have a.bootstrap.local/minion file then
486
+   # some commands can't run, and some commands are re-executed in master
487
+   # and some commands (like fetch and clean) are executed locally AND in the
488
+   # master
489
+   #
490
+   local masterpath
491
+
492
+   masterpath="${BOOTSTRAP_DIR}.local/master"
493
+   if [ -e "${masterpath}" ]
494
+   then
495
+      case "${command}" in
496
+         build)
497
+            log_info "Minion .bootstrap: defer to master for execution"
498
+            exec bootstrap_execute_in_master "${masterpath}" "$@"
499
+         ;;
500
+
501
+         fetch|update|refresh|clean|dist-clean)
502
+            log_info "Minion .bootstrap: execute parly in master"
503
+            bootstrap_execute_in_master "${masterpath}" "$@"
504
+            EMBEDDED_ONLY=YES
505
+         ;;
506
+
507
+         git|setup-xcode|xcode|tag|version)
508
+            log_verbose "Minion .bootstrap: execute locally"
509
+         ;;
510
+
511
+         *)
512
+            fail "This is a minion bootstrap project (${minionpath}), can't continue"
513
+         ;;
430 514
       esac
431 515
    fi
432 516
 
... ...
@@ -495,6 +579,7 @@ bootstrap_main()
495 579
 
496 580
       config)
497 581
          . mulle-bootstrap-settings.sh
582
+         . mulle-bootstrap-build-environment.sh
498 583
 
499 584
          MULLE_BOOTSTRAP_FAIL_PREFIX="mulle-bootstrap config"
500 585
          config_main "$@" || exit 1
... ...
@@ -30,18 +30,32 @@
30 30
 #   POSSIBILITY OF SUCH DAMAGE.
31 31
 MULLE_BOOTSTRAP_AUTO_UPDATE_SH="included"
32 32
 
33
+
34
+#
35
+# What auto_update does:
36
+#
37
+# 1. bootstrap_auto_create:
38
+#    1.a. run once to copy roots .bootstrap.local to .bootstrap.auto
39
+#    1.b) augment .bootstrap.local with stuff from .bootstrap
40
+#
41
+# 2. bootstrap_auto_update:
42
+#    2.a) augment .bootstrap.local with stuff from .repos/<name>/.bootstrap
33 43
 #
34
-# MERGE some settings
44
+
35 45
 #
36 46
 # prepend new contents to old contents
37 47
 # of a few select and known files, these are merged with whats there
48
+# `BOOTSTRAP_DIR` is the "root" bootstrap to update
49
+# `directory` can be the inferior bootstrap of a fetched repository
38 50
 #
39
-bootstrap_auto_update_merge()
51
+_bootstrap_auto_update_merge()
40 52
 {
41 53
    local directory
42 54
 
43 55
    directory="$1"
44 56
 
57
+   [ -z "${directory}" ] && internal_fail "wrong"
58
+
45 59
    local srcfile
46 60
    local dstfile
47 61
    local localfile
... ...
@@ -66,7 +80,7 @@ bootstrap_auto_update_merge()
66 80
          continue
67 81
       fi
68 82
 
69
-      localfile="${BOOTSTRAP_SUBDIR}.local/${settingname}"
83
+      localfile="${BOOTSTRAP_DIR}.local/${settingname}"
70 84
 
71 85
       if [ -e "${localfile}" ]
72 86
       then
... ...
@@ -81,10 +95,10 @@ bootstrap_auto_update_merge()
81 95
          continue
82 96
       fi
83 97
 
84
-      dstfile="${BOOTSTRAP_SUBDIR}.auto/${settingname}"
98
+      dstfile="${BOOTSTRAP_DIR}.auto/${settingname}"
85 99
       if [ -f "${dstfile}" ]
86 100
       then
87
-         tmpfile="${BOOTSTRAP_SUBDIR}.auto/${settingname}.tmp"
101
+         tmpfile="${BOOTSTRAP_DIR}.auto/${settingname}.tmp"
88 102
 
89 103
          log_fluff "Merging \"${settingname}\" from \"${srcfile}\""
90 104
 
... ...
@@ -102,7 +116,7 @@ bootstrap_auto_update_merge()
102 116
 }
103 117
 
104 118
 
105
-bootstrap_auto_copy_public_settings()
119
+_bootstrap_auto_copy_public_settings()
106 120
 {
107 121
    local name
108 122
    local directory
... ...
@@ -110,11 +124,13 @@ bootstrap_auto_copy_public_settings()
110 124
    name="$1"
111 125
    directory="$2"
112 126
 
127
+   [ -z "${name}" -o -z "${directory}" ] && internal_fail "wrong"
128
+
113 129
    local srcdir
114 130
    local dstdir
115 131
 
116 132
    srcdir="${directory}/.bootstrap/public_settings"
117
-   dstdir="${BOOTSTRAP_SUBDIR}.auto/${name}"
133
+   dstdir="${BOOTSTRAP_DIR}.auto/${name}"
118 134
 
119 135
    if dir_has_files "${srcdir}"
120 136
    then
... ...
@@ -123,7 +139,7 @@ bootstrap_auto_copy_public_settings()
123 139
 }
124 140
 
125 141
 
126
-bootstrap_auto_update_repo_settings()
142
+_bootstrap_auto_update_repo_settings()
127 143
 {
128 144
    local directory
129 145
 
... ...
@@ -134,7 +150,7 @@ bootstrap_auto_update_repo_settings()
134 150
    local reponame
135 151
 
136 152
    srcdir="${directory}/.bootstrap"
137
-   dstdir="${BOOTSTRAP_SUBDIR}.auto"
153
+   dstdir="${BOOTSTRAP_DIR}.auto"
138 154
 
139 155
    mkdir_if_missing "${dstdir}"
140 156
 
... ...
@@ -165,26 +181,32 @@ bootstrap_auto_update_repo_settings()
165 181
 
166 182
 
167 183
 #
184
+# This function is called periodocally to update .bootstrap.auto with the
185
+# contents of fetched repository .bootstraps
186
+#
187
+# `BOOTSTRAP_DIR` is the "root" bootstrap to update
188
+# `directory` the fetched repository
168 189
 # return 0, if something changed
169 190
 #
170 191
 bootstrap_auto_update()
171 192
 {
172 193
    local name
173
-   local url
174 194
    local directory
175 195
 
176 196
    name="$1"
177
-   url="$2"
178
-   directory="$3"
197
+   directory="$2"
179 198
 
180
-   [ -z "${directory}" ]         && internal_fail "src was empty"
199
+   [ -z "${BOOTSTRAP_DIR}" ]     && internal_fail "BOOTSTRAP_DIR was empty"
200
+   [ -z "${directory}" ]         && internal_fail "directory was empty"
181 201
    [ "${PWD}" = "${directory}" ] && internal_fail "configuration error"
182 202
 
183 203
    if [ "$MULLE_BOOTSTRAP_TRACE_MERGE" = "YES" ]
184 204
    then
185
-      log_trace2 "bootstrap.auto: ${name}"
205
+      log_trace2 "bootstrap.auto: ${name} from ${directory}"
186 206
    fi
187 207
 
208
+   log_verbose "Auto update \"${name}\" settings ($directory)"
209
+
188 210
    # contains own bootstrap ? and not a symlink
189 211
    if [ ! -d "${directory}/.bootstrap" ] # -a ! -L "${dst}" ]
190 212
    then
... ...
@@ -192,38 +214,47 @@ bootstrap_auto_update()
192 214
       return 1
193 215
    fi
194 216
 
195
-   log_verbose "Updating .bootstrap.auto with ${directory}"
217
+   log_verbose "Updating .bootstrap.auto with ${directory}/.bootstrap ($PWD)"
196 218
 
197 219
    log_fluff "Acquiring \"${name}\" merge settings"
198
-   bootstrap_auto_update_merge "${directory}"
220
+   _bootstrap_auto_update_merge "${directory}"
199 221
 
200 222
    log_fluff "Acquiring \"${name}\" public settings"
201
-   bootstrap_auto_copy_public_settings "${name}" "${directory}"
223
+   _bootstrap_auto_copy_public_settings "${name}" "${directory}"
202 224
 
203 225
    log_fluff "Acquiring \"${name}\" repo settings"
204
-   bootstrap_auto_update_repo_settings "${directory}"
226
+   _bootstrap_auto_update_repo_settings "${directory}"
227
+
228
+   log_fluff "Acquisiton of \"${name}\" settings complete"
205 229
 
206
-   log_fluff "Acquisiton of \"${name}\" complete"
207 230
    return 0
208 231
 }
209 232
 
233
+
234
+#
235
+# This function is called initially to setup .bootstrap.auto before
236
+# doing anything else. It is clear that .bootstrap.auto does not exist
210 237
 #
211 238
 # copy contents of .bootstrap.local to .bootstrap.auto
212 239
 # them add contents of .bootstrap to .bootstrap.auto, if not present
213 240
 #
214 241
 bootstrap_auto_create()
215 242
 {
216
-   log_verbose "Creating .bootstrap.auto from .bootstrap and .bootstrap.local"
243
+   [ -z "${BOOTSTRAP_DIR}" ] && internal_fail "empty bootstrap"
244
+   [ -d "${BOOTSTRAP_DIR}.auto" ] && internal_fail "${BOOTSTRAP_DIR}.auto already exists"
217 245
 
218
-   [ -z "${BOOTSTRAP_SUBDIR}" ] && internal_fail "empty bootstrap"
246
+   log_verbose "Creating .bootstrap.auto from ${BOOTSTRAP_DIR} (`pwd -P`)"
219 247
 
220 248
    assert_mulle_bootstrap_version
221 249
 
222
-   mkdir_if_missing "${BOOTSTRAP_SUBDIR}.auto"
250
+   mkdir_if_missing "${BOOTSTRAP_DIR}.auto"
223 251
 
224
-   if dir_has_files "${BOOTSTRAP_SUBDIR}.local"
252
+   #
253
+   # Copy over .local verbatim
254
+   #
255
+   if dir_has_files "${BOOTSTRAP_DIR}.local"
225 256
    then
226
-      exekutor cp -Ra "${BOOTSTRAP_SUBDIR}.local/" "${BOOTSTRAP_SUBDIR}.auto/"
257
+      exekutor cp -Ra "${BOOTSTRAP_DIR}.local/" "${BOOTSTRAP_DIR}.auto/"
227 258
    fi
228 259
 
229 260
    #
... ...
@@ -237,7 +268,7 @@ bootstrap_auto_create()
237 268
    [ -z "${DEFAULT_IFS}" ] && internal_fail "IFS fail"
238 269
    IFS="
239 270
 "
240
-   for file in `ls -1 "${BOOTSTRAP_SUBDIR}"`
271
+   for file in `ls -1 "${BOOTSTRAP_DIR}"`
241 272
    do
242 273
       IFS="${DEFAULT_IFS}"
243 274
       name="`basename -- "${file}"`"
... ...
@@ -248,11 +279,11 @@ bootstrap_auto_create()
248 279
          ;;
249 280
 
250 281
          public_settings)
251
-            exekutor cp -Ran "${BOOTSTRAP_SUBDIR}/public_settings/" "${BOOTSTRAP_SUBDIR}.auto/settings"
282
+            exekutor cp -Ran "${BOOTSTRAP_DIR}/public_settings/" "${BOOTSTRAP_DIR}.auto/settings"
252 283
          ;;
253 284
 
254 285
          *)
255
-            exekutor cp -Ran "${BOOTSTRAP_SUBDIR}/${name}" "${BOOTSTRAP_SUBDIR}.auto/"
286
+            exekutor cp -Ran "${BOOTSTRAP_DIR}/${name}" "${BOOTSTRAP_DIR}.auto/"
256 287
          ;;
257 288
       esac
258 289
    done
... ...
@@ -41,14 +41,14 @@ MULLE_BOOTSTRAP_BREW_SH="included"
41 41
 #    directory
42 42
 #
43 43
 
44
-BREW="${ADDICTION_SUBDIR}/bin/brew"
44
+BREW="${ADDICTIONS_DIR}/bin/brew"
45 45
 
46 46
 
47 47
 touch_last_update()
48 48
 {
49 49
    local last_update
50 50
 
51
-   last_update="${ADDICTION_SUBDIR}/.last_update"
51
+   last_update="${ADDICTIONS_DIR}/.last_update"
52 52
    log_fluff "Touching ${last_update}"
53 53
    exekutor touch "${last_update}"
54 54
 }
... ...
@@ -64,16 +64,16 @@ fetch_brew_if_needed()
64 64
    case "${UNAME}" in
65 65
       darwin)
66 66
          log_info "Installing OS X brew"
67
-         exekutor git clone https://github.com/Homebrew/brew.git "${ADDICTION_SUBDIR}"
67
+         exekutor git clone https://github.com/Homebrew/brew.git "${ADDICTIONS_DIR}"
68 68
          ;;
69 69
 
70 70
       linux)
71 71
          log_info "Installing Linux brew"
72
-         exekutor git clone https://github.com/Linuxbrew/brew.git "${ADDICTION_SUBDIR}"
72
+         exekutor git clone https://github.com/Linuxbrew/brew.git "${ADDICTIONS_DIR}"
73 73
          ;;
74 74
 
75 75
       *)
76
-         log_fail "Missing brew support for ${UNAME}"
76
+         fail "Missing brew support for ${UNAME}"
77 77
          ;;
78 78
    esac
79 79
 
... ...
@@ -78,6 +78,58 @@ build_complete_environment()
78 78
 }
79 79
 
80 80
 
81
+make_executable_search_path()
82
+{
83
+   local path
84
+   local dependencies
85
+   local addictions
86
+
87
+   path="$1"
88
+   dependencies="$2"
89
+   addictions="$3"
90
+
91
+   #
92
+   #
93
+   #
94
+   local new_path
95
+   local tail_path
96
+
97
+   tail_path=""
98
+   new_path=""
99
+   addictions="`realpath "${addictions}"`"
100
+   dependencies="`realpath "${dependencies}"`"
101
+
102
+   tail_path="`add_path "${tail_path}" "${dependencies}/bin"`"
103
+   tail_path="`add_path "${tail_path}" "${addictions}/bin"`"
104
+
105
+   local i
106
+   local oldifs
107
+
108
+   oldifs="$IFS"
109
+   IFS=":"
110
+
111
+   for i in $path
112
+   do
113
+      IFS="${oldifs}"
114
+
115
+      # shims stay in front (homebrew)
116
+      case "$i" in
117
+         */shims/*)
118
+            new_path="`add_path "${new_path}" "$i"`"
119
+         ;;
120
+
121
+         *)
122
+            tail_path="`add_path "${tail_path}" "$i"`"
123
+         ;;
124
+      esac
125
+   done
126
+
127
+   IFS="${oldifs}"
128
+
129
+   add_path "${new_path}" "${tail_path}"
130
+}
131
+
132
+
81 133
 build_environment_initialize()
82 134
 {
83 135
    log_fluff ":build_environment_initialize:"
... ...
@@ -85,11 +137,20 @@ build_environment_initialize()
85 137
    [ -z "${MULLE_BOOTSTRAP_LOCAL_ENVIRONMENT_SH}" ] && . mulle-bootstrap-local-environment.sh
86 138
    [ -z "${MULLE_BOOTSTRAP_SETTINGS_SH}" ] && . mulle-bootstrap-settings.sh
87 139
 
88
-   CLONESBUILD_SUBDIR=`read_sane_config_path_setting "build_foldername" "${RELATIVE_ROOT}build/.repos"`
89
-   BUILDLOG_SUBDIR=`read_sane_config_path_setting "build_log_foldername" "${CLONESBUILD_SUBDIR}/.logs"`
140
+   CLONESBUILD_SUBDIR="`read_sane_config_path_setting "build_foldername" "build/.repos"`"
141
+   BUILDLOG_SUBDIR="`read_sane_config_path_setting "build_log_foldername" "${CLONESBUILD_SUBDIR}/.logs"`"
142
+   DEPENDENCIES_DIR="`read_sane_config_path_setting "dependency_dir" "dependencies"`"
143
+   ADDICTIONS_DIR="`read_sane_config_path_setting "addictions_dir" "addictions"`"
144
+
145
+   [ -z "${CLONESBUILD_SUBDIR}" ] && internal_fail "variable CLONESBUILD_SUBDIR is empty"
146
+   [ -z "${BUILDLOG_SUBDIR}" ]    && internal_fail "variable BUILDLOG_SUBDIR is empty"
147
+   [ -z "${DEPENDENCIES_DIR}" ]     && internal_fail "variable DEPENDENCIES_DIR is empty"
148
+   [ -z "${ADDICTIONS_DIR}" ]      && internal_fail "variable ADDICTIONS_DIR is empty"
149
+
150
+   PATH="`make_executable_search_path "$PATH" "${DEPENDENCIES_DIR}" "${ADDICTIONS_DIR}"`"
151
+   export PATH
90 152
 
91
-   [ -z "${CLONESBUILD_SUBDIR}" ]   && internal_fail "variable CLONESBUILD_SUBDIR is empty"
92
-   [ -z "${BUILDLOG_SUBDIR}" ]      && internal_fail "variable BUILDLOG_SUBDIR is empty"
153
+   log_fluff "PATH set to: $PATH"
93 154
 
94 155
    #
95 156
    # Global Settings
... ...
@@ -72,7 +72,7 @@ EOF
72 72
    You can optionally specify the names of the repositories to build.
73 73
    Currently available names are:
74 74
 EOF
75
-   (cd "${CLONES_SUBDIR}" ; ls -1 ) 2> /dev/null
75
+   (cd "${REPOS_DIR}" ; ls -1 ) 2> /dev/null
76 76
 
77 77
    exit 1
78 78
 }
... ...
@@ -103,7 +103,7 @@ dispense_headers()
103 103
       then
104 104
          headerpath="`read_build_setting "${name}" "dispense_headers_path" "/${HEADER_DIR_NAME}"`"
105 105
 
106
-         dst="${REFERENCE_DEPENDENCY_SUBDIR}${headerpath}"
106
+         dst="${REFERENCE_DEPENDENCIES_DIR}${headerpath}"
107 107
          mkdir_if_missing "${dst}"
108 108
 
109 109
          # this fails with more nested header set ups, need to fix!
... ...
@@ -151,7 +151,7 @@ dispense_binaries()
151 151
    then
152 152
       if dir_has_files "${src}"
153 153
       then
154
-         dst="${REFERENCE_DEPENDENCY_SUBDIR}${depend_subdir}${subpath}"
154
+         dst="${REFERENCE_DEPENDENCIES_DIR}${depend_subdir}${subpath}"
155 155
 
156 156
          log_fluff "Copying \"${src}\" to \"${dst}\""
157 157
          mkdir_if_missing "${dst}"
... ...
@@ -201,53 +201,53 @@ collect_and_dispense_product()
201 201
 
202 202
       # cmake
203 203
 
204
-      src="${BUILD_DEPENDENCY_SUBDIR}/usr/local/include"
204
+      src="${BUILD_DEPENDENCIES_DIR}/usr/local/include"
205 205
       dispense_headers "${name}" "${src}"
206 206
 
207
-      src="${BUILD_DEPENDENCY_SUBDIR}/usr/local/lib"
207
+      src="${BUILD_DEPENDENCIES_DIR}/usr/local/lib"
208 208
       dispense_binaries "${name}" "${src}" "f" "${depend_subdir}" "/${LIBRARY_DIR_NAME}"
209 209
 
210 210
       # pretty much xcodetool specific
211 211
 
212
-      src="${BUILD_DEPENDENCY_SUBDIR}/usr/include"
212
+      src="${BUILD_DEPENDENCIES_DIR}/usr/include"
213 213
       dispense_headers "${name}" "${src}"
214 214
 
215
-      src="${BUILD_DEPENDENCY_SUBDIR}/include"
215
+      src="${BUILD_DEPENDENCIES_DIR}/include"
216 216
       dispense_headers "${name}" "${src}"
217 217
 
218
-      src="${BUILD_DEPENDENCY_SUBDIR}${build_subdir}/lib"
218
+      src="${BUILD_DEPENDENCIES_DIR}${build_subdir}/lib"
219 219
       dispense_binaries "${name}" "${src}" "f" "${depend_subdir}" "/${LIBRARY_DIR_NAME}"
220 220
 
221
-      src="${BUILD_DEPENDENCY_SUBDIR}${build_subdir}/Library/Frameworks"
221
+      src="${BUILD_DEPENDENCIES_DIR}${build_subdir}/Library/Frameworks"
222 222
       dispense_binaries "${name}" "${src}" "d" "${depend_subdir}" "/${FRAMEWORK_DIR_NAME}"
223 223
 
224
-      src="${BUILD_DEPENDENCY_SUBDIR}${build_subdir}/Frameworks"
224
+      src="${BUILD_DEPENDENCIES_DIR}${build_subdir}/Frameworks"
225 225
       dispense_binaries "${name}" "${src}" "d" "${depend_subdir}" "/${FRAMEWORK_DIR_NAME}"
226 226
 
227
-      src="${BUILD_DEPENDENCY_SUBDIR}${build_subdir}/Library/Frameworks"
227
+      src="${BUILD_DEPENDENCIES_DIR}${build_subdir}/Library/Frameworks"
228 228
       dispense_binaries "${name}" "${src}" "d" "${depend_subdir}" "/${FRAMEWORK_DIR_NAME}"
229 229
 
230
-      src="${BUILD_DEPENDENCY_SUBDIR}${build_subdir}/Frameworks"
230
+      src="${BUILD_DEPENDENCIES_DIR}${build_subdir}/Frameworks"
231 231
       dispense_binaries "${name}" "${src}" "d" "${depend_subdir}" "/${FRAMEWORK_DIR_NAME}"
232 232
 
233
-      src="${BUILD_DEPENDENCY_SUBDIR}/Library/Frameworks"
233
+      src="${BUILD_DEPENDENCIES_DIR}/Library/Frameworks"
234 234
       dispense_binaries "${name}" "${src}" "d"  "${depend_subdir}" "/${FRAMEWORK_DIR_NAME}"
235 235
 
236
-      src="${BUILD_DEPENDENCY_SUBDIR}/Frameworks"
236
+      src="${BUILD_DEPENDENCIES_DIR}/Frameworks"
237 237
       dispense_binaries "${name}" "${src}" "d" "${depend_subdir}" "/${FRAMEWORK_DIR_NAME}"
238 238
    fi
239 239
 
240 240
    #
241 241
    # Delete empty dirs if so
242 242
    #
243
-   src="${BUILD_DEPENDENCY_SUBDIR}/usr/local"
243
+   src="${BUILD_DEPENDENCIES_DIR}/usr/local"
244 244
    dir_has_files "${src}"
245 245
    if [ $? -ne 0 ]
246 246
    then
247 247
       rmdir_safer "${src}"
248 248
    fi
249 249
 
250
-   src="${BUILD_DEPENDENCY_SUBDIR}/usr"
250
+   src="${BUILD_DEPENDENCIES_DIR}/usr"
251 251
    dir_has_files "${src}"
252 252
    if [ $? -ne 0 ]
253 253
    then
... ...
@@ -264,9 +264,9 @@ collect_and_dispense_product()
264 264
 
265 265
       usrlocal="`read_build_setting "${name}" "dispense_other_path" "/usr/local"`"
266 266
 
267
-      log_fluff "Considering copying ${BUILD_DEPENDENCY_SUBDIR}/*"
267
+      log_fluff "Considering copying ${BUILD_DEPENDENCIES_DIR}/*"
268 268
 
269
-      src="${BUILD_DEPENDENCY_SUBDIR}"
269
+      src="${BUILD_DEPENDENCIES_DIR}"
270 270
       if [ "${wasxcode}" = "YES" ]
271 271
       then
272 272
          src="${src}${build_subdir}"
... ...
@@ -274,7 +274,7 @@ collect_and_dispense_product()
274 274
 
275 275
       if dir_has_files "${src}"
276 276
       then
277
-         dst="${REFERENCE_DEPENDENCY_SUBDIR}${usrlocal}"
277
+         dst="${REFERENCE_DEPENDENCIES_DIR}${usrlocal}"
278 278
 
279 279
          log_fluff "Copying everything from \"${src}\" to \"${dst}\""
280 280
          exekutor find "${src}" -xdev -mindepth 1 -maxdepth 1 -print0 | \
... ...
@@ -284,17 +284,17 @@ collect_and_dispense_product()
284 284
 
285 285
       if [ "$MULLE_BOOTSTRAP_VERBOSE" = "YES"  ]
286 286
       then
287
-         if dir_has_files "${BUILD_DEPENDENCY_SUBDIR}"
287
+         if dir_has_files "${BUILD_DEPENDENCIES_DIR}"
288 288
          then
289 289
             log_fluff "Directory \"${dst}\" contained files after collect and dispense"
290 290
             log_fluff "--------------------"
291
-            ( cd "${BUILD_DEPENDENCY_SUBDIR}" ; ls -lR >&2 )
291
+            ( cd "${BUILD_DEPENDENCIES_DIR}" ; ls -lR >&2 )
292 292
             log_fluff "--------------------"
293 293
          fi
294 294
       fi
295 295
    fi
296 296
 
297
-   rmdir_safer "${BUILD_DEPENDENCY_SUBDIR}"
297
+   rmdir_safer "${BUILD_DEPENDENCIES_DIR}"
298 298
 
299 299
    log_fluff "Done collecting and dispensing product"
300 300
    log_fluff
... ...
@@ -308,9 +308,9 @@ enforce_build_sanity()
308 308
    builddir="$1"
309 309
 
310 310
    # these must not exist
311
-   if [ -d "${BUILD_DEPENDENCY_SUBDIR}" ]
311
+   if [ -d "${BUILD_DEPENDENCIES_DIR}" ]
312 312
    then
313
-      fail "A previous build left \"${BUILD_DEPENDENCY_SUBDIR}\", can't continue"
313
+      fail "A previous build left \"${BUILD_DEPENDENCIES_DIR}\", can't continue"
314 314
    fi
315 315
 }
316 316
 
... ...
@@ -397,16 +397,16 @@ create_dummy_dirs_against_warnings()
397 397
    owd="${PWD}"
398 398
 
399 399
    # to avoid warnings, make sure directories are all there
400
-   mkdir_if_missing "${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${HEADER_DIR_NAME}"
400
+   mkdir_if_missing "${owd}/${REFERENCE_DEPENDENCIES_DIR}/${HEADER_DIR_NAME}"
401 401
 
402
-   mkdir_if_missing "${owd}/${REFERENCE_ADDICTION_SUBDIR}${mappedsubdir}/${LIBRARY_DIR_NAME}"
403
-   mkdir_if_missing "${owd}/${REFERENCE_ADDICTION_SUBDIR}${mappedsubdir}/${FRAMEWORK_DIR_NAME}"
402
+   mkdir_if_missing "${owd}/${REFERENCE_ADDICTIONS_DIR}${mappedsubdir}/${LIBRARY_DIR_NAME}"
403
+   mkdir_if_missing "${owd}/${REFERENCE_ADDICTIONS_DIR}${mappedsubdir}/${FRAMEWORK_DIR_NAME}"
404 404
 
405
-   mkdir_if_missing "${owd}/${REFERENCE_DEPENDENCY_SUBDIR}${suffixsubdir}/${LIBRARY_DIR_NAME}"
406
-   mkdir_if_missing "${owd}/${REFERENCE_DEPENDENCY_SUBDIR}${suffixsubdir}/${FRAMEWORK_DIR_NAME}"
405
+   mkdir_if_missing "${owd}/${REFERENCE_DEPENDENCIES_DIR}${suffixsubdir}/${LIBRARY_DIR_NAME}"
406
+   mkdir_if_missing "${owd}/${REFERENCE_DEPENDENCIES_DIR}${suffixsubdir}/${FRAMEWORK_DIR_NAME}"
407 407
 
408
-   mkdir_if_missing "${owd}/${REFERENCE_DEPENDENCY_SUBDIR}${mappedsubdir}/${LIBRARY_DIR_NAME}"
409
-   mkdir_if_missing "${owd}/${REFERENCE_DEPENDENCY_SUBDIR}${mappedsubdir}/${FRAMEWORK_DIR_NAME}"
408
+   mkdir_if_missing "${owd}/${REFERENCE_DEPENDENCIES_DIR}${mappedsubdir}/${LIBRARY_DIR_NAME}"
409
+   mkdir_if_missing "${owd}/${REFERENCE_DEPENDENCIES_DIR}${mappedsubdir}/${FRAMEWORK_DIR_NAME}"
410 410
 }
411 411
 
412 412
 
... ...
@@ -556,7 +556,7 @@ find_compiler()
556 556
    compiler="`read_build_setting "${name}" "${compiler_name}"`"
557 557
    if [ -z "${compiler}" ]
558 558
    then
559
-      file="${CLONESFETCH_SUBDIR}/${name}/.${compiler_name}"
559
+      file="${REPOS_DIR}/${name}/.${compiler_name}"
560 560
       compiler="`cat "${file}" 2>/dev/null`"
561 561
       if [  ! -z "${compiler}" ]
562 562
       then
... ...
@@ -793,30 +793,30 @@ ${C_MAGENTA}${C_BOLD}${sdk}${C_INFO} in \"${builddir}\" ..."
793 793
 
794 794
       if [ ! -z "${suffixsubdir}" ]
795 795
       then
796
-         frameworklines="`add_cmake_path "${frameworklines}" "${nativewd}/${REFERENCE_DEPENDENCY_SUBDIR}${suffixsubdir}/${FRAMEWORK_DIR_NAME}"`"
797
-         librarylines="`add_cmake_path "${librarylines}" "${nativewd}/${REFERENCE_DEPENDENCY_SUBDIR}${suffixsubdir}/${LIBRARY_DIR_NAME}"`"
796
+         frameworklines="`add_cmake_path "${frameworklines}" "${nativewd}/${REFERENCE_DEPENDENCIES_DIR}${suffixsubdir}/${FRAMEWORK_DIR_NAME}"`"
797
+         librarylines="`add_cmake_path "${librarylines}" "${nativewd}/${REFERENCE_DEPENDENCIES_DIR}${suffixsubdir}/${LIBRARY_DIR_NAME}"`"
798 798
       fi
799 799
 
800 800
       if [ ! -z "${mappedsubdir}" -a "${mappedsubdir}" != "${suffixsubdir}" ]
801 801
       then
802
-         frameworklines="`add_cmake_path "${frameworklines}" "${nativewd}/${REFERENCE_DEPENDENCY_SUBDIR}${mappedsubdir}/${FRAMEWORK_DIR_NAME}"`"
803
-         librarylines="`add_cmake_path "${librarylines}" "${nativewd}/${REFERENCE_DEPENDENCY_SUBDIR}${mappedsubdir}/${LIBRARY_DIR_NAME}"`"
802
+         frameworklines="`add_cmake_path "${frameworklines}" "${nativewd}/${REFERENCE_DEPENDENCIES_DIR}${mappedsubdir}/${FRAMEWORK_DIR_NAME}"`"
803
+         librarylines="`add_cmake_path "${librarylines}" "${nativewd}/${REFERENCE_DEPENDENCIES_DIR}${mappedsubdir}/${LIBRARY_DIR_NAME}"`"
804 804
       fi
805 805
 
806 806
       if [ ! -z "${fallbacksubdir}" -a "${fallbacksubdir}" != "${suffixsubdir}" -a "${fallbacksubdir}" != "${mappedsubdir}" ]
807 807
       then
808
-         frameworklines="`add_cmake_path "${frameworklines}" "${nativewd}/${REFERENCE_DEPENDENCY_SUBDIR}${fallbacksubdir}/${FRAMEWORK_DIR_NAME}"`"
809
-         librarylines="`add_cmake_path "${librarylines}" "${nativewd}/${REFERENCE_DEPENDENCY_SUBDIR}${fallbacksubdir}/${LIBRARY_DIR_NAME}"`"
808
+         frameworklines="`add_cmake_path "${frameworklines}" "${nativewd}/${REFERENCE_DEPENDENCIES_DIR}${fallbacksubdir}/${FRAMEWORK_DIR_NAME}"`"
809
+         librarylines="`add_cmake_path "${librarylines}" "${nativewd}/${REFERENCE_DEPENDENCIES_DIR}${fallbacksubdir}/${LIBRARY_DIR_NAME}"`"
810 810
       fi
811 811
 
812
-      includelines="`add_cmake_path "${includelines}" "${nativewd}/${REFERENCE_DEPENDENCY_SUBDIR}/${HEADER_DIR_NAME}"`"
813
-      includelines="`add_cmake_path "${includelines}" "${nativewd}/${REFERENCE_ADDICTION_SUBDIR}/${HEADER_DIR_NAME}"`"
812
+      includelines="`add_cmake_path "${includelines}" "${nativewd}/${REFERENCE_DEPENDENCIES_DIR}/${HEADER_DIR_NAME}"`"
813
+      includelines="`add_cmake_path "${includelines}" "${nativewd}/${REFERENCE_ADDICTIONS_DIR}/${HEADER_DIR_NAME}"`"
814 814
 
815
-      librarylines="`add_cmake_path "${librarylines}" "${nativewd}/${REFERENCE_DEPENDENCY_SUBDIR}/${LIBRARY_DIR_NAME}"`"
816
-      librarylines="`add_cmake_path "${librarylines}" "${nativewd}/${REFERENCE_ADDICTION_SUBDIR}/${LIBRARY_DIR_NAME}"`"
815
+      librarylines="`add_cmake_path "${librarylines}" "${nativewd}/${REFERENCE_DEPENDENCIES_DIR}/${LIBRARY_DIR_NAME}"`"
816
+      librarylines="`add_cmake_path "${librarylines}" "${nativewd}/${REFERENCE_ADDICTIONS_DIR}/${LIBRARY_DIR_NAME}"`"
817 817
 
818
-      frameworklines="`add_cmake_path "${frameworklines}" "${nativewd}/${REFERENCE_DEPENDENCY_SUBDIR}/${FRAMEWORK_DIR_NAME}"`"
819
-      frameworklines="`add_cmake_path "${frameworklines}" "${nativewd}/${REFERENCE_ADDICTION_SUBDIR}/${FRAMEWORK_DIR_NAME}"`"
818
+      frameworklines="`add_cmake_path "${frameworklines}" "${nativewd}/${REFERENCE_DEPENDENCIES_DIR}/${FRAMEWORK_DIR_NAME}"`"
819
+      frameworklines="`add_cmake_path "${frameworklines}" "${nativewd}/${REFERENCE_ADDICTIONS_DIR}/${FRAMEWORK_DIR_NAME}"`"
820 820
 
821 821
       if [ "${ADD_USR_LOCAL}" = "YES" ]
822 822
       then
... ...
@@ -832,9 +832,9 @@ ${C_MAGENTA}${C_BOLD}${sdk}${C_INFO} in \"${builddir}\" ..."
832 832
 
833 833
       relative_srcdir="`relative_path_between "${owd}/${srcdir}" "${PWD}"`"
834 834
 
835
-      prefixbuild="`add_cmake_path "${prefixbuild}" "${nativewd}/${BUILD_DEPENDENCY_SUBDIR}"`"
836
-      dependenciesdir="`add_cmake_path "${dependenciesdir}" "${nativewd}/${REFERENCE_DEPENDENCY_SUBDIR}"`"
837
-      addictionsdir="`add_cmake_path "${addictionsdir}" "${nativewd}/${REFERENCE_ADDICTION_SUBDIR}"`"
835
+      prefixbuild="`add_cmake_path "${prefixbuild}" "${nativewd}/${BUILD_DEPENDENCIES_DIR}"`"
836
+      dependenciesdir="`add_cmake_path "${dependenciesdir}" "${nativewd}/${REFERENCE_DEPENDENCIES_DIR}"`"
837
+      addictionsdir="`add_cmake_path "${addictionsdir}" "${nativewd}/${REFERENCE_ADDICTIONS_DIR}"`"
838 838
 
839 839
 #      cmakemodulepath="\${CMAKE_MODULE_PATH}"
840 840
 #      if [ ! -z "${CMAKE_MODULE_PATH}" ]
... ...
@@ -1083,30 +1083,30 @@ ${C_MAGENTA}${C_BOLD}${sdk}${C_INFO} in \"${builddir}\" ..."
1083 1083
 
1084 1084
       if [ ! -z "${suffixsubdir}" ]
1085 1085
       then
1086
-         frameworklines="`add_path "${frameworklines}" "${nativewd}/${REFERENCE_DEPENDENCY_SUBDIR}${suffixsubdir}/${FRAMEWORK_DIR_NAME}"`"
1087
-         librarylines="`add_path "${librarylines}" "${nativewd}/${REFERENCE_DEPENDENCY_SUBDIR}${suffixsubdir}/${LIBRARY_DIR_NAME}"`"
1086
+         frameworklines="`add_path "${frameworklines}" "${nativewd}/${REFERENCE_DEPENDENCIES_DIR}${suffixsubdir}/${FRAMEWORK_DIR_NAME}"`"
1087
+         librarylines="`add_path "${librarylines}" "${nativewd}/${REFERENCE_DEPENDENCIES_DIR}${suffixsubdir}/${LIBRARY_DIR_NAME}"`"
1088 1088
       fi
1089 1089
 
1090 1090
       if [ ! -z "${mappedsubdir}" -a "${mappedsubdir}" != "${suffixsubdir}" ]
1091 1091
       then
1092
-         frameworklines="`add_path "${frameworklines}" "${nativewd}/${REFERENCE_DEPENDENCY_SUBDIR}${mappedsubdir}/${FRAMEWORK_DIR_NAME}"`"
1093
-         librarylines="`add_path "${librarylines}" "${nativewd}/${REFERENCE_DEPENDENCY_SUBDIR}${mappedsubdir}/${LIBRARY_DIR_NAME}"`"
1092
+         frameworklines="`add_path "${frameworklines}" "${nativewd}/${REFERENCE_DEPENDENCIES_DIR}${mappedsubdir}/${FRAMEWORK_DIR_NAME}"`"
1093
+         librarylines="`add_path "${librarylines}" "${nativewd}/${REFERENCE_DEPENDENCIES_DIR}${mappedsubdir}/${LIBRARY_DIR_NAME}"`"
1094 1094
       fi
1095 1095
 
1096 1096
       if [ ! -z "${fallbacksubdir}" -a "${fallbacksubdir}" != "${suffixsubdir}" -a "${fallbacksubdir}" != "${mappedsubdir}" ]
1097 1097
       then
1098
-         frameworklines="`add_path "${frameworklines}" "${nativewd}/${REFERENCE_DEPENDENCY_SUBDIR}${fallbacksubdir}/${FRAMEWORK_DIR_NAME}"`"
1099
-         librarylines="`add_path "${librarylines}" "${nativewd}/${REFERENCE_DEPENDENCY_SUBDIR}${fallbacksubdir}/${LIBRARY_DIR_NAME}"`"
1098
+         frameworklines="`add_path "${frameworklines}" "${nativewd}/${REFERENCE_DEPENDENCIES_DIR}${fallbacksubdir}/${FRAMEWORK_DIR_NAME}"`"
1099
+         librarylines="`add_path "${librarylines}" "${nativewd}/${REFERENCE_DEPENDENCIES_DIR}${fallbacksubdir}/${LIBRARY_DIR_NAME}"`"
1100 1100
       fi
1101 1101
 
1102
-      includelines="`add_path "${includelines}" "${nativewd}/${REFERENCE_DEPENDENCY_SUBDIR}/${HEADER_DIR_NAME}"`"
1103
-      includelines="`add_path "${includelines}" "${nativewd}/${REFERENCE_ADDICTION_SUBDIR}/${HEADER_DIR_NAME}"`"
1102
+      includelines="`add_path "${includelines}" "${nativewd}/${REFERENCE_DEPENDENCIES_DIR}/${HEADER_DIR_NAME}"`"
1103
+      includelines="`add_path "${includelines}" "${nativewd}/${REFERENCE_ADDICTIONS_DIR}/${HEADER_DIR_NAME}"`"
1104 1104
 
1105
-      librarylines="`add_path "${librarylines}" "${nativewd}/${REFERENCE_DEPENDENCY_SUBDIR}/${LIBRARY_DIR_NAME}"`"
1106
-      librarylines="`add_path "${librarylines}" "${nativewd}/${REFERENCE_ADDICTION_SUBDIR}/${LIBRARY_DIR_NAME}"`"
1105
+      librarylines="`add_path "${librarylines}" "${nativewd}/${REFERENCE_DEPENDENCIES_DIR}/${LIBRARY_DIR_NAME}"`"
1106
+      librarylines="`add_path "${librarylines}" "${nativewd}/${REFERENCE_ADDICTIONS_DIR}/${LIBRARY_DIR_NAME}"`"
1107 1107
 
1108
-      frameworklines="`add_path "${frameworklines}" "${nativewd}/${REFERENCE_DEPENDENCY_SUBDIR}/${FRAMEWORK_DIR_NAME}"`"
1109
-      frameworklines="`add_path "${frameworklines}" "${nativewd}/${REFERENCE_ADDICTION_SUBDIR}/${FRAMEWORK_DIR_NAME}"`"
1108
+      frameworklines="`add_path "${frameworklines}" "${nativewd}/${REFERENCE_DEPENDENCIES_DIR}/${FRAMEWORK_DIR_NAME}"`"
1109
+      frameworklines="`add_path "${frameworklines}" "${nativewd}/${REFERENCE_ADDICTIONS_DIR}/${FRAMEWORK_DIR_NAME}"`"
1110 1110
 
1111 1111
       if [ "${ADD_USR_LOCAL}" = "YES" ]
1112 1112
       then
... ...
@@ -1119,9 +1119,9 @@ ${C_MAGENTA}${C_BOLD}${sdk}${C_INFO} in \"${builddir}\" ..."
1119 1119
       local addictionsdir
1120 1120
       #local linker
1121 1121
 
1122
-      pathrefixbuild="`add_path "${prefixbuild}" "${nativewd}/${BUILD_DEPENDENCY_SUBDIR}"`"
1123
-      dependenciesdir="`add_path "${dependenciesdir}" "${nativewd}/${REFERENCE_DEPENDENCY_SUBDIR}"`"
1124
-      addictionsdir="`add_path "${addictionsdir}" "${nativewd}/${REFERENCE_ADDICTION_SUBDIR}"`"
1122
+      pathrefixbuild="`add_path "${prefixbuild}" "${nativewd}/${BUILD_DEPENDENCIES_DIR}"`"
1123
+      dependenciesdir="`add_path "${dependenciesdir}" "${nativewd}/${REFERENCE_DEPENDENCIES_DIR}"`"
1124
+      addictionsdir="`add_path "${addictionsdir}" "${nativewd}/${REFERENCE_ADDICTIONS_DIR}"`"
1125 1125
 
1126 1126
       case "${UNAME}" in
1127 1127
          darwin)
... ...
@@ -1423,7 +1423,7 @@ ${C_MAGENTA}${C_BOLD}${sdk}${C_INFO}${info} in \
1423 1423
          schemename="${targetname}"
1424 1424
          targetname=
1425 1425
       else
1426
-         echo "Please specify a scheme to compile in ${BOOTSTRAP_SUBDIR}/${name}/SCHEME for xctool" >& 2
1426
+         echo "Please specify a scheme to compile in ${BOOTSTRAP_DIR}/${name}/SCHEME for xctool" >& 2
1427 1427
          echo "and be sure that this scheme exists and is shared." >& 2
1428 1428
          echo "Or just delete ${HOME}/.mulle-bootstrap/xcodebuild and use xcodebuild (preferred)" >& 2
1429 1429
          exit 1
... ...
@@ -1559,8 +1559,8 @@ ${C_MAGENTA}${C_BOLD}${sdk}${C_INFO}${info} in \
1559 1559
       #
1560 1560
       inherited="`xcode_get_setting HEADER_SEARCH_PATHS ${arguments}`" || exit 1
1561 1561
       path=`combined_escaped_search_path \
1562
-"${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${HEADER_DIR_NAME}" \
1563
-"${owd}/${REFERENCE_ADDICTION_SUBDIR}/${HEADER_DIR_NAME}"`
1562
+"${owd}/${REFERENCE_DEPENDENCIES_DIR}/${HEADER_DIR_NAME}" \
1563
+"${owd}/${REFERENCE_ADDICTIONS_DIR}/${HEADER_DIR_NAME}"`
1564 1564
       if [ -z "${inherited}" ]
1565 1565
       then
1566 1566
          dependencies_header_search_path="${path}"
... ...
@@ -1570,13 +1570,13 @@ ${C_MAGENTA}${C_BOLD}${sdk}${C_INFO}${info} in \
1570 1570
 
1571 1571
       inherited="`xcode_get_setting LIBRARY_SEARCH_PATHS ${arguments}`" || exit 1
1572 1572
       path=`combined_escaped_search_path \
1573
-"${owd}/${REFERENCE_DEPENDENCY_SUBDIR}${mappedsubdir}/${LIBRARY_DIR_NAME}" \
1574
-"${owd}/${REFERENCE_DEPENDENCY_SUBDIR}${fallbacksubdir}/${LIBRARY_DIR_NAME}" \
1575
-"${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${LIBRARY_DIR_NAME}" \
1576
-"${owd}/${REFERENCE_ADDICTION_SUBDIR}/${LIBRARY_DIR_NAME}"`
1573
+"${owd}/${REFERENCE_DEPENDENCIES_DIR}${mappedsubdir}/${LIBRARY_DIR_NAME}" \
1574
+"${owd}/${REFERENCE_DEPENDENCIES_DIR}${fallbacksubdir}/${LIBRARY_DIR_NAME}" \
1575
+"${owd}/${REFERENCE_DEPENDENCIES_DIR}/${LIBRARY_DIR_NAME}" \
1576
+"${owd}/${REFERENCE_ADDICTIONS_DIR}/${LIBRARY_DIR_NAME}"`
1577 1577
       if [ ! -z "$sdk" ]
1578 1578
       then
1579
-         escaped="`escaped_spaces "${owd}/${REFERENCE_DEPENDENCY_SUBDIR}${mappedsubdir}/${LIBRARY_DIR_NAME}"'-$(EFFECTIVE_PLATFORM_NAME)'`"
1579
+         escaped="`escaped_spaces "${owd}/${REFERENCE_DEPENDENCIES_DIR}${mappedsubdir}/${LIBRARY_DIR_NAME}"'-$(EFFECTIVE_PLATFORM_NAME)'`"
1580 1580
          path="${escaped} ${path}" # prepend
1581 1581
       fi
1582 1582
       if [ -z "${inherited}" ]
... ...
@@ -1594,13 +1594,13 @@ ${C_MAGENTA}${C_BOLD}${sdk}${C_INFO}${info} in \
1594 1594
 
1595 1595
       inherited="`xcode_get_setting FRAMEWORK_SEARCH_PATHS ${arguments}`" || exit 1
1596 1596
       path=`combined_escaped_search_path \
1597
-"${owd}/${REFERENCE_DEPENDENCY_SUBDIR}${mappedsubdir}/${FRAMEWORK_DIR_NAME}" \
1598
-"${owd}/${REFERENCE_DEPENDENCY_SUBDIR}${fallbacksubdir}/${FRAMEWORK_DIR_NAME}" \
1599
-"${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${FRAMEWORK_DIR_NAME}" \
1600
-"${owd}/${REFERENCE_ADDICTION_SUBDIR}/${FRAMEWORK_DIR_NAME}"`
1597
+"${owd}/${REFERENCE_DEPENDENCIES_DIR}${mappedsubdir}/${FRAMEWORK_DIR_NAME}" \
1598
+"${owd}/${REFERENCE_DEPENDENCIES_DIR}${fallbacksubdir}/${FRAMEWORK_DIR_NAME}" \
1599
+"${owd}/${REFERENCE_DEPENDENCIES_DIR}/${FRAMEWORK_DIR_NAME}" \
1600
+"${owd}/${REFERENCE_ADDICTIONS_DIR}/${FRAMEWORK_DIR_NAME}"`
1601 1601
       if [ ! -z "$sdk" ]
1602 1602
       then
1603
-         escaped="`escaped_spaces "${owd}/${REFERENCE_DEPENDENCY_SUBDIR}${mappedsubdir}/${FRAMEWORK_DIR_NAME}"'-$(EFFECTIVE_PLATFORM_NAME)'`"
1603
+         escaped="`escaped_spaces "${owd}/${REFERENCE_DEPENDENCIES_DIR}${mappedsubdir}/${FRAMEWORK_DIR_NAME}"'-$(EFFECTIVE_PLATFORM_NAME)'`"
1604 1604
          path="${escaped} ${path}" # prepend
1605 1605
       fi
1606 1606
       if [ -z "${inherited}" ]
... ...
@@ -1627,11 +1627,11 @@ ${C_MAGENTA}${C_BOLD}${sdk}${C_INFO}${info} in \
1627 1627
       # if it doesn't install, probably SKIP_INSTALL is set
1628 1628
       cmdline="\"${XCODEBUILD}\" \"${command}\" ${arguments} \
1629 1629
 ARCHS='${ARCHS:-\${ARCHS_STANDARD_32_64_BIT}}' \
1630
-DSTROOT='${owd}/${BUILD_DEPENDENCY_SUBDIR}' \
1630
+DSTROOT='${owd}/${BUILD_DEPENDENCIES_DIR}' \
1631 1631
 SYMROOT='${owd}/${builddir}/' \
1632 1632
 OBJROOT='${owd}/${builddir}/obj' \
1633
-DEPENDENCIES_DIR='${owd}/${REFERENCE_DEPENDENCY_SUBDIR}' \
1634
-ADDICTIONS_DIR='${owd}/${REFERENCE_ADDICTION_SUBDIR}' \
1633
+DEPENDENCIES_DIR='${owd}/${REFERENCE_DEPENDENCIES_DIR}' \
1634
+ADDICTIONS_DIR='${owd}/${REFERENCE_ADDICTIONS_DIR}' \
1635 1635
 ONLY_ACTIVE_ARCH=${ONLY_ACTIVE_ARCH:-NO} \
1636 1636
 ${skip_install} \
1637 1637
 ${other_cflags} \
... ...
@@ -1800,7 +1800,7 @@ ${C_MAGENTA}${C_BOLD}${sdk}${C_INFO}${info} in \
1800 1800
          "${configuration}" \
1801 1801
          "${owd}/${srcdir}" \
1802 1802
          "${owd}/${builddir}" \
1803
-         "${owd}/${BUILD_DEPENDENCY_SUBDIR}" \
1803
+         "${owd}/${BUILD_DEPENDENCIES_DIR}" \
1804 1804
          "${name}" \
1805 1805
          "${sdk}" > "${logfile}"
1806 1806
       rval=$?
... ...
@@ -1946,7 +1946,7 @@ build()
1946 1946
    name="$1"
1947 1947
    srcdir="$2"
1948 1948
 
1949
-   [ "${name}" != "${CLONES_SUBDIR}" ] || internal_fail "missing repo argument (${srcdir})"
1949
+   [ "${name}" != "${REPOS_DIR}" ] || internal_fail "missing repo argument (${srcdir})"
1950 1950
 
1951 1951
    log_verbose "Building ${name} ..."
1952 1952
 
... ...
@@ -2013,12 +2013,12 @@ configure"`"
2013 2013
 
2014 2014
 
2015 2015
 #
2016
-# ${DEPENDENCY_SUBDIR} is split into
2016
+# ${DEPENDENCIES_DIR} is split into
2017 2017
 #
2018
-#  REFERENCE_DEPENDENCY_SUBDIR and
2019
-#  BUILD_DEPENDENCY_SUBDIR
2018
+#  REFERENCE_DEPENDENCIES_DIR and
2019
+#  BUILD_DEPENDENCIES_DIR
2020 2020
 #
2021
-# above this function, noone should access ${DEPENDENCY_SUBDIR}
2021
+# above this function, noone should access ${DEPENDENCIES_DIR}
2022 2022
 #
2023 2023
 build_wrapper()
2024 2024
 {
... ...
@@ -2028,19 +2028,19 @@ build_wrapper()
2028 2028
    name="$1"
2029 2029
    srcdir="$2"
2030 2030
 
2031
-   REFERENCE_ADDICTION_SUBDIR="${ADDICTION_SUBDIR}"
2032
-   REFERENCE_DEPENDENCY_SUBDIR="${DEPENDENCY_SUBDIR}"
2033
-   BUILD_DEPENDENCY_SUBDIR="${DEPENDENCY_SUBDIR}/tmp"
2031
+   REFERENCE_ADDICTIONS_DIR="${ADDICTIONS_DIR}"
2032
+   REFERENCE_DEPENDENCIES_DIR="${DEPENDENCIES_DIR}"
2033
+   BUILD_DEPENDENCIES_DIR="${DEPENDENCIES_DIR}/tmp"
2034 2034
 
2035
-   DEPENDENCY_SUBDIR="WRONG_DONT_USE_DEPENDENCY_SUBDIR_DURING_BUILD"
2036
-   ADDICTION_SUBDIR="WRONG_DONT_USE_ADDICTION_SUBDIR_DURING_BUILD"
2035
+   DEPENDENCIES_DIR="WRONG_DONT_USE_DEPENDENCIES_DIR_DURING_BUILD"
2036
+   ADDICTIONS_DIR="WRONG_DONT_USE_ADDICTIONS_DIR_DURING_BUILD"
2037 2037
 
2038
-   log_fluff "Setting up BUILD_DEPENDENCY_SUBDIR as \"${BUILD_DEPENDENCY_SUBDIR}\""
2038
+   log_fluff "Setting up BUILD_DEPENDENCIES_DIR as \"${BUILD_DEPENDENCIES_DIR}\""
2039 2039
 
2040
-   if [ "${COMMAND}" != "ibuild" -a -d "${BUILD_DEPENDENCY_SUBDIR}" ]
2040
+   if [ "${COMMAND}" != "ibuild" -a -d "${BUILD_DEPENDENCIES_DIR}" ]
2041 2041
    then
2042
-      log_fluff "Cleaning up orphaned \"${BUILD_DEPENDENCY_SUBDIR}\""
2043
-      rmdir_safer "${BUILD_DEPENDENCY_SUBDIR}"
2042
+      log_fluff "Cleaning up orphaned \"${BUILD_DEPENDENCIES_DIR}\""
2043
+      rmdir_safer "${BUILD_DEPENDENCIES_DIR}"
2044 2044
    fi
2045 2045
 
2046 2046
 
... ...
@@ -2057,16 +2057,16 @@ build_wrapper()
2057 2057
 
2058 2058
    if [ "${COMMAND}" != "ibuild"  ]
2059 2059
    then
2060
-      log_fluff "Remove \"${BUILD_DEPENDENCY_SUBDIR}\""
2061
-      rmdir_safer "${BUILD_DEPENDENCY_SUBDIR}"
2060
+      log_fluff "Remove \"${BUILD_DEPENDENCIES_DIR}\""
2061
+      rmdir_safer "${BUILD_DEPENDENCIES_DIR}"
2062 2062
    fi
2063 2063
 
2064
-   DEPENDENCY_SUBDIR="${REFERENCE_DEPENDENCY_SUBDIR}"
2065
-   ADDICTION_SUBDIR="${REFERENCE_ADDICTION_SUBDIR}"
2064
+   DEPENDENCIES_DIR="${REFERENCE_DEPENDENCIES_DIR}"
2065
+   ADDICTIONS_DIR="${REFERENCE_ADDICTIONS_DIR}"
2066 2066
 
2067 2067
    # for mulle-bootstrap developers
2068
-   REFERENCE_DEPENDENCY_SUBDIR="WRONG_DONT_USE_REFERENCE_DEPENDENCY_SUBDIR_AFTER_BUILD"
2069
-   BUILD_DEPENDENCY_SUBDIR="WRONG_DONT_USE_BUILD_DEPENDENCY_SUBDIR_AFTER_BUILD"
2068
+   REFERENCE_DEPENDENCIES_DIR="WRONG_DONT_USE_REFERENCE_DEPENDENCIES_DIR_AFTER_BUILD"
2069
+   BUILD_DEPENDENCIES_DIR="WRONG_DONT_USE_BUILD_DEPENDENCIES_DIR_AFTER_BUILD"
2070 2070
 }
2071 2071
 
2072 2072
 
... ...
@@ -2108,7 +2108,7 @@ get_source_dir()
2108 2108
    local srcdir
2109 2109
    local srcsubdir
2110 2110
 
2111
-   srcdir="${CLONES_SUBDIR}/${name}"
2111
+   srcdir="${REPOS_DIR}/${name}"
2112 2112
    srcsubdir="`read_build_setting "${name}" "source_dir"`"
2113 2113
    if [ ! -z "${srcsubdir}" ]
2114 2114
    then
... ...
@@ -2124,7 +2124,7 @@ build_clones()
2124 2124
 
2125 2125
    IFS="
2126 2126
 "
2127
-   for clone in `ls -1d ${CLONES_SUBDIR}/*.failed 2> /dev/null`
2127
+   for clone in `ls -1d ${REPOS_DIR}/*.failed 2> /dev/null`
2128 2128
    do
2129 2129
       IFS="${DEFAULT_IFS}"
2130 2130
       if [ -d "${clone}" ]
... ...
@@ -2234,9 +2234,9 @@ install_tars()
2234 2234
       then
2235 2235
          fail "tarball \"$tar\" not found"
2236 2236
       else
2237
-         mkdir_if_missing "${DEPENDENCY_SUBDIR}"
2237
+         mkdir_if_missing "${DEPENDENCIES_DIR}"
2238 2238
          log_info "Installing tarball \"${tar}\""
2239
-         exekutor tar -xz -C "${DEPENDENCY_SUBDIR}" -f "${tar}" || fail "failed to extract ${tar}"
2239
+         exekutor tar -xz -C "${DEPENDENCIES_DIR}" -f "${tar}" || fail "failed to extract ${tar}"
2240 2240
       fi
2241 2241
    done
2242 2242
    IFS="${DEFAULT_IFS}"
... ...
@@ -2338,9 +2338,9 @@ build_main()
2338 2338
    #
2339 2339
    # START
2340 2340
    #
2341
-   if [ ! -d "${CLONES_SUBDIR}" ]
2341
+   if [ ! -d "${REPOS_DIR}" ]
2342 2342
    then
2343
-      log_info "No repositories in \"${CLONES_SUBDIR}\", so nothing to build."
2343
+      log_info "No repositories in \"${REPOS_DIR}\", so nothing to build."
2344 2344
       return 0
2345 2345
    fi
2346 2346
 
... ...
@@ -2352,42 +2352,42 @@ build_main()
2352 2352
 
2353 2353
    CHECK_USR_LOCAL_INCLUDE="`read_config_setting "check_usr_local_include" "NO"`"
2354 2354
 
2355
-   remove_file_if_present "${CLONESFETCH_SUBDIR}/.build_done"
2355
+   remove_file_if_present "${REPOS_DIR}/.bootstrap_build_done"
2356 2356
 
2357 2357
    if [ $# -eq 0 ]
2358 2358
    then
2359
-      log_fluff "Setting up dependencies directory as \"${DEPENDENCY_SUBDIR}\""
2359
+      log_fluff "Setting up dependencies directory as \"${DEPENDENCIES_DIR}\""
2360 2360
       clean="`read_config_setting "clean_dependencies_before_build" "YES"`"
2361 2361
       if [ "${clean}" = "YES" ]
2362 2362
       then
2363
-         rmdir_safer "${DEPENDENCY_SUBDIR}"
2363
+         rmdir_safer "${DEPENDENCIES_DIR}"
2364 2364
       fi
2365 2365
    else
2366
-      log_fluff "Unprotecting \"${DEPENDENCY_SUBDIR}\" (as this is a partial build)."
2367
-      exekutor chmod -R u+w "${DEPENDENCY_SUBDIR}"
2366
+      log_fluff "Unprotecting \"${DEPENDENCIES_DIR}\" (as this is a partial build)."
2367
+      exekutor chmod -R u+w "${DEPENDENCIES_DIR}"
2368 2368
    fi
2369 2369
 
2370 2370
    # if present then we didnt't want to clean and we do nothing special
2371
-   if [ ! -d "${DEPENDENCY_SUBDIR}" ]
2371
+   if [ ! -d "${DEPENDENCIES_DIR}" ]
2372 2372
    then
2373 2373
       install_tars "$@"
2374 2374
    else
2375 2375
       if have_tars
2376 2376
       then
2377
-         log_warning "Tars have not been installed, as \"${DEPENDENCY_SUBDIR}\" already exists."
2377
+         log_warning "Tars have not been installed, as \"${DEPENDENCIES_DIR}\" already exists."
2378 2378
       fi
2379 2379
    fi
2380 2380
 
2381 2381
    build_clones "$@"
2382 2382
 
2383
-   if [ -d "${DEPENDENCY_SUBDIR}" ]
2383
+   if [ -d "${DEPENDENCIES_DIR}" ]
2384 2384
    then
2385
-      write_protect_directory "${DEPENDENCY_SUBDIR}"
2385
+      write_protect_directory "${DEPENDENCIES_DIR}"
2386 2386
    else
2387 2387
       log_fluff "No dependencies have been generated"
2388 2388
    fi
2389 2389
 
2390
-   create_file_if_missing "${CLONESFETCH_SUBDIR}/.build_done"
2390
+   create_file_if_missing "${REPOS_DIR}/.bootstrap_build_done"
2391 2391
 
2392 2392
    log_fluff "::: build end :::"
2393 2393
 }
... ...
@@ -33,23 +33,23 @@ MULLE_BOOTSTRAP_CLEAN_SH="included"
33 33
 
34 34
 setup_clean_environment()
35 35
 {
36
-   [ -z "${DEPENDENCY_SUBDIR}"  ] && internal_fail "DEPENDENCY_SUBDIR is empty"
36
+   [ -z "${DEPENDENCIES_DIR}"  ] && internal_fail "DEPENDENCIES_DIR is empty"
37 37
    [ -z "${CLONESBUILD_SUBDIR}" ] && internal_fail "CLONESBUILD_SUBDIR is empty"
38
-   [ -z "${ADDICTION_SUBDIR}"   ] && internal_fail "ADDICTION_SUBDIR is empty"
38
+   [ -z "${ADDICTIONS_DIR}"   ] && internal_fail "ADDICTIONS_DIR is empty"
39 39
 
40 40
    CLEAN_EMPTY_PARENTS="`read_config_setting "clean_empty_parent_folders" "YES"`"
41 41
 
42
-   BUILD_CLEANABLE_FILES="${CLONESFETCH_SUBDIR}/.build_done"
42
+   BUILD_CLEANABLE_FILES="${REPOS_DIR}/.bootstrap_build_done"
43 43
 
44 44
    BUILD_CLEANABLE_SUBDIRS="`read_sane_config_path_setting "clean_folders" "${CLONESBUILD_SUBDIR}
45
-${DEPENDENCY_SUBDIR}/tmp"`"
46
-   OUTPUT_CLEANABLE_SUBDIRS="`read_sane_config_path_setting "output_clean_folders" "${DEPENDENCY_SUBDIR}"`"
47
-   INSTALL_CLEANABLE_SUBDIRS="`read_sane_config_path_setting "install_clean_folders" "${CLONES_SUBDIR}
45
+${DEPENDENCIES_DIR}/tmp"`"
46
+   OUTPUT_CLEANABLE_SUBDIRS="`read_sane_config_path_setting "output_clean_folders" "${DEPENDENCIES_DIR}"`"
47
+   INSTALL_CLEANABLE_SUBDIRS="`read_sane_config_path_setting "install_clean_folders" "${REPOS_DIR}
48 48
 .bootstrap.auto"`"
49
-   DIST_CLEANABLE_SUBDIRS="`read_sane_config_path_setting "dist_clean_folders" "${CLONES_SUBDIR}
50
-${ADDICTION_SUBDIR}
49
+   DIST_CLEANABLE_SUBDIRS="`read_sane_config_path_setting "dist_clean_folders" "${REPOS_DIR}
50
+${ADDICTIONS_DIR}
51 51
 .bootstrap.auto"`"
52
-   EMBEDDED="`embedded_repository_directories_from_repos`"
52
+   EMBEDDED="`embedded_repository_directories_from_repos "${REPOS_DIR}"`"
53 53
 
54 54
    DIST_CLEANABLE_SUBDIRS="`add_line "${EMBEDDED}" "${DIST_CLEANABLE_SUBDIRS}"`"
55 55
 }
... ...
@@ -153,7 +153,7 @@ clean_parent_folders_if_empty()
153 153
          then
154 154
             assert_sane_subdir_path "${parent}"
155 155
             log_info "Deleting \"${parent}\" because it was empty. "
156
-            log_fluff "Set \"${BOOTSTRAP_SUBDIR}/config/clean_empty_parent_folders\" to NO if you don't like it."
156
+            log_fluff "Set \"${BOOTSTRAP_DIR}/config/clean_empty_parent_folders\" to NO if you don't like it."
157 157
             exekutor rmdir "${parent}"
158 158
          fi
159 159
       done
... ...
@@ -219,9 +219,9 @@ _clean_execute()
219 219
 {
220 220
    local flag
221 221
 
222
-   [ -z "${DEPENDENCY_SUBDIR}"  ] && internal_fail "DEPENDENCY_SUBDIR is empty"
222
+   [ -z "${DEPENDENCIES_DIR}"  ] && internal_fail "DEPENDENCIES_DIR is empty"
223 223
    [ -z "${CLONESBUILD_SUBDIR}" ] && internal_fail "CLONESBUILD_SUBDIR is empty"
224
-   [ -z "${ADDICTION_SUBDIR}"   ] && internal_fail "ADDICTION_SUBDIR is empty"
224
+   [ -z "${ADDICTIONS_DIR}"   ] && internal_fail "ADDICTIONS_DIR is empty"
225 225
 
226 226
    flag="NO"
227 227
    CLEAN_EMPTY_PARENTS="`read_config_setting "clean_empty_parent_folders" "YES"`"
... ...
@@ -230,8 +230,8 @@ _clean_execute()
230 230
    case "${COMMAND}" in
231 231
       build)
232 232
          BUILD_CLEANABLE_SUBDIRS="`read_sane_config_path_setting "clean_folders" "${CLONESBUILD_SUBDIR}
233
-${DEPENDENCY_SUBDIR}/tmp"`"
234
-         BUILD_CLEANABLE_FILES="${CLONESFETCH_SUBDIR}/.build_done"
233
+${DEPENDENCIES_DIR}/tmp"`"
234
+         BUILD_CLEANABLE_FILES="${REPOS_DIR}/.bootstrap_build_done"
235 235
          clean_directories "${BUILD_CLEANABLE_SUBDIRS}" "${flag}"
236 236
          clean_files "${BUILD_CLEANABLE_FILES}"
237 237
          return
... ...
@@ -239,8 +239,8 @@ ${DEPENDENCY_SUBDIR}/tmp"`"
239 239
 
240 240
       dist|output|install)
241 241
          BUILD_CLEANABLE_SUBDIRS="`read_sane_config_path_setting "clean_folders" "${CLONESBUILD_SUBDIR}
242
-${DEPENDENCY_SUBDIR}/tmp"`"
243
-         BUILD_CLEANABLE_FILES="${CLONESFETCH_SUBDIR}/.build_done"
242
+${DEPENDENCIES_DIR}/tmp"`"
243
+         BUILD_CLEANABLE_FILES="${REPOS_DIR}/.bootstrap_build_done"
244 244
          flag="`clean_directories "${BUILD_CLEANABLE_SUBDIRS}" "${flag}"`"
245 245
          clean_files "${BUILD_CLEANABLE_FILES}"
246 246
       ;;
... ...
@@ -248,14 +248,14 @@ ${DEPENDENCY_SUBDIR}/tmp"`"
248 248
 
249 249
    case "${COMMAND}" in
250 250
       output)
251
-         OUTPUT_CLEANABLE_SUBDIRS="`read_sane_config_path_setting "output_clean_folders" "${DEPENDENCY_SUBDIR}"`"
251
+         OUTPUT_CLEANABLE_SUBDIRS="`read_sane_config_path_setting "output_clean_folders" "${DEPENDENCIES_DIR}"`"
252 252
          clean_directories "${OUTPUT_CLEANABLE_SUBDIRS}" "${flag}"
253 253
          clean_files "${OUTPUT_CLEANABLE_FILES}"
254 254
          return
255 255
       ;;
256 256
 
257 257
       dist)
258
-         OUTPUT_CLEANABLE_SUBDIRS="`read_sane_config_path_setting "output_clean_folders" "${DEPENDENCY_SUBDIR}"`"
258
+         OUTPUT_CLEANABLE_SUBDIRS="`read_sane_config_path_setting "output_clean_folders" "${DEPENDENCIES_DIR}"`"
259 259
          flag="`clean_directories "${OUTPUT_CLEANABLE_SUBDIRS}" "${flag}"`"
260 260
          clean_files "${OUTPUT_CLEANABLE_FILES}"
261 261
       ;;
... ...
@@ -263,7 +263,7 @@ ${DEPENDENCY_SUBDIR}/tmp"`"
263 263
 
264 264
    case "${COMMAND}" in
265 265
       install)
266
-         INSTALL_CLEANABLE_SUBDIRS="`read_sane_config_path_setting "install_clean_folders" "${CLONES_SUBDIR}
266
+         INSTALL_CLEANABLE_SUBDIRS="`read_sane_config_path_setting "install_clean_folders" "${REPOS_DIR}
267 267
 .bootstrap.auto"`"
268 268
          clean_directories "${INSTALL_CLEANABLE_SUBDIRS}" "${flag}"
269 269
          clean_files "${INSTALL_CLEANABLE_FILES}"
... ...
@@ -273,10 +273,10 @@ ${DEPENDENCY_SUBDIR}/tmp"`"
273 273
 
274 274
    case "${COMMAND}" in
275 275
       dist)
276
-         DIST_CLEANABLE_SUBDIRS="`read_sane_config_path_setting "dist_clean_folders" "${CLONES_SUBDIR}
277
-${ADDICTION_SUBDIR}
276
+         DIST_CLEANABLE_SUBDIRS="`read_sane_config_path_setting "dist_clean_folders" "${REPOS_DIR}
277
+${ADDICTIONS_DIR}
278 278
 .bootstrap.auto"`"
279
-         EMBEDDED="`embedded_repository_directories_from_repos`"
279
+         EMBEDDED="`embedded_repository_directories_from_repos "${REPOS_DIR}"`"
280 280
 
281 281
          if [ ! -z "$EMBEDDED" ]
282 282
          then
... ...
@@ -57,10 +57,10 @@ usage:
57 57
 
58 58
    You can specify the names of the repositories to update.
59 59
 EOF
60
-   if [ -d "${CLONESFETCH_SUBDIR}" ]
60
+   if [ -d "${REPOS_DIR}" ]
61 61
    then
62 62
       echo "Currently available repositories are:"
63
-      (cd "${CLONESFETCH_SUBDIR}" ; ls -1 | sed 's/^/   /')
63
+      (cd "${REPOS_DIR}" ; ls -1 */.bootstrap | sed 's/^\(.*\)/.bootstrap/   \1/')
64 64
    fi
65 65
    exit 1
66 66
 }
... ...
@@ -153,10 +153,10 @@ install_brews()
153 153
 
154 154
    [ -z "${MULLE_BOOTSTRAP_BREW_SH}" ] && . mulle-bootstrap-brew.sh
155 155
 
156
-   if [ "${flag}" = "NO" -a -d "${ADDICTION_SUBDIR}" ]
156
+   if [ "${flag}" = "NO" -a -d "${ADDICTIONS_DIR}" ]
157 157
    then
158
-      log_fluff "Unprotecting \"${ADDICTION_SUBDIR}\" for ${command}."
159