Skip to content

Latest commit

 

History

History
61 lines (41 loc) · 1.39 KB

style-mk.md

File metadata and controls

61 lines (41 loc) · 1.39 KB

Style for Makefiles

build.mk and other Makefiles follow a consistent style described bellow.

Filename

Use Makefile, although we write only GNU Makefiles, thus we could use GNUMakefile.

Include yplatform

ifeq (,$(wildcard yplatform/Makefile))
INSTALL_YP := $(shell git submodule update --init --recursive yplatform)
ifneq (,$(filter undefine,$(.FEATURES)))
undefine INSTALL_YP
endif
endif

include yplatform/build.mk/...

Include yplatform/build.mk/generic.common.mk, or at the very minimum, include yplatform/build.mk/core.common.mk.

This will mean that

  • a bunch of sane defaults will be set and utility functions will become available.
  • a bunch of exe/os/git variables will become available.
  • a bunch of sane target patterns will become available.
    • make = make all = make deps build check
    • make clean, make nuke
    • make deps
    • make build
    • make check
    • make test
    • make help
    • etc.

Target naming

TODO

Assignments

TODO

References