From a7159d47d1971e78aa45b8dbbd882d07df2e2a89 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 --- Makefile | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 4fac3b2..cb2c188 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)