diff options
Diffstat (limited to 'GNUmakefile')
-rw-r--r-- | GNUmakefile | 109 |
1 files changed, 49 insertions, 60 deletions
diff --git a/GNUmakefile b/GNUmakefile index d63de98..5d25714 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1,9 +1,11 @@ -MODULES=xmodmap emacs xdg shepherd +MODULES=xmodmap emacs xdg shepherd dunst zsh mcron mbsync STOW = stow EMACS = emacs SCHEME_IMPLEMENTATION = guile +.PRECIOUS: %.el + define tangle = @echo -e "\e[35mOBT\e[0m" $< @$(EMACS) -quick -batch \ @@ -18,14 +20,8 @@ endef all: $(MODULES) -install: - cp --recursive --verbose build/. ~/ - -clean: - rm -r build - -zsh: - $(MAKE) -C $@ +install: $(addsuffix -stow,$(MODULES)) +clean: $(addsuffix -clean,$(MODULES)) before-%-install: # Dummy recipe @true @@ -39,7 +35,7 @@ before-%-install: # Dummy recipe %-uninstall: $(STOW) -D $(subst -uninstall,,$@) -# Picom +## Picom picom: picom/.config/picom.conf @@ -49,31 +45,22 @@ picom/.config/picom.conf: picom/.config/picom.org picom-clean: rm -f picom/.config/picom.conf -######### -# Emacs # -######### +## Emacs -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) +emacs: emacs/.config/shepherd/init.d/emacs.scm emacs/.config/emacs/init.elc -########### -# Xmodmap # -########### +emacs-clean: + rm -f emacs/.config/shepherd/init.d/emacs.scm emacs/.config/emacs/init.el \ + emacs/.config/emacs/init.elc -xmodmap: build/ build/.Xmodmap +## Xmodmap -build/.Xmodmap: xmodmap/Xmodmap.org - $(call tangle,fundamental) +xmodmap: xmodmap/.Xmodmap xmodmap-clean: - rm -f build/.Xmodmap + rm -f xmodmap/.Xmodmap -######### -# Cower # -######### +## Cower cower: cower/.config/cower/config @@ -83,9 +70,7 @@ cower/.config/cower/config: cower/.config/cower/config.org cower-clean: rm -f cower/.config/cower/config -############# -# Mowedline # -############# +## Mowedline mowedline: mowedline/.config/mowedline/init.scm @@ -96,59 +81,63 @@ mowedline/.config/mowedline/init.scm: mowedline/.config/mowedline/init.org mowedline-clean: rm -f mowedline/.config/mowedline/init.scm -######### -# Dunst # -######### +## Dunst dunst: dunst/.config/dunst/dunstrc -dunst/.config/dunst/dunstrc: dunst/.config/dunst/dunstrc.org - $(call tangle,conf-unix) - -dunst-clean: - rm -f dunst/.config/dunst/dunstrc - -# X11 +## X11 x11-install: lib-install x11/dot-x11-0-1-any.pkg.tar.xz x11/dot-x11-0-1-any.pkg.tar.xz: x11/PKGBUILD cd x11 && makepkg -sicf -####### -# XDG # -####### +## XDG -xdg: build/.config/ build/.config/mimeapps.list build/.config/user-dirs.dirs \ - build/.config/user-dirs.locale +xdg: xdg/.config/mimeapps.list xdg/.config/user-dirs.dirs \ + xdg/.config/user-dirs.locale -build/.config/mimeapps.list: xdg/.config/mimeapps.list.org - $(call tangle) +# These files shouldn't be stowed because the applications managing/using them +# immediately replace the symbolic links with new files and the settings in them +# are lost. +xdg-stow: + cp xdg/.config/mimeapps.list xdg/.config/user-dirs.dirs xdg/.config/user-dirs.locale $(HOME)/.config/ -build/.config/user-dirs.dirs: xdg/.config/user-dirs.dirs.org - $(call tangle) +## Shepherd -build/.config/user-dirs.locale: xdg/.config/user-dirs.locale.org - $(call tangle) +shepherd: shepherd/.config/shepherd/init.scm -# Shepherd +## Mcron -shepherd: build/.config/shepherd/ build/.config/shepherd/init.scm +mcron: mcron/.config/shepherd/init.d/mcron.scm -build/.config/shepherd/init.scm: shepherd/.config/shepherd/init.org - $(call tangle) +## Mbsync + +mbsync: mbsync/.config/cron/mbsync.guile + +## ZSH -# Helper +zsh: zsh/.profile zsh/.zshrc zsh/.zsh/functions/unzip.zwc \ + zsh/.zsh/functions/x-yank.zwc zsh/.zsh/functions/x-copy-region-as-kill.zwc + +## Helper %.el: %.org $(call tangle,emacs-lisp) %.elc: %.el @echo -e "\e[36mELC\e[0m" $< - $(EMACS) -batch -f batch-byte-compile $< + $(EMACS) -batch -f package-initialize -f batch-byte-compile $< %: %.org $(call tangle) -%/: - mkdir -p $@ +.%: %.org + $(call tangle) + +%.zwc: % + zsh -c "zcompile $@ $^" + +# Local Variables: +# outline-regexp: "##+" +# End: |