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 326
 
327 327
 create_dummy_dirs_against_warnings()
328 328
 {
329
-   local relative
329
+   local builddir
330
+   local configuration
330 331
    local suffix
331 332
 
332 333
    builddir="$1"
... ...
@@ -531,10 +536,12 @@ build_configure()
531 531
    log_info "Let ${C_CYAN}configure${C_INFO} do a ${C_MAGENTA}${configuration}${C_INFO} build of \
532 532
 ${C_MAGENTA}${name}${C_INFO} for SDK ${C_MAGENTA}${sdk}${C_INFO} in \"${builddir}\" ..."
533 533
 
534
+   local sdkpath
534 535
 
535 536
    mapped="`read_build_setting "$name" "configure-${configuration}.map" "${configuration}"`"
536 537
    suffix="`determine_suffix "${configuration}" "${sdk}"`"
537
-   sdk="`gcc_sdk_parameter "${sdk}"`"
538
+   sdkpath="`gcc_sdk_parameter "${sdk}"`"
539
+   sdkpath="`echo "${sdkpath}" | sed -e 's/ /\\ /g'`"
538 540
 
539 541
    local other_cflags
540 542
    local other_cppflags
... ...
@@ -583,14 +590,14 @@ ${C_MAGENTA}${name}${C_INFO} for SDK ${C_MAGENTA}${sdk}${C_INFO} in \"${builddir
583 583
 -F${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${FRAMEWORK_DIR_NAME}/${configuration} \
584 584
 -F${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${FRAMEWORK_DIR_NAME} \
585 585
 ${other_cflags} \
586
-${sdk}\" \
586
+-isysroot ${sdkpath}\" \
587 587
       CPPFLAGS=\"\
588 588
 -I${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${HEADER_DIR_NAME} \
589 589
 -F${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${FRAMEWORK_DIR_NAME}${suffix} \
590 590
 -F${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${FRAMEWORK_DIR_NAME}/${configuration} \
591 591
 -F${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${FRAMEWORK_DIR_NAME} \
592 592
 ${other_cppflags} \
593
-${sdk}\" \
593
+-isysroot ${sdkpath}\" \
594 594
       LDFLAGS=\"\
595 595
 -F${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${FRAMEWORK_DIR_NAME}${suffix} \
596 596
 -F${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${FRAMEWORK_DIR_NAME}/${configuration} \
... ...
@@ -599,7 +606,7 @@ ${sdk}\" \
599 599
 -L${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${LIBRARY_DIR_NAME}/${configuration} \
600 600
 -L${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${LIBRARY_DIR_NAME} \
601 601
 ${other_ldflags} \
602
-${sdk}\"" >> "${logfile1}"
602
+-isysroot ${sdkpath}\"" >> "${logfile1}"
603 603
 
604 604
 
605 605
        CFLAGS="\
... ...
@@ -608,14 +615,14 @@ ${sdk}\"" >> "${logfile1}"
608 608
 -F${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${FRAMEWORK_DIR_NAME}/${configuration} \
609 609
 -F${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${FRAMEWORK_DIR_NAME} \
610 610
 ${other_cflags} \
611
-${sdk}" \
611
+-isysroot ${sdkpath}" \
612 612
       CPPFLAGS="\
613 613
 -I${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${HEADER_DIR_NAME} \
614 614
 -F${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${FRAMEWORK_DIR_NAME}${suffix} \
615 615
 -F${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${FRAMEWORK_DIR_NAME}/${configuration} \
616 616
 -F${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${FRAMEWORK_DIR_NAME} \
617 617
 ${other_cppflags} \
618
-${sdk}" \
618
+-isysroot ${sdkpath}" \
619 619
       LDFLAGS="\
620 620
 -F${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${FRAMEWORK_DIR_NAME}${suffix} \
621 621
 -F${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${FRAMEWORK_DIR_NAME}/${configuration} \
... ...
@@ -624,7 +631,7 @@ ${sdk}" \
624 624
 -L${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${LIBRARY_DIR_NAME}/${configuration} \
625 625
 -L${owd}/${REFERENCE_DEPENDENCY_SUBDIR}/${LIBRARY_DIR_NAME} \
626 626
 ${other_ldflags} \
627
-${sdk}" \
627
+-isysroot ${sdkpath}" \
628 628
        logging_exekutor "${owd}/${srcdir}/configure" \
629 629
           --prefix "${owd}/${BUILD_DEPENDENCY_SUBDIR}/usr/local" >> "${logfile1}" \
630 630
       || build_fail "${logfile1}" "configure"
... ...
@@ -1153,7 +1160,6 @@ build_script()
1153 1153
    name="$5"
1154 1154
    sdk="$6"
1155 1155
 
1156
-
1157 1156
    local logfile
1158 1157
 
1159 1158
    mkdir_if_missing "${BUILDLOG_SUBDIR}"
... ...
@@ -1208,7 +1214,6 @@ build()
1208 1208
    [ "${name}" != "${CLONES_SUBDIR}" ] || internal_fail "missing repo argument (${srcdir})"
1209 1209
 
1210 1210
    local preferences
1211
-   local configurations
1212 1211
 
1213 1212
    #
1214 1213
    # repo may override how it wants to be build
... ...
@@ -1229,6 +1234,8 @@ configure"`"
1229 1229
       fi
1230 1230
    fi
1231 1231
 
1232
+   local configurations
1233
+
1232 1234
    configurations="`read_build_root_setting "configurations" "Debug
1233 1235
 Release"`"
1234 1236
 
... ...
@@ -1255,14 +1262,14 @@ Release"`"
1255 1255
    do
1256 1256
       for configuration in ${configurations}
1257 1257
       do
1258
-         if [ "$/{configuration}" = "/${LIBRARY_DIR_NAME}" -o "/${configuration}" = "${HEADER_DIR_NAME}" -o "/${configuration}" = "${FRAMEWORK_DIR_NAME}" ]
1258
+         if [ "/${configuration}" = "/${LIBRARY_DIR_NAME}" -o "/${configuration}" = "${HEADER_DIR_NAME}" -o "/${configuration}" = "${FRAMEWORK_DIR_NAME}" ]
1259 1259
          then
1260
-            fail "You are just asking for trouble."
1260
+            fail "You are just asking for trouble naming your configuration \"${configuration}\"."
1261 1261
          fi
1262 1262
 
1263 1263
          if [ "${configuration}" = "lib" -o "${configuration}" = "include" -o "${configuration}" = "Frameworks" ]
1264 1264
          then
1265
-            fail "You are just asking for major trouble."
1265
+            fail "You are just asking for major trouble naming your configuration \"${configuration}\"."
1266 1266
          fi
1267 1267
 
1268 1268
          builddir="${CLONESBUILD_SUBDIR}/${configuration}/${name}"