Follow

TIL Target-specific Variable Values in GNU Make. The values set for a target are also passed to all the prerequisites of the targets.

gnu.org/software/make/manual/h

build:
@echo "$(FEATURE)"

deploy: FEATURE = enable
deploy: build
@echo "$(FEATURE)"

This will print:
enable
enable

· · Web · 0 · 0 · 0
Sign in to participate in the conversation
dgplug

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!