-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathMakeKitBuild
77 lines (70 loc) · 1.93 KB
/
MakeKitBuild
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
SUBDIRS="mkdash doc"
MODULES="core path"
make()
{
mk_stage \
DESTDIR="${MK_DATADIR}" \
mk/help.awk \
mk/mk.sh \
mk/doc.awk \
mk/build.sh \
mk/build.awk \
mk/makekit \
mk/command/configure.sh \
mk/command/init.sh \
mk/command/doc.sh \
mk/script/group.sh \
mk/script/scrub.sh \
mk/script/compile.sh \
mk/script/clean.sh \
mk/script/link.sh \
mk/script/install.sh \
mk/script/scour.sh \
mk/module/doxygen.sh \
mk/module/package.sh \
mk/module/fortune.sh \
mk/module/autotools.sh \
mk/module/package-deb.sh \
mk/module/docbook.sh \
mk/module/core.sh \
mk/module/package-rpm.sh \
mk/module/platform.sh \
mk/module/chain-compiler.sh \
mk/module/chain-autotools.sh \
mk/module/package-freebsd.sh \
mk/module/path.sh \
mk/module/gnu-debuginfo.sh \
mk/module/pkg-config.sh \
mk/module/chain-generic.sh \
mk/module/compiler.sh \
mk/module/darwin-debuginfo.sh \
mk/module/program.sh \
mk/module/moonunit.sh
mk_target \
TARGET="${MK_BINDIR}/makekit" \
DEPS="mk/makekit" \
install_bin_makekit "&${MK_BINDIR}/makekit" "&mk/makekit"
mk_target \
TARGET="@bootstrap" \
DEPS="$MK_DATADIR/mk/mkdash.c" \
bootstrap_mkdash "&$MK_DATADIR/mk/mkdash.c" "@$MK_SOURCE_DIR/mk/mkdash.c"
mk_add_phony_target "$result"
}
install_bin_makekit()
{
mk_msg_domain "stage"
mk_msg "${1#$MK_STAGE_DIR}"
mk_mkdir "${1%/*}"
sed "s:@MK_DEFAULT_HOME@:${MK_DATADIR}/mk:" \
< "$2" \
> "$1" \
|| mk_fail "sed failed"
mk_run_or_fail chmod +x "$1"
}
bootstrap_mkdash()
{
mk_msg_domain "bootstrap"
mk_pretty_path "$2"
mk_msg "$result"
mk_clone "$1" "$2" || mk_fail "could not create $2"
}