2022-01-14 09:13:00 +01:00
|
|
|
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
|
2017-04-03 05:22:36 +02:00
|
|
|
|
|
|
|
.PHONY: all clean $(MODULES) zsh
|
|
|
|
|
|
|
|
all: $(MODULES)
|
|
|
|
|
2022-01-14 09:13:00 +01:00
|
|
|
install:
|
|
|
|
cp --recursive --verbose build/. ~/
|
2022-01-14 08:10:42 +01:00
|
|
|
|
2022-01-14 09:13:00 +01:00
|
|
|
clean:
|
|
|
|
rm -r build
|
2016-11-24 21:45:18 +01:00
|
|
|
|
|
|
|
zsh:
|
|
|
|
$(MAKE) -C $@
|
2017-04-03 05:22:36 +02:00
|
|
|
|
2020-05-10 08:52:46 +02:00
|
|
|
before-%-install: # Dummy recipe
|
|
|
|
@true
|
|
|
|
|
|
|
|
%-stow: % before-%-install
|
2020-04-27 05:58:39 +02:00
|
|
|
$(STOW) $<
|
2020-04-25 05:49:40 +02:00
|
|
|
|
2020-05-10 08:52:46 +02:00
|
|
|
%-install: %-stow # Dummy recipe
|
|
|
|
@true
|
|
|
|
|
2020-04-25 05:49:40 +02:00
|
|
|
%-uninstall:
|
|
|
|
$(STOW) -D $(subst -uninstall,,$@)
|
2018-01-09 06:16:02 +01:00
|
|
|
|
2020-04-27 01:12:05 +02:00
|
|
|
# Picom
|
2017-06-22 09:07:28 +02:00
|
|
|
|
2020-04-27 01:12:05 +02:00
|
|
|
picom: picom/.config/picom.conf
|
2017-06-22 09:07:28 +02:00
|
|
|
|
2020-04-27 01:12:05 +02:00
|
|
|
picom/.config/picom.conf: picom/.config/picom.org
|
2017-06-22 09:07:28 +02:00
|
|
|
$(call tangle,conf)
|
|
|
|
|
2020-04-27 01:12:05 +02:00
|
|
|
picom-clean:
|
|
|
|
rm -f picom/.config/picom.conf
|
2017-06-22 09:07:28 +02:00
|
|
|
|
2017-04-03 05:52:42 +02:00
|
|
|
#########
|
|
|
|
# Emacs #
|
|
|
|
#########
|
|
|
|
|
2022-01-14 09:13:00 +01:00
|
|
|
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)
|
2020-05-10 08:52:46 +02:00
|
|
|
|
2017-04-03 05:22:36 +02:00
|
|
|
###########
|
|
|
|
# Xmodmap #
|
|
|
|
###########
|
|
|
|
|
2022-01-14 09:13:00 +01:00
|
|
|
xmodmap: build/ build/.Xmodmap
|
2017-04-03 05:22:36 +02:00
|
|
|
|
2022-01-14 08:10:42 +01:00
|
|
|
build/.Xmodmap: xmodmap/Xmodmap.org
|
2017-04-03 05:22:36 +02:00
|
|
|
$(call tangle,fundamental)
|
|
|
|
|
|
|
|
xmodmap-clean:
|
2022-01-14 08:10:42 +01:00
|
|
|
rm -f build/.Xmodmap
|
2017-04-03 05:22:36 +02:00
|
|
|
|
2018-01-09 05:48:18 +01:00
|
|
|
#########
|
|
|
|
# Cower #
|
|
|
|
#########
|
|
|
|
|
|
|
|
cower: cower/.config/cower/config
|
|
|
|
|
|
|
|
cower/.config/cower/config: cower/.config/cower/config.org
|
|
|
|
$(call tangle,conf-unix)
|
|
|
|
|
|
|
|
cower-clean:
|
|
|
|
rm -f cower/.config/cower/config
|
2018-01-09 06:21:01 +01:00
|
|
|
|
|
|
|
#############
|
|
|
|
# Mowedline #
|
|
|
|
#############
|
|
|
|
|
|
|
|
mowedline: mowedline/.config/mowedline/init.scm
|
|
|
|
|
|
|
|
mowedline/.config/mowedline/init.scm: SCHEME_IMPLEMENTATION = chicken
|
|
|
|
mowedline/.config/mowedline/init.scm: mowedline/.config/mowedline/init.org
|
|
|
|
$(call tangle,scheme)
|
|
|
|
|
|
|
|
mowedline-clean:
|
|
|
|
rm -f mowedline/.config/mowedline/init.scm
|
2018-01-09 07:33:43 +01:00
|
|
|
|
|
|
|
#########
|
|
|
|
# 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
|
2020-04-27 06:35:26 +02:00
|
|
|
|
|
|
|
# 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
|
2021-11-18 05:45:40 +01:00
|
|
|
|
|
|
|
#######
|
|
|
|
# XDG #
|
|
|
|
#######
|
|
|
|
|
2022-01-14 09:13:00 +01:00
|
|
|
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)
|
2021-11-18 05:45:40 +01:00
|
|
|
|
|
|
|
# Helper
|
|
|
|
|
2022-01-14 09:13:00 +01:00
|
|
|
%.el: %.org
|
|
|
|
$(call tangle,emacs-lisp)
|
|
|
|
|
|
|
|
%.elc: %.el
|
|
|
|
@echo -e "\e[36mELC\e[0m" $<
|
|
|
|
$(EMACS) -batch -f batch-byte-compile $<
|
|
|
|
|
2021-11-18 05:45:40 +01:00
|
|
|
%: %.org
|
|
|
|
$(call tangle)
|
2022-01-14 09:13:00 +01:00
|
|
|
|
|
|
|
%/:
|
|
|
|
mkdir -p $@
|