forked from project-chip/connectedhomeip
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile-bootstrap
125 lines (111 loc) · 4.08 KB
/
Makefile-bootstrap
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
#
# Copyright (c) 2020 Project CHIP Authors
# Copyright 2019 Google LLC. All Rights Reserved.
# Copyright 2017-2018 Nest Labs Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
# Description:
# This file is the makefile for inlining optional and required
# third-party packages as package-internal copies and for providing
# convenience targets for bootstrapping the GNU autotools-based build
# system used by this package.
#
# If your package has dependent git repositories that you might
# otherwise be inclined to subtree in, you can define a
# "repos.conf" file at the top of your project that enumerates
# the repositories, the branch thereof, and where to put it in
# your project. An example is shown below:
#
# [submodule "nlassert"]
# path = third_party/nlassert/repo
# url = [email protected]:nestlabs/nlassert.git
# branch = master
# update = none
# [submodule "nlunit-test"]
# path = third_party/nlunit-test/repo
# url = [email protected]:nestlabs/nlunit-test.git
# branch = master
# commit = 561a155bb7257e54198cf5496f74ed5bc41cf85f
# update = none
#
ThisMakefile := $(firstword $(MAKEFILE_LIST))
builddir ?= .
abs_builddir ?= $(realpath $(builddir))
top_builddir ?= $(builddir)
abs_top_builddir ?= $(realpath $(top_builddir))
srcdir ?= $(dir $(realpath $(ThisMakefile)))
abs_srcdir ?= $(realpath $(srcdir))
top_srcdir ?= $(srcdir)
abs_top_srcdir ?= $(realpath $(top_srcdir))
nlbuild_autotools_stem ?= third_party/nlbuild-autotools/repo
abs_top_nlbuild_autotools_dir ?= $(abs_top_srcdir)/$(nlbuild_autotools_stem)
include $(abs_top_nlbuild_autotools_dir)/make/pre.mak
include $(abs_top_nlbuild_autotools_dir)/make/host/tools/bootstrap.mak
# If repos have been defined, create them as the default target goal;
# otherwise, default to help.
ifneq ($(REPOS),)
.DEFAULT_GOAL := repos
else
.DEFAULT_GOAL := help
endif # REPOS
#
# Add any project-specific bootstrap help commands to this
# 'help-hook' target.
#
# These commands will be executed AFTER the core bootstrap 'help'
# target commands.
#
help-hook:
#
# Add any project-specific bootstrap help commands to this
# 'help-bootstrap-hook' target.
#
# These commands will be executed AFTER the core bootstrap 'help' and
# 'help-bootstrap' target commands.
#
help-bootstrap-hook:
#
# Add any project-specific bootstrap help commands to this
# 'help-repos-hook' target.
#
# These commands will be executed AFTER the core bootstrap 'help' and
# 'help-repos' target commands.
#
help-repos-hook:
#
# Add any project-specific bootstrap repos commands to this
# 'repos-hook' target.
#
# These commands will be executed AFTER the core bootstrap 'repos'
# target commands.
#
repos-hook:
#
# Add any project-specific bootstrap repos commands to this
# 'clean-repos-hook' target.
#
# These commands will be executed BEFORE the core bootstrap 'clean-repos'
# target commands.
#
clean-repos-hook:
# Transition submodule names.
repos: rename-submodules
clean-repos: rename-submodules
rename-submodules:
@if test -f $(top_srcdir)/scripts/helpers/rename_submodules.sh; then \
$(top_srcdir)/scripts/helpers/rename_submodules.sh; \
fi
include $(abs_top_nlbuild_autotools_dir)/make/post.mak
include $(abs_top_nlbuild_autotools_dir)/make/post/rules/bootstrap.mak