Created
February 16, 2009 12:28
-
-
Save youpy/65144 to your computer and use it in GitHub Desktop.
Makefile for using SuperCollider on OSX + Emacs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Makefile for using SuperCollider on OSX + Emacs | |
usage: | |
$ git clone git://gist.github.com/65144.git gist-65144 | |
$ cd gist-65144 | |
$ # edit SCLANG_DIR, BIN_DIR and ELISP_DIR as you like | |
$ make | |
install sclang in bin dir | |
$ sudo make install-bin | |
start sclang on Emacs | |
M-x sclang-start |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# vim:et:ft=sh:sts=2:sw=2 | |
#----------------------------------------------------------------------------- | |
# suite tests | |
# | |
testMakeAll() | |
{ | |
${cmd} ${macros} | |
assertTrue 'directory missing: SCLANG_DIR' "[ -d '${testDir}/sclang' ]" | |
assertTrue 'directory missing: SCLANG_DIR/SCClassLibrary' "[ -d '${testDir}/sclang/SCClassLibrary' ]" | |
assertTrue 'directory missing: SCLANG_DIR/plugins' "[ -d '${testDir}/sclang/plugins' ]" | |
assertTrue 'directory missing: ELISP_DIR/sclang' "[ -d '${testDir}/elisp/sclang' ]" | |
assertTrue 'file missing: ELISP_DIR/sclang/sclang-vars.el' "[ -f '${testDir}/elisp/sclang/sclang-vars.el' ]" | |
#assertTrue 'directory missing' "[ -d '${testDir/bin}' ]" | |
} | |
testMakeInstallBin() | |
{ | |
${cmd} ${macros} install-bin | |
assertTrue 'file missing: BIN_DIR/sclang' "[ -f '${testDir}/bin/sclang' ]" | |
} | |
#----------------------------------------------------------------------------- | |
# suite functions | |
# | |
setUp() | |
{ | |
testDir="${__shunit_tmpDir}/some_test_dir" | |
mkdir -p $testDir | |
mkdir "${testDir}/elisp" | |
mkdir "${testDir}/bin" | |
cmd="make" | |
macros="ELISP_DIR=${testDir}/elisp SCLANG_DIR=${testDir}/sclang BIN_DIR=${testDir}/bin" | |
} | |
tearDown() | |
{ | |
rm -fr "${testDir}" | |
} | |
# load and run shUnit2 | |
[ -n "${ZSH_VERSION:-}" ] && SHUNIT_PARENT=$0 | |
. shunit2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ;; .emacs | |
# | |
# ;; load-path | |
# (setq load-path | |
# (append | |
# (list | |
# (expand-file-name "~/.elisp") | |
# (expand-file-name "~/.elisp/sclang") | |
# load-path))) | |
# | |
# ;; sclang | |
# (setq sclang-program "sclang") | |
# (setq sclang-runtime-directory "~/sclang") | |
# (require 'sclang) | |
ELISP_DIR = ~/.elisp | |
BIN_DIR = /usr/local/bin | |
SCLANG_DIR = ~/sclang | |
# do not edit | |
TMP_DIR = /tmp | |
SC3 = $(TMP_DIR)/SC3 | |
SC_SVN = $(TMP_DIR)/sc_svn | |
all: $(SCLANG_DIR)/SCClassLibrary/sc $(ELISP_DIR)/sclang | |
install-bin: all | |
install -v $(SC3)/sclang $(BIN_DIR) | |
.PHONY: clean | |
clean: | |
rm -rf $(SC3) $(SCLANG_DIR) $(ELISP_DIR)/sclang | |
clean-all: clean | |
rm -rf $(SC3).tar.gz $(SC_SVN) | |
$(SC3).tar.gz: | |
wget http://supercollider.wesleyan.edu/builds/CURRENT_SC3.tar.gz -O $(SC3).tar.gz | |
$(SC3): $(SC3).tar.gz | |
tar zxvfm $(SC3).tar.gz -C $(TMP_DIR) | |
$(SC_SVN): | |
svn co https://supercollider.svn.sourceforge.net/svnroot/supercollider/trunk/editors $(SC_SVN) | |
$(SCLANG_DIR): $(SC3) | |
mkdir $(SCLANG_DIR) | |
cp -rp $(SC3)/SCClassLibrary $(SCLANG_DIR)/ | |
cp -rp $(SC3)/plugins $(SCLANG_DIR)/ | |
cp -p $(SC3)/scsynth $(SCLANG_DIR)/ | |
patch -d $(SCLANG_DIR) -p0 < platform.patch | |
$(SCLANG_DIR)/SCClassLibrary/sc: $(SCLANG_DIR) $(SC_SVN) | |
svn export $(SC_SVN)/scel/sc $(SCLANG_DIR)/SCClassLibrary/sc | |
$(ELISP_DIR)/sclang: $(SC_SVN) | |
svn export $(SC_SVN)/scel/el $(ELISP_DIR)/sclang | |
mv $(ELISP_DIR)/sclang/sclang-vars.el.in $(ELISP_DIR)/sclang/sclang-vars.el |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- SCClassLibrary/Platform/osx/OSXPlatform.sc.orig 2009-02-16 14:45:08.000000000 +0900 | |
+++ SCClassLibrary/Platform/osx/OSXPlatform.sc 2009-02-16 19:46:54.000000000 +0900 | |
@@ -16,12 +16,15 @@ | |
} | |
startup { | |
- Document.implementationClass.startup; | |
+ //Document.implementationClass.startup; | |
+ if ( this.hasFeature( \emacs ) ) { | |
+ Document.implementationClass.startup; | |
+ }; | |
// make server window | |
- Server.internal.makeWindow; | |
- Server.local.makeWindow; | |
+ //Server.internal.makeWindow; | |
+ //Server.local.makeWindow; | |
this.loadStartupFiles; | |
- Help.addToMenu; | |
+ //Help.addToMenu; | |
} | |
shutdown { | |
HIDDeviceService.releaseDeviceList; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment