blob: 828e4ebc379cc2c16210f80ccf46ba91737c4f25 [file] [log] [blame]
Joey Armstrongf548adc2023-09-08 15:59:42 -04001# -*- makefile -*-
2# -----------------------------------------------------------------------
Joey Armstrongdc04c932024-04-01 12:14:21 -04003# Copyright 2022-2024 Open Networking Foundation Contributors
Joey Armstrongf548adc2023-09-08 15:59: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#
Joey Armstrongdc04c932024-04-01 12:14:21 -04009# http:#www.apache.org/licenses/LICENSE-2.0
Joey Armstrongf548adc2023-09-08 15:59:42 -040010#
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 Armstrongdc04c932024-04-01 12:14:21 -040017# SPDX-FileCopyrightText: 2022-2024 Open Networking Foundation Contributors
18# SPDX-License-Identifier: Apache-2.0
19# -----------------------------------------------------------------------
Joey Armstrongccab2cf2024-04-06 18:00:59 -040020# Intent: Install npm-groovy-lint for syntax checking
21# -----------------------------------------------------------------------
22# NOTES: Tool install dependency chain
23# version : tool-install
24# tool-install : npm-tool
25# npm-tool : npm-install
26#
27# % make npm-groovy-lint installs npm, node and npm-groovy-lint
Joey Armstrongdc04c932024-04-01 12:14:21 -040028# -----------------------------------------------------------------------
Joey Armstrongf548adc2023-09-08 15:59:42 -040029
Joey Armstrongccab2cf2024-04-06 18:00:59 -040030$(if $(DEBUG),$(warning ENTER))
Joey Armstrongf548adc2023-09-08 15:59:42 -040031
32## -----------------------------------------------------------------------
Joey Armstrongccab2cf2024-04-06 18:00:59 -040033## Intent: Display groovy command version string.
Joey Armstrongf548adc2023-09-08 15:59:42 -040034## -----------------------------------------------------------------------
Joey Armstrongccab2cf2024-04-06 18:00:59 -040035.PHONY: lint-groovy-version
36lint-groovy-version : $(lint-groovy-cmd)
37 @echo
38 $(activate-npm) && "$<" --version
Joey Armstrongf548adc2023-09-08 15:59:42 -040039
40## -----------------------------------------------------------------------
Joey Armstrongccab2cf2024-04-06 18:00:59 -040041## Intent: On-demand instalation of the groovy command
Joey Armstrongf548adc2023-09-08 15:59:42 -040042## -----------------------------------------------------------------------
Joey Armstrongccab2cf2024-04-06 18:00:59 -040043.PHONY: lint-groovy-install
44lint-groovy-install : $(lint-groovy-cmd)
45
46## -----------------------------------------------------------------------
47## Intent: Display command usage
48## -----------------------------------------------------------------------
49lint-groovy-help ::
50 @echo
51 @printf ' %-33.33s %s\n' 'lint-groovy-version' 'Display lint tool version'
52 @printf ' %-33.33s %s\n' 'lint-groovy-install' 'Install lint tool'
53
54 @$(MAKE) --no-print-directory npm-help
Joey Armstrongf548adc2023-09-08 15:59:42 -040055
56# [EOF]