diff options
author | Mattias Andrée <maandree@operamail.com> | 2013-10-24 21:57:12 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2013-10-24 21:57:12 +0200 |
commit | 74523811d00207bc255db69a26bad4fadffe48f4 (patch) | |
tree | d15b8c208fa317e03fd1dfdc2aafff6456c201b9 | |
parent | add option: -u twice (diff) | |
download | gpp-74523811d00207bc255db69a26bad4fadffe48f4.tar.gz gpp-74523811d00207bc255db69a26bad4fadffe48f4.tar.bz2 gpp-74523811d00207bc255db69a26bad4fadffe48f4.tar.xz |
add makefile
Signed-off-by: Mattias Andrée <maandree@operamail.com>
-rw-r--r-- | Makefile | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..bf56f08 --- /dev/null +++ b/Makefile @@ -0,0 +1,69 @@ +# Copying and distribution of this file, with or without modification, +# are permitted in any medium without royalty provided the copyright +# notice and this notice are preserved. This file is offered as-is, +# without any warranty. + +VERSION = 1 + +PREFIX = /usr +DATA = /share +BIN = /bin +PKGNAME = gpp +PY3 = python3 +SHEBANG = /usr/$(BIN)/env $(PY3) +COMMAND = gpp +LICENSES = $(DATA)/licenses + + +.PHONY: all +all: gpp doc + +.PHONY: doc +doc: info + +.PHONY: info +info: gpp.info.gz + +%.info.gz: info/%.texinfo + makeinfo "$<" + gzip -9 -f "$*.info" + +gpp: src/gpp.py + VERSION=$(VERSION) $(PY3) "$<" < "$<" > "$@" + +.PHONY: install +install: install-core install-doc + +.PHONY: install-core +install-core: install-cmd install-license + +.PHONY: install-cmd +install-cmd: gpp + install -dm755 -- "$(DESTDIR)$(PREFIX)$(BIN)" + install -m755 gpp -- "$(DESTDIR)$(PREFIX)$(BIN)/$(COMMAND)" + +.PHONY: install-license +install-license: + install -dm755 -- "$(DESTDIR)$(PREFIX)$(LICENSES)/$(PKGNAME)" + install -m644 COPYING LICENSE -- "$(DESTDIR)$(PREFIX)$(LICENSES)/$(PKGNAME)" + +.PHONY: install-doc +install-doc: install-info + +.PHONY: install-info +install-info: gpp.info.gz + install -dm755 -- "$(DESTDIR)$(PREFIX)$(DATA)/info" + install -m644 gpp.info.gz -- "$(DESTDIR)$(PREFIX)$(DATA)/info/$(PKGNAME).info.gz" + +.PHONY: uninstall +uninstall: + -rm -- "$(DESTDIR)$(PREFIX)$(BIN)/$(COMMAND)" + -rm -- "$(DESTDIR)$(PREFIX)$(LICENSES)/$(PKGNAME)/COPYING" + -rm -- "$(DESTDIR)$(PREFIX)$(LICENSES)/$(PKGNAME)/LICENSE" + -rmdir -- "$(DESTDIR)$(PREFIX)$(LICENSES)/$(PKGNAME)" + -rm -- "$(DESTDIR)$(PREFIX)$(DATA)/info/$(PKGNAME).info.gz" + +.PHONY: clean +clean: + -rm -f gpp gpp.info gpp.info.gz + |