Commits

Meikel Brandmeyer committed 73143fc

Switch to the Makefile and gen-class.clj from lazy-map

Comments (0)

Files changed (2)

 DISTDIR := dist
 
 JAVASRC != cd ${SRCDIR} && find * -type f -name \*.java
-CLJSRC  != cd ${SRCDIR} && find * -type f -name \*.clj
+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
 test: jar
 	env CLASSPATH=${JAR}:$${CLASSPATH} prove t
 
-doc:
+doc: compile
 	( cat README.txt.in; \
 	  java clojure.lang.Script gen-docs.clj ) > README.txt
 
 clean:
 	rm -rf ${DISTDIR} ${JAR} ${TGZ} README.txt
 
-compile.clj: ${DISTDIR}
-	@for clj in ${CLJSRC}; do \
-		echo shtool install -C ${SRCDIR}/$${clj} ${DISTDIR}/$${clj}; \
-		shtool install -C ${SRCDIR}/$${clj} ${DISTDIR}/$${clj}; \
-	done
+compile: ${CLJSRC:C/^/dist\//} ${GCCLJSRC:R:R:C/^/dist\//:C/$/.class/}
 
-${JAR}: doc compile.clj
+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
+
+${JAR}: doc compile
 	cp README.txt ${DISTDIR}
 	cp LICENSE ${DISTDIR}
 	jar cf ${JAR} -C ${DISTDIR} .
 		shtool mkdir -p ${DISTDIR}/$${dir}; \
 	done
 
-.PHONY: all release jar tarball test doc clean compile.clj
+.PHONY: all release jar tarball test doc clean compile
+;-
+; 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)))