forked from 0install/0install
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile.build
More file actions
51 lines (39 loc) · 1.75 KB
/
Makefile.build
File metadata and controls
51 lines (39 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
SRCDIR ?= NOTSET
DISTDIR ?= NOTSET
BUILDDIR ?= NOTSET
DOCS = README.md COPYING
MANPAGES = 0launch.1 0store-secure-add.1 0store.1 0desktop.1 0install.1
vpath %.po ${SRCDIR}
MO = $(shell cd ${SRCDIR}; find share/locale -name '*.po' | sort | sed -e 's/\.po/\.mo/')
YOJSON = $(shell ocamlfind query yojson)
BINIOU = $(shell ocamlfind query biniou)
EASY_FORMAT = $(shell ocamlfind query easy-format)
JSON_LIBS = "${EASY_FORMAT}/easy_format.cmo" "${BINIOU}/bi_util.cmo" "${BINIOU}/bi_share.cmo" "${BINIOU}/bi_outbuf.cmo" "${YOJSON}/yojson.cmo"
XMLM = $(shell ocamlfind query xmlm)
all: translations
(cd "${SRCDIR}/ocaml" && ocaml build-in.ml "${BUILDDIR}/ocaml")
(cd "${SRCDIR}" && cp README.md COPYING "${DISTDIR}/")
install -d "${DISTDIR}/files"
-install ocaml/gui_gtk.c*[sa] "${DISTDIR}/files/"
install ocaml/0install "${DISTDIR}/files/0install"
ln -f "${DISTDIR}/files/0install" "${DISTDIR}/files/0launch"
ln -f "${DISTDIR}/files/0install" "${DISTDIR}/files/0store"
ln -f "${DISTDIR}/files/0install" "${DISTDIR}/files/0store-secure-add"
ln -f "${DISTDIR}/files/0install" "${DISTDIR}/files/0desktop"
ln -f "${DISTDIR}/files/0install" "${DISTDIR}/files/0alias"
(cd "${SRCDIR}" && cp ${MANPAGES} "${DISTDIR}/files")
install "${SRCDIR}/install.sh.src" "${DISTDIR}/install.sh"
(cp -r share "${DISTDIR}/files/")
(cd "${SRCDIR}" && cp -r share/0install.net share/applications share/appdata share/bash-completion share/fish share/icons share/zsh "${DISTDIR}/files/share/")
translations: $(MO)
install: install_local
install_home:
(cd "${DISTDIR}" && ./install.sh home)
install_system:
(cd "${DISTDIR}" && ./install.sh system)
install_local:
(cd "${DISTDIR}" && ./install.sh local)
%.mo: %.po
mkdir -p `dirname "$@"`
msgfmt -o "$@" "$<"
.PHONY: all install translations