[VOL-5194] - Refactor and use repo:onf-make as a git-submodule
Makefile
--------
o Added target view for interactive rendering of README.md
o Use printf VS echo in target help to normalize formatting
README.md
docs/todo.md
docs/VARIABLES.md
-----------------
o Begin documenting makefile variables and features for library makefiles.
Change-Id: If75417c45363ee5c6a514fe9ebd4414ba8cf0cf7
diff --git a/Makefile b/Makefile
index d830da6..96b8f26 100644
--- a/Makefile
+++ b/Makefile
@@ -32,4 +32,23 @@
## Display make help text late
include $(ONF_MAKEDIR)/help/trailer.mk
+## -----------------------------------------------------------------------
+## Intent: Helper target for interactive README.md viewing
+## Note: This target has limited use for repo:onf-make and this directory
+## Todo: Add makefiles/[lint/]md/include.mk and generalize logic
+## -----------------------------------------------------------------------
+view-docs-src := README.md $(wildcard docs/*.md)
+view-docs-dep := $(addprefix view-dep^,$(view-docs-src))
+
+.PHONY: view $(view-docs-dep)
+view :: $(view-docs-dep)
+
+$(view-docs-dep): # view-dep^README.md => README.md
+ -pandoc $(lastword $(subst ^,$(space),$@)) | lynx -stdin
+
+help ::
+ @echo
+ @printf ' %-25.25s %s\n' 'view'\
+ 'Rendering *.md docs for interactive viewing'
+
# [EOF]
diff --git a/README.md b/README.md
index 48b1916..b10b43d 100644
--- a/README.md
+++ b/README.md
@@ -53,19 +53,6 @@
| | | |-- shell.mk Invoke shellcheck command on scripts
| | | |-- yaml Syntax check yaml configs
-TODO
-====
-
-- Refactor and merge logic from available repository makefiles/ directories.
-- Update to make use of library makefiles
-
- - [setup.sh](http://github.com/opencord/onf-make/blob/master/bin/setup.sh)
- - {repository}/makefiles/{local, onf-make}/
- - Create [config.mk](https://github.com/opencord/onf-make/blob/master/config.mk) to enable targets and features.
-
-- Exercise make lint targets, bulk cleanup is needed across all repositories.
-- Relocate $sandbox/config.mk into makefiles/config.mk
-
NOTES
=====
@@ -76,3 +63,10 @@
- README.md can be rendered locally using
- pandoc README.md | lynx -stdin
+ - make view
+
+SEE ALSO
+========
+
+- [Makefile Variables & Debugging](docs/VARIABLES.md)
+- [Todo List](docs/todo.md)
diff --git a/docs/VARIABLES.md b/docs/VARIABLES.md
new file mode 100644
index 0000000..0c495c8
--- /dev/null
+++ b/docs/VARIABLES.md
@@ -0,0 +1,43 @@
+make macros
+-----------
+
+Sandbox directories
+===================
+
+| Varname | Description |
+| --- | --- |
+| ONF_MAKEDIR | Path to library repo:onf-make/makefiles/ directory |
+| MAKEDIR | Path to per-repository, local makefiles/ directory. |
+| | |
+| onf-mk-top | Path to top level sandbox directory (contains makefiles/) |
+| onf-mk-lib | Path to library repo:onf-make/makefiles/ directory |
+| onf-mk-loc | Path to per-repository, local makefiles/ directory. |
+| onf-mk-tmp | Threaded makefile scratch area (cleanup behind yourself!) |
+
+Runtime modes
+=============
+
+| Varname | Description |
+| --- | --- |
+| DEBUG | Enable makefile debugging, display includes while loading |
+| VERBOSE | |
+
+Lint Conditionals
+=================
+
+| Varname | Tool | Description |
+| --- | --- | --- |
+| NO-LINT-DOC8 | text | Disable reStructured text syntax checking |
+| NO-LINT-FLAKE8 | python | Disable tool:flake8 syntax checking |
+| NO-LINT-GOLANG | golang | Disable tool:gofmt syntax checking |
+| NO-LINT-GROOVY | groovy | Disable tool:groovy syntax checking |
+| NO-LINT-JJB | | Disable Jenkins Job Builder (JJB) syntax checking |
+| NO-LINT-JSON | json | Disable config file syntax checking |
+| NO-LINT-MAKEFILE | makefile | Disable tool:make --dryrun, --no-undef syntax checking |
+| NO-LINT-PYLINT | python | Disable tool:pylint syntax checking |
+| NO-LINT-PYTHON | python | Disable all python syntax checking |
+| NO-LINT-REUSE | | Disable license checking |
+| NO-LINT-ROBOT | | Syntax check tool:robot test framework |
+| NO-LINT-SHELL | bash | Run tool:shellcheck on script sources. |
+| NO-LINT-TOX | | Syntax check virtualenv test automation |
+| NO-LINT-YAML | yaml | Disable config file syntax checking |
diff --git a/docs/todo.md b/docs/todo.md
new file mode 100644
index 0000000..8c40dc3
--- /dev/null
+++ b/docs/todo.md
@@ -0,0 +1,12 @@
+TODO
+====
+
+- Refactor and merge logic from available repository makefiles/ directories.
+- Update to make use of library makefiles
+
+ - [setup.sh](http://github.com/opencord/onf-make/blob/master/bin/setup.sh)
+ - {repository}/makefiles/{local, onf-make}/
+ - Create [config.mk](https://github.com/opencord/onf-make/blob/master/config.mk) to enable targets and features.
+
+- Exercise make lint targets, bulk cleanup is needed across all repositories.
+- Relocate $sandbox/config.mk into makefiles/config.mk