Introduction
Introduction Statistics Contact Development Disclaimer Help
Add install target to Makefile. Fix manpath. - gramscii - A simple editor for A…
Log
Files
Refs
Tags
README
LICENSE
---
commit 5cfc45336702f9edb4e1c65890157e7ccdafd482
parent 77cefcf490d76f31fcac004debd4626e4af73545
Author: Christoph Lohmann <[email protected]>
Date: Wed, 24 Jul 2019 15:04:40 +0200
Add install target to Makefile. Fix manpath.
Diffstat:
M Makefile | 16 ++++++++++++++++
M config.mk | 2 +-
2 files changed, 17 insertions(+), 1 deletion(-)
---
diff --git a/Makefile b/Makefile
@@ -18,3 +18,19 @@ options:
gramscii: $(SRC) $(INCLUDES)
$(CC) $(CFLAGS) -o $@ $(SRC)
+install: all
+ @echo installing executable to ${DESTDIR}${BINDIR}
+ @mkdir -p "${DESTDIR}${BINDIR}"
+ @cp -f ${NAME} "${DESTDIR}${BINDIR}"
+ @chmod 755 "${DESTDIR}${BINDIR}/${NAME}"
+ @echo installing manpage to "${DESTDIR}${MANDIR}/man1"
+ @mkdir -p "${DESTDIR}${MANDIR}/man1"
+ @cp -f ${NAME}.1 "${DESTDIR}${MANDIR}/man1"
+ @chmod 644 "${DESTDIR}${MANDIR}/man1/${NAME}.1"
+
+uninstall:
+ @echo removing executable file from ${DESTDIR}${BINDIR}
+ @rm -f "${DESTDIR}${BINDIR}/${NAME}"
+ @echo removing manpage from "${DESTDIR}${MANDIR}"
+ @rm -f "${DESTDIR}${MANDIR}/man1/${NAME}.1"
+
diff --git a/config.mk b/config.mk
@@ -3,7 +3,7 @@ VERSION=0.1
PREFIX = /usr/local
BINDIR = $(PREFIX)/bin
-MANDIR = $(PREFIX)share/man
+MANDIR = $(PREFIX)/share/man
CFLAGS=-O3 -std=c90 -pedantic -Wall
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.