Browse code

Remove ConsoleMovies Make Tutorial C and cmake based (more globally applicable) Fix mulle-bootstrap-xcode.sh for new paths Don't create useless and wrong dummy "Release" directories Fix mulle-bootstrap-tag.sh

Nat! authored on 23-06-2016 14:23:39
Showing 33 changed files
1 1
deleted file mode 100644
... ...
@@ -1,104 +0,0 @@
1
-cd /tmp
2
-chown -R `id -u` mulle-bootstrap 2> /dev/null
3
-rm -rf mulle-bootstrap 2> /dev/null
4
-
5
-# sudo pip install TermRecord
6
-# brew install ttyrec
7
-
8
-TermRecord -o /tmp/session.html || exit 1
9
-
10
-set -x
11
-set -e
12
-echo "#" > /dev/null
13
-echo "# clone mulle-bootstrap from www.mulle-kybernetik.com" > /dev/null
14
-echo "#" > /dev/null
15
-
16
-#git clone /Volumes/Source/srcM/mulle-bootstrap
17
-git clone http://www.mulle-kybernetik.com/repositories/mulle-bootstrap
18
-
19
-echo "#" > /dev/null
20
-echo "# now install it, you can install it with itself, but you get" > /dev/null
21
-echo "# the developer environment too, which you may not want for now" > /dev/null
22
-echo "#" > /dev/null
23
-cd mulle-bootstrap
24
-./install.sh /tmp
25
-PATH=/tmp/bin:$PATH
26
-
27
-set +e
28
-mulle-bootstrap -h
29
-set -e
30
-sleep 4
31
-
32
-echo "#" > /dev/null
33
-echo "# lets try out a simple demo, that shows Xcode, cmake and configure" > /dev/null
34
-echo "# repositories being checked out and built" > /dev/null
35
-echo "#" > /dev/null
36
-cd demo
37
-ls -FAG
38
-sleep 1
39
-ls -FARG .bootstrap
40
-sleep 1
41
-cat .bootstrap/settings/zlib/dispense_headers_path
42
-cat .bootstrap/settings/Finch/xcode_public_headers
43
-cat .bootstrap/repositories
44
-sleep 2
45
-
46
-echo "#" > /dev/null
47
-echo "# lets make a dry run, to see what would happen" > /dev/null
48
-echo "#" > /dev/null
49
-mulle-bootstrap -n fetch
50
-ls -FAG
51
-sleep 2
52
-
53
-echo "#" > /dev/null
54
-echo "# ok lets fetch them for real" > /dev/null
55
-echo "# the -a always chooses the default, which means clone" > /dev/null
56
-echo "#" > /dev/null
57
-
58
-mulle-bootstrap -a fetch
59
-ls -FAG
60
-sleep 2
61
-
62
-echo "#" > /dev/null
63
-echo "# time to build stuff, mulle-bootstrap w/o a command" > /dev/null
64
-echo "# does fetch and build in one step" > /dev/null
65
-echo "#" > /dev/null
66
-
67
-mulle-bootstrap -n build
68
-sleep 2
69
-
70
-echo "#" > /dev/null
71
-echo "# ok now for real" > /dev/null
72
-echo "#" > /dev/null
73
-mulle-bootstrap build
74
-ls -FARG dependencies
75
-sleep 1
76
-ls -FAG
77
-sleep 2
78
-
79
-
80
-echo "#"
81
-echo "# remove intermediate build files, but how ?" > /dev/null
82
-echo "# ask mulle-bootstrap"  > /dev/null
83
-echo "#"  > /dev/null
84
-set +e
85
-mulle-bootstrap -h
86
-mulle-bootstrap clean -h
87
-sleep 1
88
-set -e
89
-
90
-echo "#"  > /dev/null
91
-echo "# ok clean those intermediates, use -v to get more output"  > /dev/null
92
-echo "#"  > /dev/null
93
-mulle-bootstrap -v clean
94
-ls -FAG
95
-sleep 2
96
-
97
-echo "#" > /dev/null
98
-echo "# now get rid of repos and dependencies too, everything like" > /dev/null
99
-echo "# before. Use an environment variable to get even more output"  > /dev/null
100
-echo "#" > /dev/null
101
-MULLE_BOOTSTRAP_VERBOSE=FULL mulle-bootstrap clean dist
102
-ls -FAG
103
-
104
-exit
105 0
deleted file mode 100644
... ...
@@ -1,45 +0,0 @@
1
-set -e
2
-set -x
3
-[ -d tutorial ] || exit 1
4
-[ -d /tmp/tut ] && chmod -R u+wX /tmp/tut && rm -rf /tmp/tut
5
-
6
-cp -R tutorial /tmp/tut
7
-cd /tmp/tut
8
-ls -FARG
9
-
10
-cd B
11
-mulle-bootstrap -a init
12
-echo "A" > .bootstrap/repositories
13
-ls -FARG .bootstrap/
14
-rm -rf .bootstrap/brews .bootstrap/settings/MulleScion.example/
15
-ls -FARG .bootstrap/
16
-set +e
17
-mulle-bootstrap -y || echo "OK "
18
-
19
-ls dependencies/include
20
-cat ../B/src/B.h
21
-mkdir .bootstrap/settings/A
22
-echo "/usr/local/include/A" > .bootstrap/settings/A/xcode_public_headers
23
-
24
-mulle-bootstrap -y
25
-ls dependencies/include/A/A.h
26
-xcodebuild
27
-mulle-bootstrap -y xcode add
28
-xcodebuild
29
-
30
-git init
31
-git add .bootstrap/repositories .bootstrap/settings/A/xcode_public_headers src/B.? B.xcodeproj/project.pbxproj CMakeLists.txt
32
-git commit -m "mercyful release"
33
-
34
-cd ../C
35
-cat src/C.h
36
-mulle-bootstrap -a init
37
-echo "B" > .bootstrap/repositories
38
-rm -rf .bootstrap/brews .bootstrap/settings/MulleScion.example/
39
-mkdir -p .bootstrap/settings/B
40
-echo "/usr/local/include/B" > .bootstrap/settings/B/xcode_public_headers
41
-mulle-bootstrap -y
42
-ls -FARG  dependencies/include/
43
-ls -FARG .bootstrap.auto
44
-cat .bootstrap.auto/repositories
45
-cat .bootstrap.auto/settings/A/xcode_public_headers
46 0
\ No newline at end of file
... ...
@@ -1,19 +1,21 @@
1 1
 1.0
2 2
 ===
3 3
 
4
-Version 1.0 breaks compatibility with the previous version. You should "clean" everything.
4
+Version 1.0 breaks compatibility with the previous version. You should "clean"
5
+everything.
5 6
 
6 7
 * **change in the dependencies/ structure**
7 8
    it's now dependencies/Debug/lib for Debug and dependencies/lib for Release
8 9
 * The default built is Release only
9
-* mulle-bootstrap can now '-f' force tags and '-d' delete tags
10
+* mulle-bootstrap tag can now '-f' force tags and '-d' delete tags
10 11
 * mulle-bootstrap no longer places headers into `dependencies/usr/local/include`
11 12
 but just into `dependencies/include`
12 13
 * the 'tag' command is now less powerful. It just tags the fetched repositories,
13
-because that's mulle-bootstraps scope. The tag script facility has been
14
+because that's mulle-bootstraps scope. The tag 'script facility' has been
14 15
 eliminated.
15 16
 * new clean target "install"
16 17
 * removed convert-pre-0.10 and ibuild commands
18
+* ConsoleMovies are gone, I am too lazy to maintain them.
17 19
 
18 20
 
19 21
 0.26
... ...
@@ -430,13 +430,17 @@ cmake_sdk_parameter()
430 430
 
431 431
 create_dummy_dirs_against_warnings()
432 432
 {
433
-   local builddir
433
+   local mapped
434
+   local suffix
435
+
436
+   mapped="$1"
437
+   suffix="$2"
438
+
434 439
    local mappedsubdir
435 440
    local suffixsubdir
436 441
 
437
-   builddir="$1"
438
-   mappedsubdir="$2"
439
-   suffixsubdir="$3"
442
+   mappedsubdir="`determine_dependencies_subdir "${mapped}"`"
443
+   suffixsubdir="`determine_dependencies_subdir "${suffix}"`"
440 444
 
441 445
    local owd
442 446
 
... ...
@@ -536,6 +540,8 @@ ${C_MAGENTA}${C_BOLD}${sdk}${C_INFO} in \"${builddir}\" ..."
536 540
    suffix="`determine_suffix "${configuration}" "${sdk}"`"
537 541
    sdkparameter="`cmake_sdk_parameter "${sdk}"`"
538 542
 
543
+   create_dummy_dirs_against_warnings "${mapped}" "${suffix}"
544
+
539 545
    local mappedsubdir
540 546
    local fallbacksubdir
541 547
    local suffixsubdir
... ...
@@ -552,8 +558,6 @@ ${C_MAGENTA}${C_BOLD}${sdk}${C_INFO} in \"${builddir}\" ..."
552 558
    other_cppflags="`gcc_cppflags_value "${name}"`"
553 559
    other_ldflags="`gcc_ldflags_value "${name}"`"
554 560
 
555
-   create_dummy_dirs_against_warnings "${builddir}" "${mappedsubdir}" "${suffixsubdir}"
556
-
557 561
    local logfile1
558 562
    local logfile2
559 563
 
... ...
@@ -694,6 +698,8 @@ ${C_MAGENTA}${C_BOLD}${sdk}${C_INFO} in \"${builddir}\" ..."
694 698
    sdkpath="`gcc_sdk_parameter "${sdk}"`"
695 699
    sdkpath="`echo "${sdkpath}" | sed -e 's/ /\\ /g'`"
696 700
 
701
+   create_dummy_dirs_against_warnings "${mapped}" "${suffix}"
702
+
697 703
    local mappedsubdir
698 704
    local fallbacksubdir
699 705
    local suffixsubdir
... ...
@@ -710,7 +716,6 @@ ${C_MAGENTA}${C_BOLD}${sdk}${C_INFO} in \"${builddir}\" ..."
710 716
    other_cppflags="`gcc_cppflags_value "${name}"`"
711 717
    other_ldflags="`gcc_ldflags_value "${name}"`"
712 718
 
713
-   create_dummy_dirs_against_warnings "${builddir}" "${mappedsubdir}" "${suffixsubdir}"
714 719
 
715 720
    local logfile1
716 721
    local logfile2
... ...
@@ -970,6 +975,8 @@ ${C_MAGENTA}${C_BOLD}${sdk}${C_INFO}${info} in \
970 975
       sdk=
971 976
    fi
972 977
 
978
+   create_dummy_dirs_against_warnings "${mapped}" "${suffix}"
979
+
973 980
    local mappedsubdir
974 981
    local fallbacksubdir
975 982
    local suffixsubdir
... ...
@@ -1120,8 +1127,6 @@ ${C_MAGENTA}${C_BOLD}${sdk}${C_INFO}${info} in \
1120 1127
    fi
1121 1128
 
1122 1129
 
1123
-   create_dummy_dirs_against_warnings "${builddir}" "${mappedsubdir}" "${suffixsubdir}"
1124
-
1125 1130
    owd=`pwd`
1126 1131
    exekutor cd "${srcdir}" || exit 1
1127 1132
 
... ...
@@ -293,9 +293,9 @@ link_command()
293 293
    local dstdir
294 294
    dstdir="`dirname -- "${dst}"`"
295 295
 
296
-   if [ ! -e "${dstdir}/${src}" ]
296
+   if [ ! -e "${dstdir}/${src}" -a "${MULLE_BOOTSTRAP_DRY_RUN}" != "YES" ]
297 297
    then
298
-      fail "\"${dstdir}/${src}${C_ERROR} does not exist ($PWD)"
298
+      fail "${C_RESET}${C_BOLD}${dstdir}/${src}${C_ERROR} does not exist ($PWD)"
299 299
    fi
300 300
 
301 301
    if [ "${COMMAND}" = "install" ]
... ...
@@ -324,7 +324,7 @@ link_command()
324 324
          name="`basename -- "${dst}"`"
325 325
          log_warning "tag ${tag} will be ignored, due to symlink" >&2
326 326
          log_warning "if you want to checkout this tag do:" >&2
327
-         log_warning "${C_RESET}(cd .repos/${name}; git ${GITFLAGS} checkout \"${tag}\" )${C_WARNING}" >&2
327
+         log_warning "${C_RESET}${C_BOLD}(cd .repos/${name}; git ${GITFLAGS} checkout \"${tag}\" )${C_WARNING}" >&2
328 328
       fi
329 329
    fi
330 330
 
... ...
@@ -33,18 +33,17 @@ git_is_bare_repository()
33 33
    local is_bare
34 34
 
35 35
        # if bare repo, we can only clone anyway
36
-    is_bare=`( cd "${1}"; git rev-parse --is-bare-repository )`
36
+    is_bare=`( cd "${1}"; git rev-parse --is-bare-repository 2> /dev/null )`
37 37
     [ "${is_bare}" = "true" ]
38 38
 }
39 39
 
40 40
 
41 41
 git_get_branch()
42 42
 {
43
-   ( cd "$1" ; git rev-parse --abbrev-ref HEAD )
43
+   ( cd "$1" ; git rev-parse --abbrev-ref HEAD 2> /dev/null )
44 44
 }
45 45
 
46 46
 
47
-
48 47
 git_checkout_tag()
49 48
 {
50 49
    local dst
... ...
@@ -39,9 +39,6 @@
39 39
 . mulle-bootstrap-scripts.sh
40 40
 
41 41
 
42
-name=`basename -- "${PWD}"`
43
-
44
-
45 42
 usage()
46 43
 {
47 44
    cat <<EOF
... ...
@@ -50,7 +47,7 @@ usage: tag [-f] <tag>
50 47
    -d           : delete tag
51 48
    -f           : force tag
52 49
 
53
-   tag          : the tag for your repository ($name)
50
+   tag          : the tag for your fetched repositories
54 51
 EOF
55 52
 }
56 53
 
... ...
@@ -247,7 +244,7 @@ main()
247 244
 
248 245
    run_fetch_settings_script "pre-tag"
249 246
 
250
-   tag "${CLONES_SUBDIR}" "${REPO}" "${TAG}" "${VENDOR_TAG}" "$@"
247
+   tag "${CLONES_SUBDIR}" "${TAG}" "$@"
251 248
 
252 249
    run_fetch_settings_script "pre-tag"
253 250
 }
... ...
@@ -301,19 +301,17 @@ Release"
301 301
 
302 302
    default=`echo "${configurations}" | tail -1 | sed 's/^[ \t]*//;s/[ \t]*$//'`
303 303
 
304
-   library_search_paths="\$(DEPENDENCIES_DIR)/${LIBRARY_DIR_NAME}/\$(LIBRARY_CONFIGURATION)\$(EFFECTIVE_PLATFORM_NAME)"
305
-   library_search_paths="${library_search_paths} \$(DEPENDENCIES_DIR)/${LIBRARY_DIR_NAME}/\$(LIBRARY_CONFIGURATION)"
306
-   library_search_paths="${library_search_paths} \$(DEPENDENCIES_DIR)/${LIBRARY_DIR_NAME}/${default}\$(EFFECTIVE_PLATFORM_NAME)"
307
-   library_search_paths="${library_search_paths} \$(DEPENDENCIES_DIR)/${LIBRARY_DIR_NAME}/${default}"
304
+   library_search_paths="\$(DEPENDENCIES_DIR)/\$(LIBRARY_CONFIGURATION)\$(EFFECTIVE_PLATFORM_NAME)/${LIBRARY_DIR_NAME}"
305
+   library_search_paths="${library_search_paths} \$(DEPENDENCIES_DIR)/\$(LIBRARY_CONFIGURATION)/${LIBRARY_DIR_NAME}"
306
+   library_search_paths="${library_search_paths} \$(DEPENDENCIES_DIR)/\$(EFFECTIVE_PLATFORM_NAME)/${LIBRARY_DIR_NAME}"
308 307
    library_search_paths="${library_search_paths} \$(DEPENDENCIES_DIR)/${LIBRARY_DIR_NAME}"
