diff options
author | eldritch horrors <pennae@lix.systems> | 2024-03-13 19:46:14 +0100 |
---|---|---|
committer | eldritch horrors <pennae@lix.systems> | 2024-03-13 19:48:26 +0100 |
commit | 06952cf7c424dcfba67a5c632f965c3e9e1aa8ac (patch) | |
tree | 83a45137816b0d82e98204ad35f38c3e8696a08c /mk/programs.mk | |
parent | 1b8662b85cb70e02c2a1650e290ec3007b6c6d30 (diff) |
support <program>_ENV variables
this lets us set per-test-program environment variables rather than only
a single, global default. this was supported in nix originally but
might've gone partially missing in the upstream backports process?
Change-Id: Iad0919841b1b6d11e0b7ebd3920449a62f544e77
Diffstat (limited to 'mk/programs.mk')
-rw-r--r-- | mk/programs.mk | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mk/programs.mk b/mk/programs.mk index a88d9d949..7768ef3eb 100644 --- a/mk/programs.mk +++ b/mk/programs.mk @@ -6,6 +6,9 @@ programs-list := # - $(1)_NAME: the name of the program (e.g. ‘foo’); defaults to # $(1). # +# - $(1)_ENV: environment variables to set when running the program +# from the Makefile using the $(1)_RUN target. +# # - $(1)_DIR: the directory where the (non-installed) program will be # placed. # @@ -87,6 +90,6 @@ define build-program # Phony target to run this program (typically as a dependency of 'check'). .PHONY: $(1)_RUN $(1)_RUN: $$($(1)_PATH) - $(trace-test) $$(UNIT_TEST_ENV) $$($(1)_PATH) + $(trace-test) $$($(1)_ENV) $$($(1)_PATH) endef |