kit

kit
git clone https://git.ryansepassi.com/git/kit.git
Log | Files | Refs | README

config.mk (660B)


      1 # Build-time component flags, mirrored from include/kit/config.h so the
      2 # Makefile drops the same sources that #if drops from the compile.
      3 #
      4 # Single source of truth is the header; this file just parses it.
      5 #
      6 # Parse every `KIT_*_ENABLED` flag from the header in a single awk pass — one
      7 # process for the whole file rather than one `awk` per flag — then define each
      8 # as an identically named make variable. An absent flag stays unset/empty,
      9 # exactly as the old per-flag lookups behaved.
     10 CFG_HDR  := include/kit/config.h
     11 CFG_DEFS := $(shell awk '/^\#define KIT_[A-Z0-9_]+_ENABLED[ \t]/{print $$2"="$$3}' $(CFG_HDR))
     12 $(foreach kv,$(CFG_DEFS),$(eval $(kv)))