From 9399cc5c69131d0c22a7825b1c2b7d0d6e4dbc7e Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 16 Sep 2021 18:29:22 +0200 Subject: Improve makefile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 10 ++++------ config.mk | 2 ++ 2 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 config.mk diff --git a/Makefile b/Makefile index aa796a4..e4eafc5 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,8 @@ .POSIX: -PREFIX = /usr/local -MANPREFIX = $(PREFIX)/share/man +CONFIGFILE = config.mk +include $(CONFIGFILE) + all: @: @@ -9,18 +10,15 @@ all: install: 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 -f -- "$(DESTDIR)$(PREFIX)/bin/metar" -rm -f -- "$(DESTDIR)$(MANPREFIX)/man1/metar.1" - -rm -rf -- "$(DESTDIR)$(PREFIX)/share/licenses/metar" clean: @: -.PHONY: all clean install uninstall +.PHONY: all install uninstall clean diff --git a/config.mk b/config.mk new file mode 100644 index 0000000..59032da --- /dev/null +++ b/config.mk @@ -0,0 +1,2 @@ +PREFIX = /usr +MANPREFIX = $(PREFIX)/share/man -- cgit v1.2.3-70-g09d2