diff options
| -rw-r--r-- | .gitignore | 15 | ||||
| -rw-r--r-- | DEPENDENCIES | 2 | ||||
| -rw-r--r-- | Makefile | 44 |
3 files changed, 57 insertions, 4 deletions
@@ -7,4 +7,19 @@ __pycache__/ *.sw[op] *.py[co] *.install +*.gz +*.xz +*.aux +*.cp +*.fn +*.info +*.ky +*.log +*.pdf +*.ps +*.dvi +*.pg +*.toc +*.tp +*.vr diff --git a/DEPENDENCIES b/DEPENDENCIES index abef489..3deefe3 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -19,4 +19,6 @@ sed sed required coreutils cp required coreutils rm required coreutils install required +texinfo makeinfo opt-out: for info manual +gzip gzip opt-out: for info manual compression @@ -3,7 +3,8 @@ SYSCONF = /etc DEV = /dev BIN = /bin SBIN = /sbin -LICENSES = /usr/share/licenses +DATA = /usr/share +LICENSES = $(DATA)/licenses COMMAND = got PKGNAME = gates-of-tartaros SSHUSER = sshlogin @@ -12,7 +13,25 @@ SSH = ssh BASH_SHEBANG = /usr/bin/env bash -all: got.install got-cmd.install + +.PHONY: all +all: cmd doc + +.PHONY: doc +doc: info + +.PHONY: info +info: gates-of-tartaros.info.gz + +%.info.gz: info/%.texinfo.install + makeinfo "$<" + gzip -9 -f "$*.info" + +info/%.texinfo.install: info/%.texinfo + cp "$<" "$@" + +.PHONY: cmd +cmd: got.install got-cmd.install got.install: got cp "$<" "$@" @@ -29,14 +48,28 @@ got-cmd.install: got-cmd sed -i 's:#!/usr/bin/env bash:#!$(BASH_SHEBANG):g' "$@" -install: got.install got-cmd.install + +.PHONY: install +install: install-cmd install-doc + +.PHONY: install-cmd +install-cmd: got.install got-cmd.install install -Dm755 -- "got.install" "$(DESTDIR)$(PREFIX)$(SBIN)/got" install -Dm755 -- "got-cmd.install" "$(DESTDIR)$(PREFIX)$(BIN)/got-cmd" install -Dm644 -- "gotrc" "$(DESTDIR)$(SYSCONF)/gotrc.examples/lower-left-ponysay" install -d -- "$(DESTDIR)$(LICENSES)/$(PKGNAME)" install -m644 -- COPYING LICENSE "$(DESTDIR)$(LICENSES)/$(PKGNAME)" +.PHONY: install-doc +install-doc: install-info + +.PHONY: install-info +install-info: gates-of-tartaros.info.gz + install -Dm644 -- "$<" "$(DESTDIR)$(DATA)/info/$(PKGNAME).info.gz" + + +.PHONY: uninstall uninstall: -rm -- "$(DESTDIR)$(PREFIX)$(SBIN)/got" -rm -- "$(DESTDIR)$(PREFIX)$(BIN)/got-cmd" @@ -44,8 +77,11 @@ uninstall: -rm -- "$(DESTDIR)$(LICENSES)/$(PKGNAME)/COPYING" -rm -- "$(DESTDIR)$(LICENSES)/$(PKGNAME)/LICENSE" -rm -d -- "$(DESTDIR)$(LICENSES)/$(PKGNAME)" + -rm -- "$(DESTDIR)$(DATA)/info/$(PKGNAME).info.gz" + +.PHONY: clean clean: - -rm *.install 2>/dev/null + -rm *.install *.info.gz 2>/dev/null |
