From 2a13aea07c32c7e2f29bd7a08dfbfb19451ad0a7 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 11 Dec 2017 19:22:03 +0100 Subject: Simplify makefile, change license, and don't use upcase for variables in usage and man page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 38 +++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 21 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 411d172..aa796a4 100644 --- a/Makefile +++ b/Makefile @@ -1,30 +1,26 @@ -PREFIX = /usr -BIN = /bin -DATA = /share -BINDIR = $(PREFIX)$(BIN) -DATADIR = $(PREFIX)$(DATA) -MANDIR = $(DATADIR)/man -LICENSEDIR = $(DATADIR)/licenses +.POSIX: -PKGNAME = metar -COMMAND = metar +PREFIX = /usr/local +MANPREFIX = $(PREFIX)/share/man all: -clean: + @: install: - mkdir -p -- "$(DESTDIR)$(BINDIR)" - mkdir -p -- "$(DESTDIR)$(MANDIR)/man1" - mkdir -p -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)" - install -m755 metar "$(DESTDIR)$(BINDIR)/$(COMMAND)" - install -m644 COPYING "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)/COPYING" - install -m644 metar.1 "$(DESTDIR)$(MANDIR)/man1/$(COMMAND).1" + mkdir -p -- "$(DESTDIR)$(PREFIX)/bin" + mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man1" + mkdir -p -- "$(DESTDIR)$(PREFIX)/share/licenses/metar" + cp -- metar "$(DESTDIR)$(PREFIX)/bin" + cp -- metar.1 "$(DESTDIR)$(MANPREFIX)/man1" + cp -- LICENSE "$(DESTDIR)$(PREFIX)/share/licenses/metar" + chmod -- 755 "$(DESTDIR)$(PREFIX)/bin/metar" uninstall: - -rm -- "$(DESTDIR)$(BINDIR)/$(COMMAND)" - -rm -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)/COPYING" - -rm -- "$(DESTDIR)$(MANDIR)/man1/$(COMMAND).1" - -rmdir -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)" + -rm -f -- "$(DESTDIR)$(PREFIX)/bin/metar" + -rm -f -- "$(DESTDIR)$(MANPREFIX)/man1/metar.1" + -rm -rf -- "$(DESTDIR)$(PREFIX)/share/licenses/metar" -.PHONY: all clean install uninstall +clean: + @: +.PHONY: all clean install uninstall -- cgit v1.2.3-70-g09d2