## ## Programmer: Craig Stuart Sapp ## Creation Date: Sun Jun 21 22:08:52 PDT 2009 ## Last Modified: Thu Sep 15 22:50:17 PDT 2011 ## Filename: ...Makefile ## ## Description: Humdrum extras meta-makefile: Downloads and makes ## all Humdrum Extras programs (particularly humplay ## which requires the improv library). ## ## Typing: ## ## make Will download both code sets and compile everything ## with executable programs stored in humextra/bin. ## make download Will download the most-recent humextra and improv code. ## DATE = `date +"%Y%m%d"` .PHONY: improv humextra default: humextradownload humextracompile @echo @echo "Humextra programs are compiled in the humextra/bin directory" @echo all: download improvlibrary humextracompile download: improvdownload humextradownload library: download improvlibrary humextralibrary examples: programs programs: humextraprograms improvlibrary: (cd improv; make library) humextracompile: humextralibrary humextraprograms humextralibrary: (cd humextra; make library) humextraprograms: (cd humextra; make programs) improvdownload: cleanimprov ifeq ($(shell uname),Darwin) curl http://improv.sapp.org/cgi-bin/improv -o improv-$(DATE).tar.bz2 else wget http://improv.sapp.org/cgi-bin/improv -O improv-$(DATE).tar.bz2 endif tar xvjf improv-$(DATE).tar.bz2 humextradownload: cleanhumextra ifeq ($(shell uname),Darwin) # curl http://extras.humdrum.org/download -o humextra-$(DATE).tar.bz2 curl http://extras.humdrum.org/download/humextra.tar.bz2 -o humextra-$(DATE).tar.bz2 else # wget http://extras.humdrum.org/download -O humextra-$(DATE).tar.bz2 wget http://extras.humdrum.org/download/humextra.tar.bz2 -O humextra-$(DATE).tar.bz2 endif tar xvjf humextra-$(DATE).tar.bz2 clean: cleanimprov cleanhumextra cleanimprov: -rm -rf improv-old -rm improv-*-old.tar.bz2 -if [ -d "improv" ]; then \ echo "Moving improv directory to improv-old"; \ echo "Run 'make clean' again to completely remove"; \ mv improv improv-old; \ mv improv-*.tar.bz2 improv-$(DATE)-old.tar.bz2; \ fi cleanhumextra: -rm -rf humextra-old -rm humextra-$(DATE)-old.tar.bz2 -if [ -d "humextra" ]; then \ echo "Moving humextra directory to humextra-old"; \ echo "Run 'make clean' again to completely remove"; \ mv humextra humextra-old; \ mv humextra-*.tar.bz2 humextra-$(DATE)-old.tar.bz2; \ fi