From: Miro Jurisic Date: Fri, 28 Aug 1998 20:22:33 +0000 (+0000) Subject: Added perl and AppleScript stuff to automagically build CW projects X-Git-Tag: krb5-1.1-beta1~552 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6770c84427f2c47031c338ea595ee3af6d598700;p=krb5.git Added perl and AppleScript stuff to automagically build CW projects git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10893 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/mac/ChangeLog b/src/mac/ChangeLog index 32070d46e..0337462c7 100644 --- a/src/mac/ChangeLog +++ b/src/mac/ChangeLog @@ -1,3 +1,8 @@ +Fri Aug 28 16:30:00 1998 Miro Jurisic + + * Makefile.tmpl, ReadMe, Makefile.initial, RunAppleScript.pl: Added stuff to + automagically run AppleScriprs to build CW projects. + Fri Aug 28 12:00:00 1998 Miro Jurisic * Makefile.tmpl: Removed static library targets, renamed other diff --git a/src/mac/Makefile.initial b/src/mac/Makefile.initial new file mode 100644 index 000000000..08657f303 --- /dev/null +++ b/src/mac/Makefile.initial @@ -0,0 +1,40 @@ +all Ä build-makefile create-directories build-cw-projects + echo # Open {TargDir}:mac:libraries:BeforeBuild.prj in CodeWarrior IDE 2.1 and build it + +################################################################################ +## +## Creating makefile +## +################################################################################ + +build-makefile Ä + perl :mac:macfile_gen.pl + +################################################################################ +## +## Creating build directories +## +################################################################################ + +create-directories Ä + If Not "`Exists -d :bin`" + NewFolder :bin + End + If Not "`Exists -d :bin:PPC`" + NewFolder :bin:PPC + End + If Not "`Exists -d :bin:CFM-68K`" + NewFolder :bin:CFM-68K + End + +################################################################################ +## +## Build CodeWarrior projects +## +################################################################################ + +build-cw-projects Ä + (Echo "Tell application ¶"CodeWarrior IDE 2.1¶""; ¶ + Echo "Open ¶"{TargDir}:mac:libraries:BeforeBuild.prj¶" as alias"; ¶ + Echo "Make Project"; ¶ + Echo "end") | Catenate | perl :mac:RunAppleScript.pl \ No newline at end of file diff --git a/src/mac/Makefile.tmpl b/src/mac/Makefile.tmpl index 2e66d6de8..198c22caf 100644 --- a/src/mac/Makefile.tmpl +++ b/src/mac/Makefile.tmpl @@ -556,6 +556,7 @@ all-mac-files = {mac-files} {classic-glue-input} {autogeneration-sources} /Makef /mac/ReadMe \ /mac/version.r \ /mac/FragmentAlias.mpw \ + /mac/RunAppleScript.pl \ "/mac/Release notes" \ /mac/libraries/autoconf.h \ /mac/libraries/ChangeLog \ @@ -613,5 +614,13 @@ snapshot : autogenerate-clean SetFile -a l {snapshot-root}"{snapshot-file}" end end - + Duplicate {TargDir}mac/Makefile.initial {snapshot-root}Makefile + +################################################################################ +## +## Makefile +## +################################################################################ +Makefile :Ê/mac/Makefile.tmpl + perl /mac/macfile_gen.pl diff --git a/src/mac/ReadMe b/src/mac/ReadMe index 04ee3ab32..ecc22c822 100644 --- a/src/mac/ReadMe +++ b/src/mac/ReadMe @@ -31,18 +31,13 @@ To build the Macintosh version of Kerberos 5 and GSS: 5) Set directory in MPW to the top level of Kerberos 5 distribution (e.g. "GSS-Kerberos5-1.0.5"). - 6) Execute "perl :mac:macfile_gen.pl" in MPW. - - 7) Build target "create-directories" in MPW. - - 8) Open the project "[krb5 src]:mac:libraries:BeforeBuild.prj" - in your CW Pro 2 IDE and build it. - - You will see some link warnings. These are normal and can be ignored. + 6) Build target "all" in MPW. + This will create a new Makefile, and launch your CodeWarrior IDE 2.1 to build + some CodeWarrior projects. You may be asked to locate CodeWarrior IDE 2.1. --- Building libraries --- - 9) Build target "all" in MPW. Wait. + 7) Build target "all" in MPW. Wait. Example build times: 30-40 minutes on a G3 machine, 80 minutes on a PowerMac 9600/233. diff --git a/src/mac/RunAppleScript.pl b/src/mac/RunAppleScript.pl new file mode 100644 index 000000000..8a4828b89 --- /dev/null +++ b/src/mac/RunAppleScript.pl @@ -0,0 +1,16 @@ +use Mac::Components; +use Mac::OSA; +use Mac::AppleEvents; + +undef $/; + +$applescript = OpenDefaultComponent(kOSAComponentType, "ascr") or die "AppleScript not installed"; +$script = AECreateDesc "TEXT", ; + +$result = OSADoScript($applescript, $script, 0, "TEXT", 0) or die $^E; + +print AEPrint($result), "\n"; + +AEDisposeDesc $result; +AEDisposeDesc $script; +CloseComponent $applescript;