Browse code

fix some regressions

Nat! authored on 17-01-2016 20:45:22
Showing 1 changed files
... ...
@@ -313,9 +313,13 @@ determine_suffix()
313 313
 
314 314
 cmake_sdk_parameter()
315 315
 {
316
+   local sdk
317
+
318
+   sdk="$1"
319
+
316 320
    local sdkpath
317 321
 
318
-   sdkpath=`gcc_sdk_parameter "$1"`
322
+   sdkpath=`gcc_sdk_parameter "${sdk}"`
319 323
    if [ "${sdkpath}" != "" ]
320 324
    then
321 325
       log_fluff "Set cmake -DCMAKE_OSX_SYSROOT to \"${sdkpath}\""
... ...
@@ -326,7 +330,8 @@ cmake_sdk_parameter()
326 330
 
327 331
 create_dummy_dirs_against_warnings()
328 332
 {
329
-   local relative
333
+   local builddir
334
+   local configuration
330 335
    local suffix
331 336
 
332 337
    builddir="$1"
... ...
@@ -531,10 +536,12 @@ build_configure()
531 536
    log_info "Let ${C_CYAN}configure${C_INFO} do a ${C_MAGENTA}${configuration}${C_INFO} build of \
532 537
 ${C_MAGENTA}${name}${C_INFO} for SDK ${C_MAGENTA}${sdk}${C_INFO} in \"${builddir}\" ..."
533 538
 
539
+   local sdkpath
534 540
 
535 541
    mapped="`read_build_setting "$name" "configure-${configuration}.map" "${configuration}"`"
536 542
    suffix="`determine_suffix "${configuration}" "${sdk}"`"
537
-   sdk="`gcc_sdk_parameter "${sdk}"`"
543
+   sdkpath="`gcc_sdk_parameter "${sdk}"`"
544
+   sdkpath="`echo "${sdkpath}" | sed -e 's/ /\\ /g'`"
538 545
 
539 546
    local other_cflags
540 547
    local other_cppflags
... ...
@@ -583,14 +590,14 @@ ${C_MAGENTA}${name}${C_INFO} for SDK ${C_MAGENTA}${sdk}${C_INFO} in \"${builddir
583 590
 -F${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${FRAMEWORK_DIR_NAME}/${configuration} \
584 591
 -F${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${FRAMEWORK_DIR_NAME} \
585 592
 ${other_cflags} \
586
-${sdk}\" \
593
+-isysroot ${sdkpath}\" \
587 594
       CPPFLAGS=\"\
588 595
 -I${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${HEADER_DIR_NAME} \
589 596
 -F${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${FRAMEWORK_DIR_NAME}${suffix} \
590 597
 -F${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${FRAMEWORK_DIR_NAME}/${configuration} \
591 598
 -F${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${FRAMEWORK_DIR_NAME} \
592 599
 ${other_cppflags} \
593
-${sdk}\" \
600
+-isysroot ${sdkpath}\" \
594 601
       LDFLAGS=\"\
595 602
 -F${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${FRAMEWORK_DIR_NAME}${suffix} \
596 603
 -F${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${FRAMEWORK_DIR_NAME}/${configuration} \
... ...
@@ -599,7 +606,7 @@ ${sdk}\" \
599 606
 -L${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${LIBRARY_DIR_NAME}/${configuration} \
600 607
 -L${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${LIBRARY_DIR_NAME} \
601 608
 ${other_ldflags} \
602
-${sdk}\"" >> "${logfile1}"
609
+-isysroot ${sdkpath}\"" >> "${logfile1}"
603 610
 
604 611
 
605 612
        CFLAGS="\
... ...
@@ -608,14 +615,14 @@ ${sdk}\"" >> "${logfile1}"
608 615
 -F${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${FRAMEWORK_DIR_NAME}/${configuration} \
609 616
 -F${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${FRAMEWORK_DIR_NAME} \
610 617
 ${other_cflags} \
611
-${sdk}" \
618
+-isysroot ${sdkpath}" \
612 619
       CPPFLAGS="\
613 620
 -I${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${HEADER_DIR_NAME} \
614 621
 -F${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${FRAMEWORK_DIR_NAME}${suffix} \
615 622
 -F${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${FRAMEWORK_DIR_NAME}/${configuration} \
616 623
 -F${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${FRAMEWORK_DIR_NAME} \
617 624
 ${other_cppflags} \
618
-${sdk}" \
625
+-isysroot ${sdkpath}" \
619 626
       LDFLAGS="\
620 627
 -F${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${FRAMEWORK_DIR_NAME}${suffix} \
621 628
 -F${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${FRAMEWORK_DIR_NAME}/${configuration} \
... ...
@@ -624,7 +631,7 @@ ${sdk}" \
624 631
 -L${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${LIBRARY_DIR_NAME}/${configuration} \
625 632
 -L${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${LIBRARY_DIR_NAME} \
626 633
 ${other_ldflags} \
627
-${sdk}" \
634
+-isysroot ${sdkpath}" \
628 635
        logging_exekutor "${owd}/${srcdir}/configure" \
629 636
           --prefix "${owd}/${BUILD_DEPENDENCY_SUBDIR}/usr/local" >> "${logfile1}" \
630 637
       || build_fail "${logfile1}" "configure"
... ...
@@ -1153,7 +1160,6 @@ build_script()
1153 1160
    name="$5"
1154 1161
    sdk="$6"
1155 1162
 
1156
-
1157 1163
    local logfile
1158 1164
 
1159 1165
    mkdir_if_missing "${BUILDLOG_SUBDIR}"
... ...
@@ -1208,7 +1214,6 @@ build()
1208 1214
    [ "${name}" != "${CLONES_SUBDIR}" ] || internal_fail "missing repo argument (${srcdir})"
1209 1215
 
1210 1216
    local preferences
1211
-   local configurations
1212 1217
 
1213 1218
    #
1214 1219
    # repo may override how it wants to be build
... ...
@@ -1229,6 +1234,8 @@ configure"`"
1229 1234
       fi
1230 1235
    fi
1231 1236
 
1237
+   local configurations
1238
+
1232 1239
    configurations="`read_build_root_setting "configurations" "Debug
1233 1240
 Release"`"
1234 1241
 
... ...
@@ -1255,14 +1262,14 @@ Release"`"
1255 1262
    do
1256 1263
       for configuration in ${configurations}
1257 1264
       do
1258
-         if [ "$/{configuration}" = "/${LIBRARY_DIR_NAME}" -o "/${configuration}" = "${HEADER_DIR_NAME}" -o "/${configuration}" = "${FRAMEWORK_DIR_NAME}" ]
1265
+         if [ "/${configuration}" = "/${LIBRARY_DIR_NAME}" -o "/${configuration}" = "${HEADER_DIR_NAME}" -o "/${configuration}" = "${FRAMEWORK_DIR_NAME}" ]
1259 1266
          then
1260
-            fail "You are just asking for trouble."
1267
+            fail "You are just asking for trouble naming your configuration \"${configuration}\"."
1261 1268
          fi
1262 1269
 
1263 1270
          if [ "${configuration}" = "lib" -o "${configuration}" = "include" -o "${configuration}" = "Frameworks" ]
1264 1271
          then
1265
-            fail "You are just asking for major trouble."
1272
+            fail "You are just asking for major trouble naming your configuration \"${configuration}\"."
1266 1273
          fi
1267 1274
 
1268 1275
          builddir="${CLONESBUILD_SUBDIR}/${configuration}/${name}"