aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2015-06-07 19:24:45 +0200
committerJonas Bernoulli <jonas@bernoul.li>2015-06-07 20:49:16 +0200
commit07fd277fe9c3dfbefbf735f6494262e8d0eb124e (patch)
tree9453fcaf3a8660942e9fa6b6bd01d4da2ff3d4a2 /Makefile
parentd0984877bc6b252bfded0d48d52b06fbdf93fab6 (diff)
split Makefile
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile52
1 files changed, 16 insertions, 36 deletions
diff --git a/Makefile b/Makefile
index ce9e372..09e12bd 100644
--- a/Makefile
+++ b/Makefile
@@ -1,13 +1,7 @@
-include config.mk
+include .common.mk
-PREFIX ?= /usr/local
-datarootdir ?= $(PREFIX)/share
-lispdir ?= $(datarootdir)/emacs/site-lisp/magit
-infodir ?= $(datarootdir)/info
-docdir ?= $(datarootdir)/doc/magit
-statsdir ?= ./stats
-
-ELPA_DIR ?= $(HOME)/.emacs.d/elpa
+ELPA_DIR ?= $(HOME)/.emacs.d/elpa
DASH_DIR ?= $(shell \
find -L $(ELPA_DIR) -maxdepth 1 -regex '.*/dash-[.0-9]*' 2> /dev/null | \
@@ -24,19 +18,7 @@ else
LOAD_PATH ?= -L . -L $(DASH_DIR)
endif
-EMACSBIN ?= emacs
-BATCH = $(EMACSBIN) -batch -Q $(LOAD_PATH)
-
-CP ?= install -p -m 644
-MKDIR ?= install -p -m 755 -d
-RMDIR ?= rm -rf
-TAR ?= tar
-
-MAKEINFO ?= makeinfo
-INSTALL_INFO ?= $(shell \
- hash ginstall-info 2> /dev/null\
- && printf ginstall-info\
- || printf install-info)
+BATCH = $(EMACSBIN) -batch -Q $(LOAD_PATH)
VERSION=$(shell \
test -e .git\
@@ -47,7 +29,7 @@ VERSION=$(shell \
(princ magit-version))")
.PHONY: help magit-version.el AUTHORS.md \
- install-lisp install-docs test test-interactive clean \
+ install-lisp install-docs test test-interactive clean clean-docs \
dist magit-$(VERSION).tar magit-$(VERSION).tar.gz genstats
all: lisp docs
@@ -180,14 +162,8 @@ magit-autoloads.el: $(ELS)
(setq find-file-visit-truename t)\
(update-directory-autoloads default-directory)))"
-docs: Documentation/magit.info Documentation/dir
-
-Documentation/dir: Documentation/magit.info
- @$(INSTALL_INFO) --dir=$@ $<
-
-%.info: %.texi
- @printf "Generating magit.info\n"
- @$(MAKEINFO) $< -o $@
+docs:
+ @$(MAKE) -C Documentation all
AUTHORS_URL = http://magit.vc/stats/authors.html
define AUTHORS_HEADER
@@ -235,13 +211,16 @@ AUTHORS.md: .mailmap
install: install-lisp install-docs
install-lisp: lisp
- $(MKDIR) $(DESTDIR)$(lispdir)
+ @$(MKDIR) $(DESTDIR)$(lispdir)
$(CP) $(ELS) $(ELCS) magit-autoloads.el magit-version.el $(DESTDIR)$(lispdir)
-install-docs: docs
- $(MKDIR) $(DESTDIR)$(docdir)
+install-docs: install-info
+ @$(MKDIR) $(DESTDIR)$(docdir)
$(CP) AUTHORS.md $(DESTDIR)$(docdir)
+install-info: docs
+ @$(MAKE) -C Documentation install
+
test:
@$(BATCH) --eval "(progn\
(load-file \"t/magit-tests.el\")\
@@ -253,12 +232,13 @@ test-interactive:
(load-file \"t/magit-tests.el\")\
(ert t))"
-clean:
- @printf "Cleaning...\n"
+clean: clean-docs
@$(RM) $(ELCS) magit-autoloads.el magit-version.el *.tar.gz *.tar
- @$(RM) dir Documentation/dir Documentation/magit.info
@$(RMDIR) magit-$(VERSION)
+clean-docs:
+ @$(MAKE) -C Documentation clean
+
DIST_FILES = $(ELS) magit-version.el Makefile \
AUTHORS.md README.md COPYING Documentation/magit.texi