Files
_dotfiles/.config/i3blocks/Makefile
2024-06-12 13:49:42 +02:00

26 lines
561 B
Makefile

PREFIX = $(HOME)/.local/
_INSTALLDIR = $(DESTDIR)$(PREFIX)/libexec/i3blocks/
_MAKEBLOCKS := $(dir $(wildcard */Makefile))
all: build
build: $(_MAKEBLOCKS)
$(_MAKEBLOCKS):
$(MAKE) -C $@
install: all do-install
installdirs:
install -d $(_INSTALLDIR)
_BLOCKS := $(shell find . -type f -executable -not -path './.*')
do-install: installdirs $(_BLOCKS)
$(_BLOCKS):
install -m755 $@ $(_INSTALLDIR)
uninstall:
rm -f $(foreach block,$(_BLOCKS),$(_INSTALLDIR)$(notdir $(block)))
.PHONY: $(_MAKEBLOCKS) $(_BLOCKS) build do-install all install uninstall