tree: 6ad3892db8357e2a0d914261717606fe85feb28b [path history] [tgz]
  1. README.md
  2. bin/
  3. bootstrap.mk
  4. commands/
  5. consts.mk
  6. docker/
  7. etc/
  8. gerrit/
  9. git-submodules.mk
  10. git/
  11. golang/
  12. help/
  13. include.mk
  14. jjb/
  15. library-makefiles.mk
  16. lint/
  17. python/
  18. release/
  19. targets/
  20. todo.mk
  21. utils/
  22. virtualenv/
makefiles/README.md

makefiles

Two distinct makefile directories are in use:

  • Common library makefiles (onf-make/)
  • Project specific makefile logic (local/)

Makefile logic is loaded/accessed through make macros: ONF_MAKEDIR= Common makefile targets and logic MAKEDIR= Repository/project specific targets

Common library targets are defined/augmented as double colon rules: build clean help sterile test :: # dup targets OK

% make sterile test

All other targets are defined and accessed as single colon rules: repo-rule : # fail on duplicate targets

All makefiles/ logic can be access from the top level Makefile

TOP ?= $(strip $(dir $(abspath $(lastword $(MAKEFILE_LIST))) ) )
include $(TOP)/config.mk include $(TOP)/makefiles/include.mk

Which in turn will load onf-make/ and local/

include $(ONF_MAKE)/makefiles/include.mk include $(MAKEDIR)/makefiles/include.mk

% make sterile build

[EOF]