2 # Copyright (c) 2020 Project nlbuild-autotools Authors. All Rights Reserved.
3 # Copyright (c) 2019 Google LLC. All Rights Reserved.
4 # Copyright (c) 2014-2016 Nest Labs Inc. All Rights Reserved.
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
21 # This file defines automake macros common to all other automake
25 include $(abs_top_nlbuild_autotools_dir)/automake/pre/macros/constants.am
26 include $(abs_top_nlbuild_autotools_dir)/automake/pre/macros/paths.am
27 include $(abs_top_nlbuild_autotools_dir)/automake/pre/macros/pretty.am
28 include $(abs_top_nlbuild_autotools_dir)/automake/pre/macros/verbosity.am
29 include $(abs_top_nlbuild_autotools_dir)/automake/pre/macros/coverage.am
30 include $(abs_top_nlbuild_autotools_dir)/automake/pre/macros/subdirs.am
31 include $(abs_top_nlbuild_autotools_dir)/automake/pre/macros/foreigndeps.am
36 # Create the directory with the name of the $(@) variable.
38 define create-directory
39 $(call nl-create-dir,$(@))
40 endef # create-directory
45 # Create the symbolic link with the source of the $(<) variable and
46 # the destination of the $(@) variable.
49 $(call nl-create-link)
53 # check-file <macro suffix>
55 # Check whether a file, referenced by the $(@) variable, should be
56 # updated / regenerated based on its dependencies, referenced by the
57 # $(<) variable by running the make macro check-file-<macro suffix>.
59 # The $(<) is passed as the first argument if the macro wants to process
60 # it and the prospective new output file, which the macro MUST
61 # generate, as the second.
63 # This macro will ensure that any required parent directories are created
64 # prior to invoking check-file-<macro suffix>.
66 # This macro is similar to and inspired by that from Linux Kbuild and
69 # <macro suffix> - The name, suffixed to "check-file-", which indicates
70 # the make macro to invoke.
74 $(call nl-check-file-with-subroutine,check-file,$(1))