commit | 7805bbdee5b6b27ba096651f7ccbf769a1eb04af | [log] [tgz] |
---|---|---|
author | Joey Armstrong <joey@opennetworking.org> | Fri Jul 07 08:37:04 2023 -0400 |
committer | Joey Armstrong <joey@opennetworking.org> | Thu Jul 27 12:17:54 2023 -0400 |
tree | d0f12eb2867b6c2efbbb25c1b52ab7cb7360c937 | |
parent | 1e07f8827585a2d7ba6541babb28027c8e1f39e0 [diff] |
Update README and config.mk for conditional target logic Change-Id: I490cdcc11966a7e944ce6d4c7dced327fe7fa7c7
This repo holds generic library makefile logic and targets that can be used to build and test arbitrary targets.
Two module directories are maintained, access through variables:
Make Macro | Description |
---|---|
MAKEDIR | Path to project specific makefiles/ directory |
ONF_MAKEDIR | Path to generic library makefiles/ directory |
include $(ONF_MAKEDIR)/include.mk
Config.mk contains flags that will {en,dis}able conditional makefile logic.
── [mM]akefile ├── config.mk ├── makefiles/
Basic makefile hierarchy contains:
For each subdir in the makefiles library the file include.mk exists
├── makefiles │ ├── include.mk │ ├── docker │ │ └── include.mk │ ├── etc │ │ └── include.mk │ ├── help │ │ ├── include.mk │ ├── lint │ │ │ ├── include.mk │ │ │ └── reuse.mk
include.mk will capture and normalize access for target logic. One single include to define all permutations for a makefile target.
% onf-make/makefiles ├── lint │ ├── license │ │ ├── include.mk │ │ ├── license-check.sh │ │ ├── license-helper.sh │ │ ├── reuse.mk │ │ ├── voltha-onos.mk <-----** │ │ └── voltha-protos.mk <-----**
Some repositories contain custom logic and scripts attached to a target. To help support variants and create a bridge for refactoring, a custom makefile named for a repository can be supported
For example the lint-license target can be customized
Target:lint-license is a dependency of target=lint
Create makefiles/lint/license/{repo-name}.mk
Modify lint/license/include.mk to