forked from TritonDataCenter/triton
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
61 lines (44 loc) · 1.29 KB
/
Makefile
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
52
53
54
55
56
57
58
59
60
61
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
#
# Copyright (c) 2014, Joyent, Inc.
#
#
# SDC docs Makefile
#
JSON = json
NPM = npm
RAMSEY = node_modules/.bin/ramsey
MD_FILES = \
docs/developer-guide/repos.md
include ./tools/mk/Makefile.defs
#
# Repo-specific targets
#
.PHONY: all
all: docs
.PHONY: docs
docs: $(MD_FILES)
docs/developer-guide/repos.md: $(RAMSEY) docs/developer-guide/repos.md.in build/repos.json
$(RAMSEY) -d build -j repos.json "[email protected]" "$@"
build/repos.json: build etc/repos.json
$(JSON) -f ./etc/repos.json -e ' \
var self = this; \
this.name = /([^:/]+).git$$/.exec(this.git)[1]; \
this.url = "https://github.com/joyent/" + this.name; \
(this.tags || ["none"]).forEach(function (t) { self[t] = true; }); \
' > "$@"
build:
mkdir -p "$@"
$(RAMSEY):
$(NPM) install
# A quick hack for convenience of looking at source for all SDC repos.
# Assumption: you have `json` (npm install -g json).
.PHONY: clone-all-repos
clone-all-repos:
(mkdir -p build/repos; cd build/repos; json -f ../../etc/repos.json -a git | xargs -n1 git clone)
include ./tools/mk/Makefile.deps
include ./tools/mk/Makefile.targ