how/makefile

25 lines
571 B
Makefile

SRCDIR = $(dir $(realpath $(firstword $(MAKEFILE_LIST))))
PREFIX ?= /usr
HOWROOT ?= $(PREFIX)/share/how
DESTDIR ?= $(PREFIX)/bin
GITBASE ?= $(shell realpath $(shell git config --get remote.origin.url) | rev \
| cut -d/ -f2- | rev)
.PHONY: install uninstall lix-os-how
lix-os-how: lix-os-defaults lix-os-pkgs
lix-os-defaults:
git clone $(GITBASE)/how-lix-os-defaults default
lix-os-pkgs:
git clone $(GITBASE)/how-lix-os-pkgs pkg
install:
ln -sf $(SRCDIR) $(HOWROOT)
ln -sf $(HOWROOT)/how.sh $(DESTDIR)/how
uninstall:
rm $(DESTDIR)/how
rm $(HOWROOT)