diff options
| author | Mike Skec <skec@protonmail.ch> | 2021-02-28 18:53:02 +1100 |
|---|---|---|
| committer | Felix Queißner <felix@ib-queissner.de> | 2021-03-02 10:55:50 +0100 |
| commit | 026198ca4c94f15ff69548478ddcbc3becad5812 (patch) | |
| tree | 4732c4808c248f00e6df4c29604914835e8b076e | |
| parent | 7644e39d6559733fde244d1fef053f9f56b393ce (diff) | |
| download | kristall-026198ca4c94f15ff69548478ddcbc3becad5812.tar.gz | |
Makefile: add man page to install/uninstall targets
Currently we install the man page by default to /usr/share/man/man1/kristall.1. This should be fine - we allow users to specify the MANPATH variable on command line if they wish to install somewhere else. We could make it more complicated by using /usr/share/man:/usr/lib/jvm/default/man command to determine install location, but unless this becomes an issue, I don't think we'd need to use that
| -rw-r--r-- | Makefile | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -1,6 +1,10 @@ # Install to /usr/local unless otherwise specified, such as `make PREFIX=/app` PREFIX?=/usr/local +# Man pages by default instaled to /usr/share/man, like above this can +# be specified on command line. +MANPATH?=/usr/share/man + # What to run to install various files INSTALL?=install # Run to install the actual binary @@ -11,6 +15,7 @@ INSTALL_DATA=$(INSTALL) -m 644 # Directories into which to install the various files bindir=$(DESTDIR)$(PREFIX)/bin sharedir=$(DESTDIR)$(PREFIX)/share +mandir=$(DESTDIR)$(MANPATH)/man1 MAKEDIR=mkdir -p # Default Qmake Command For Ubuntu (and probably other Debian) distributions @@ -32,6 +37,8 @@ kristall: build/kristall build/kristall: src/* mkdir -p build cd build; $(HOMEBREW_PATH) $(QMAKE_COMMAND) CONFIG+=$(QMAKE_CONFIG) ../src/kristall.pro && $(MAKE) + cd doc; ./gen-man.sh + install: kristall # Prepare directories $(MAKEDIR) $(sharedir)/icons/hicolor/scalable/apps/ @@ -42,7 +49,7 @@ install: kristall $(MAKEDIR) $(sharedir)/applications/ $(MAKEDIR) $(sharedir)/mime/packages/ $(MAKEDIR) $(bindir) - + # Install files $(INSTALL_DATA) src/icons/kristall.svg $(sharedir)/icons/hicolor/scalable/apps/net.random-projects.kristall.svg $(INSTALL_DATA) src/icons/kristall-16.png $(sharedir)/icons/hicolor/16x16/apps/net.random-projects.kristall.png @@ -51,6 +58,7 @@ install: kristall $(INSTALL_DATA) src/icons/kristall-128.png $(sharedir)/icons/hicolor/128x128/apps/net.random-projects.kristall.png $(INSTALL_DATA) Kristall.desktop $(sharedir)/applications/Kristall.desktop $(INSTALL_DATA) kristall-mime-info.xml $(sharedir)/mime/packages/kristall.xml + $(INSTALL_DATA) doc/kristall.1 $(mandir)/kristall.1 $(INSTALL_PROGRAM) kristall $(bindir)/kristall uninstall: @@ -61,6 +69,8 @@ uninstall: rm -f $(sharedir)/icons/hicolor/*x*/apps/net.random-projects.kristall.png # Remove the binary rm -f $(bindir)/kristall + # Remove man page + rm -f $(mandir)/kristall.1 clean: rm -rf build |
