1# 2# Copyright 2019 Google LLC. All Rights Reserved. 3# Copyright 2014-2016 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 defines automake macros common to all other automake 21# headers and files. 22# 23 24include $(abs_top_nlbuild_autotools_dir)/automake/pre/macros/constants.am 25include $(abs_top_nlbuild_autotools_dir)/automake/pre/macros/paths.am 26include $(abs_top_nlbuild_autotools_dir)/automake/pre/macros/pretty.am 27include $(abs_top_nlbuild_autotools_dir)/automake/pre/macros/verbosity.am 28include $(abs_top_nlbuild_autotools_dir)/automake/pre/macros/coverage.am 29include $(abs_top_nlbuild_autotools_dir)/automake/pre/macros/subdirs.am 30 31# 32# create-directory 33# 34# Create the directory with the name of the $(@) variable. 35# 36define create-directory 37$(call nl-create-dir,$(@)) 38endef # create-directory 39 40# 41# create-link 42# 43# Create the symbolic link with the source of the $(<) variable and 44# the destination of the $(@) variable. 45# 46define create-link 47$(call nl-create-link) 48endef # create-link 49 50# 51# check-file <macro suffix> 52# 53# Check whether a file, referenced by the $(@) variable, should be 54# updated / regenerated based on its dependencies, referenced by the 55# $(<) variable by running the make macro check-file-<macro suffix>. 56# 57# The $(<) is passed as the first argument if the macro wants to process 58# it and the prospective new output file, which the macro MUST 59# generate, as the second. 60# 61# This macro will ensure that any required parent directories are created 62# prior to invoking check-file-<macro suffix>. 63# 64# This macro is similar to and inspired by that from Linux Kbuild and 65# elsewhere. 66# 67# <macro suffix> - The name, suffixed to "check-file-", which indicates 68# the make macro to invoke. 69# 70# 71define check-file 72$(call nl-check-file-with-subroutine,check-file,$(1)) 73endef # check-file 74 75 76 77 78