aboutsummaryrefslogtreecommitdiffstats
path: root/emacs/.emacs.d/windows.mk
diff options
context:
space:
mode:
authorGravatar Tom Willemse2018-06-13 11:15:49 -0700
committerGravatar Tom Willemse2018-06-13 11:15:49 -0700
commit736cf0f37f1c566c07f5d2540438a89569f816a8 (patch)
treeb27928032ad883c9d34156083aa4f021f8180593 /emacs/.emacs.d/windows.mk
parent701601ca86d3bdbf8e9ea6effcd65c96db5897cc (diff)
downloadnew-dotfiles-736cf0f37f1c566c07f5d2540438a89569f816a8.tar.gz
new-dotfiles-736cf0f37f1c566c07f5d2540438a89569f816a8.zip
Fix compilation on Windows, add install target
Paths on Windows get confused since I use a strange combination of some 4 different GNU/Linux-like systems on Windows (cygwin, msys2, msys git, WSL). Since Windows doesn't support symlinks properly, I can't use GNU Stow to install my files. So for Windows I copy over all the necessary files.
Diffstat (limited to 'emacs/.emacs.d/windows.mk')
-rw-r--r--[-rwxr-xr-x]emacs/.emacs.d/windows.mk17
1 files changed, 17 insertions, 0 deletions
diff --git a/emacs/.emacs.d/windows.mk b/emacs/.emacs.d/windows.mk
index 53d6f57..20e73c5 100755..100644
--- a/emacs/.emacs.d/windows.mk
+++ b/emacs/.emacs.d/windows.mk
@@ -1,2 +1,19 @@
EMACS := C:/msys64/mingw64/bin/emacs.exe
HOME := $(APPDATA)
+INSTALLDIR := $(APPDATA)/.emacs.d
+BASE_DIR := $(subst \,/,$(shell cygpath -w $(CURDIR)))
+
+.PHONY: install
+
+ALL_LISPS := init.el init.elc $(SITE_LISPS) $(COMPILED_SITE_LISPS) \
+ $(INIT_LISPS) $(COMPILED_INIT_LISPS)
+
+install:
+ for file in $(ALL_LISPS); do \
+ [[ -e $$file ]] && install -Dm 644 $$file "$(INSTALLDIR)/$$file"; \
+ done
+
+ mkdir -p "$(INSTALLDIR)/vendor-lisp/"
+ for dir in $(VENDOR_DIRS); do \
+ cp --recursive $$dir "$(INSTALLDIR)/$$dir"; \
+ done