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

This commit is contained in:
Wolfgang (Blub) Bumiller 2012-12-06 18:57:56 +01:00
parent 583c58f65b
commit 362d822e18

View file

@ -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/