Got rid of remaining old ant stuff and added TODO's to current Rakefile.

Reviewed by me.
This commit is contained in:
Francisco Tolmasky
2009-03-21 07:31:47 -07:00
parent 436c466e2d
commit 0023c5753a
4 changed files with 16 additions and 573 deletions
+16
View File
@@ -70,3 +70,19 @@ end
task :install => [:downloads] do
system %{cd #{$TOOLS_DOWNLOAD} && sudo sh ./install-tools }
end
=begin
TODO: ojunit stuff:
<git-clone-pull repository = "git://github.com/280north/ojunit.git" dest = "${Build}/Release/ojunit" />
<copy todir = "${Build.Cappuccino.Tools.Lib}/ojunit">
<fileset dir = "${Build}/Release/ojunit" includes = "**/*.j" />
</copy>
<copy file = "Tools/ojunit/ojtest" tofile = "${Build.Cappuccino.Tools.Bin}/ojtest" />
TODO: documentation
TODO: zip/tar.
=end
-341
View File
@@ -1,341 +0,0 @@
<?xml version = "1.0"?>
<project name = "Cappuccino" default = "build">
<import file = "common.xml" />
<filelist id = "Projects" dir = ".">
<file name = "Objective-J/build.xml" />
<file name = "Foundation/build.xml" />
<file name = "AppKit/build.xml" />
<file name = "Tools/build.xml" />
</filelist>
<!-- Deployment Paths -->
<property name = "Build.Cappuccino" location = "${Build}/Cappuccino" />
<property name = "Build.Cappuccino.Starter" location = "${Build.Cappuccino}/Starter" />
<property name = "Build.Cappuccino.Starter.Frameworks" location = "${Build.Cappuccino.Starter}/Frameworks" />
<property name = "Build.Cappuccino.Tools" location = "${Build.Cappuccino}/Tools" />
<property name = "Build.Cappuccino.Tools.Frameworks" location = "${Build.Cappuccino.Tools}/Frameworks" />
<property name = "Build.Cappuccino.Tools.Objj" location = "${Build.Cappuccino.Tools}/objj" />
<property name = "Build.Cappuccino.Tools.Bin" location = "${Build.Cappuccino.Tools.Objj}/bin" />
<property name = "Build.Cappuccino.Tools.Lib" location = "${Build.Cappuccino.Tools.Objj}/lib" />
<property name = "Build.Cappuccino.Tools.Lib.Frameworks" location = "${Build.Cappuccino.Tools.Lib}/Frameworks" />
<property name = "Build.Cappuccino.Tools.Lib.Frameworks-Debug" location = "${Build.Cappuccino.Tools.Lib}/Frameworks-Debug" />
<property name = "Build.Cappuccino.Tools.Lib.Frameworks-Rhino" location = "${Build.Cappuccino.Tools.Lib}/Frameworks-Rhino" />
<property name = "Build.Cappuccino.Tools.Lib.Frameworks-Rhino-Debug" location = "${Build.Cappuccino.Tools.Lib}/Frameworks-Rhino-Debug" />
<property name = "Build.Cappuccino.Tools.Editors" location = "${Build.Cappuccino.Tools}/Editors" />
<target name = "clean">
<iterate-build target = "clean"/>
<delete dir = "${Build.Cappuccino}" verbose = "true" />
</target>
<target name = "build">
<iterate target = "build">
<files>
<filelist refid = "Projects" />
</files>
</iterate>
</target>
<target name = "tools">
<iterate target = "release">
<files>
<filelist dir = ".">
<file name = "Objective-J/build.xml" />
<file name = "Tools/objjc/build.xml" />
<file name = "Tools/steam/build.xml" />
</filelist>
</files>
</iterate>
</target>
<target name = "install-tools">
<!-- TODO: replace this with a cross-platform (i.e. Windows compatible) version -->
<exec executable = "sudo" dir = "${Build.Cappuccino.Tools}">
<arg value = "sh" />
<arg value = "install-tools" />
</exec>
</target>
<target name = "bootstrap">
<antcall target = "deploy-bare-minimum" />
<antcall target = "install-tools" />
<antcall target = "deploy" />
<antcall target = "install-tools" />
</target>
<target name = "update-install" depends = "deploy">
<antcall target = "install-tools" />
</target>
<target name = "test" depends = "build">
<ojtest>
<tests>
<fileset dir = "Tests/Objective-J" includes = "*.j"/>
<fileset dir = "Tests/Foundation" includes = "*.j"/>
<!--<fileset dir = "Tests/AppKit" includes = "*.j"/>-->
</tests>
</ojtest>
</target>
<target name = "safe-documentation" >
<exec executable = "which" outputproperty = "doxygen.location">
<arg line = "doxygen" />
</exec>
<condition property = "doxygen.target" value = "" else = "-warning">
<not>
<length string = "${doxygen.location}" length = "0" />
</not>
</condition>
<antcall target = "documentation${doxygen.target}" />
</target>
<target name = "documentation-warning">
<echo>*** WARNING: Doxygen not installed. Could not create documentation.</echo>
</target>
<target name = "documentation">
<exec executable = "doxygen" dir = ".">
<arg value = "Tools/Documentation/Cappuccino.doxygen" />
</exec>
<mkdir dir = "${Build.Cappuccino}" />
<move file = "Documentation" todir = "${Build.Cappuccino}" />
<mkdir dir = "${Build.Cappuccino.Starter}" />
<copy todir = "${Build.Cappuccino.Starter}/Documentation" >
<fileset dir = "${Build.Cappuccino}/Documentation/html" />
</copy>
<mkdir dir = "${Build.Cappuccino.Tools}" />
<copy todir = "${Build.Cappuccino.Tools}/Documentation" >
<fileset dir = "${Build.Cappuccino}/Documentation/html" />
</copy>
<delete file="debug.txt"/>
</target>
<!-- Deploying -->
<target name = "deploy-bare-minimum" >
<!-- Build Bare Minimum -->
<ant antfile = "build.xml" dir = "Objective-J">
<property name = "Configuration" value = "Release" />
</ant>
<ant antfile = "build.xml" dir = "Tools/objjc" >
<property name = "Configuration" value = "Release" />
</ant>
<ant antfile = "build.xml" dir = "Tools/steam" >
<property name = "Configuration" value = "Release" />
</ant>
<!-- Deploy Bare Minimum -->
<copy todir = "${Build.Cappuccino.Tools.Lib.Frameworks-Rhino}">
<fileset dir = "${Build}/Release/">
<include name = "Objective-J/" />
</fileset>
</copy>
<copy todir = "${Build.Cappuccino.Tools.Bin}">
<fileset dir = "${Build}/Release/objjc/bin" />
<fileset dir = "${Build}/Release/steam/bin" />
</copy>
<copy todir = "${Build.Cappuccino.Tools.Lib}">
<fileset dir = "${Build}/Release/objjc/lib" />
<fileset dir = "${Build}/Release/steam/lib" />
</copy>
<copy file = "Tools/Utilities/js.jar" todir = "${Build.Cappuccino.Tools.Lib}" />
<!-- Copy install script -->
<copy file = "Tools/Install/install-tools" tofile = "${Build.Cappuccino.Tools}/install-tools" />
</target>
<target name = "deploy" >
<!-- Build Everything Debug AND Release -->
<ant antfile = "build.xml" >
<property name = "Configuration" value = "Debug" />
</ant>
<ant antfile = "build.xml" >
<property name = "Configuration" value = "Release" />
</ant>
<!-- Actually Deploy -->
<copy todir = "${Build.Cappuccino.Tools.Lib.Frameworks}">
<fileset dir = "${Build}/Release/">
<include name = "Objective-J/" />
<include name = "Foundation/" />
<include name = "AppKit/" />
</fileset>
</copy>
<copy todir = "${Build.Cappuccino.Tools.Lib.Frameworks-Debug}">
<fileset dir = "${Build}/Debug/">
<include name = "Objective-J/" />
<include name = "Foundation/" />
<include name = "AppKit/" />
</fileset>
</copy>
<copy todir = "${Build.Cappuccino.Tools.Lib.Frameworks-Rhino}">
<fileset dir = "${Build}/Release/">
<include name = "Objective-J/" />
<include name = "Foundation/" />
</fileset>
<fileset dir = "${Build}/Release-Rhino/">
<include name = "AppKit/" />
<include name = "BlendKit/" />
</fileset>
</copy>
<copy todir = "${Build.Cappuccino.Tools.Lib.Frameworks-Rhino-Debug}">
<fileset dir = "${Build}/Debug/">
<include name = "Objective-J/" />
<include name = "Foundation/" />
</fileset>
<fileset dir = "${Build}/Debug-Rhino/">
<include name = "AppKit/" />
<include name = "BlendKit/" />
</fileset>
</copy>
<copy todir = "${Build.Cappuccino.Tools.Lib}/NewApplication">
<fileset dir = "Tools/NewApplication" />
</copy>
<!-- FIXME: This is awful, we need to handle this like we handle Demos -->
<!-- <git-clone-pull repository = "git://github.com/280north/ojunit.git" dest = "${Build}/Release/ojunit" />
<copy todir = "${Build.Cappuccino.Tools.Lib}/ojunit">
<fileset dir = "${Build}/Release/ojunit" includes = "**/*.j" />
</copy>
<copy file = "Tools/ojunit/ojtest" tofile = "${Build.Cappuccino.Tools.Bin}/ojtest" />
-->
<!-- Tools -->
<copy todir = "${Build.Cappuccino.Tools.Bin}">
<fileset dir = "${Build}/Release/bake/bin" />
<fileset dir = "${Build}/Release/cplutil/bin" />
<fileset dir = "${Build}/Release/objj/bin" />
<fileset dir = "${Build}/Release/objjc/bin" />
<fileset dir = "${Build}/Release/press/bin" />
<fileset dir = "${Build}/Release/steam/bin" />
</copy>
<copy file = "Tools/nib2cib/nib2cib" todir = "${Build.Cappuccino.Tools.Bin}" />
<copy file = "Tools/blend/Tool/blend" todir = "${Build.Cappuccino.Tools.Bin}" />
<copy todir = "${Build.Cappuccino.Tools.Lib}/nib2cib">
<fileset dir = "${Build}/Release/nib2cib" />
</copy>
<copy todir = "${Build.Cappuccino.Tools.Lib}/blend">
<fileset dir = "${Build}/Release/blend" />
</copy>
<copy todir = "${Build.Cappuccino.Tools.Lib}">
<fileset dir = "${Build}/Release/bake/lib" />
<fileset dir = "${Build}/Release/cplutil/lib" />
<fileset dir = "${Build}/Release/objj/lib" />
<fileset dir = "${Build}/Release/objjc/lib" />
<fileset dir = "${Build}/Release/press/lib" />
<fileset dir = "${Build}/Release/steam/lib" />
</copy>
<!-- Copy READMEs -->
<copy file = "Tools/READMEs/STARTER-README" tofile = "${Build.Cappuccino.Starter}/README" />
<copy file = "Tools/READMEs/TOOLS-README" tofile = "${Build.Cappuccino.Tools}/README" />
<!-- Copy Editors -->
<copy file = "Tools/SubEthaEdit/Objective-J.mode.zip" tofile = "${Build.Cappuccino.Tools.Editors}/Objective-J.mode.zip" />
<copy file = "Tools/TextMate/JavaScript Objective-J.tmbundle.zip" tofile = "${Build.Cappuccino.Tools.Editors}/JavaScript Objective-J.tmbundle.zip" />
<copy file = "Tools/Vim/objj.vim" tofile = "${Build.Cappuccino.Tools.Editors}/objj.vim" />
<!-- Copy Utilities -->
<copy file = "Tools/Utilities/ant-apache-bsf-1.7.0.jar" todir = "${Build.Cappuccino.Tools.Lib}" />
<copy file = "Tools/Utilities/bsf.jar" todir = "${Build.Cappuccino.Tools.Lib}" />
<copy file = "Tools/Utilities/commons-logging-1.1.jar" todir = "${Build.Cappuccino.Tools.Lib}" />
<copy file = "Tools/Utilities/js.jar" todir = "${Build.Cappuccino.Tools.Lib}" />
<!-- Copy install script -->
<copy file = "Tools/Install/install-tools" tofile = "${Build.Cappuccino.Tools}/install-tools" />
<!-- Starter Package -->
<copy todir = "${Build.Cappuccino.Starter}/NewApplication">
<fileset dir = "Tools/NewApplication/" />
</copy>
<copy todir = "${Build.Cappuccino.Starter}/NewApplication/Frameworks">
<fileset dir = "${Build}/Release/">
<include name = "Objective-J/" />
<include name = "Foundation/" />
<include name = "AppKit/" />
</fileset>
</copy>
<copy todir = "${Build.Cappuccino.Starter}/NewApplication/Frameworks/Debug">
<fileset dir = "${Build}/Debug/">
<include name = "Objective-J/" />
<include name = "Foundation/" />
<include name = "AppKit/" />
</fileset>
</copy>
<!-- Documentation -->
<antcall target = "safe-documentation" />
<!-- Zip -->
<zip destfile = "${Build.Cappuccino}/Starter.zip">
<fileset dir = "${Build.Cappuccino.Starter}" />
</zip>
<tar destfile = "${Build.Cappuccino}/Starter.tar.gz" compression = "gzip">
<fileset dir = "${Build.Cappuccino.Starter}" />
</tar>
<zip destfile = "${Build.Cappuccino}/Tools.zip">
<fileset dir = "${Build.Cappuccino.Tools}" />
</zip>
<tar destfile = "${Build.Cappuccino}/Tools.tar.gz" compression = "gzip">
<fileset dir = "${Build.Cappuccino.Tools}" />
</tar>
</target>
</project>
-1
View File
@@ -165,4 +165,3 @@ task :clobberall => ['clobber-all']
def spawn_rake(task_name)
system %{#{$serialized_env} #{$0} #{task_name}}
end
-231
View File
@@ -1,231 +0,0 @@
<project name = "common">
<property environment = "env" />
<dirname property = "Checkout" file = "${ant.file.common}" />
<property name = "Configuration" value = "Release" />
<property name = "Build" location = "${env.STEAM_BUILD}" />
<property name = "env.OBJJ_HOME" value = "/usr/local/share/objj" />
<property name = "env.OBJJ_LIB" value = "${env.OBJJ_HOME}/lib" />
<!-- allow bootstrapping: use installed js.jar if it's present, otherwise use local version -->
<condition property = "jsjar" value = "${env.OBJJ_LIB}/js.jar">
<and>
<available file = "${env.OBJJ_LIB}/js.jar" />
<!-- hack to prevent deprecation warnings for overwriting properties -->
<not>
<isset property = "jsjar" />
</not>
</and>
</condition>
<property name = "jsjar" value = "${Checkout}/Tools/Utilities/js.jar" />
<!-- Steam Version Checking -->
<target name = "steam-uptodate">
<exec executable = "steam" outputproperty = "steam.version">
<arg line = "--version" />
</exec>
<fail>
!
**********************************************
You version of Steam is out of date.
----------------------------------------------
Please run the following commands to update:
$sudo echo
$ant bootstrap
**********************************************
<condition>
<not>
<contains string = "${steam.version}" substring = "steam version 0.6" />
</not>
</condition>
</fail>
</target>
<!-- <macrodef name = "safe-steam-build" >
<element name = "args" optional = "true" implicit = "true" />
<sequential>
<antcall target = "steam-uptodate" />
<steam-build>
<arguments>
<args/>
</arguments>
</steam-build>
</sequential>
</macrodef> -->
<!-- Short Hands -->
<target name = "build-release">
<ant antfile = "build.xml">
<property name = "Configuration" value = "Release" />
</ant>
</target>
<target name = "clean-release">
<ant antfile = "build.xml" target = "clean">
<property name = "Configuration" value = "Release" />
</ant>
</target>
<target name = "build-debug">
<ant antfile = "build.xml">
<property name = "Configuration" value = "Debug" />
</ant>
</target>
<target name = "clean-debug">
<ant antfile = "build.xml" target = "clean">
<property name = "Configuration" value = "Debug" />
</ant>
</target>
<target name = "release" >
<antcall target = "build-release" />
</target>
<target name = "debug" >
<antcall target = "build-debug" />
</target>
<target name = "all" >
<antcall target = "build-debug" />
<antcall target = "build-release" />
</target>
<target name = "clean-all" >
<antcall target = "clean-debug" />
<antcall target = "clean-release" />
</target>
<!-- Iterate -->
<macrodef name = "iterate">
<attribute name = "target"/>
<element name = "files" />
<sequential>
<subant target = "@{target}" inheritall = "false" inheritrefs = "false" >
<files/>
</subant>
</sequential>
</macrodef>
<macrodef name = "iterate-build">
<attribute name = "target"/>
<sequential>
<subant target = "@{target}" inheritall = "false" inheritrefs = "false" >
<fileset dir = "." includes = "*/build.xml" />
</subant>
</sequential>
</macrodef>
<!-- JavaScript Compiler -->
<macrodef name = "jsc">
<attribute name = "dir" default = "." />
<element name = "arguments"/>
<sequential>
<java classname = "org.mozilla.javascript.tools.jsc.Main" dir = "@{dir}" fork = "true">
<classpath>
<pathelement location = "${jsjar}" />
<pathelement location = "." />
</classpath>
<arguments/>
</java>
</sequential>
</macrodef>
<!-- JavaScript "Preprocessor" -->
<macrodef name = "preprocess">
<attribute name = "file" />
<attribute name = "output"/>
<element name = "arguments" optional = "true" />
<sequential>
<exec executable = "gcc" output = "@{output}" error = "@{output}.err">
<!-- Preprocessing only -->
<arg value = "-E" />
<!-- Interpret files as C source files (instead of treating them as object files); this option is given to make the compiler preprocess them -->
<arg value = "-x" />
<arg value = "c" />
<!-- Don't generate #line directives (which would of course mess things up in HTML documents!) -->
<arg value = "-P" />
<arguments/>
<arg value = "@{file}" />
</exec>
</sequential>
</macrodef>
<!-- git tasks -->
<macrodef name = "git">
<attribute name = "command" />
<attribute name = "dir" default = "" />
<element name = "args" optional = "true" />
<sequential>
<echo message = "git @{command}" />
<exec executable = "git" dir = "@{dir}">
<arg value = "@{command}" />
<args/>
</exec>
</sequential>
</macrodef>
<macrodef name = "git-clone-pull">
<attribute name = "repository" />
<attribute name = "dest" />
<sequential>
<git command = "clone">
<args>
<arg value = "@{repository}" />
<arg value = "@{dest}" />
</args>
</git>
<git command = "pull" dir = "@{dest}" />
</sequential>
</macrodef>
<!-- ojtest task -->
<macrodef name = "ojtest">
<attribute name = "frameworks" default = "${env.STEAM_BUILD}/Release" />
<element name = "tests" />
<sequential>
<apply executable = "ojtest" parallel = "true">
<env key = "OBJJ_INCLUDE_PATHS" value = "@{frameworks}" />
<tests/>
</apply>
</sequential>
</macrodef>
</project>