From 0841a61482896a9489223a08df8d02a2456e39fb Mon Sep 17 00:00:00 2001 From: Michael Haubenwallner Date: Mon, 27 Mar 2017 16:07:27 +0200 Subject: [PATCH] allow for easy disabling consoletype program Although consoletype can be built with MSVC, it is of less use there. --- Makefile | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 6de74d7..0843fc3 100644 --- a/Makefile +++ b/Makefile @@ -13,17 +13,21 @@ ROOTLIBEXECDIR ?= $(ROOTPREFIX)/lib/gentoo PREFIX ?= /usr MANDIR ?= $(PREFIX)/share/man -PROGRAMS = consoletype +PROGRAM_consoletype ?= consoletype + +PROGRAMS = $(PROGRAM_consoletype) all: $(PROGRAMS) install: all - install -m 0755 -d $(DESTDIR)$(ROOTSBINDIR) - install -m 0755 consoletype $(DESTDIR)$(ROOTSBINDIR) install -m 0755 -d $(DESTDIR)$(ROOTLIBEXECDIR) install -m 0644 functions.sh $(DESTDIR)$(ROOTLIBEXECDIR) - install -m 0755 -d $(DESTDIR)$(MANDIR)/man1 - install -m 0644 consoletype.1 $(DESTDIR)$(MANDIR)/man1 + for p in $(PROGRAMS) ; do \ + install -m 0755 -d $(DESTDIR)$(ROOTSBINDIR) ; \ + install -m 0755 $${p} $(DESTDIR)$(ROOTSBINDIR) ; \ + install -m 0755 -d $(DESTDIR)$(MANDIR)/man1 ; \ + install -m 0644 $${p}.1 $(DESTDIR)$(MANDIR)/man1 ; \ + done clean: rm -rf $(PROGRAMS)