.POSIX: .PHONY: FORCE NAME = dppt PREFIX = /usr/local MANPREFIX = $(PREFIX)/share/man CORE_PATH = $(DESTDIR)$(PREFIX)/lib/$(NAME)-core all: FORCE install: FORCE mkdir -p $(DESTDIR)$(PREFIX)/bin cp $(NAME) $(DESTDIR)$(PREFIX)/bin/$(NAME) sed 's#\(\=\).*#\1"$(CORE_PATH)"#' -i $(DESTDIR)$(PREFIX)/bin/$(NAME) mkdir -p $(CORE_PATH) cp -r core/. $(CORE_PATH)/ mkdir -p $(DESTDIR)$(MANPREFIX)/man1 cp -r man/$(NAME).1 $(DESTDIR)$(MANPREFIX)/man1/ uninstall: FORCE rm -f $(DESTDIR)$(PREFIX)/bin/$(NAME) rm -f $(DESTDIR)$(MANPREFIX)/man1/$(NAME).1 rm -rf $(CORE_PATH)