# Makefile for the Ale alignment editor. EMACS=@EMACS@ # This must be an ANSI C compiler. Sun's cc is *not* ANSI -- if # you're not sure, and your system has gcc, just use gcc. CC = @CC@ CFLAGS = @CFLAGS@ VERSION=@VERSION@ SVN_REVISION=@SVN_REVISION@ ARCHITECTURE=@ARCHITECTURE@ # PREFIXDIR is the "top level" directory in which to place the # installed gene editor. # By default things will be installed in the following subdirectories # of PREFIXDIR: PREFIXDIR/bin and PREFIXDIR/lib/ale. PREFIXDIR=@prefix@ ### If you set PREFIXDIR, it's unlikely that you want to change any of ### the subdirs below: # Where to put the phylo server, file reader executables, and analyzers BINDIR=${PREFIXDIR}/bin # Where to put data files that ale uses COMMONLIBDIR=${PREFIXDIR}/lib/ale LIBDIR=${COMMONLIBDIR}/${VERSION} # Where to put architecture-specific files, like utility executables ARCHDIR=${LIBDIR}/${ARCHITECTURE} # Where local Emacs lisp code is normally stored. You probably want # this to be your "site-lisp" directory (i.e.: default.el's home). LISPDIR=${LIBDIR}/lisp # When we get around to Info documentation, this will be useful. INFODIR=${PREFIXDIR}/info # If your site does not have gzip, then use the commented out lines # below instead of the uncommented ones: # GZIP=compress # GZIP_EXT=.Z GZIP=gzip --best GZIP_EXT=.gz ### You should not need to modify anything below this line. SOURCE_DIRS=phylo readers analyses lisp docs DISTDIR=ale-${VERSION}.${SVN_REVISION} DIST_NAME=ale-${VERSION}.${SVN_REVISION} DIST_LOC=www VC_SUBDIR=.svn all: ale lisp/gene-version.el cd phylo; ${MAKE} all cd readers; ${MAKE} all cd analyses; ${MAKE} all @true Since we include formatted documentation in the disty, @true this should not try to do anything unless you have actually @true changed some of the documentation sources. cd docs; ${MAKE} all cd lisp; ${MAKE} all ale: ale.in Makefile sed < ale.in > ale \ -e 's;^EMACS=;&${EMACS};' \ -e 's;^ALE_LISPDIR=;&${LISPDIR};' \ -e 's;^ALE_ARCHDIR=;&${ARCHDIR};' lisp/gene-version.el: cd lisp; \ rm -f gene-version.el; \ echo "(defconst gene-version \"${VERSION}\")" > gene-version.el; \ echo "(provide 'gene-version)" >> gene-version.el; ### This is getting hopelessly circular... But GNU Make seems to ### handle it just fine. Makefile: Makefile.in configure ./configure configure: configure.in autoconf install: all @echo @echo "Installing the ALE executable..." [ -d ${BINDIR} ] || mkdir -p ${BINDIR} chmod a+x ale cp ale ${BINDIR}/ale-${VERSION} rm -f ${BINDIR}/ale ln ${BINDIR}/ale-${VERSION} ${BINDIR}/ale @echo cd analyses; ${MAKE} install @echo cd docs; ${MAKE} install @echo cd lisp; ${MAKE} install @echo cd phylo; ${MAKE} install @echo cd readers; ${MAKE} install @echo @echo "Done Installing." uninstall: @echo @echo "Uninstalling the ALE executable..." rm ${BINDIR}/ale rm ${BINDIR}/ale-${VERSION} @echo cd analyses; ${MAKE} uninstall @echo cd docs; ${MAKE} uninstall @echo cd lisp; ${MAKE} uninstall @echo cd phylo; ${MAKE} uninstall @echo cd readers; ${MAKE} uninstall @echo -rmdir ${ARCHDIR} -rmdir ${LISPDIR} -rmdir ${LIBDIR} -rmdir ${COMMONLIBDIR} @echo @echo "Done Uninstalling." clean: rm -f *~ rm -f ale cd lisp; ${MAKE} clean cd docs; ${MAKE} clean cd phylo; ${MAKE} clean cd readers; ${MAKE} clean cd analyses; ${MAKE} clean ale.info: docs/ale.texi (cd docs; makeinfo ale.texi) dist-dir: rm -rf ${DIST_LOC}/${DIST_NAME} mkdir ${DIST_LOC}/${DIST_NAME} ln configure.in configure config.guess ${DIST_LOC}/${DIST_NAME} ln Makefile.in ale.in ${DIST_LOC}/${DIST_NAME} ln BUGS ChangeLog.CVS README WISHLIST ${DIST_LOC}/${DIST_NAME} mkdir ${DIST_LOC}/${DIST_NAME}/demo-data ln demo-data/demo.gb ${DIST_LOC}/${DIST_NAME}/demo-data/demo.gb ln demo-data/demo.phylo ${DIST_LOC}/${DIST_NAME}/demo-data/demo.phylo mkdir ${DIST_LOC}/${DIST_NAME}/www ln www/index.html.in ${DIST_LOC}/${DIST_NAME}/www/index.html.in dist: dist-dir @### TODO: it would be better if this did everything in a tmp @### location and then moved the result atomically into place. for dir in ${SOURCE_DIRS}; do \ (cd $${dir}; ${MAKE} dist-dir \ DISTDIR="../${DIST_LOC}/${DIST_NAME}/$${dir}"); \ done (cd ${DIST_LOC}; tar zcvf ${DIST_NAME}.tar${GZIP_EXT} ${DIST_NAME}) rm -rf ${DIST_LOC}/${DIST_NAME} www: dist