diff options
| author | Jonas Bernoulli <jonas@bernoul.li> | 2015-07-01 21:46:19 +0200 |
|---|---|---|
| committer | Jonas Bernoulli <jonas@bernoul.li> | 2015-07-01 21:46:19 +0200 |
| commit | aa15fdccafe15ced001b2499ca265d69994e4b0f (patch) | |
| tree | 36f69762e2d5748b7cca5858840b38e8dab640fe /Makefile | |
| parent | 93cbf42fc3c90274ef9e10eb127d66a6e237dae2 (diff) | |
| parent | 8bab0f7df4fa13c973ca777a249184b9ede84923 (diff) | |
Merge branch 'next'
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 362 |
1 files changed, 162 insertions, 200 deletions
@@ -1,65 +1,34 @@ -PREFIX ?= /usr/local -datarootdir ?= $(PREFIX)/share -lispdir ?= $(datarootdir)/emacs/site-lisp/magit -infodir ?= $(datarootdir)/info -docdir ?= $(datarootdir)/doc/magit - -LOADDEFS_FILE ?= magit-autoloads.el -LOADDEFS_DIR ?= $(lispdir) - -ELS = magit.el -ELS += magit-blame.el -ELS += magit-key-mode.el -ELS += magit-wip.el -ELCS = $(ELS:.el=.elc) - -CP ?= install -p -m 644 -MKDIR ?= install -p -m 755 -d -RMDIR ?= rm -rf - -MAKEINFO ?= makeinfo -INSTALL_INFO ?= install-info - -EFLAGS ?= -L ../git-modes -L ../cl-lib -EMACSBIN ?= emacs -BATCH = $(EMACSBIN) $(EFLAGS) -batch -Q -L . - -VERSION=$(shell \ - test -e .git && git describe --tags --dirty 2> /dev/null || \ - $(BATCH) --eval "(progn\ - (require 'cl)\ - (flet ((message (&rest _) _))\ - (load-file \"magit-version.el\"))\ - (princ magit-version))") - -.PHONY: lisp -lisp: $(ELCS) magit-version.el loaddefs - -.PHONY: all +include default.mk +-include config.mk + +.PHONY: lisp \ + install install-lisp install-docs install-info \ + test test-interactive \ + clean clean-lisp clean-docs \ + genstats \ + dist magit-$(VERSION).tar.gz elpa $(ELPA_ARCHIVES) + all: lisp docs -.PHONY: help help: - $(info Getting Help) - $(info ============) $(info ) - $(info make help - show brief help) + $(info Current version: magit-$(VERSION)) $(info ) $(info Build) $(info =====) $(info ) - $(info make - build elisp files) - $(info make lisp - ditto) - $(info make all - build elisp files and documentation) - $(info make docs - generate documentation) + $(info make [all] - compile elisp and documentation) + $(info make lisp - compile elisp) + $(info make docs - generate info manuals) + $(info make info - generate info manuals) $(info ) $(info Install) $(info =======) $(info ) - $(info make install - install elisp files and documentation) - $(info make install-lisp - install elisp files) - $(info make install-docs - install documentation) - $(info make install-all - install elisp files, script, and docs) + $(info make install - install elisp and documentation) + $(info make install-lisp - install elisp) + $(info make install-docs - install all documentation) + $(info make install-info - install info manuals only) $(info ) $(info Test) $(info ====) @@ -70,174 +39,167 @@ help: $(info Release Managment) $(info =================) $(info ) - $(info make authors - regenerate the AUTHORS.md file) - $(info make dist - create old-school tarball) - $(info make marmalade - create marmalade tarball) - $(info make marmalade-upload - create and upload marmalade tarball) + $(info make texi - regenerate texi from org) + $(info make genstats - regenerate statistics) + $(info make authors - regenerate AUTHORS.md) + $(info make dist - create tarballs) + $(info make elpa - create elpa tarballs) + $(info make marmalade - upload elpa tarballs to marmalade) @printf "\n" -%.elc: %.el - @$(BATCH) -eval "(setq magit-last-seen-setup-instructions \"9999\")" \ - -f batch-byte-compile $< - -# Not a phony target, but needs to run *every* time. -.PHONY: magit-version.el -magit-version.el: - @printf "Generating magit-version.el\n" - @printf ";;; magit-version.el --- the Magit version you are using\n\n" > $@ - @printf "(setq magit-version \""$(VERSION)"\")\n\n" >> $@ - @printf "(provide 'magit-version)\n\n" >> $@ - @printf ";; Local Variables:\n" >> $@ - @printf ";; version-control: never\n" >> $@ - @printf ";; no-byte-compile: t\n" >> $@ - @printf ";; no-update-autoloads: t\n" >> $@ - @printf ";; coding: utf-8\n" >> $@ - @printf ";; End:\n" >> $@ - @printf ";;; magit-version.el ends here\n" >> $@ - -# Not a phony target, but needs to run *every* time. -.PHONY: magit-pkg.el -magit-pkg.el: - @printf "Generating magit-pkg.el\n" - @printf "(define-package \"magit\" \""$(VERSION)"\"\n" > $@ - @printf " \"Control Git from Emacs.\"\n" >> $@ - @printf " '((cl-lib \"0.5\")\n" >> $@ - @printf " (git-commit-mode \"1.0.0\")\n" >> $@ - @printf " (git-rebase-mode \"1.0.0\")))\n" >> $@ - -.PHONY: loaddefs -loaddefs: $(LOADDEFS_FILE) - -$(LOADDEFS_FILE): $(ELS) - @$(BATCH) --eval "(progn\ - (setq vc-handled-backends nil)\ - (setq magit-last-seen-setup-instructions \"9999\")\ - (defvar generated-autoload-file nil)\ - (let ((generated-autoload-file \"$(CURDIR)/$(LOADDEFS_FILE)\")\ - (make-backup-files nil))\ - (update-directory-autoloads \".\")))" +lisp: + @$(RM) $(ELCS) $(ELGS) # temporary cleanup kludge + @$(MAKE) -C lisp lisp -.PHONY: docs -docs: magit.info dir +docs: + @$(MAKE) -C Documentation all -%.info: %.texi - $(MAKEINFO) $< -o $@ +info: + @$(MAKE) -C Documentation info -dir: magit.info - $(INSTALL_INFO) --dir=$@ $< +texi: + @$(MAKE) -C Documentation texi -CONTRIBUTORS_URL = https://github.com/magit/magit/graphs/contributors -define AUTHORS_HEADER -Authors -======= +install: install-lisp install-docs -Also see $(CONTRIBUTORS_URL). -Names below are sorted alphabetically. +install-lisp: lisp + @$(MAKE) -C lisp install -Author ------- +install-docs: docs + @$(MAKE) -C Documentation install-docs -- Marius Vollmer <marius.vollmer@gmail.com> +install-info: info + @$(MAKE) -C Documentation install-info -Maintainer ----------- +test: + @$(BATCH) --eval "(progn\ + (load-file \"t/magit-tests.el\")\ + (ert-run-tests-batch-and-exit))" -- Jonas Bernoulli <jonas@bernoul.li> +test-interactive: + @$(EMACSBIN) -Q $(LOAD_PATH) --eval "(progn\ + (load-file \"t/magit-tests.el\")\ + (ert t))" -Retired Maintainers -------------------- +clean: clean-lisp clean-docs + @printf "Cleaning...\n" + @$(RM) $(ELCS) $(ELGS) # temporary cleanup kludge + @$(RM) *.gz *.tar.gz *.tar Documentation/*.texi~ + @$(RMDIR) magit-$(VERSION) -- Nicolas Dudebout <nicolas.dudebout@gatech.edu> -- Peter J. Weisberg <pj@irregularexpressions.net> -- Phil Jackson <phil@shellarchive.co.uk> -- Rémi Vanicat <vanicat@debian.org> -- Yann Hodique <yann.hodique@gmail.com> +clean-lisp: + @$(MAKE) -C lisp clean -Contributors ------------- +clean-docs: + @$(MAKE) -C Documentation clean -endef -export AUTHORS_HEADER - -# Not a phony target, but needs to run *every* time. -.PHONY: AUTHORS.md -AUTHORS.md: .mailmap - @printf "Generating AUTHORS.md..." - @test -d .git \ - && (printf "$$AUTHORS_HEADER\n" > $@ \ - && git log --pretty=format:'- %aN <%aE>' | sort -u >> $@ \ - && printf "done\n" ; ) \ - || printf "FAILED (non-fatal)\n" - -.PHONY: authors -authors: AUTHORS.md - -.PHONY: install -install: install-lisp install-docs +# Release management -.PHONY: install-all -install-all: install-lisp install-docs +genstats: + @printf "Generating stats\n" + @gitstats -c style=/css/stats.css -c max_authors=200 . $(statsdir) -.PHONY: install-lisp -install-lisp: lisp - $(MKDIR) $(DESTDIR)$(lispdir) - $(CP) $(ELS) $(ELCS) magit-version.el $(DESTDIR)$(lispdir) - $(MKDIR) $(DESTDIR)$(LOADDEFS_DIR) - $(CP) $(LOADDEFS_FILE) $(DESTDIR)$(LOADDEFS_DIR)/$(LOADDEFS_FILE) +authors: + @$(MAKE) -C Documentation authors -.PHONY: install-docs -install-docs: docs - $(MKDIR) $(DESTDIR)$(infodir) - $(CP) magit.info $(DESTDIR)$(infodir) - $(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/magit.info - $(MKDIR) $(DESTDIR)$(docdir) - $(CP) AUTHORS.md $(DESTDIR)$(docdir) - -.PHONY: test -test: $(ELCS) - @$(BATCH) --eval "(progn\ - (require 'cl) \ - (setq magit-last-seen-setup-instructions \"9999\")\ - (put 'flet 'byte-obsolete-info nil))" \ - -l tests/magit-tests.el -f ert-run-tests-batch-and-exit - -.PHONY: test-interactive -test-interactive: $(ELCS) - @$(EMACSBIN) $(EFLAGS) -Q -L "." --eval "(progn\ - (require 'cl)\ - (put 'flet 'byte-obsolete-info nil)\ - (setq magit-last-seen-setup-instructions \"9999\")\ - (load-file \"tests/magit-tests.el\")\ - (ert t))" +dist: magit-$(VERSION).tar.gz -.PHONY: clean -clean: - @echo "Cleaning..." - @$(RM) $(ELCS) $(LOADDEFS_FILE) magit-version.el *.tar.gz *.tar dir +DIST_ROOT_FILES = COPYING default.mk Makefile README.md +DIST_LISP_FILES = $(addprefix lisp/,$(ELS) magit-version.el Makefile) +DIST_DOCS_FILES = $(addprefix Documentation/,$(TEXIPAGES) AUTHORS.md Makefile) +ifneq ("$(wildcard RelNotes/$(VERSION).txt)","") + DIST_DOCS_FILES += RelNotes/$(VERSION).txt +endif + +magit-$(VERSION).tar.gz: lisp info + @printf "Packing $@\n" + @$(MKDIR) magit-$(VERSION) + @$(CP) $(DIST_ROOT_FILES) magit-$(VERSION) + @$(MKDIR) magit-$(VERSION)/lisp + @$(CP) $(DIST_LISP_FILES) magit-$(VERSION)/lisp + @$(MKDIR) magit-$(VERSION)/Documentation + @$(CP) $(DIST_DOCS_FILES) magit-$(VERSION)/Documentation + @$(TAR) cz --mtime=./magit-$(VERSION) -f magit-$(VERSION).tar.gz magit-$(VERSION) @$(RMDIR) magit-$(VERSION) - @test ! -e .git || $(RM) magit.info - -DIST_FILES = $(ELS) magit-version.el Makefile AUTHORS.md -DIST_FILES += README.md magit.texi magit.info dir - -ELPA_FILES = $(ELS) magit.info dir AUTHORS.md -.PHONY: dist -dist: magit-$(VERSION).tar.gz - -magit-$(VERSION).tar.gz: $(DIST_FILES) - $(MKDIR) magit-$(VERSION) - $(CP) $(DIST_FILES) magit-$(VERSION) - tar -cvz --mtime=./magit-$(VERSION) -f magit-$(VERSION).tar.gz magit-$(VERSION) - $(RMDIR) magit-$(VERSION) - -.PHONY: marmalade-upload marmalade -marmalade-upload: magit-$(VERSION).tar - marmalade-upload $< -marmalade: magit-$(VERSION).tar -magit-$(VERSION).tar: $(ELPA_FILES) magit-pkg.el - $(MKDIR) magit-$(VERSION) - $(CP) $(ELPA_FILES) magit-$(VERSION) - $(CP) magit-pkg.el magit-$(VERSION) - tar -cv --mtime=./magit-$(VERSION) -f magit-$(VERSION).tar magit-$(VERSION) - $(RMDIR) magit-$(VERSION) +marmalade: elpa + @printf "Uploading with-editor-$(VERSION)\n" + @marmalade-upload with-editor-$(VERSION).tar + @printf "Uploading git-commit-$(VERSION)\n" + @marmalade-upload git-commit-$(VERSION).tar + @printf "Uploading magit-popup-$(VERSION)\n" + @marmalade-upload magit-popup-$(VERSION).tar + @printf "Uploading magit-$(VERSION)\n" + @marmalade-upload magit-$(VERSION).tar + +ELPA_ARCHIVES = with-editor-$(VERSION).tar +ELPA_ARCHIVES += git-commit-$(VERSION).el.gz +ELPA_ARCHIVES += magit-popup-$(VERSION).tar +ELPA_ARCHIVES += magit-$(VERSION).tar + +elpa: $(ELPA_ARCHIVES) + +define with_editor_pkg +(define-package "with-editor" "$(VERSION)" + "Use the Emacsclient as $$EDITOR" + '((emacs "24.4") + (dash "2.10.0"))) +endef +# ' +export with_editor_pkg +with-editor-$(VERSION).tar: info + @printf "Packing $@\n" + @$(MKDIR) with-editor-$(VERSION) + @printf "$$with_editor_pkg\n" > with-editor-$(VERSION)/with-editor-pkg.el + @$(CP) lisp/with-editor.el with-editor-$(VERSION) + @$(CP) Documentation/with-editor.info Documentation/dir with-editor-$(VERSION) + @$(TAR) c --mtime=./with-editor-$(VERSION) \ + -f with-editor-$(VERSION).tar with-editor-$(VERSION) + @$(RMDIR) with-editor-$(VERSION) + +git-commit-$(VERSION).el.gz: + @printf "Packing $@\n" + @$(CP) lisp/git-commit.el git-commit-$(VERSION).el + +define magit_popup_pkg +(define-package "magit-popup" "$(VERSION)" + "Define prefix-infix-suffix command combos" + '((emacs "24.4") + (dash "2.10.0"))) +endef +# ' +export magit_popup_pkg +magit-popup-$(VERSION).tar: info + @printf "Packing $@\n" + @$(MKDIR) magit-popup-$(VERSION) + @printf "$$magit_popup_pkg\n" > magit-popup-$(VERSION)/magit-popup-pkg.el + @$(CP) lisp/magit-popup.el magit-popup-$(VERSION) + @$(CP) Documentation/magit-popup.info Documentation/dir magit-popup-$(VERSION) + @$(TAR) c --mtime=./magit-popup-$(VERSION) \ + -f magit-popup-$(VERSION).tar magit-popup-$(VERSION) + @$(RMDIR) magit-popup-$(VERSION) + +ELPA_ROOT_FILES = COPYING +ELPA_LISP_FILES = $(addprefix lisp/,$(ELMS) magit-version.el) +ELPA_DOCS_FILES = $(addprefix Documentation/,AUTHORS.md dir magit.info) + +define magit_pkg +(define-package "magit" "$(VERSION)" + "A Git porcelain inside Emacs" + '((emacs "24.4") + (dash "2.10.0") + (with-editor "2.0.50") + (git-commit "2.0.50") + (magit-popup "2.0.50"))) +endef +# ' +export magit_pkg +magit-$(VERSION).tar: lisp info + @printf "Packing $@\n" + @$(MKDIR) magit-$(VERSION) + @printf "$$magit_pkg\n" > magit-$(VERSION)/magit-pkg.el + @$(CP) $(ELPA_ROOT_FILES) magit-$(VERSION) + @$(CP) $(ELPA_LISP_FILES) magit-$(VERSION) + @$(CP) $(ELPA_DOCS_FILES) magit-$(VERSION) + @$(TAR) c --mtime=./magit-$(VERSION) -f magit-$(VERSION).tar magit-$(VERSION) + @$(RMDIR) magit-$(VERSION) |
