Makefile - instead of calling `as` directly, use it from env var
Signed-off-by: Rahil Bhimjiani <me@rahil.rocks>
This commit is contained in:
parent
e3c8c0e649
commit
c1b43b57bb
3
Makefile
3
Makefile
|
@ -16,6 +16,7 @@ BUILDFLAGS := -tags "$(BUILDTAGS)"
|
|||
BUILDAH := buildah
|
||||
SELINUXOPT ?= $(shell test -x /usr/sbin/selinuxenabled && selinuxenabled && echo -Z)
|
||||
SELINUXTYPE=container_runtime_exec_t
|
||||
AS ?= as
|
||||
|
||||
GO := go
|
||||
GO_LDFLAGS := $(shell if $(GO) version|grep -q gccgo; then echo "-gccgoflags"; else echo "-ldflags"; fi)
|
||||
|
@ -79,7 +80,7 @@ bin/buildah: $(SOURCES) cmd/buildah/*.go internal/mkcw/embed/entrypoint_amd64.gz
|
|||
$(GO_BUILD) $(BUILDAH_LDFLAGS) $(GO_GCFLAGS) "$(GOGCFLAGS)" -o $@ $(BUILDFLAGS) ./cmd/buildah
|
||||
test -z "${SELINUXOPT}" || chcon --verbose -t $(SELINUXTYPE) $@
|
||||
|
||||
ifneq ($(shell as --version | grep x86_64),)
|
||||
ifneq ($(shell $(AS) --version | grep x86_64),)
|
||||
internal/mkcw/embed/entrypoint_amd64.gz: internal/mkcw/embed/entrypoint_amd64
|
||||
gzip -k9nf $^
|
||||
|
||||
|
|
Loading…
Reference in New Issue