1# 2# Copyright 2019 Google LLC. All Rights Reserved. 3# Copyright 2017-2018 Nest Labs Inc. All Rights Reserved. 4# 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 8# 9# http://www.apache.org/licenses/LICENSE-2.0 10# 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. 16# 17 18# 19# Description: 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. 24# 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: 30# 31# [submodule "nlassert"] 32# path = third_party/nlassert/repo 33# url = git@github.com:nestlabs/nlassert.git 34# branch = master 35# update = none 36# [submodule "nlunit-test"] 37# path = third_party/nlunit-test/repo 38# url = git@github.com:nestlabs/nlunit-test.git 39# branch = master 40# commit = 561a155bb7257e54198cf5496f74ed5bc41cf85f 41# update = none 42# 43 44ThisMakefile := $(firstword $(MAKEFILE_LIST)) 45 46builddir ?= . 47abs_builddir ?= $(realpath $(builddir)) 48top_builddir ?= $(builddir) 49abs_top_builddir ?= $(realpath $(top_builddir)) 50srcdir ?= $(dir $(realpath $(ThisMakefile))) 51abs_srcdir ?= $(realpath $(srcdir)) 52top_srcdir ?= $(srcdir) 53abs_top_srcdir ?= $(realpath $(top_srcdir)) 54 55nlbuild_autotools_stem ?= @NLBUILD_AUTOTOOLS_STEM@ 56abs_top_nlbuild_autotools_dir ?= $(abs_top_srcdir)/$(nlbuild_autotools_stem) 57 58include $(abs_top_nlbuild_autotools_dir)/make/pre.mak 59include $(abs_top_nlbuild_autotools_dir)/make/host/tools/bootstrap.mak 60 61# If repos have been defined, create them as the default target goal; 62# otherwise, default to help. 63 64ifneq ($(REPOS),) 65.DEFAULT_GOAL := repos 66else 67.DEFAULT_GOAL := help 68endif # REPOS 69 70# 71# Add any project-specific bootstrap help commands to this 72# 'help-hook' target. 73# 74# These commands will be executed AFTER the core bootstrap 'help' 75# target commands. 76# 77help-hook: 78 79# 80# Add any project-specific bootstrap help commands to this 81# 'help-bootstrap-hook' target. 82# 83# These commands will be executed AFTER the core bootstrap 'help' and 84# 'help-bootstrap' target commands. 85# 86help-bootstrap-hook: 87 88# 89# Add any project-specific bootstrap help commands to this 90# 'help-repos-hook' target. 91# 92# These commands will be executed AFTER the core bootstrap 'help' and 93# 'help-repos' target commands. 94# 95help-repos-hook: 96 97# 98# Add any project-specific bootstrap repos commands to this 99# 'repos-hook' target. 100# 101# These commands will be executed AFTER the core bootstrap 'repos' 102# target commands. 103# 104repos-hook: 105 106# 107# Add any project-specific bootstrap repos commands to this 108# 'clean-repos-hook' target. 109# 110# These commands will be executed BEFORE the core bootstrap 'clean-repos' 111# target commands. 112# 113clean-repos-hook: 114 115include $(abs_top_nlbuild_autotools_dir)/make/post.mak 116include $(abs_top_nlbuild_autotools_dir)/make/post/rules/bootstrap.mak 117