tree: 1aca88192c82a6a9c7c0d2ab8bc9b4dc1a6da57d [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. main/
  18. npm/
  19. python/
  20. release/
  21. targets/
  22. todo.mk
  23. utils/
  24. 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]