blob: ccc6a7300cdb9cac862733f069d0fc3d45d8e8c7 [file] [log] [blame]
Joey Armstrong0205d332023-04-11 17:29:23 -04001# -*- makefile -*-
2# -----------------------------------------------------------------------
Joey Armstrongdc04c932024-04-01 12:14:21 -04003# Copyright 2022-2024 Open Networking Foundation Contributors
Joey Armstrong0205d332023-04-11 17:29:23 -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 Armstrong0205d332023-04-11 17:29:23 -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# -----------------------------------------------------------------------
20# Intent:
21# -----------------------------------------------------------------------
Joey Armstrong0205d332023-04-11 17:29:23 -040022
Joey Armstrong0205d332023-04-11 17:29:23 -040023.PHONY: help clean help test
24.DEFAULT_GOAL := help
25
Joey Armstronga2db6cd2023-11-30 12:16:18 -050026##---------------------##
27##---] BOOTSTRAP [---##
28##---------------------##
29onf-mk-abs ?= $(abspath $(lastword $(MAKEFILE_LIST)))
30onf-mk-top := $(dir $(onf-mk-abs))
31onf-mk-top := $(patsubst %/,%,$(onf-mk-top))
32
Joey Armstrong0205d332023-04-11 17:29:23 -040033##-------------------##
34##---] GLOBALS [---##
35##-------------------##
Joey Armstrongf128de82023-09-08 17:05:18 -040036TOP ?= .
Joey Armstrong43997db2023-06-04 10:08:58 -040037
Joey Armstrong0205d332023-04-11 17:29:23 -040038##--------------------##
39##---] INCLUDES [---##
40##--------------------##
Joey Armstrongccab2cf2024-04-06 18:00:59 -040041include config.mk
Joey Armstronga2db6cd2023-11-30 12:16:18 -050042include $(onf-mk-top)/makefiles/include.mk
Joey Armstrong0205d332023-04-11 17:29:23 -040043
Joey Armstrong7f590b92023-10-18 12:07:51 -040044## -----------------------------------------------------------------------
45## Intent: Helper target for interactive README.md viewing
46## Note: This target has limited use for repo:onf-make and this directory
47## Todo: Add makefiles/[lint/]md/include.mk and generalize logic
48## -----------------------------------------------------------------------
49view-docs-src := README.md $(wildcard docs/*.md)
50view-docs-dep := $(addprefix view-dep^,$(view-docs-src))
51
52.PHONY: view $(view-docs-dep)
53view :: $(view-docs-dep)
54
55$(view-docs-dep): # view-dep^README.md => README.md
56 -pandoc $(lastword $(subst ^,$(space),$@)) | lynx -stdin
57
58help ::
59 @echo
60 @printf ' %-25.25s %s\n' 'view'\
61 'Rendering *.md docs for interactive viewing'
62
Joey Armstrong0205d332023-04-11 17:29:23 -040063# [EOF]