## ## Makefile for Proof General ## ## Author: David Aspinall ## ## $Id$ ## ########################################################################### # TODO (da): # - user-level targets for .elc compile. ## ## Use: ## ## make compile - cleanout all .elc's and recompile ## make - byte compile file if .el file is newer ## (do all if is omitted) ## make install - install .el and .elc's into INSTALLDIR ## .rules files into RULESINSTALLDIR ## make public - install doc files and .el's into PUBLICDIR ## ## make docs - build info and .dvi files from isamode.texi ## make alldocs - make all docs (pdf,html,dvi,info) ## ## ########################################################################### ## ## Things to edit: INSTALLDIR, PUBLICDIR, EMACS, MAKEINFO, TEXI2DVI ## ## See-also: generic/proof-site.el doc/Makefile ## ########################################################################### # Byte compilation command BYTECOMP = $(EMACS) -batch -q -f batch-byte-compile EMACS=xemacs ############################################################# ## ## Developer use only: ## ## make ChangeLog - make ChangeLog from CVS sources (uses emacs) ## make tag - tag the CVS sources with CVS_RELEASE_TAG ## make dist - make a distribution from sources with above tag ## ############################################################# ## ## Developer variables ## # Release tag. NB: CVS tags can't have points in them. RELEASE_TAG=2.0-pre$(shell date "+%y%m%d") CVS_RELEASE_TAG=2-0-pre$(shell date "+%y%m%d") CVSNAME = elisp CVSROOT = /home/lego/src EXPORTDIR = /home/lego/pub/ProofGeneral NAME = ProofGeneral RELEASENAME = ProofGeneral-2.0 # Files not to include the distribution area / tarball NONDISTFILES=todo html # Files not to include in the distribution tarball IGNOREDFILES=doc/ProofGeneral.pdf doc/ProofGeneral.dvi # Where to build a distribution DISTBUILDIR = /tmp/ProofGeneralRelease # Where to install a new distribution RELEASEDIR = /home/lego/EXPORT/ProofGeneral # Files not kept under cvs to clean away. FILES_NONCVS = ChangeLog FORCE: # Targets to pre-compile for distribution # Slightly dodgy to include elisp compile here. alldist: doc ############################################################ # # Re-Build ChangeLog. CVSROOT must be set correctly. # Correct dependency would be to check repository for changes! # ChangeLog: FORCE rm -f ChangeLog $(EMACS) -batch -q -f vc-update-change-log -f save-buffer ############################################################ # # Clean up intermediate files # clean: (cd doc; $(MAKE) clean) ############################################################ # # Clean up all generated files. # distclean: clean rm -rf $(FILES_NONCVS) (cd doc; $(MAKE) distclean) ############################################################ # # Documentation # doc: FORCE (cd doc; $(MAKE) doc) alldocs: FORCE (cd doc; $(MAKE) all) ############################################################ ## ## tag: tag the CVS sources of working directory with RELEASE_TAG, ## and edit version stamp in proof-site.el ## (Developers only) ## tag: @echo "*************************************************" @echo " Tagging sources... (fails if CVS source dirty)" @echo "*************************************************" if [ -n "`cvs -n -q update`" ]; then exit 1; fi (cd generic; mv proof-site.el proof-site.el.old; sed -e 's/defconst proof-general-version\n \".*\"/defconst proof-general-version\n \"Proof General, Version $(RELEASE_TAG) released by da,tms. Email lego@dcs.ed.ac.uk.\"/g' proof-site.el.old > proof-site.el; rm proof-site.el.old) cvs commit -m"Set version tag for release." generic/proof-site.el cvs tag "Release-$(CVS_RELEASE_TAG)" ############################################################ ## ## dist: make a distribution in DISTBUILDIR from CVS sources ## Builds from sources tagged with CVS_RELEASE_TAG. ## Moves html files to parent directory, and removes ## non-distributed files. ## (Developer only) ## dist: cvsclean @echo "*************************************************" @echo " Cleaning dist build directory..." @echo "*************************************************" rm -rf $(DISTBUILDIR) mkdir -p $(DISTBUILDIR) @echo "*************************************************" @echo " Running cvs export .." @echo "*************************************************" cvs export -kv -r "Release-$(CVS_RELEASE_TAG)" -d $(DISTBUILDIR)/$(RELEASENAME) $(CVSNAME) @echo "*************************************************" @echo " Running 'make alldist' for new release .." @echo "*************************************************" (cd $(DISTBUILDIR)/$(RELEASENAME); make alldist) (cd $(DISTBUILDIR)/$(RELEASENAME); make clean) @echo "*************************************************" @echo " Copying doc files .." @echo "*************************************************" (cp -pr $(DISTBUILDIR)/$(RELEASENAME)/doc $(DISTBUILDIR)) @echo "*************************************************" @echo " Moving html files .." @echo "*************************************************" (cd $(DISTBUILDIR)/$(RELEASENAME)/html; mv * ../..) @echo "*************************************************" @echo " Cleaning non-distributed files .." @echo "*************************************************" (cd $(DISTBUILDIR)/$(RELEASENAME); rm -rf $(NONDISTFILES)) @echo "*************************************************" @echo " Making compressed tar file..." @echo "*************************************************" (cd $(DISTBUILDIR); for f in $(IGNOREDFILES); do echo $f >> ignoredfiles; done) tar -cvhf $(DISTBUILDIR)/$(RELEASENAME).tar -C $(DISTBUILDIR) $(RELEASENAME) -X $(DISTBUILDIR)/ignoredfiles gzip -9 $(DISTBUILDIR)/$(RELEASENAME).tar @echo "*************************************************" @echo " Finished making dist." @echo "*************************************************" ############################################################ ## ## release: ## tag the CVS sources, and make a distribution. ## Then install the distribution in RELEASEDIR. ## WARNING: RELEASEDIR is not cleaned, but files there ## with same names will be overwritten. ## Moreover, a link ProofGeneral -> ProofGeneral- ## is made. ## release: tag dist mkdir -p $(RELEASEDIR) cp -pfr $(DISTBUILDIR)/* $(RELEASEDIR) (cd $(RELEASEDIR); ln -sf $(RELEASENAME) $(NAME)) @echo "*************************************************" @echo " Finished installing dist." @echo "*************************************************" ## Same except do the install remotely. ## REMOTE=ssh ssh.dcs.ed.ac.uk remoterelease: tag dist $(REMOTE) cp -pfr $(DISTBUILDIR)/* $(RELEASEDIR) $(REMOTE) (cd $(RELEASEDIR); ln -sf $(RELEASENAME) $(NAME)) @echo "*************************************************" @echo " Finished installing dist." @echo "*************************************************"