blob: 96b8f26d37aa935d8f2d2a18338079bf84d7137e [file] [log] [blame]
Joey Armstrong0205d332023-04-11 17:29:23 -04001# -*- makefile -*-
2# -----------------------------------------------------------------------
Joey Armstrong1e07f882023-07-08 19:28:49 -04003# Copyright 2022-2023 Open Networking Foundation (ONF) and the ONF 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#
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
Joey Armstrong0205d332023-04-11 17:29:23 -040018.PHONY: help clean help test
19.DEFAULT_GOAL := help
20
21##-------------------##
22##---] GLOBALS [---##
23##-------------------##
Joey Armstrongf128de82023-09-08 17:05:18 -040024TOP ?= .
Joey Armstrong43997db2023-06-04 10:08:58 -040025
Joey Armstrong0205d332023-04-11 17:29:23 -040026##--------------------##
27##---] INCLUDES [---##
28##--------------------##
Joey Armstrongf128de82023-09-08 17:05:18 -040029include $(TOP)/config.mk
30include $(TOP)/makefiles/include.mk
Joey Armstrong0205d332023-04-11 17:29:23 -040031
32## Display make help text late
Joey Armstrong43997db2023-06-04 10:08:58 -040033include $(ONF_MAKEDIR)/help/trailer.mk
Joey Armstrong0205d332023-04-11 17:29:23 -040034
Joey Armstrong7f590b92023-10-18 12:07:51 -040035## -----------------------------------------------------------------------
36## Intent: Helper target for interactive README.md viewing
37## Note: This target has limited use for repo:onf-make and this directory
38## Todo: Add makefiles/[lint/]md/include.mk and generalize logic
39## -----------------------------------------------------------------------
40view-docs-src := README.md $(wildcard docs/*.md)
41view-docs-dep := $(addprefix view-dep^,$(view-docs-src))
42
43.PHONY: view $(view-docs-dep)
44view :: $(view-docs-dep)
45
46$(view-docs-dep): # view-dep^README.md => README.md
47 -pandoc $(lastword $(subst ^,$(space),$@)) | lynx -stdin
48
49help ::
50 @echo
51 @printf ' %-25.25s %s\n' 'view'\
52 'Rendering *.md docs for interactive viewing'
53
Joey Armstrong0205d332023-04-11 17:29:23 -040054# [EOF]