Commits

Meikel Brandmeyer  committed 2bb80ea

Gorilla - Initial CheckIn

  • Participants
  • Parent commits 1a73ca8

Comments (0)

Files changed (4)

+Copyright 2008 (c) Meikel Brandmeyer.
+All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+PROJECT := gorilla
+
+SRCDIR  := src
+DISTDIR := dist
+
+JAVASRC != cd ${SRCDIR} && find * -type f -name \*.java
+CLJSRC  != cd ${SRCDIR} && find * -type f \( -name \*.clj -and -not -name \*.gen.clj \)
+GCCLJSRC!= cd ${SRCDIR} && find * -type f -name \*.gen.clj
+DIRS    != cd ${SRCDIR} && find * -type d
+
+VERSION != shtool version -d short version.txt
+JAR     := ${PROJECT}-${VERSION}.jar
+TGZ     := ${PROJECT}-${VERSION}.tar.gz
+
+all: jar
+
+release: jar tarball
+
+jar: ${JAR}
+
+tarball: ${TGZ}
+
+test: jar
+	env CLASSPATH=${JAR}:$${CLASSPATH} prove t
+
+clean:
+	rm -rf ${DISTDIR} ${JAR} ${TGZ} README.txt
+
+compile: ${CLJSRC:C/^/dist\//} ${GCCLJSRC:R:R:C/^/dist\//:C/$/.class/} ${JAVASRC:C/^/dist\//:C/.java$/.class/}
+
+bump-version:
+	shtool version -l txt -n ${PROJECT} -i v version.txt
+
+bump-revision:
+	shtool version -l txt -n ${PROJECT} -i r version.txt
+
+bump-level:
+	shtool version -l txt -n ${PROJECT} -i l version.txt
+
+.for _clj in ${CLJSRC}
+dist/${_clj}: src/${_clj} ${DISTDIR}
+	shtool install -c src/${_clj} dist/${_clj}
+.endfor
+
+.for _clj in ${GCCLJSRC}
+dist/${_clj:R:R}.class: src/${_clj} ${DISTDIR}
+	java clojure.lang.Script gen-class.clj -- ${DISTDIR} ${_clj}
+.endfor
+
+.for _java in ${JAVASRC}
+dist/${_java:R}.class: src/${_java} ${DISTDIR}
+	javac -d dist src/${_java}
+.endfor
+
+${JAR}: compile
+	cp README.txt ${DISTDIR}
+	cp LICENSE ${DISTDIR}
+	jar cf ${JAR} -C ${DISTDIR} .
+
+${TGZ}:
+	shtool tarball -c "gzip -9" -o ${TGZ} \
+		-e '\.DS_Store,${DISTDIR},\.jar,\.hg,\.tar\.gz' .
+
+${DISTDIR}:
+	shtool mkdir -p ${DISTDIR}
+	@for dir in ${DIRS}; do \
+		echo shtool mkdir -p ${DISTDIR}/$${dir}; \
+		shtool mkdir -p ${DISTDIR}/$${dir}; \
+	done
+
+.PHONY: all release jar tarball test clean compile
+            _________            ________________
+            __  ____/_______________(_)__  /__  /_____ _
+            _  / __ _  __ \_  ___/_  /__  /__  /_  __ `/
+            / /_/ / / /_/ /  /   _  / _  / _  / / /_/ /
+            \____/  \____//_/    /_/  /_/  /_/  \__,_/
+
+Gorilla - a Clojure environment for Vim
+
+Gorilla provides a similar, although as sophisticated environment for
+Vim as SLIME does for Emacs. It uses a modified Repl, which is provides
+a network interface to a running Clojure.
+
+Meikel Branmdeyer <mb@kotka.de>
+Frankfurt am Main, 2008

File gen-class.clj

+;-
+; Copyright 2008 (c) Meikel Brandmeyer.
+; All rights reserved.
+;
+; Permission is hereby granted, free of charge, to any person obtaining a copy
+; of this software and associated documentation files (the "Software"), to deal
+; in the Software without restriction, including without limitation the rights
+; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+; copies of the Software, and to permit persons to whom the Software is
+; furnished to do so, subject to the following conditions:
+;
+; The above copyright notice and this permission notice shall be included in
+; all copies or substantial portions of the Software.
+;
+; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+; THE SOFTWARE.
+
+(def *builddir* (first *command-line-args*))
+
+(doseq c (rest *command-line-args*)
+  (load-file (str "src/" c)))