309 308
    library_search_paths="${library_search_paths} /usr/local/lib"
310 309
    library_search_paths="${library_search_paths} \$(inherited)"
311 310
 
312 311
 
313
-   framework_search_paths="\$(DEPENDENCIES_DIR)/${FRAMEWORK_DIR_NAME}/\$(LIBRARY_CONFIGURATION)\$(EFFECTIVE_PLATFORM_NAME)"
314
-   framework_search_paths="${framework_search_paths} \$(DEPENDENCIES_DIR)/${FRAMEWORK_DIR_NAME}/\$(LIBRARY_CONFIGURATION)"
315
-   framework_search_paths="${framework_search_paths} \$(DEPENDENCIES_DIR)/${FRAMEWORK_DIR_NAME}/${default}\$(EFFECTIVE_PLATFORM_NAME)"
316
-   framework_search_paths="${framework_search_paths} \$(DEPENDENCIES_DIR)/${FRAMEWORK_DIR_NAME}/${default}"
312
+   framework_search_paths="\$(DEPENDENCIES_DIR)/\$(LIBRARY_CONFIGURATION)\$(EFFECTIVE_PLATFORM_NAME)/${FRAMEWORK_DIR_NAME}"
313
+   framework_search_paths="${framework_search_paths} \$(DEPENDENCIES_DIR)/\$(LIBRARY_CONFIGURATION)/${FRAMEWORK_DIR_NAME}"
314
+   framework_search_paths="${framework_search_paths} \$(DEPENDENCIES_DIR)/\$(EFFECTIVE_PLATFORM_NAME)/${FRAMEWORK_DIR_NAME}"
317 315
    framework_search_paths="${framework_search_paths} \$(DEPENDENCIES_DIR)/${FRAMEWORK_DIR_NAME}"
318 316
    framework_search_paths="${framework_search_paths} \$(inherited)"
319 317
 
