blob: 3800707e592ad00c5d7f64e0f1ea39938c4008a8 [file] [log] [blame]
Joey Armstrongcb896602023-07-21 16:38:42 -04001# -*- makefile -*-
2# -----------------------------------------------------------------------
Joey Armstrong518f3572024-02-11 07:56:25 -05003# Copyright 2022-2024 Open Networking Foundation (ONF) and the ONF Contributors
Joey Armstrongcb896602023-07-21 16:38:42 -04004#
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#
Joey Armstrong518f3572024-02-11 07:56:25 -050017# SPDX-FileCopyrightText: 2024 Open Networking Foundation (ONF) and the ONF Contributors
Joey Armstrongcb896602023-07-21 16:38:42 -040018# SPDX-License-Identifier: Apache-2.0
19# -----------------------------------------------------------------------
20
21$(if $(DEBUG),$(warning ENTER))
22
23## -----------------------------------------------------------------------
24## Intent: Install the doc8 tool
25## -----------------------------------------------------------------------
26.PHONY: lint-doc8-install
27
28## Define a macro to standardize and simplify access
29# DOC8 ?= $(venv-activate-bin)/doc8
30# DOC8 ?= $(activate) && doc8
31
32## -----------------------------------------------------------------------
33## Intent: Display doc8 command version string.
34## Note: As a side effect, install doc8 by dependency
35## -----------------------------------------------------------------------
36.PHONY: lint-doc8-cmd-version
37lint-doc8-cmd-version : $(venv-activate-bin)/doc8
38
39 $(HIDE) echo
40 $< --version
41
42## -----------------------------------------------------------------------
43## Intent: On-demand instalation of the doc8 command
44## -----------------------------------------------------------------------
45lint-doc8-install := $(venv-activate-bin)/doc8
46$(lint-doc8-install) : $(venv-activate-script)
47
48 $(call banner-enter,Target $@)
49 $(activate) && pip install doc8
50 $(call banner-leave,Target $@)
51
52## -----------------------------------------------------------------------
53## Intent: Purge doc8 tool installation
54## -----------------------------------------------------------------------
55sterile ::
56 $(HIDE)$(RM) "$(venv-abs-bin)/doc8"
57# HIDE)$(RM) -r .venv/lib/*/site-packages/doc8
58
59## -----------------------------------------------------------------------
60## Intent: Display command usage
61## -----------------------------------------------------------------------
62help::
63 @echo ' lint-doc8-install Install the doc8 tool'
64
65# [EOF]