aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2013-08-15 00:35:59 +0200
committerMattias Andrée <maandree@operamail.com>2013-08-15 00:35:59 +0200
commit3e1f4687af3b48d66d3d6f8d481a422d5e0330af (patch)
tree54e3a090a97b67a70f34619ef316e37512277898
parentadd base file (diff)
downloadusing-git-3e1f4687af3b48d66d3d6f8d481a422d5e0330af.tar.gz
using-git-3e1f4687af3b48d66d3d6f8d481a422d5e0330af.tar.bz2
using-git-3e1f4687af3b48d66d3d6f8d481a422d5e0330af.tar.xz
add makefile
Signed-off-by: Mattias Andrée <maandree@operamail.com>
-rw-r--r--Makefile86
1 files changed, 86 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..0646e3f
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,86 @@
+PROGRAM = using-git
+PKGNAME = using-git
+TEXINFO_DIR = .
+
+PREFIX = /usr
+DATA = /share
+
+
+
+.PHONY: all
+all:
+
+
+%.gz: %
+ gzip -9c < "$<" > "$@"
+
+%.bz2: %
+ bzip2 -9c < "$<" > "$@"
+
+%.xz: %
+ xz -e9 < "$<" > "$@"
+
+
+.PHONY: install
+install:
+
+.PHONY: uninstall
+uninstall:
+
+.PHONY: clean
+clean:
+ -rn -r -- bin obj
+
+## Texinfo manual section
+
+.PHONY: doc
+all: doc
+doc: info
+
+.PHONY: info pdf ps dvi
+info: $(PROGRAM).info.gz
+pdf: $(PROGRAM).pdf.gz
+ps: $(PROGRAM).ps.gz
+dvi: $(PROGRAM).dvi.gz
+
+%.info: $(TEXINFO_DIR)/%.texinfo
+ $(MAKEINFO) "$<"
+
+%.pdf: $(TEXINFO_DIR)/%.texinfo
+ texi2pdf "$<"
+
+%.dvi: $(TEXINFO_DIR)/%.texinfo
+ $(TEXI2DVI) "$<"
+
+%.ps: $(TEXINFO_DIR)/%.texinfo
+ texi2pdf --ps "$<"
+
+.PHONY: install-info
+install: install-info
+install-info: $(PROGRAM).info.gz
+ install -Dm644 "$<" -- "$(DESTDIR)$(PREFIX)$(DATA)/info/$(PKGNAME).info.gz"
+
+.PHONY: uninstall-info
+uninstall: uninstall-info
+uninstall-info:
+ -rm -- "$(DESTDIR)$(PREFIX)$(DATA)/info/$(PKGNAME).info.gz"
+
+.PHONY: clean-texinfo
+clean: clean-texinfo
+clean-texinfo:
+ -rm -- *.{info,pdf,ps,dvi}{,.gz,.bz2,.xz}
+
+## License section
+
+.PHONY: install-license
+install: install-license
+install-license:
+ install -d -- "$(DESTDIR)$(PREFIX)$(DATA)/licenses/$(PKGNAME)"
+ install -m644 LICENSE -- "$(DESTDIR)$(PREFIX)$(DATA)/licenses/$(PKGNAME)"
+
+.PHONY: uninstall-license
+uninstall: uninstall-license
+uninstall-license:
+ -rm -- "$(DESTDIR)$(PREFIX)$(DATA)/licenses/$(PKGNAME)/LICENSE"
+ -rmdir -- "$(DESTDIR)$(PREFIX)$(DATA)/licenses/$(PKGNAME)"
+