tree: 41522d123662293a9b30487f563c940cd32813f7 [path history] [tgz]
  1. README.md
  2. bin/
  3. bootstrap.mk
  4. commands/
  5. consts.mk
  6. detect/
  7. docker/
  8. etc/
  9. gerrit/
  10. git-submodules.mk
  11. git/
  12. golang/
  13. help/
  14. include.mk
  15. jjb/
  16. library-makefiles.mk
  17. lint/
  18. main/
  19. npm/
  20. python/
  21. release/
  22. targets/
  23. todo.mk
  24. utils/
  25. 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]