Joey Armstrong | 0205d33 | 2023-04-11 17:29:23 -0400 | [diff] [blame] | 1 | # -*- makefile -*- |
| 2 | # ----------------------------------------------------------------------- |
Joey Armstrong | dc04c93 | 2024-04-01 12:14:21 -0400 | [diff] [blame] | 3 | # Copyright 2022-2024 Open Networking Foundation Contributors |
Joey Armstrong | 0205d33 | 2023-04-11 17:29:23 -0400 | [diff] [blame] | 4 | # |
| 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 Armstrong | dc04c93 | 2024-04-01 12:14:21 -0400 | [diff] [blame] | 9 | # http:#www.apache.org/licenses/LICENSE-2.0 |
Joey Armstrong | 0205d33 | 2023-04-11 17:29:23 -0400 | [diff] [blame] | 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 Armstrong | dc04c93 | 2024-04-01 12:14:21 -0400 | [diff] [blame] | 17 | # SPDX-FileCopyrightText: 2022-2024 Open Networking Foundation Contributors |
| 18 | # SPDX-License-Identifier: Apache-2.0 |
| 19 | # ----------------------------------------------------------------------- |
| 20 | # Intent: |
| 21 | # ----------------------------------------------------------------------- |
Joey Armstrong | 0205d33 | 2023-04-11 17:29:23 -0400 | [diff] [blame] | 22 | |
Joey Armstrong | 0205d33 | 2023-04-11 17:29:23 -0400 | [diff] [blame] | 23 | .PHONY: help clean help test |
| 24 | .DEFAULT_GOAL := help |
| 25 | |
Joey Armstrong | a2db6cd | 2023-11-30 12:16:18 -0500 | [diff] [blame] | 26 | ##---------------------## |
| 27 | ##---] BOOTSTRAP [---## |
| 28 | ##---------------------## |
| 29 | onf-mk-abs ?= $(abspath $(lastword $(MAKEFILE_LIST))) |
| 30 | onf-mk-top := $(dir $(onf-mk-abs)) |
| 31 | onf-mk-top := $(patsubst %/,%,$(onf-mk-top)) |
| 32 | |
Joey Armstrong | 78fca2d | 2024-05-01 16:51:58 -0400 | [diff] [blame] | 33 | onf-mk-dir := $(onf-mk-top)/makefiles |
| 34 | |
Joey Armstrong | 0205d33 | 2023-04-11 17:29:23 -0400 | [diff] [blame] | 35 | ##-------------------## |
| 36 | ##---] GLOBALS [---## |
| 37 | ##-------------------## |
Joey Armstrong | f128de8 | 2023-09-08 17:05:18 -0400 | [diff] [blame] | 38 | TOP ?= . |
Joey Armstrong | 43997db | 2023-06-04 10:08:58 -0400 | [diff] [blame] | 39 | |
Joey Armstrong | 0205d33 | 2023-04-11 17:29:23 -0400 | [diff] [blame] | 40 | ##--------------------## |
| 41 | ##---] INCLUDES [---## |
| 42 | ##--------------------## |
Joey Armstrong | ccab2cf | 2024-04-06 18:00:59 -0400 | [diff] [blame] | 43 | include config.mk |
Joey Armstrong | 78fca2d | 2024-05-01 16:51:58 -0400 | [diff] [blame] | 44 | include $(onf-mk-dir)/include.mk |
Joey Armstrong | 0205d33 | 2023-04-11 17:29:23 -0400 | [diff] [blame] | 45 | |
Joey Armstrong | 7f590b9 | 2023-10-18 12:07:51 -0400 | [diff] [blame] | 46 | ## ----------------------------------------------------------------------- |
| 47 | ## Intent: Helper target for interactive README.md viewing |
| 48 | ## Note: This target has limited use for repo:onf-make and this directory |
| 49 | ## Todo: Add makefiles/[lint/]md/include.mk and generalize logic |
| 50 | ## ----------------------------------------------------------------------- |
| 51 | view-docs-src := README.md $(wildcard docs/*.md) |
| 52 | view-docs-dep := $(addprefix view-dep^,$(view-docs-src)) |
| 53 | |
| 54 | .PHONY: view $(view-docs-dep) |
| 55 | view :: $(view-docs-dep) |
| 56 | |
| 57 | $(view-docs-dep): # view-dep^README.md => README.md |
| 58 | -pandoc $(lastword $(subst ^,$(space),$@)) | lynx -stdin |
| 59 | |
| 60 | help :: |
| 61 | @echo |
| 62 | @printf ' %-25.25s %s\n' 'view'\ |
| 63 | 'Rendering *.md docs for interactive viewing' |
| 64 | |
Joey Armstrong | 0205d33 | 2023-04-11 17:29:23 -0400 | [diff] [blame] | 65 | # [EOF] |