aboutsummaryrefslogtreecommitdiff
path: root/emacsen
diff options
context:
space:
mode:
authorRyan Kavanagh <rak@debian.org>2013-02-19 14:19:47 -0500
committerRyan Kavanagh <rak@debian.org>2013-02-19 14:19:47 -0500
commit7f9446e1996d0135e949fb3c0546c02dbb574af3 (patch)
tree5f5f3a0bd5a4643266b69b44ec0350749b02abb3 /emacsen
parentAdded auto-indent-mode and magit (diff)
Added makefile for building emacsen
Diffstat (limited to 'emacsen')
-rw-r--r--emacsen/Makefile56
1 files changed, 56 insertions, 0 deletions
diff --git a/emacsen/Makefile b/emacsen/Makefile
new file mode 100644
index 0000000..ebed80b
--- /dev/null
+++ b/emacsen/Makefile
@@ -0,0 +1,56 @@
+ROOT=$(shell pwd)/..
+export ROOT
+EMACSD=$(ROOT)/.emacs.d/
+export ELISPDIR
+
+SUBDIRS = auto-complete \
+ auto-indent-mode \
+ magit
+# color-theme-6.6.0 \
+# ProofGeneral-4.1
+
+INSTALLDIRS = $(SUBDIRS:%=install-%)
+CLEANDIRS = $(SUBDIRS:%=clean-%)
+
+subdirs: $(SUBDIRS)
+
+$(SUBDIRS):
+ $(MAKE) -C $@
+
+install: $(INSTALLDIRS)
+$(INSTALLDIRS):
+ -mkdir $(EMACSD)/$(@:install-%=%)
+ $(MAKE) -C $(@:install-%=%) install DIR=$(EMACSD)/$(@:install-%=%)
+
+clean: $(CLEANDIRS)
+$(CLEANDIRS):
+ $(MAKE) -C $(@:clean-%=%) clean
+
+# Manual overrides:
+auto-indent-mode clean-auto-indent-mode:
+ echo $@
+
+install-auto-complete:
+ -mkdir $(EMACSD)/$(@:install-%=%)
+ $(MAKE) -C $(@:install-%=%) -e DIR=$(EMACSD)/$(@:install-%=%) install
+
+install-auto-indent-mode:
+ -mkdir $(EMACSD)/$(@:install-%=%)
+ cp $(@:install-%=%)/auto-indent-mode.el $(EMACSD)/$(@:install-%=%)
+
+install-color-theme-6.6.0:
+ -mkdir $(EMACSD)/$(@:install-%=%)
+ $(MAKE) -C $(@:install-%=%) -e ELISPDIR=$(EMACSD)/$(@:install-%=%) install
+
+install-magit:
+ -mkdir $(EMACSD)/$(@:install-%=%)
+ $(MAKE) -C $(@:install-%=%) -e PREFIX="" -e DESTDIR=$(shell pwd)/$(@:install-%=%) \
+ -e SYSCONFDIR="" -e ELISP_INSTALL_DIR=$(EMACSD)/$(@:install-%=%) install
+
+clean-magit:
+ $(MAKE) -C $(@:clean-%=%) clean
+ rm -fr $(@:clean-%=%)/share
+
+all: subdirs
+
+.PHONY: all subdirs $(SUBDIRS) install $(INSTALLDIRS) clean $(CLEANDIRS)