Permalink
Browse files

The cocoa framework now triggers ./build.sh instead of the other way …

…around. Also, ./build.sh has a new flag --force which will force a total re-check-out and re-build.
  • Loading branch information...
1 parent a4b60d8 commit 2702ed543e0ef73277adcaeb0d341959ac0ed882 @rsms committed Dec 27, 2010
Showing with 58 additions and 18 deletions.
  1. +4 −0 README.md
  2. +32 −18 build.sh
  3. +18 −0 cocoa-framework/CSS.xcodeproj/project.pbxproj
  4. +4 −0 reset.sh
View
@@ -7,6 +7,10 @@ There's also an ongoing project building a Cocoa framework (see the `cocoa-frame
## Building
+Open `cocoa-framework/CSS.xcodeproj` and build the "CSS" target. Please allow the build process to take a few minutes the first time as it will check out and build all dependencies.
+
+To build only the libcss library, run:
+
./build.sh
## License
View
@@ -1,21 +1,35 @@
#!/bin/bash
cd "$(dirname "$0")"
+[ "$1" == "--force" ] && (./reset.sh || exit $?)
+
# --------------------------------------------------------------------------
# checkout
NETSURF_SVN_REV=11123
if [ ! -d libparserutils ]; then
- svn co svn://svn.netsurf-browser.org/trunk/libparserutils@$NETSURF_SVN_REV
+ if ! (svn co svn://svn.netsurf-browser.org/trunk/libparserutils@$NETSURF_SVN_REV) ; then
+ S=$?
+ rm -rf libparserutils
+ exit $S
+ fi
fi
if [ ! -d libwapcaplet ]; then
- svn co svn://svn.netsurf-browser.org/trunk/libwapcaplet@$NETSURF_SVN_REV
+ if ! (svn co svn://svn.netsurf-browser.org/trunk/libwapcaplet@$NETSURF_SVN_REV) ; then
+ S=$?
+ rm -rf libparserutils
+ exit $S
+ fi
fi
if [ ! -d libcss ]; then
- svn checkout svn://svn.netsurf-browser.org/trunk/libcss@$NETSURF_SVN_REV
+ if ! (svn co svn://svn.netsurf-browser.org/trunk/libcss@$NETSURF_SVN_REV) ; then
+ S=$?
+ rm -rf libparserutils
+ exit $S
+ fi
# apply patches
for patchfile in patches/libcss/*.patch; do
- patch -p0 -d libcss --backup-if-mismatch -i "../$patchfile"
+ patch -p0 -d libcss --backup-if-mismatch -i "../$patchfile" || exit $?
done
fi
@@ -91,17 +105,17 @@ gcc -g -W -Wall -o example1 example1.c \
|| exit $?
./example1
-echo '------------------- CSS.framework -------------------'
-
-cd ../../cocoa-framework
-xcodebuild -project CSS.xcodeproj \
- -target CSS \
- -parallelizeTargets \
- -configuration Release \
- build \
- > /dev/null || exit $?
-
-rm -rf ../lib/CSS.framework
-cp -Rp build/Release/CSS.framework ../lib/CSS.framework
-
-echo "done"
+#echo '------------------- CSS.framework -------------------'
+#
+#cd ../../cocoa-framework
+#xcodebuild -project CSS.xcodeproj \
+# -target CSS \
+# -parallelizeTargets \
+# -configuration Release \
+# build \
+# > /dev/null || exit $?
+#
+# rm -rf ../lib/CSS.framework
+# cp -Rp build/Release/CSS.framework ../lib/CSS.framework
+#
+# echo "done"
@@ -277,6 +277,7 @@
isa = PBXNativeTarget;
buildConfigurationList = 1DEB91AD08733DA50010E9CD /* Build configuration list for PBXNativeTarget "CSS" */;
buildPhases = (
+ 3AA91CF412C8FE8000132A25 /* ShellScript */,
8DC2EF500486A6940098B216 /* Headers */,
8DC2EF520486A6940098B216 /* Resources */,
8DC2EF540486A6940098B216 /* Sources */,
@@ -337,6 +338,23 @@
};
/* End PBXResourcesBuildPhase section */
+/* Begin PBXShellScriptBuildPhase section */
+ 3AA91CF412C8FE8000132A25 /* ShellScript */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "../build.sh || exit $?\nexit 0";
+ showEnvVarsInLog = 0;
+ };
+/* End PBXShellScriptBuildPhase section */
+
/* Begin PBXSourcesBuildPhase section */
3AF14EF8128E083800623011 /* Sources */ = {
isa = PBXSourcesBuildPhase;
View
@@ -0,0 +1,4 @@
+#!/bin/bash
+cd "$(dirname "$0")"
+echo "Resetting/cleaning..."
+rm -rf libparserutils libwapcaplet libcss lib include

0 comments on commit 2702ed5

Please sign in to comment.