[VOL-5194] - Refactor and use repo:onf-make as a git-submodule

makefiles/lint/doc8/doc8.ini
makefiles/lint/doc8/ini.mk
----------------------------
  o Repo:onf-make library makefiles define a default config for doc8.
  o Per-repository overrides and exclusions are needed for linting.
  o The doc8 command will err when multiple --config switches are passed.
  o ini.mk was added to dynamically generate a doc8.ini config
    file by merging library and local doc8 configs.

config.mk
---------
  o Added a deprecation note for config values moving to repo:voltha-docs.
  o Explicitly define --repo-name--, we lose per-repository error checking
    but the edit is needed to enable jenkins lint testing for repo:onf-make.

makefiles/include.mk
makefiles/.gitignore
--------------------
  o Define onf-mk-tmp=makefiles/tmp for internal library makefile use.
  o Targets and 'make clean' maintain the temp directory.

makefiles/lint/doc8/include.mk
------------------------------
  o include ini.mk to generate a doc8.ini config file.
  o Update lint target to support common *-{all, mod, src} targets.
  o help targets: replace echo with printf for consistent formatting.
  o Added banner-{enter,leave} calls and fixed a typo.

makefiles/lint/doc8/install.mk
------------------------------
  o Rename peripheral doc8 help target to lint-doc8-help.
    Output from 'make help' is growing long and difficult to read.
    Simplify by displaying two help items per topic (primary and summary),
    devs can later request topic specific help by name when needed.

Change-Id: I7c83bd48d26510e79fd32f8bb97887cace67b55f
7 files changed
tree: fd06a5a6667bbc4f8df1d0cc836241f818ead5b3
  1. .gitignore
  2. .gitreview
  3. Makefile
  4. README.md
  5. bin/
  6. config.mk
  7. docs/
  8. makefiles/
  9. makefiles_include_mk.ex
README.md

onf-make library makefiles

This repository contains common makefile logic and targets that can be used to build arbitrary repositories. Makefile logic is currently being consumed by the VOLTHA project

makefiles/ subdirectories

Two distinct sets of makefiles are needed to support builds:

  • The first is a subdir of makefiles/ named 'onf-make'

    • This directory exists and is maintained as a git-submodule of repo:onf-make.
    • Library makefiles contain independent logic to install common tools such as (virtualenv), perform linting tasks, define constants and perform path/string manipulation, etc.
  • The second makefile directory contains repository/project specific logic:

    • makefiles/local/ exists as a repository subdirectory under SCM.
    • Contains custom targets, variant parameters and custom logic specific to the repository it exists within.
  • Most makefile logic can be parameterized and implemented to support reuse. Consider adding enhancements or refactoring local/ makefile logic into repo:onf-make so all makefiles can leverage it.

Hierarchy

% tree --charset=ascii -n

Makefile
config.mk
makefiles/
|-- include.mk
|-- local
|   |-- include.mk
|   |   |   |-- doc8
|   |   |   |    |-- doc8.ini   (alas only one --config switch allowed)
|-- [onf-make: git-submodule](https://github.com/opencord/onf-make)
|   |-- makefiles
|   |   |-- consts.mk
|   |   |-- include.mk
|   |   |-- lint
|   |   |   |-- doc8            Syntax check ReStructuredText (rst) files
|   |   |   |-- groovy
|   |   |   |-- python
|   |   |   |-- robot.mk        Syntax check robot testing framework
|   |   |   |-- shell.mk        Invoke shellcheck command on scripts
|   |   |   |-- yaml            Syntax check yaml configs

NOTES

  • Ascii art was rendered using

    • tree --charset=ascii -n
  • README.md can be rendered locally using

    • pandoc README.md | lynx -stdin
    • make view

SEE ALSO