From 362d822e18eaf3b551f4667edfb60bc2792350f9 Mon Sep 17 00:00:00 2001 From: "Wolfgang (Blub) Bumiller" Date: Thu, 6 Dec 2012 18:57:56 +0100 Subject: [PATCH] Adding an 'install-doc' target to the Makefile, which is included by the 'install' target and uses MANDIR, which defaults to DATADIR/man, and DATADIR defaults to PREFIX/share --- Makefile | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 3485193..482f132 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,8 @@ DESTDIR := PREFIX := /usr/local BINDIR := $(PREFIX)/bin +DATADIR := $(PREFIX)/share +MANDIR := $(DATADIR)/man CC ?= clang CFLAGS += -Wall -Wextra -I. -pedantic-errors @@ -63,10 +65,13 @@ parser.o: ast.h lexer.h ast.o: ast.h ir.h ir.o: ir.h -install: install-gmqcc install-qcvm +install: install-gmqcc install-qcvm install-doc install-gmqcc: gmqcc - install -d -m755 $(DESTDIR)$(BINDIR) - install -m755 gmqcc $(DESTDIR)$(BINDIR)/gmqcc + install -d -m755 $(DESTDIR)$(BINDIR) + install -m755 gmqcc $(DESTDIR)$(BINDIR)/gmqcc install-qcvm: qcvm - install -d -m755 $(DESTDIR)$(BINDIR) - install -m755 qcvm $(DESTDIR)$(BINDIR)/qcvm + install -d -m755 $(DESTDIR)$(BINDIR) + install -m755 qcvm $(DESTDIR)$(BINDIR)/qcvm +install-doc: + install -d -m755 $(DESTDIR)$(MANDIR)/man1 + install -m755 doc/gmqcc.1 $(DESTDIR)$(MANDIR)/man1/