Skip to content
Browse files

Update Guides/forking

  • Loading branch information...
1 parent ed879f3 commit b441cd40e93980acdb4f3c159a919d637272f7f5 @groue committed Apr 2, 2012
Showing with 15 additions and 17 deletions.
  1. +15 −17 Guides/forking.md
View
32 Guides/forking.md
@@ -1,20 +1,14 @@
[up](../../../../GRMustache)
-# Note on forking
+# Forking GRMustache
After you have forked groue/GRMustache, you might want to change stuff, test, and then build the library.
You'll find below some useful information on each of those topics.
## Change GRMustache
-There are two projects: one for MacOS, and one for iOS: `GRMustache1-macosx.xcodeproj` and `GRMustache1-ios.xcodeproj`. When XCode allows for multi-platform projects, there will be a single one :-) (addendum: it looks like XCode 4.2 allows for that, stay tuned).
-
-Objective-C files that make GRMustache are stored in the `Classes` folder.
-
-When a file is added or removed from the `Classes` folder, both projects are updated.
-
-When a header file is added to the `Classes` folder, the "Copy headers" build phase of the three targets (one for the MacOS project, two for the iOS project) are updated accordingly. The set of public headers of all three targets are the same.
+Objective-C files that make GRMustache are stored in the `src/classes` folder. They are added to both `GRMustache2-MacOS` and `GRMustache2-iOS` targets of the `src/GRMustache.xcodeproj` project.
Headers are splitted in two categories:
@@ -27,6 +21,8 @@ Public headers must contain only declarations for APIs that are exposed to the G
Methods and functions declared in public headers must be decorated with the macros defined in `Classes/GRMustacheAvailabilityMacros.h`. Check existing public headers for inspiration.
+`src/classes/GRMustacheAvailabilityMacros.h` is generated by `src/bin/buildGRMustacheAvailabilityMacros`.
+
### Private headers
Private headers have names ending in `_private.h`. They must not import or include any public header. The set of public APIs must be duplicated in both public and private headers.
@@ -37,41 +33,43 @@ Before running the tests, make sure git submodules are downloaded:
$ git submodule update --init
-There are two kinds of tests, all stored in the `Tests` folder.
+There are two kinds of tests, all stored in the `src/tests` folder.
- tests of private APIs
- tests of public APIs
-When a file is added or removed from the `Tests` folder, both `GRMustache1-macosx.xcodeproj` and `GRMustache1-ios.xcodeproj` projects are updated.
+When a file is added or removed from the `src/tests` folder, both `GRMustache2-MacOSTests` and `GRMustache2-iOSTests` targets of the `src/GRMustache.xcodeproj` project are updated.
### Tests of private APIs
-Tests of private internals are stored in the `Tests/Private` folder, and are all subclasses of `GRMustachePrivateAPITest`.
+Tests of private internals are stored in the `src/tests/Private` folder, and are all subclasses of `GRMustachePrivateAPITest`.
The implementation files of those tests must not include any public header.
### Tests of public APIS
-Tests of public GRMustache API are versionned: the `Tests/v1.0` folder contains tests for features introduced in the version 1.0 of the library. `Tests/v1.1` contains tests for the version 1.1, etc.
+Tests of public GRMustache API are versionned: the `src/tests/Public/v2.0` folder contains tests for features introduced in the version 2.0 of the library. `src/tests/Public/v2.1` contains tests for the version 2.1, etc.
Those tests are all subclasses of `GRMustachePublicAPITest`. Their implementation files must not include any private header.
You will use the macros defined in `Classes/GRMustacheAvailabilityMacros.h`. They help the tests acheiving three goals:
- use only APIs that are available in the GRMustache version they test against,
- emit deprecation warning when they use deprecated GRMustache APIs,
-- help GRMustache achieve the full backward compatibility claimed by the [APR](http://apr.apache.org/versioning.html) compliance.
+- help GRMustache achieve full backward compatibility.
-For instance, all header files for public API tests in `Tests/v1.4` begin with:
+For instance, all header files for public API tests in `src/tests/Public/v2.1` would begin with:
- #define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_1_4
+ #define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_2_1
#import "GRMustachePublicAPITest.h"
-When you add a test for a public API, make sure you place it in the folder that introduced the API (check the release notes), and NOT in the version that will include the new code. For instance, if version 1.6 introduces a fix for an API that was introduced in version 1.2, the version 1.6 will then ship with new tests in the Tests/v1.2 folder.
+When you add a test for a public API, make sure you place it in the folder that introduced the API (check the release notes), and NOT in the version that will include the new code. For instance, if version 2.6 introduces a fix for an API that was introduced in version 2.2, the version 2.6 will then ship with new tests in the src/tests/Public/v2.2 folder.
## Building
-Make sure git submodules are downloaded first:
+Building GRMustache is building the `/lib` and `/include` folders, which contain public headers and static libraries for iOS and MacOS.
+
+In order to build them: make sure git submodules are downloaded first:
$ git submodule update --init

0 comments on commit b441cd4

Please sign in to comment.
Something went wrong with that request. Please try again.