320 318
deleted file mode 100644
... ...
@@ -1,13 +0,0 @@
1
-//
2
-//  A.h
3
-//  A
4
-//
5
-//  Created by Nat! on 24.09.15.
6
-//  Copyright (c) 2015 Mulle kybernetiK. All rights reserved.
7
-//
8
-
9
-#import <Foundation/Foundation.h>
10
-
11
-@interface A : NSObject
12
-
13
-@end
14 0
deleted file mode 100644
... ...
@@ -1,13 +0,0 @@
1
-//
2
-//  A.m
3
-//  A
4
-//
5
-//  Created by Nat! on 24.09.15.
6
-//  Copyright (c) 2015 Mulle kybernetiK. All rights reserved.
7
-//
8
-
9
-#import "A.h"
10
-
11
-@implementation A
12
-
13
-@end
14 0
deleted file mode 100644
... ...
@@ -1,251 +0,0 @@
1
-// !$*UTF8*$!
2
-{
3
-	archiveVersion = 1;
4
-	classes = {
5
-	};
6
-	objectVersion = 46;
7
-	objects = {
8
-
9
-/* Begin PBXBuildFile section */
10
-		41C310681BB444B500F0B036 /* B.m in Sources */ = {isa = PBXBuildFile; fileRef = 41C310671BB444B500F0B036 /* B.m */; };
11
-		41C310A01BB44CD400F0B036 /* B.h in Headers */ = {isa = PBXBuildFile; fileRef = 41C310651BB444B500F0B036 /* B.h */; settings = {ATTRIBUTES = (Public, ); }; };
12
-/* End PBXBuildFile section */
13
-
14
-/* Begin PBXFileReference section */
15
-		41C310621BB444B500F0B036 /* libB.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libB.a; sourceTree = BUILT_PRODUCTS_DIR; };
16
-		41C310651BB444B500F0B036 /* B.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = B.h; sourceTree = "<group>"; };
17
-		41C310671BB444B500F0B036 /* B.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = B.m; sourceTree = "<group>"; };
18
-/* End PBXFileReference section */
19
-
20
-/* Begin PBXFrameworksBuildPhase section */
21
-		41C3105F1BB444B500F0B036 /* Frameworks */ = {
22
-			isa = PBXFrameworksBuildPhase;
23
-			buildActionMask = 2147483647;
24
-			files = (
25
-			);
26
-			runOnlyForDeploymentPostprocessing = 0;
27
-		};
28
-/* End PBXFrameworksBuildPhase section */
29
-
30
-/* Begin PBXGroup section */
31
-		41C310591BB444B500F0B036 = {
32
-			isa = PBXGroup;
33
-			children = (
34
-				41C310641BB444B500F0B036 /* B */,
35
-				41C310631BB444B500F0B036 /* Products */,
36
-			);
37
-			sourceTree = "<group>";
38
-		};
39
-		41C310631BB444B500F0B036 /* Products */ = {
40
-			isa = PBXGroup;
41
-			children = (
42
-				41C310621BB444B500F0B036 /* libB.a */,
43
-			);
44
-			name = Products;
45
-			sourceTree = "<group>";
46
-		};
47
-		41C310641BB444B500F0B036 /* B */ = {
48
-			isa = PBXGroup;
49
-			children = (
50
-				41C310651BB444B500F0B036 /* B.h */,
51
-				41C310671BB444B500F0B036 /* B.m */,
52
-			);
53
-			name = B;
54
-			path = src;
55
-			sourceTree = "<group>";
56
-		};
57
-/* End PBXGroup section */
58
-
59
-/* Begin PBXHeadersBuildPhase section */
60
-		41C3109F1BB44CCD00F0B036 /* Headers */ = {
61
-			isa = PBXHeadersBuildPhase;
62
-			buildActionMask = 2147483647;
63
-			files = (
64
-				41C310A01BB44CD400F0B036 /* B.h in Headers */,
65
-			);
66
-			runOnlyForDeploymentPostprocessing = 0;
67
-		};
68
-/* End PBXHeadersBuildPhase section */
69
-
70
-/* Begin PBXNativeTarget section */
71
-		41C310611BB444B500F0B036 /* B */ = {
72
-			isa = PBXNativeTarget;
73
-			buildConfigurationList = 41C310761BB444B500F0B036 /* Build configuration list for PBXNativeTarget "B" */;
74
-			buildPhases = (
75
-				41C3109F1BB44CCD00F0B036 /* Headers */,
76
-				41C3105E1BB444B500F0B036 /* Sources */,
77
-				41C3105F1BB444B500F0B036 /* Frameworks */,
78
-			);
79
-			buildRules = (
80
-			);
81
-			dependencies = (
82
-			);
83
-			name = B;
84
-			productName = B;
85
-			productReference = 41C310621BB444B500F0B036 /* libB.a */;
86
-			productType = "com.apple.product-type.library.static";
87
-		};
88
-/* End PBXNativeTarget section */
89
-
90
-/* Begin PBXProject section */
91
-		41C3105A1BB444B500F0B036 /* Project object */ = {
92
-			isa = PBXProject;
93
-			attributes = {
94
-				LastUpgradeCheck = 0640;
95
-				ORGANIZATIONNAME = "Mulle kybernetiK";
96
-				TargetAttributes = {
97
-					41C310611BB444B500F0B036 = {
98
-						CreatedOnToolsVersion = 6.4;
99
-					};
100
-				};
101
-			};
102
-			buildConfigurationList = 41C3105D1BB444B500F0B036 /* Build configuration list for PBXProject "B" */;
103
-			compatibilityVersion = "Xcode 3.2";
104
-			developmentRegion = English;
105
-			hasScannedForEncodings = 0;
106
-			knownRegions = (
107
-				en,
108
-			);
109
-			mainGroup = 41C310591BB444B500F0B036;
110
-			productRefGroup = 41C310631BB444B500F0B036 /* Products */;
111
-			projectDirPath = "";
112
-			projectRoot = "";
113
-			targets = (
114
-				41C310611BB444B500F0B036 /* B */,
115
-			);
116
-		};
117
-/* End PBXProject section */
118
-
119
-/* Begin PBXSourcesBuildPhase section */
120
-		41C3105E1BB444B500F0B036 /* Sources */ = {
121
-			isa = PBXSourcesBuildPhase;
122
-			buildActionMask = 2147483647;
123
-			files = (
124
-				41C310681BB444B500F0B036 /* B.m in Sources */,
125
-			);
126
-			runOnlyForDeploymentPostprocessing = 0;
127
-		};
128
-/* End PBXSourcesBuildPhase section */
129
-
130
-/* Begin XCBuildConfiguration section */
131
-		41C310741BB444B500F0B036 /* Debug */ = {
132
-			isa = XCBuildConfiguration;
133
-			buildSettings = {
134
-				ALWAYS_SEARCH_USER_PATHS = NO;
135
-				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
136
-				CLANG_CXX_LIBRARY = "libc++";
137
-				CLANG_ENABLE_MODULES = YES;
138
-				CLANG_ENABLE_OBJC_ARC = YES;
139
-				CLANG_WARN_BOOL_CONVERSION = YES;
140
-				CLANG_WARN_CONSTANT_CONVERSION = YES;
141
-				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
142
-				CLANG_WARN_EMPTY_BODY = YES;
143
-				CLANG_WARN_ENUM_CONVERSION = YES;
144
-				CLANG_WARN_INT_CONVERSION = YES;
145
-				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
146
-				CLANG_WARN_UNREACHABLE_CODE = YES;
147
-				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
148
-				COPY_PHASE_STRIP = NO;
149
-				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
150
-				ENABLE_STRICT_OBJC_MSGSEND = YES;
151
-				GCC_C_LANGUAGE_STANDARD = gnu99;
152
-				GCC_DYNAMIC_NO_PIC = NO;
153
-				GCC_NO_COMMON_BLOCKS = YES;
154
-				GCC_OPTIMIZATION_LEVEL = 0;
155
-				GCC_PREPROCESSOR_DEFINITIONS = (
156
-					"DEBUG=1",
157
-					"$(inherited)",
158
-				);
159
-				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
160
-				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
161
-				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
162
-				GCC_WARN_UNDECLARED_SELECTOR = YES;
163
-				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
164
-				GCC_WARN_UNUSED_FUNCTION = YES;
165
-				GCC_WARN_UNUSED_VARIABLE = YES;
166
-				IPHONEOS_DEPLOYMENT_TARGET = 8.4;
167
-				MTL_ENABLE_DEBUG_INFO = YES;
168
-				ONLY_ACTIVE_ARCH = YES;
169
-				SDKROOT = iphoneos;
170
-			};
171
-			name = Debug;
172
-		};
173
-		41C310751BB444B500F0B036 /* Release */ = {
174
-			isa = XCBuildConfiguration;
175
-			buildSettings = {
176
-				ALWAYS_SEARCH_USER_PATHS = NO;
177
-				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
178
-				CLANG_CXX_LIBRARY = "libc++";
179
-				CLANG_ENABLE_MODULES = YES;
180
-				CLANG_ENABLE_OBJC_ARC = YES;
181
-				CLANG_WARN_BOOL_CONVERSION = YES;
182
-				CLANG_WARN_CONSTANT_CONVERSION = YES;
183
-				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
184
-				CLANG_WARN_EMPTY_BODY = YES;
185
-				CLANG_WARN_ENUM_CONVERSION = YES;
186
-				CLANG_WARN_INT_CONVERSION = YES;
187
-				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
188
-				CLANG_WARN_UNREACHABLE_CODE = YES;
189
-				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
190
-				COPY_PHASE_STRIP = NO;
191
-				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
192
-				ENABLE_NS_ASSERTIONS = NO;
193
-				ENABLE_STRICT_OBJC_MSGSEND = YES;
194
-				GCC_C_LANGUAGE_STANDARD = gnu99;
195
-				GCC_NO_COMMON_BLOCKS = YES;
196
-				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
197
-				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
198
-				GCC_WARN_UNDECLARED_SELECTOR = YES;
199
-				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
200
-				GCC_WARN_UNUSED_FUNCTION = YES;
201
-				GCC_WARN_UNUSED_VARIABLE = YES;
202
-				IPHONEOS_DEPLOYMENT_TARGET = 8.4;
203
-				MTL_ENABLE_DEBUG_INFO = NO;
204
-				SDKROOT = iphoneos;
205
-				VALIDATE_PRODUCT = YES;
206
-			};
207
-			name = Release;
208
-		};
209
-		41C310771BB444B500F0B036 /* Debug */ = {
210
-			isa = XCBuildConfiguration;
211
-			buildSettings = {
212
-				OTHER_LDFLAGS = "-ObjC";
213
-				PRODUCT_NAME = "$(TARGET_NAME)";
214
-				SKIP_INSTALL = YES;
215
-			};
216
-			name = Debug;
217
-		};
218
-		41C310781BB444B500F0B036 /* Release */ = {
219
-			isa = XCBuildConfiguration;
220
-			buildSettings = {
221
-				OTHER_LDFLAGS = "-ObjC";
222
-				PRODUCT_NAME = "$(TARGET_NAME)";
223
-				SKIP_INSTALL = YES;
224
-			};
225
-			name = Release;
226
-		};
227
-/* End XCBuildConfiguration section */
228
-
229
-/* Begin XCConfigurationList section */
230
-		41C3105D1BB444B500F0B036 /* Build configuration list for PBXProject "B" */ = {
231
-			isa = XCConfigurationList;
232
-			buildConfigurations = (
233
-				41C310741BB444B500F0B036 /* Debug */,
234
-				41C310751BB444B500F0B036 /* Release */,
235
-			);
236
-			defaultConfigurationIsVisible = 0;
237
-			defaultConfigurationName = Release;
238
-		};
239
-		41C310761BB444B500F0B036 /* Build configuration list for PBXNativeTarget "B" */ = {
240
-			isa = XCConfigurationList;
241
-			buildConfigurations = (
242
-				41C310771BB444B500F0B036 /* Debug */,
243
-				41C310781BB444B500F0B036 /* Release */,
244
-			);
245
-			defaultConfigurationIsVisible = 0;
246
-			defaultConfigurationName = Release;
247
-		};
248
-/* End XCConfigurationList section */
249
-	};
250
-	rootObject = 41C3105A1BB444B500F0B036 /* Project object */;
251
-}
252 0
deleted file mode 100644
... ...
@@ -1,16 +0,0 @@
1
-cmake_minimum_required (VERSION 3.0)
2
-
3
-project (B)
4
-
5
-set(HEADERS
6
-src/B.h)
7
-
8
-add_library(B
9
-src/B.m
10
-)
11
-
12
-
13
-target_link_libraries( B LINK_PUBLIC A)
14
-
15
-INSTALL(TARGETS B DESTINATION "lib")
16
-INSTALL(FILES ${HEADERS} DESTINATION "include/B")
17 0
deleted file mode 100644
... ...
@@ -1,13 +0,0 @@
1
-//
2
-//  B.h
3
-//  B
4
-//
5
-//  Created by Nat! on 24.09.15.
6
-//  Copyright (c) 2015 Mulle kybernetiK. All rights reserved.
7
-//
8
-
9
-#import <A/A.h>
10
-
11
-@interface B : A
12
-
13
-@end
14 0
deleted file mode 100644
... ...
@@ -1,13 +0,0 @@
1
-//
2
-//  B.m
3
-//  B
4
-//
5
-//  Created by Nat! on 24.09.15.
6
-//  Copyright (c) 2015 Mulle kybernetiK. All rights reserved.
7
-//
8
-
9
-#import "B.h"
10
-
11
-@implementation B
12
-
13
-@end
14 0
deleted file mode 100644
... ...
@@ -1,16 +0,0 @@
1
-cmake_minimum_required (VERSION 3.0)
2
-
3
-project (C)
4
-
5
-set(HEADERS
6
-src/C.h)
7
-
8
-add_library(C
9
-src/C.m
10
-)
11
-
12
-
13
-target_link_libraries( C LINK_PUBLIC B)
14
-
15
-INSTALL(TARGETS B DESTINATION "lib")
16
-INSTALL(FILES ${HEADERS} DESTINATION "include/C")
17 0
deleted file mode 100644
... ...
@@ -1,13 +0,0 @@
1
-//
2
-//  C.h
3
-//  C
4
-//
5
-//  Created by Nat! on 24.09.15.
6
-//  Copyright (c) 2015 Mulle kybernetiK. All rights reserved.
7
-//
8
-
9
-#import <B/B.h>
10
-
11
-@interface C : B
12
-
13
-@end
14 0
deleted file mode 100644
... ...
@@ -1,13 +0,0 @@
1
-//
2
-//  C.m
3
-//  C
4
-//
5
-//  Created by Nat! on 24.09.15.
6
-//  Copyright (c) 2015 Mulle kybernetiK. All rights reserved.
7
-//
8
-
9
-#import "C.h"
10
-
11
-@implementation C
12
-
13
-@end
14 0
new file mode 100644
... ...
@@ -0,0 +1,335 @@
1
+
2
+# "a b c" Tutorial
3
+
4
+> This tutorial shows you how to orchestrate your own libraries during
5
+> developement.
6
+
7
+This directory contains a simple test with 3 folders `a`, `b`,  `c`. Each folder
8
+contains a minimal "C" project of the same name.  Project **c* depends
9
+on **b**. And project **b** depends on **a**.
10
+
11
+`a.h`:
12
+
13
+```
14
+extern int a( void);
15
+```
16
+
17
+`a.c`:
18
+
19
+```
20
+int a( void)
21
+{
22
+   return( 1848);
23
+}
24
+```
25
+
26
+**b** requires **a** to be present:
27
+
28
+
29
+`b.h`:
30
+
31
+```
32
+extern int b( void);
33
+```
34
+
35
+`b.c`:
36
+
37
+```
38
+#include <a/a.h>
39
+
40
+int b( void)
41
+{
42
+   return( a() == 1848  ? 1 : 0);
43
+}
44
+```
45
+
46
+**c** is quite like **b**
47
+
48
+`c.h`:
49
+
50
+```
51
+extern int c( void);
52
+```
53
+
54
+`c.c`:
55
+
56
+```
57
+#include <b/b.h>
58
+
59
+int c( void)
60
+{
61
+   return( b() ? 1848 : 1849);
62
+}
63
+```
64
+
65
+Initially none of the folders contain a `.bootstrap` folder.
66
+
67
+
68
+Try to build **b** with `cmake`. It will not work, because the header
69
+`<a/a.h>` will not be found.
70
+
71
+```console
72
+cd b
73
+mkdir build
74
+cd build
75
+cmake ..
76
+# -- The C compiler identification is AppleClang 7.0.2.7000181
77
+# -- The CXX compiler identification is AppleClang 7.0.2.7000181
78
+# -- Check for working C compiler: /applications/Xcode-7.2.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
79
+# -- Check for working C compiler: /applications/Xcode-7.2.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
80
+# -- Detecting C compiler ABI info
81
+# -- Detecting C compiler ABI info - done
82
+# -- Detecting C compile features
83
+# -- Detecting C compile features - done
84
+# -- Check for working CXX compiler: /applications/Xcode-7.2.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
85
+# -- Check for working CXX compiler: /applications/Xcode-7.2.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
86
+# -- Detecting CXX compiler ABI info
87
+# -- Detecting CXX compiler ABI info - done
88
+# -- Detecting CXX compile features
89
+# -- Detecting CXX compile features - done
90
+# -- Configuring done
91
+# -- Generating done
92
+# -- Build files have been written to: /tutorial/b/build
93
+# Scanning dependencies of target b
94
+# [ 50%] Building C object CMakeFiles/b.dir/src/b.c.o
95
+# /tutorial/b/src/b.c:1:10: fatal error: 'a/a.h' file not found
96
+# include <a/a.h>
97
+#         ^
98
+# 1 error generated.
99
+# make[2]: *** [CMakeFiles/b.dir/src/b.c.o] Error 1
100
+# make[1]: *** [CMakeFiles/b.dir/all] Error 2
101
+# make: *** [all] Error 2
102
+#
103
+cd ..
104
+```
105
+
106
+## mulle-bootstrap to the rescue
107
+
108
+If you don't have cmake installed yet, you can use `mulle-bootstrap` to install
109
+it (on OS X and Linux). Here we set up **mulle-bootstrap** to fetch cmake.
110
+
111
+
112
+```console
113
+cd b
114
+mulle-bootstrap init
115
+echo "cmake" >> .bootstrap/brews
116
+```
117
+
118
+At that point a `.bootstrap` will be created with some default
119
+content. Take the option to edit **repositories** and you should be in an editor
120
+seeing:
121
+
122
+```shell
123
+# add projects that should be cloned with git in order
124
+# of their inter-dependencies
125
+#
126
+# some possible types of repository specifications:
127
+# http://www.mulle-kybernetik.com/repositories/MulleScion
128
+# git@github.com:mulle-nat/MulleScion.git
129
+# ../MulleScion
130
+# /Volumes/Source/srcM/MulleScion
131
+#
132
+```
133
+Lines starting with a '#' are comments, these are just useless fluff in the
134
+long run, so delete them all, and add a line containing 'a'.
135
+The file now looks like this.
136
+
137
+`.bootstrap/repositories`:
138
+
139
+```
140
+a
141
+```
142
+
143
+Alright, ready to bootstrap.  First lets see what **mulle-bootstrap** will do
144
+using the `-n`option
145
+
146
+```console
147
+mulle-bootstrap -n
148
+# Dry run is active.
149
+# mkdir -p .repos
150
+# There is a ../a folder in the parent
151
+# directory of this project.
152
+# Use it ? (y/N)
153
+```
154
+
155
+**a** will be found in the parent directory, and you have the option to use it,
156
+which you should do.
157
+
158
+```console
159
+# Use it ? (y/N) y
160
+# ../a is not a git repository (yet ?)
161
+# So symlinking is the only way to go.
162
+# ln -s -f ../../a .repos/a
163
+# Symlinking a ...
164
+# ==> ln -s -f ../../a .repos/a
165
+# ==> [ -e .repos/a ]
166
+# ==> [ -e .repos/a ]
167
+# ==> [ -e .repos/a ]
168
+# ==> mkdir -p .repos
169
+# ==> touch .repos/.fetch_update_started
170
+# Dry run is active.
171
+# ==> mkdir -p .repos
172
+# Dry run is active.
173
+# No repositories in ".repos", so nothing to build.
174
+```
175
+
176
+It can not preview the build stage, because there are no repositories really
177
+setup yet.
178
+
179
+The conservative choice now is to do it in two steps. `mulle-bootstrap fetch`
180
+and the `mulle-bootstrap build`. `mulle-bootstrap` without a command
181
+combines both steps into one.
182
+
183
+Lets go with `mulle-bootstrap fetch` first, so we can examine the build
184
+processs afterwards. It will be just like above, but the symlink should be in
185
+place now.
186
+
187
+```
188
+mulle-bootstrap fetch
189
+# There is a ../a folder in the parent
190
+# directory of this project.
191
+# Use it ? (y/N) > y
192
+# ../a is not a git repository (yet ?)
193
+# So symlinking is the only way to go.
194
+# Symlinking a ...
195
+```
196
+
197
+Now lets see what `mulle-bootstrap build` will do:
198
+
199
+```console
200
+Dry run is active.
201
+==> mkdir -p .repos/.zombies
202
+==> touch .repos/.zombies/a
203
+Dry run is active.
204
+==> [ -e .repos/a ]
205
+Let cmake do a Release build of a for SDK Default in "build/.repos/Release/a" ...
206
+==> mkdir -p /tmp/tutorial/b/dependencies/include
207
+==> mkdir -p /tmp/tutorial/b/dependencies/Release/lib
208
+==> mkdir -p /tmp/tutorial/b/dependencies/Release/Frameworks
209
+==> mkdir -p /tmp/tutorial/b/dependencies/Release/lib
210
+==> mkdir -p /tmp/tutorial/b/dependencies/Release/Frameworks
211
+==> mkdir -p build/.repos/.logs
212
+==> mkdir -p build/.repos/Release/a
213
+==> cd build/.repos/Release/a
214
+==> cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_SYSROOT=/applications/Xcode-7.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -DDEPENDENCIES_DIR=/tmp/tutorial/b/dependencies -DCMAKE_INSTALL_PREFIX:PATH=/tmp/tutorial/b/dependencies/tmp/usr/local -DCMAKE_C_FLAGS=-I/tmp/tutorial/b/dependencies/include -F/tmp/tutorial/b/dependencies/Release/Frameworks -F/tmp/tutorial/b/dependencies/Release/Frameworks -F/tmp/tutorial/b/dependencies/Release/Frameworks -F/tmp/tutorial/b/dependencies/Frameworks  -DCMAKE_CXX_FLAGS=-I/tmp/tutorial/b/dependencies/include -F/tmp/tutorial/b/dependencies/Release/Frameworks -F/tmp/tutorial/b/dependencies/Release/Frameworks -F/tmp/tutorial/b/dependencies/Release/Frameworks -F/tmp/tutorial/b/dependencies/Frameworks  -DCMAKE_EXE_LINKER_FLAGS=-L/tmp/tutorial/b/dependencies/Release/lib -L/tmp/tutorial/b/dependencies/Release/lib -L/tmp/tutorial/b/dependencies/Release/lib -L/tmp/tutorial/b/dependencies/lib  -DCMAKE_SHARED_LINKER_FLAGS=-L/tmp/tutorial/b/dependencies/Release/lib -L/tmp/tutorial/b/dependencies/Release/lib -L/tmp/tutorial/b/dependencies/Release/lib -L/tmp/tutorial/b/dependencies/lib  -DCMAKE_MODULE_PATH=;${CMAKE_MODULE_PATH} .repos/a
215
+==> make -j 12 VERBOSE=1 install
216
+==> cd /tmp/tutorial/b
217
+==> [ -e .repos/a ]
218
+Write-protecting dependencies to avoid spurious header edits
219
+==> chmod -R a-w dependencies
220
+```
221
+
222
+Lets do it for real, and use `mulle-bootstrap build`.
223
+
224
+```
225
+mulle-bootstrap build
226
+# Let cmake do a Release build of a for SDK Default in "build/.repos/Release/a" ...
227
+# CMake Warning:
228
+#   Manually-specified variables were not used by the project:
229
+#
230
+#     DEPENDENCIES_DIR
231
+#
232
+#
233
+# Write-protecting dependencies to avoid spurious header edits
234
+```
235
+
236
+In the end we wind up with the "dependencies" folder, which should contain
237
+the following files (`ls -GFR dependencies`):
238
+
239
+~~~
240
+Frameworks/ include/    lib/
241
+
242
+dependencies/Frameworks:
243
+
244
+dependencies/include:
245
+a/
246
+
247
+dependencies/include/a:
248
+a.h
249
+
250
+dependencies/lib:
251
+libA.a
252
+~~~
253
+
254
+
255
+## modify CMakeLists.txt to use dependencies as search path
256
+
257
+
258
+Put these lines into the `CMakeLists.txt` file to add the proper search paths:
259
+
260
+```
261
+include_directories( BEFORE SYSTEM
262
+   dependencies/include
263
+)
264
+
265
+link_directories( ${CMAKE_BINARY_DIR}
266
+   dependencies/lib
267
+)
268
+```
269
+
270
+`CMakeLists.txt`:
271
+
272
+```
273
+cmake_minimum_required (VERSION 3.0)
274
+
275
+project (b)
276
+
277
+include_directories( BEFORE SYSTEM
278
+   dependencies/include
279
+)
280
+
281
+link_directories( ${CMAKE_BINARY_DIR}
282
+   dependencies/lib
283
+)
284
+
285
+set(HEADERS
286
+src/b.h)
287
+
288
+add_library(b
289
+src/b.c
290
+)
291
+
292
+target_link_libraries( b LINK_PUBLIC a)
293
+
294
+INSTALL(TARGETS b DESTINATION "lib")
295
+INSTALL(FILES ${HEADERS} DESTINATION "include/b")
296
+```
297
+
298
+Now **b** will build:
299
+
300
+```
301
+mkdir build
302
+cd build
303
+cmake ..
304
+make
305
+cd ..
306
+```
307
+
308
+## Inheriting our work in **c**
309
+
310
+
311
+Now let's do the same for `c`:
312
+
313
+```console
314
+mulle-bootstrap init
315
+echo "b" > .bootstrap/repositories
316
+mulle-bootstrap
317
+```
318
+
319
+This will have used the dependency information from b, to automatically also
320
+build a for you in the proper order.
321
+
322
+Since the CMakeLists.txt file is already setup properly, you can now just
323
+build **c**:
324
+
325
+```
326
+mkdir build 2> /dev/null
327
+cd build
328
+cmake ..
329
+make
330
+```
331
+
332
+
333
+
334
+
335
+
0 336
new file mode 100644
... ...
@@ -0,0 +1,87 @@
1
+You can also use xcodebuild instead of cmake. This file lists the few
2
+differerences:
3
+
4
+
5
+#  Change build_preferences to `xcodebuild`
6
+
7
+```console
8
+cd b
9
+mulle-bootstrap init
10
+mkdir -p .bootstrap.local/settings
11
+echo "xcodebuild" >> .bootstrap.local/settings/build_preferences
12
+```
13
+
14
+
15
+# Set dispense_headers_path to control header output
16
+
17
+
18
+After `mulle-bootstrap build` we wind up with the "dependencies" folder,
19
+which should contain the following files (`ls -GFR dependencies`):
20
+
21
+~~~
22
+Frameworks/ include/    lib/
23
+
24
+dependencies/Frameworks:
25
+
26
+dependencies/include:
27
+a/
28
+
29
+dependencies/include/a:
30
+a.h
31
+
32
+dependencies/lib:
33
+libA.a
34
+~~~
35
+
36
+The header file `a.h` is in `dependencies/include`, which is not where we need
37
+it. We want it to be in `dependencies/include/a`.
38
+
39
+
40
+We can instruct **mulle-bootstrap** to place the headers somewhere else. This
41
+is done on a per-repository basis in `.bootstrap/settings`.
42
+
43
+
44
+```console
45
+mkdir -p .bootstrap/settings/a
46
+echo "/include/a" > .bootstrap/settings/a/dispense_headers_path
47
+```
48
+
49
+Now build it again with **mulle-bootstrap**, the header should appear as
50
+`dependencies/include/a/a.h`, if not you may have made an exciting
51
+mistake (see "Figuring out what went wrong").
52
+
53
+
54
+
55
+#### Tell xcodebuild where the dependencies are
56
+
57
+```console
58
+mulle-bootstrap xcode add
59
+# Settings will be added to B.xcodeproj.
60
+# In the long term it may be more useful to copy/paste the
61
+# following lines into a set of local .xcconfig file, that is
62
+# inherited by all configurations.
63
+# -----------------------------------------------------------
64
+# Common.xcconfig:
65
+# -----------------------------------------------------------
66
+# DEPENDENCIES_DIR=$(PROJECT_DIR)/dependencies
67
+# HEADER_SEARCH_PATHS=$(DEPENDENCIES_DIR)/include /usr/local/include $(inherited)
68
+# LIBRARY_SEARCH_PATHS=$(DEPENDENCIES_DIR)/$(LIBRARY_CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/lib $(DEPENDENCIES_DIR)/$(LIBRARY_CONFIGURATION)/lib $(DEPENDENCIES_DIR)/$(EFFECTIVE_PLATFORM_NAME)/lib $(DEPENDENCIES_DIR)/lib /usr/local/lib $(inherited)
69
+# FRAMEWORK_SEARCH_PATHS=$(DEPENDENCIES_DIR)/$(LIBRARY_CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Frameworks $(DEPENDENCIES_DIR)/$(LIBRARY_CONFIGURATION)/Frameworks $(DEPENDENCIES_DIR)/$(EFFECTIVE_PLATFORM_NAME)/Frameworks $(DEPENDENCIES_DIR)/Frameworks $(inherited)
70
+# -----------------------------------------------------------
71
+# Debug.xcconfig:
72
+# -----------------------------------------------------------
73
+# #include "Common.xcconfig"
74
+#
75
+# LIBRARY_CONFIGURATION=Debug
76
+# -----------------------------------------------------------
77
+# Release.xcconfig:
78
+# -----------------------------------------------------------
79
+# #include "Common.xcconfig"
80
+#
81
+# LIBRARY_CONFIGURATION=Release
82
+# -----------------------------------------------------------
83
+# Add dependencies/lib and friends to search paths of B.xcodeproj ? (y/N) >
84
+```
85
+
86
+where you should say 'y'. Now it will build.
87
+
0 88
deleted file mode 100644
... ...
@@ -1,237 +0,0 @@
1
-
2
-> Check out the [terminal movie](http://www.mulle-kybernetik.com/weblog/statics/demo-tutorial.html),
3
-instead of typing all the stuff here yourself.
4
-
5
-
6
-# "A B C" Tutorial
7
-
8
-This directory contains a simple test with 3 folder A B C, each containing a
9
-minimal Objective-C project.  C depends on B, which depends on A.
10
-A depends on a system library "Foundation", which is a given.
11
-
12
-A.h
13
-
14
-```objectivec
15
-#import <Foundation/Foundation.h>
16
-
17
-@interface A : NSObject
18
-
19
-@end
20
-```
21
-
22
-B imports A, but expects the header to reside in a subdirectory A
23
-
24
-B.h
25
-
26
-```objectivec
27
-#import <A/A.h>
28
-
29
-@interface B : A
30
-
31
-@end
32
-```
33
-
34
-C is quite like B.
35
-
36
-C.h
37
-
38
-```objectivec
39
-#import <B/B.h>
40
-
41
-@interface C : B
42
-
43
-@end
44
-```
45
-
46
-Initially none of the folders contain a `.bootstrap` folder.
47
-
48
-## Using xcodebuild
49
-
50
-
51
-### First problem: the header isn't found
52
-
53
-Try to build B with `xcodebuild`. It will not work, because the header
54
-`<A/A.h>` will not be found.
55
-
56
-The first step is to initalize B for **mulle-bootstrap**. You use inside the B
57
-folder
58
-
59
-```console
60
-$ mulle-bootstrap init#
61
-```
62
-
63
-At that point a `.bootstrap` will be created with some default
64
-content. Take the option to edit **repositories** and you should be in an editor
65
-seeing:
66
-
67
-```shell
68
-# add projects that should be cloned with git in order
69
-# of their inter-dependencies
70
-#
71
-# some possible types of repository specifications:
72
-# http://www.mulle-kybernetik.com/repositories/MulleScion
73
-# git@github.com:mulle-nat/MulleScion.git
74
-# ../MulleScion
75
-# /Volumes/Source/srcM/MulleScion
76
-#
77
-```
78
-Lines starting with a '#' are comments, these are just useless fluff in the
79
-long run, so delete them all, and add a line containing 'A'.
80
-The file now looks like this.
81
-
82
-```
83
-$ cat .bootstrap/repositories
84
-A
85
-```
86
-
87
-Alright, ready to bootstrap.  First lets see what **mulle-bootstrap** will do
88
-using the `-n`option
89
-
90
-```console
91
-$ mulle-bootstrap -n
92
-Dry run is active.
93
-mkdir -p .repos
94
-There is a ../A folder in the parent
95
-directory of this project.
96
-Use it ? (y/N)
97
-```
98
-
99
-**A** will be found in the parent directory, and you have the option to use it,
100
-which you should do.
101
-
102
-```console
103
-y
104
-../A is not a git repository (yet ?)
105
-So symlinking is the only way to go.
106
-ln -s -f ../../A .repos/A
107
-[ -e .repos/A ]
108
-
109
-Dry run is active.
110
-No repos fetched, nothing to do.
111
-```
112
-
113
-It can not preview the build stage, because there are no repositories really
114
-setup yet.
115
-
116
-The conservative choice now is to do it in two steps. **mulle-bootstrap fetch**
117
-and then **mulle-bootstrap build**. **mulle-bootstrap** alone combined both
118
-steps into one.
119
-
120
-Lets go with **mulle-bootstrap fetch** first, so we can examine the build
121
-processs afterwards. It will be just like above, but the symlink should be in
122
-place now.
123
-
124
-```console
125
-$ mulle-bootstrap -n build
126
-Dry run is active.
127
-mkdir -p dependencies/usr/local/include
128
-ln -s usr/local/include dependencies/include
129
-Do a xcodebuild Debug of A for SDK Default  ...
130
-"xcodebuild" "install"  -project "./A.xcodeproj" -configuration "Debug" ARCHS='${ARCHS_STANDARD_32_64_BIT}' DEPLOYMENT_LOCATION=YES DSTROOT='/Volumes/Source/srcM/mulle-bootstrap/tutorial/B/dependencies/tmp' INSTALL_PATH='/lib/Debug' SYMROOT='/Volumes/Source/srcM/mulle-bootstrap/tutorial/B/build/.repos/Debug/A/' OBJROOT='/Volumes/Source/srcM/mulle-bootstrap/tutorial/B/build/.repos/Debug/A/obj' ONLY_ACTIVE_ARCH=NO SKIP_INSTALL=NO HEADER_SEARCH_PATHS='/Volumes/Source/srcM/mulle-bootstrap/tutorial/B/dependencies/include /usr/local/include /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include' LIBRARY_SEARCH_PATHS='/Volumes/Source/srcM/mulle-bootstrap/tutorial/B/dependencies/include /usr/local/include /Volumes/Source/srcM/mulle-bootstrap/tutorial/B/dependencies/lib/Debug /Volumes/Source/srcM/mulle-bootstrap/tutorial/B/dependencies/lib /usr/local/lib' FRAMEWORK_SEARCH_PATHS='/Volumes/Source/srcM/mulle-bootstrap/tutorial/B/dependencies/include /usr/local/include /Volumes/Source/srcM/mulle-bootstrap/tutorial/B/dependencies/lib/Debug /Volumes/Source/srcM/mulle-bootstrap/tutorial/B/dependencies/lib /usr/local/lib /Volumes/Source/srcM/mulle-bootstrap/tutorial/B/dependencies/Frameworks/Debug /Volumes/Source/srcM/mulle-bootstrap/tutorial/B/dependencies/Frameworks'
131
-Collecting and dispensing "A" "Debug" products
132
-Do a xcodebuild Release of A for SDK Default  ...
133
-"xcodebuild" "install"  -project "./A.xcodeproj" -configuration "Release" ARCHS='${ARCHS_STANDARD_32_64_BIT}' DEPLOYMENT_LOCATION=YES DSTROOT='/Volumes/Source/srcM/mulle-bootstrap/tutorial/B/dependencies/tmp' INSTALL_PATH='/lib/Release' SYMROOT='/Volumes/Source/srcM/mulle-bootstrap/tutorial/B/build/.repos/Release/A/' OBJROOT='/Volumes/Source/srcM/mulle-bootstrap/tutorial/B/build/.repos/Release/A/obj' ONLY_ACTIVE_ARCH=NO SKIP_INSTALL=NO HEADER_SEARCH_PATHS='/Volumes/Source/srcM/mulle-bootstrap/tutorial/B/dependencies/include /usr/local/include /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include' LIBRARY_SEARCH_PATHS='/Volumes/Source/srcM/mulle-bootstrap/tutorial/B/dependencies/include /usr/local/include /Volumes/Source/srcM/mulle-bootstrap/tutorial/B/dependencies/lib/Release /Volumes/Source/srcM/mulle-bootstrap/tutorial/B/dependencies/lib /usr/local/lib' FRAMEWORK_SEARCH_PATHS='/Volumes/Source/srcM/mulle-bootstrap/tutorial/B/dependencies/include /usr/local/include /Volumes/Source/srcM/mulle-bootstrap/tutorial/B/dependencies/lib/Release /Volumes/Source/srcM/mulle-bootstrap/tutorial/B/dependencies/lib /usr/local/lib /Volumes/Source/srcM/mulle-bootstrap/tutorial/B/dependencies/Frameworks/Release /Volumes/Source/srcM/mulle-bootstrap/tutorial/B/dependencies/Frameworks'
134
-Collecting and dispensing "A" "Release" products
135
-```
136
-
137
-As the saying goes "Probieren geht ├╝ber Studieren", so lets do it for real,
138
-and use **mulle-bootstrap** build (or just **mulle-bootstrap**). This creates
139
-a lot of output now shown here.
140
-
141
-In the end we wind up with the "dependencies" folder, which should contain
142
-the following files (`ls -GFR dependencies`):
143
-
144
-~~~
145
-include@
146
-dependencies/lib/Debug/libA.a
147
-dependencies/lib/Release/libA.a
148
-dependencies/usr/local/include/A.h
149
-~~~
150
-
151
-**include@** is a symlink to `/usr/local/include`, that will always be there.
152
-There is a library **libA** for each configuraration. The include file is in
153
-`dependencies/usr/local/include`, which is not where we need it.
154
-
155
-#### Tweaking the output
156
-
157
-We can instruct **mulle-bootstrap** to place the headers somewhere else. This
158
-is done on a per-repository basis in `.bootstrap/settings`. Since it's an
159
-xcode project, it's more foolproof to use "xcode_public_headers":
160
-
161
-```console
162
-$ mkdir -p .bootstrap/settings/A
163
-$ echo "/usr/local/include/A" > .bootstrap/settings/A/xcode_public_headers
164
-```
165
-
166
-Now build it again with **mulle-bootstrap**, the header should appear as
167
-`dependencies/usr/local/include/A/A.h`, if not you may have made an exciting
168
-mistake (see "Figuring out what went wrong").
169
-
170
-Ok, the proof is in the pudding. Let's build B again with **xcodebuild**.
171
-This will fail, because it doesn't know yet, to look in "dependecies/include"
172
-at all.
173
-
174
-#### Finally we have to tell xcodebuild where the dependencies are
175
-
176
-```console
177
-$ mulle-bootstrap xcode add
178
-Settings will be added to B.xcodeproj.
179
-In the long term it may be more useful to copy/paste the following
180
-lines into a local .xcconfig file, that is inherited by all configurations.
181
-// Common.xcconfig:
182
-DEPENDENCIES_DIR=$(PROJECT_DIR)/dependencies
183
-HEADER_SEARCH_PATHS=$(DEPENDENCIES_DIR)/include /usr/local/include $(inherited)
184
-LIBRARY_SEARCH_PATHS=$(DEPENDENCIES_DIR)/lib/$(LIBRARY_CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) $(DEPENDENCIES_DIR)/lib/$(LIBRARY_CONFIGURATION) $(DEPENDENCIES_DIR)/lib/Release$(EFFECTIVE_PLATFORM_NAME) $(DEPENDENCIES_DIR)/lib/Release $(DEPENDENCIES_DIR)/lib /usr/local/lib $(inherited)
185
-FRAMEWORK_SEARCH_PATHS=$(DEPENDENCIES_DIR)/Frameworks/$(LIBRARY_CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) $(DEPENDENCIES_DIR)/Frameworks/$(LIBRARY_CONFIGURATION) $(DEPENDENCIES_DIR)/Frameworks/Release$(EFFECTIVE_PLATFORM_NAME) $(DEPENDENCIES_DIR)/Frameworks/Release $(DEPENDENCIES_DIR)/Frameworks $(inherited)
186
-
187
-
188
-// Debug.xcconfig:
189
-#include "Common.xcconfig"
190
-LIBRARY_CONFIGURATION=Debug
191
-
192
-
193
-// Release.xcconfig:
194
-#include "Common.xcconfig"
195
-LIBRARY_CONFIGURATION=Release
196
-Add "dependencies/lib"  and friends to search paths of B.xcodeproj ? (y/N)
197
-```
198
-
199
-where you should say YES. Now it will build.
200
-
201
-## Inheriting our work in C
202
-
203
-So go to folder C, and do the usual setup as
204
-
205
-```console
206
-mulle-bootstrap init
207
-echo "B" > .bootstrap/repositories
208
-mkdir -p .bootstrap/settings/B
209
-echo "/usr/local/include/B" > .bootstrap/settings/B/xcode_public_headers
210
-mulle-bootstrap
211
-```
212
-
213
-This will now use the dependency information from B, to automatically also
214
-build A and get the header of A into the right place.
215
-
216
-
217
-
218
-## Using cmake
219
-
220
-Then try it again with cmake. Here we set up **mulle-bootstrap** to fetch cmake
221
-if not present and to use cmake as the only build tool:
222
-
223
-```console
224
-cd C
225
-mulle-bootstrap clean dist    # throw away results from "Using xcodebuild"
226
-echo "cmake" >> .bootstrap/brews
227
-mkdir -p .bootstrap/settings
228
-echo "cmake" >> .bootstrap/settings/build_preferences
229
-mulle-bootstrap
230
-```
231
-
232
-> This is actually cheaing a little, because the CMakeLists.txt files already
233
-habe 'include/[A|B]' set. But you could set dispense_public_headers like you
234
-can set xcode_public_headers.
235
-
236 0
similarity index 56%
237 1
rename from tutorial/A/CMakeLists.txt
238 2
rename to tutorial/a/CMakeLists.txt
... ...
@@ -1,13 +1,13 @@
1 1
 cmake_minimum_required (VERSION 3.0)
2 2
 
3
-project (A)
3
+project (a)
4 4
 
5 5
 set(HEADERS
6
-src/A.h)
6
+src/a.h)
7 7
 
8