aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2015-06-23 19:09:00 +0200
committerJonas Bernoulli <jonas@bernoul.li>2015-06-23 19:09:00 +0200
commit51eb8bb42f45237fab70f099d151c087409d32c3 (patch)
tree3d7f595f1ed5b2ebf7faff54fef2418bf342ba0d /Makefile
parentf7edcb7fe9608b1726465078abaa490af6a8efd7 (diff)
move all libraries to new lisp/ subdirectory
and move AUTHORS.md to the Documentation/ subdirectory. This also requires extensive changes to the Makefiles and some libraries.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile271
1 files changed, 70 insertions, 201 deletions
diff --git a/Makefile b/Makefile
index 09e12bd..42bf1a4 100644
--- a/Makefile
+++ b/Makefile
@@ -1,60 +1,34 @@
+include default.mk
-include config.mk
-include .common.mk
-ELPA_DIR ?= $(HOME)/.emacs.d/elpa
-
-DASH_DIR ?= $(shell \
- find -L $(ELPA_DIR) -maxdepth 1 -regex '.*/dash-[.0-9]*' 2> /dev/null | \
- sort | tail -n 1)
-ifeq "$(DASH_DIR)" ""
- DASH_DIR = ../dash
-endif
-
-CYGPATH := $(shell cygpath --version 2>/dev/null)
-
-ifdef CYGPATH
- LOAD_PATH ?= -L . -L $(shell cygpath --mixed $(DASH_DIR))
-else
- LOAD_PATH ?= -L . -L $(DASH_DIR)
-endif
-
-BATCH = $(EMACSBIN) -batch -Q $(LOAD_PATH)
-
-VERSION=$(shell \
- test -e .git\
- && git describe --tags --dirty 2> /dev/null\
- || $(BATCH) --eval "(progn\
- (fset 'message (lambda (&rest _)))\
- (load-file \"magit-version.el\")\
- (princ magit-version))")
-
-.PHONY: help magit-version.el AUTHORS.md \
- install-lisp install-docs test test-interactive clean clean-docs \
- dist magit-$(VERSION).tar magit-$(VERSION).tar.gz genstats
+.PHONY: lisp \
+ install install-lisp install-docs install-info \
+ test test-interactive \
+ clean clean-lisp clean-docs \
+ genstats \
+ dist magit-$(VERSION).tar.gz elpa magit-$(VERSION).tar
all: lisp docs
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 ====)
@@ -65,161 +39,37 @@ 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 genstats - generate stats)
+ $(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"
-ELS = with-editor.el
-ELS += git-commit.el
-ELS += magit-popup.el
-ELS += magit-utils.el
-ELS += magit-section.el
-ELS += magit-git.el
-ELS += magit-mode.el
-ELS += magit-process.el
-ELS += magit-core.el
-ELS += magit-diff.el
-ELS += magit-wip.el
-ELS += magit-apply.el
-ELS += magit-log.el
-ELS += magit.el
-ELS += magit-sequence.el
-ELS += magit-commit.el
-ELS += magit-remote.el
-ELS += magit-bisect.el
-ELS += magit-stash.el
-ELS += magit-blame.el
-ELS += magit-ediff.el
-ELS += magit-extras.el
-ELS += git-rebase.el
-ELCS = $(ELS:.el=.elc)
-
-with-editor.elc:
-git-commit.elc: with-editor.elc
-magit-utils.elc:
-magit-section.elc: magit-utils.elc
-magit-git.elc: magit-utils.elc magit-section.elc
-magit-mode.elc: magit-section.elc magit-git.elc
-magit-popup.elc:
-magit-process.elc: with-editor.elc magit-utils.elc magit-section.elc \
- magit-git.elc magit-mode.elc
-magit-core.elc: magit-utils.elc magit-section.elc magit-git.elc \
- magit-mode.elc magit-popup.elc magit-process.elc
-magit-diff.elc: git-commit.elc magit-core.elc
-magit-wip.elc: magit-core.elc
-magit-apply.elc: magit-core.elc magit-diff.elc magit-wip.elc
-magit-log.elc: magit-core.elc magit-diff.elc
-magit.elc: with-editor.elc git-commit.elc \
- magit-core.elc magit-diff.elc magit-apply.elc magit-log.elc
-magit-sequence.elc: magit.elc
-magit-commit.elc: magit.elc magit-sequence.elc
-magit-remote.elc: magit.elc
-magit-bisect.elc: magit.elc
-magit-stash.elc: magit.elc
-magit-blame.elc: magit.elc
-magit-ediff.elc: magit.elc
-magit-extras.elc: magit.elc
-git-rebase.elc: magit.elc with-editor.elc
-
-lisp: $(ELCS) magit-version.el magit-autoloads.el
-
-%.elc: %.el
- @printf "Compiling %s\n" $<
- @$(BATCH) --eval "(progn\
- (when (file-exists-p \"$@\")\
- (delete-file \"$@\"))\
- (setq with-editor-emacsclient-executable nil)\
- (fset 'message* (symbol-function 'message))\
- (fset 'message (lambda (f &rest a)\
- (unless (equal f \"Wrote %s\")\
- (apply 'message* f a)))))" \
- -f batch-byte-compile $<
-
-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" >> $@
-
-magit-autoloads.el: $(ELS)
- @printf "Generating magit-autoloads.el\n"
- @$(BATCH) --eval "(progn\
- (fset 'message (lambda (&rest _)))\
- (setq make-backup-files nil)\
- (setq vc-handled-backends nil)\
- (setq default-directory (file-truename default-directory))\
- (setq generated-autoload-file (expand-file-name \"magit-autoloads.el\"))\
- (setq find-file-visit-truename t)\
- (update-directory-autoloads default-directory)))"
+lisp:
+ @$(RM) $(ELCS) $(ELGS) # temporary cleanup kludge
+ @$(MAKE) -C lisp lisp
docs:
@$(MAKE) -C Documentation all
-AUTHORS_URL = http://magit.vc/stats/authors.html
-define AUTHORS_HEADER
-Authors
-=======
-
-For statistics see $(AUTHORS_URL).
-
-Names below are sorted alphabetically.
-
-Author
-------
-
-- Marius Vollmer <marius.vollmer@gmail.com>
-
-Maintainer
-----------
-
-- Jonas Bernoulli <jonas@bernoul.li>
-
-Retired Maintainers
--------------------
+info:
+ @$(MAKE) -C Documentation info
-- 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>
-
-Contributors
-------------
-
-endef
-export AUTHORS_HEADER
-
-authors: 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"
+texi:
+ @$(MAKE) -C Documentation texi
install: install-lisp install-docs
install-lisp: lisp
- @$(MKDIR) $(DESTDIR)$(lispdir)
- $(CP) $(ELS) $(ELCS) magit-autoloads.el magit-version.el $(DESTDIR)$(lispdir)
+ @$(MAKE) -C lisp install
-install-docs: install-info
- @$(MKDIR) $(DESTDIR)$(docdir)
- $(CP) AUTHORS.md $(DESTDIR)$(docdir)
+install-docs: docs
+ @$(MAKE) -C Documentation install-docs
-install-info: docs
- @$(MAKE) -C Documentation install
+install-info: info
+ @$(MAKE) -C Documentation install-info
test:
@$(BATCH) --eval "(progn\
@@ -228,42 +78,61 @@ test:
test-interactive:
@$(EMACSBIN) -Q $(LOAD_PATH) --eval "(progn\
- (setq magit-last-seen-setup-instructions \"9999\")\
(load-file \"t/magit-tests.el\")\
(ert t))"
-clean: clean-docs
- @$(RM) $(ELCS) magit-autoloads.el magit-version.el *.tar.gz *.tar
+clean: clean-lisp clean-docs
+ @$(RM) $(ELCS) $(ELGS) # temporary cleanup kludge
+ @$(RM) *.tar.gz *.tar
@$(RMDIR) magit-$(VERSION)
+clean-lisp:
+ @$(MAKE) -C lisp clean
+
clean-docs:
@$(MAKE) -C Documentation clean
-DIST_FILES = $(ELS) magit-version.el Makefile \
- AUTHORS.md README.md COPYING Documentation/magit.texi
+# Release management
+
+genstats:
+ @printf "Generating stats\n"
+ @gitstats -c style=/css/stats.css -c max_authors=200 . $(statsdir)
+
+authors:
+ @$(MAKE) -C Documentation authors
dist: magit-$(VERSION).tar.gz
+
+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)
+
magit-$(VERSION).tar.gz:
@printf "Packing $@\n"
@$(MKDIR) magit-$(VERSION)
- @$(CP) $(DIST_FILES) 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)
-ELPA_FILES = $(ELS) magit-pkg.el AUTHORS.md Documentation/magit.info Documentation/dir
-
-marmalade: magit-$(VERSION).tar
-marmalade-upload: marmalade
+marmalade: elpa
@printf "Uploading magit-$(VERSION)\n"
@marmalade-upload magit-$(VERSION).tar
- @$(RMDIR) marmalade
-magit-$(VERSION).tar:
+
+elpa: magit-$(VERSION).tar
+
+ELPA_ROOT_FILES = COPYING README.md magit-pkg.el
+ELPA_LISP_FILES = $(addprefix lisp/,$(ELS) magit-version.el)
+ELPA_DOCS_FILES = $(addprefix Documentation/,$(INFOPAGES) AUTHORS.md dir)
+
+magit-$(VERSION).tar: info
@printf "Packing $@\n"
@$(MKDIR) magit-$(VERSION)
- @$(CP) $(ELPA_FILES) magit-$(VERSION)
+ @$(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)
-
-genstats:
- @printf "Generating stats\n"
- @gitstats -c style=/css/stats.css -c max_authors=200 . $(statsdir)