2 # Copyright 2019 Google LLC. All Rights Reserved.
3 # Copyright 2017-2018 Nest Labs Inc. All Rights Reserved.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
20 # This file is the makefile for inlining optional and required
21 # third-party packages as package-internal copies and for providing
22 # convenience targets for bootstrapping the GNU autotools-based build
23 # system used by this package.
25 # If your package has dependent git repositories that you might
26 # otherwise be inclined to subtree in, you can define a
27 # "repos.conf" file at the top of your project that enumerates
28 # the repositories, the branch thereof, and where to put it in
29 # your project. An example is shown below:
31 # [submodule "nlassert"]
32 # path = third_party/nlassert/repo
33 # url = git@github.com:nestlabs/nlassert.git
36 # [submodule "nlunit-test"]
37 # path = third_party/nlunit-test/repo
38 # url = git@github.com:nestlabs/nlunit-test.git
40 # commit = 561a155bb7257e54198cf5496f74ed5bc41cf85f
44 ThisMakefile := $(firstword $(MAKEFILE_LIST))
47 abs_builddir ?= $(realpath $(builddir))
48 top_builddir ?= $(builddir)
49 abs_top_builddir ?= $(realpath $(top_builddir))
50 srcdir ?= $(dir $(realpath $(ThisMakefile)))
51 abs_srcdir ?= $(realpath $(srcdir))
52 top_srcdir ?= $(srcdir)
53 abs_top_srcdir ?= $(realpath $(top_srcdir))
55 nlbuild_autotools_stem ?= third_party/nlbuild-autotools/repo
56 abs_top_nlbuild_autotools_dir ?= $(abs_top_srcdir)/$(nlbuild_autotools_stem)
58 include $(abs_top_nlbuild_autotools_dir)/make/pre.mak
59 include $(abs_top_nlbuild_autotools_dir)/make/host/tools/bootstrap.mak
61 # If repos have been defined, create them as the default target goal;
62 # otherwise, default to help.
65 .DEFAULT_GOAL := repos
71 # Add any project-specific bootstrap help commands to this
74 # These commands will be executed AFTER the core bootstrap 'help'
80 # Add any project-specific bootstrap help commands to this
81 # 'help-bootstrap-hook' target.
83 # These commands will be executed AFTER the core bootstrap 'help' and
84 # 'help-bootstrap' target commands.
89 # Add any project-specific bootstrap help commands to this
90 # 'help-repos-hook' target.
92 # These commands will be executed AFTER the core bootstrap 'help' and
93 # 'help-repos' target commands.
98 # Add any project-specific bootstrap repos commands to this
99 # 'repos-hook' target.
101 # These commands will be executed AFTER the core bootstrap 'repos'
107 # Add any project-specific bootstrap repos commands to this
108 # 'clean-repos-hook' target.
110 # These commands will be executed BEFORE the core bootstrap 'clean-repos'
115 include $(abs_top_nlbuild_autotools_dir)/make/post.mak
116 include $(abs_top_nlbuild_autotools_dir)/make/post/rules/bootstrap.mak