mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-22 00:08:11 +00:00
Add PREFIX make variable to control command output
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
parent
35c6559013
commit
923344d376
5
Makefile
5
Makefile
@ -53,9 +53,12 @@ DOCKER_TARGETS := $(patsubst %,docker-%, $(TARGETS))
|
||||
GOOS ?= linux
|
||||
|
||||
binaries: cmds
|
||||
ifneq ($(PREFIX),)
|
||||
cmd-%: COMMAND_BUILD_OPTIONS = -o $(PREFIX)/$(*)
|
||||
endif
|
||||
cmds: $(CMD_TARGETS)
|
||||
$(CMD_TARGETS): cmd-%:
|
||||
GOOS=$(GOOS) go build -ldflags "-s -w" $(MODULE)/cmd/$(*)
|
||||
GOOS=$(GOOS) go build -ldflags "-s -w" $(COMMAND_BUILD_OPTIONS) $(MODULE)/cmd/$(*)
|
||||
|
||||
build:
|
||||
GOOS=$(GOOS) go build ./...
|
||||
|
@ -40,9 +40,7 @@ RUN mkdir -p $DIST_DIR /dist
|
||||
WORKDIR $GOPATH/src/nvidia-container-toolkit
|
||||
COPY . .
|
||||
|
||||
RUN make cmds && \
|
||||
mv ./nvidia-container-toolkit $DIST_DIR/nvidia-container-toolkit && \
|
||||
mv ./nvidia-container-runtime $DIST_DIR/nvidia-container-runtime
|
||||
RUN make PREFIX=${DIST_DIR} cmds
|
||||
|
||||
COPY config/config.toml.amzn $DIST_DIR/config.toml
|
||||
|
||||
|
@ -40,9 +40,7 @@ RUN mkdir -p $DIST_DIR /dist
|
||||
WORKDIR $GOPATH/src/nvidia-container-toolkit
|
||||
COPY . .
|
||||
|
||||
RUN make cmds && \
|
||||
mv ./nvidia-container-toolkit $DIST_DIR/nvidia-container-toolkit && \
|
||||
mv ./nvidia-container-runtime $DIST_DIR/nvidia-container-runtime
|
||||
RUN make PREFIX=${DIST_DIR} cmds
|
||||
|
||||
COPY config/config.toml.centos $DIST_DIR/config.toml
|
||||
|
||||
|
@ -48,9 +48,7 @@ RUN mkdir -p $DIST_DIR /dist
|
||||
WORKDIR $GOPATH/src/nvidia-container-toolkit
|
||||
COPY . .
|
||||
|
||||
RUN make cmds && \
|
||||
mv ./nvidia-container-toolkit $DIST_DIR/nvidia-container-toolkit && \
|
||||
mv ./nvidia-container-runtime $DIST_DIR/nvidia-container-runtime
|
||||
RUN make PREFIX=${DIST_DIR} cmds
|
||||
|
||||
COPY config/config.toml.debian $DIST_DIR/config.toml
|
||||
|
||||
|
@ -39,9 +39,7 @@ RUN mkdir -p $DIST_DIR /dist
|
||||
WORKDIR $GOPATH/src/nvidia-container-toolkit
|
||||
COPY . .
|
||||
|
||||
RUN make cmds && \
|
||||
mv ./nvidia-container-toolkit $DIST_DIR/nvidia-container-toolkit && \
|
||||
mv ./nvidia-container-runtime $DIST_DIR/nvidia-container-runtime
|
||||
RUN make PREFIX=${DIST_DIR} cmds
|
||||
|
||||
# Hook for Project Atomic's fork of Docker: https://github.com/projectatomic/docker/tree/docker-1.13.1-rhel#add-dockerhooks-exec-custom-hooks-for-prestartpoststop-containerspatch
|
||||
COPY oci-nvidia-hook $DIST_DIR/oci-nvidia-hook
|
||||
|
@ -46,9 +46,7 @@ RUN mkdir -p $DIST_DIR /dist
|
||||
WORKDIR $GOPATH/src/nvidia-container-toolkit
|
||||
COPY . .
|
||||
|
||||
RUN make cmds && \
|
||||
mv ./nvidia-container-toolkit $DIST_DIR/nvidia-container-toolkit && \
|
||||
mv ./nvidia-container-runtime $DIST_DIR/nvidia-container-runtime
|
||||
RUN make PREFIX=${DIST_DIR} cmds
|
||||
|
||||
COPY config/config.toml.ubuntu $DIST_DIR/config.toml
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user