diff options
author | W. Trevor King <wking@tremily.us> | 2018-05-15 16:27:07 -0700 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-05-17 00:18:43 +0000 |
commit | 624660c1b3869bdd6b3342f5924e813f32a81b4a (patch) | |
tree | 0e68891ce9ec0a0aa8ba3ad9b09820e6d60235d6 /cmd/podman | |
parent | 2fdd4a16104af142d43f593c84da7acd86d4b077 (diff) | |
download | podman-624660c1b3869bdd6b3342f5924e813f32a81b4a.tar.gz podman-624660c1b3869bdd6b3342f5924e813f32a81b4a.tar.bz2 podman-624660c1b3869bdd6b3342f5924e813f32a81b4a.zip |
Makefile: Use ?= for shell variables (ISODATE, etc.)
Previously, Make would execute these shell commands even if we didn't
need the resulting variable. With ?='s recursive expansion [1], we
only expand the variable when it's consumed. For example, the ISODATE
variable is only needed in the recipe for the changelog target, so
most Make invocations won't need the value, and the computation is
just making whatever Make actually is doing slower.
I've shifted the GIT_COMMIT and BUILD_INFO values over to
LDFLAGS_PODMAN, because the test/*/* targets don't care about those.
I've also moved the Go-specific -ldflags from the variables into the
recipes themselves, because callers probably expect C semantics for
LDFLAGS and not Go's wrapper. That means that there's no longer a
need for the LDFLAGS/BASE_LDFLAGS separation, so I'm just using
LDFLAGS (and LDFLAGS_PODMAN) now. That reduces the declared variables
to just LDFLAGS_PODMAN, so I've shifted that declaration up to get it
closer to its GIT_COMMIT and BUILD_INFO precursors.
[1]: https://www.gnu.org/software/make/manual/html_node/Setting.html
Signed-off-by: W. Trevor King <wking@tremily.us>
Closes: #777
Approved by: rhatdan
Diffstat (limited to 'cmd/podman')
0 files changed, 0 insertions, 0 deletions