xdg-desktop-search/Makefile
2024-11-03 19:08:55 +01:00

38 lines
926 B
Makefile

NAME=xdg-desktop-search
DESTDIR=
PREFIX=/usr/local
BINDIR=$(PREFIX)/bin
MANDIR=$(PREFIX)/share/man/man1
DOCDIR=$(PREIFX)/share/doc/$(NAME)
PROGRAM=$(NAME)
MANPAGE=$(NAME).1
README=README.md
LICENSE=LICENSE.txt
COPYING=COPYING.txt
$(README): $(PROGRAM)
./$(PROGRAM) --help > $(README)
$(MANPAGE): $(README)
ronn < $(README) > $(MANPAGE)
.PHONY: all install install-bin install-doc install-man
all: $(PROGRAM) $(MANPAGE)
install: install-bin install-doc install-man
install-man: $(MANPAGE)
install -d -m 0755 $(DESTDIR)$(MANDIR)
install -m 0644 $(MANPAGE) $(DESTDIR)$(MANDIR)
install-bin: $(PROGRAM)
install -d -m 0755 $(DESTDIR)$(BINDIR)
install -m 0755 $(PROGRAM) $(DESTDIR)$(BINDIR)
install-doc: $(README) $(LICENSE) $(COPYING)
install -d -m 0755 $(DESTDIR)$(DOCDIR)
install -m 0644 $(README) $(DESTDIR)$(DOCDIR)
install -m 0644 $(LICENSE) $(DESTDIR)$(DOCDIR)
install -m 0644 $(COPYING) $(DESTDIR)$(DOCDIR)