Browse code

Make MAGNUM_FORCE values uppercase for consistency. CMAKE_FLAGS is now CMAKEFLAGS. Improved log output when cloning

Nat! authored on 19-04-2017 16:39:18
Showing 5 changed files
... ...
@@ -5,6 +5,9 @@ in `.bootstrap.local`. This way I can specify a "MulleFoundation" dependency
5 5
 if I want to compile for mulle-objc. But sometimes I want the Apple Foundation.
6 6
 * finally added list command for `setting`. All that's needed now is a scripts
7 7
 setting to list all scripts
8
+* -fb automatically adds `-U *` to CMAKEFLAGS so that cached values are ignored,
9
+this reduces a lot of WTF moments.
10
+* `CMAKE_FLAGS` is now `CMAKEFLAGS
8 11
 
9 12
 ### 3.3.0
10 13
 
... ...
@@ -104,7 +107,7 @@ I am lazy and I expect it.
104 107
 * Reduce verbosity for PATH to fluff
105 108
 * The --no-recursion flag has been fixed, the  old behaviour is now available
106 109
 as --no-embedded.
107
-* Use eval exekutor for cmake to better inherit CMAKE_FLAGS and protect paths
110
+* Use eval exekutor for cmake to better inherit CMAKEFLAGS and protect paths
108 111
 with spaces.
109 112
 * build now acknowledges --check-usr-local-include also
110 113
 * With --prefix you can change /usr/local on the commandline for build and fetch
... ...
@@ -285,7 +285,7 @@ bootstrap_main()
285 285
    local ps4string
286 286
 
287 287
    local MULLE_FLAG_ANSWER="ASK"
288
-   local MULLE_FLAG_MAGNUM_FORCE="none"
288
+   local MULLE_FLAG_MAGNUM_FORCE="NONE"
289 289
    local MULLE_FLAG_IGNORE_GRAVEYARD="NO"
290 290
    local MULLE_FLAG_VERBOSE_BUILD="NO"
291 291
 
... ...
@@ -336,11 +336,11 @@ bootstrap_main()
336 336
          ;;
337 337
 
338 338
          -fb|--force-build)
339
-            MULLE_FLAG_MAGNUM_FORCE="build"
339
+            MULLE_FLAG_MAGNUM_FORCE="BUILD-ONLY"
340 340
          ;;
341 341
 
342 342
          -f|--force)
343
-            MULLE_FLAG_MAGNUM_FORCE="both"
343
+            MULLE_FLAG_MAGNUM_FORCE="BOTH"
344 344
          ;;
345 345
 
346 346
          --ignore-graveyard)
... ...
@@ -388,12 +388,12 @@ bootstrap_main()
388 388
    command="${1:-bootstrap}"
389 389
 
390 390
    case "${MULLE_FLAG_MAGNUM_FORCE}" in
391
-      both)
391
+      "BOTH")
392 392
          set_fetch_needed
393 393
          set_build_needed
394 394
       ;;
395 395
 
396
-      build)
396
+      "BUILD-ONLY")
397 397
          set_build_needed
398 398
       ;;
399 399
    esac
... ...
@@ -438,7 +438,7 @@ bootstrap_main()
438 438
    # some commands are only valid, if the fetch went through
439 439
    # defer/emancipate clean, so that's ok
440 440
    #
441
-   if [ "${MULLE_FLAG_MAGNUM_FORCE}" = "none" ]
441
+   if [ "${MULLE_FLAG_MAGNUM_FORCE}" = "NONE" ]
442 442
    then
443 443
       case "${command}" in
444 444
          bootstrap|build|systeminstall|tag|update|upgrade)
... ...
@@ -982,7 +982,7 @@ ${C_MAGENTA}${C_BOLD}${sdk}${C_INFO} in \"${builddir}\" ..."
982 982
 "${c_compiler_line}" \
983 983
 "${cxx_compiler_line}" \
984 984
 "${local_cmake_flags}" \
985
-"${CMAKE_FLAGS}" \
985
+"${CMAKEFLAGS}" \
986 986
 "'${relative_srcdir}'"
987 987
       rval=$?
988 988
 
... ...
@@ -102,7 +102,7 @@ defer_main()
102 102
       [ ! -z "${masterpath}" ]  || internal_fail "is_minion file empty"
103 103
       log_warning "Master \"${masterpath}\" already owns \"${minionpath}\""
104 104
 
105
-      if [ "${MULLE_FLAG_MAGNUM_FORCE}" = "none" ]
105
+      if [ "${MULLE_FLAG_MAGNUM_FORCE}" = "NONE" ]
106 106
       then
107 107
          return
108 108
       fi
... ...
@@ -133,10 +133,9 @@ defer_main()
133 133
 
134 134
    if master_owns_minion_bootstrap_project "${masterpath}" "${minionpath}"
135 135
    then
136
-      log_warning "Master \"${masterpath}\" already owns \"${minionpath}\", but it was not detected before"
137
-
138
-      if [ "${MULLE_FLAG_MAGNUM_FORCE}" = "none" ]
136
+      if [ "${MULLE_FLAG_MAGNUM_FORCE}" = "NONE" ]
139 137
       then
138
+         log_warning "Master \"${masterpath}\" already owns \"${minionpath}\", but it was not detected before"
140 139
          return
141 140
       fi
142 141
    fi
... ...
@@ -204,7 +203,7 @@ emancipate_main()
204 203
    then
205 204
       log_warning "Project \"${minionpath}\" does not defer to a master and is already emancipated"
206 205
 
207
-      if [ "${MULLE_FLAG_MAGNUM_FORCE}" = "none" ]
206
+      if [ "${MULLE_FLAG_MAGNUM_FORCE}" = "NONE" ]
208 207
       then
209 208
          return
210 209
       fi
... ...
@@ -224,7 +223,7 @@ emancipate_main()
224 223
    if ! is_master_bootstrap_project "${masterpath}"
225 224
    then
226 225
       log_warning "\"${masterpath}\" is not a master project"
227
-      if [ "${MULLE_FLAG_MAGNUM_FORCE}" = "none" ]
226
+      if [ "${MULLE_FLAG_MAGNUM_FORCE}" = "NONE" ]
228 227
       then
229 228
          return
230 229
       fi
... ...
@@ -198,19 +198,18 @@ _git_clone()
198 198
    [ -e "${stashdir}" ] && internal_fail "${stashdir} already exists"
199 199
 
200 200
    local options
201
+   local dstdir
201 202
 
203
+   dstdir="${stashdir}"
202 204
    options="$*"
203 205
    if [ ! -z "${branch}" ]
204 206
    then
205
-      log_info "Cloning branch ${C_RESET_BOLD}$branch${C_INFO} of ${C_MAGENTA}${C_BOLD}${url}${C_INFO} ..."
207
+      log_info "Cloning branch ${C_RESET_BOLD}$branch${C_INFO} of ${C_MAGENTA}${C_BOLD}${url}${C_INFO} into \"${stashdir}\" ..."
206 208
       options="`concat "${options}" "-b ${branch}"`"
207 209
    else
208
-      log_info "Cloning ${C_MAGENTA}${C_BOLD}${url}${C_INFO} ..."
210
+      log_info "Cloning ${C_MAGENTA}${C_BOLD}${url}${C_INFO} into \"${stashdir}\" ..."
209 211
    fi
210 212
 
211
-   local dstdir
212
-
213
-   dstdir="${stashdir}"
214 213
 
215 214
    # "remote urls" go through caches
216 215
    case "${url}" in