diff options
Diffstat (limited to 'GNUmakefile')
-rw-r--r-- | GNUmakefile | 65 |
1 files changed, 53 insertions, 12 deletions
diff --git a/GNUmakefile b/GNUmakefile index ea8fd81..d63de98 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1,16 +1,28 @@ -include dotfiles.mk - -MODULES=xmodmap emacs picom cower mowedline herbstluftwm xdg -STOW=stow +MODULES=xmodmap emacs xdg shepherd + +STOW = stow +EMACS = emacs +SCHEME_IMPLEMENTATION = guile + +define tangle = + @echo -e "\e[35mOBT\e[0m" $< + @$(EMACS) -quick -batch \ + -eval "(package-initialize)" \ + -load ob-tangle \ + -eval "(setq sh-make-vars-local nil)" \ + -eval "(setq geiser-default-implementation '$(SCHEME_IMPLEMENTATION))" \ + -eval "(org-babel-tangle-file \"$<\" \"$(PWD)/$@\" \"$(1)\")" +endef .PHONY: all clean $(MODULES) zsh all: $(MODULES) -build: - mkdir build +install: + cp --recursive --verbose build/. ~/ -clean: $(addsuffix -clean,$(MODULES)) +clean: + rm -r build zsh: $(MAKE) -C $@ @@ -41,14 +53,17 @@ picom-clean: # Emacs # ######### -emacs-install: emacs-stow - xdg-settings set default-url-scheme-handler org-protocol EmacsClient.desktop +emacs: build/.config/shepherd/init.d/ build/.config/shepherd/init.d/emacs.scm \ + emacs/.config/emacs/init.elc + +build/.config/shepherd/init.d/emacs.scm: emacs/.config/shepherd/init.d/emacs.org + $(call tangle) ########### # Xmodmap # ########### -xmodmap: build build/.Xmodmap +xmodmap: build/ build/.Xmodmap build/.Xmodmap: xmodmap/Xmodmap.org $(call tangle,fundamental) @@ -104,10 +119,36 @@ x11/dot-x11-0-1-any.pkg.tar.xz: x11/PKGBUILD # XDG # ####### -xdg: xdg/.config/mimeapps.list xdg/.config/user-dirs.dirs \ - xdg/.config/user-dirs.locale +xdg: build/.config/ build/.config/mimeapps.list build/.config/user-dirs.dirs \ + build/.config/user-dirs.locale + +build/.config/mimeapps.list: xdg/.config/mimeapps.list.org + $(call tangle) + +build/.config/user-dirs.dirs: xdg/.config/user-dirs.dirs.org + $(call tangle) + +build/.config/user-dirs.locale: xdg/.config/user-dirs.locale.org + $(call tangle) + +# Shepherd + +shepherd: build/.config/shepherd/ build/.config/shepherd/init.scm + +build/.config/shepherd/init.scm: shepherd/.config/shepherd/init.org + $(call tangle) # Helper +%.el: %.org + $(call tangle,emacs-lisp) + +%.elc: %.el + @echo -e "\e[36mELC\e[0m" $< + $(EMACS) -batch -f batch-byte-compile $< + %: %.org $(call tangle) + +%/: + mkdir -p $@ |