~sotirisp/today

aa46273755ab2dba21d50a9f54b7e7ccbf0348cb — Sotiris Papatheodorou 4 days ago 045dade devel master
Make Makefile POSIX-compatible
1 files changed, 9 insertions(+), 13 deletions(-)

M Makefile
M Makefile => Makefile +9 -13
@@ 1,23 1,19 @@
# SPDX-FileCopyrightText: 2020-2022 Sotiris Papatheodorou
# SPDX-License-Identifier: CC0-1.0
.POSIX:

PREFIX = /usr/local
BINDIR = $(PREFIX)/bin
MANDIR = $(PREFIX)/share/man
BINDIR = $(DESTDIR)$(PREFIX)/bin
MANDIR = $(DESTDIR)$(PREFIX)/share/man

doc/today.1: doc/today.1.scd
	scdoc < $? > $@

.PHONY: install
install: doc/today.1
	mkdir -p $(DESTDIR)$(BINDIR)
	cp today $(DESTDIR)$(BINDIR)
	chmod +x $(DESTDIR)$(BINDIR)/today
	mkdir -p $(DESTDIR)$(MANDIR)/man1
	cp doc/today.1 $(DESTDIR)$(MANDIR)/man1
	mkdir -p $(BINDIR) $(MANDIR)/man1
	cp -f today $(BINDIR)
	cp -f doc/today.1 $(MANDIR)/man1
	chmod +x $(BINDIR)/today

.PHONY: uninstall
uninstall:
	rm -f $(DESTDIR)$(BINDIR)/today $(DESTDIR)$(MANDIR)/man1/today.1

%.1: %.1.scd
	scdoc < $< > $@
	rm -f $(BINDIR)/today $(MANDIR)/man1/today.1