summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Evich <cevich@redhat.com>2021-04-08 08:47:19 -0400
committerChris Evich <cevich@redhat.com>2021-04-12 10:01:04 -0400
commit5a703bbf7a73ef4ab3ee99db885c206abf773a49 (patch)
tree873a972328ad9fa029cc53c441fdb9aa29de2e5c
parent837bb9f492da57c15fbd4f14f4aa53c3bd7132ea (diff)
downloadpodman-5a703bbf7a73ef4ab3ee99db885c206abf773a49.tar.gz
podman-5a703bbf7a73ef4ab3ee99db885c206abf773a49.tar.bz2
podman-5a703bbf7a73ef4ab3ee99db885c206abf773a49.zip
Don't shell to obtain current directory
Instead of shelling out frequently to resolve the current directory, use the Makefile built-in `$(CURDIR)`. It has the exact same meaning w/in the context of a `Makefile`. Ref.: https://www.gnu.org/software/make/manual/html_node/Quick-Reference.html Signed-off-by: Chris Evich <cevich@redhat.com>
-rw-r--r--Makefile12
1 files changed, 6 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 666c27b7d..0511a17f2 100644
--- a/Makefile
+++ b/Makefile
@@ -64,8 +64,8 @@ else
ISODATE ?= $(shell date --iso-8601)
endif
LIBPOD := ${PROJECT}/v3/libpod
-GCFLAGS ?= all=-trimpath=${PWD}
-ASMFLAGS ?= all=-trimpath=${PWD}
+GCFLAGS ?= all=-trimpath=$(CURDIR)
+ASMFLAGS ?= all=-trimpath=$(CURDIR)
LDFLAGS_PODMAN ?= \
-X $(LIBPOD)/define.gitCommit=$(GIT_COMMIT) \
-X $(LIBPOD)/define.buildInfo=$(BUILD_INFO) \
@@ -329,7 +329,7 @@ remoteintegration: test-binaries ginkgo-remote
localsystem:
# Wipe existing config, database, and cache: start with clean slate.
$(RM) -rf ${HOME}/.local/share/containers ${HOME}/.config/containers
- if timeout -v 1 true; then PODMAN=$(shell pwd)/bin/podman bats test/system/; else echo "Skipping $@: 'timeout -v' unavailable'"; fi
+ if timeout -v 1 true; then PODMAN=$(CURDIR)/bin/podman bats test/system/; else echo "Skipping $@: 'timeout -v' unavailable'"; fi
.PHONY: remotesystem
remotesystem:
@@ -354,7 +354,7 @@ remotesystem:
echo "Error: ./bin/podman system service did not come up on $$SOCK_FILE" >&2;\
exit 1;\
fi;\
- env PODMAN="$(shell pwd)/bin/podman-remote --url $$PODMAN_SOCKET" bats test/system/ ;\
+ env PODMAN="$(CURDIR)/bin/podman-remote --url $$PODMAN_SOCKET" bats test/system/ ;\
rc=$$?;\
kill %1;\
rm -f $$SOCK_FILE;\
@@ -404,7 +404,7 @@ docs: $(MANPAGES) ## Generate documentation
install-podman-remote-%-docs: podman-remote docs $(MANPAGES)
rm -rf docs/build/remote
mkdir -p docs/build/remote
- ln -sf $(shell pwd)/docs/source/markdown/links docs/build/man/
+ ln -sf $(CURDIR)/docs/source/markdown/links docs/build/man/
docs/remote-docs.sh $* docs/build/remote/$* $(if $(findstring windows,$*),docs/source/markdown,docs/build/man)
.PHONY: man-page-check
@@ -678,7 +678,7 @@ vendor:
.PHONY: vendor-in-container
vendor-in-container:
- podman run --privileged --rm --env HOME=/root -v `pwd`:/src -w /src docker.io/library/golang:1.16 make vendor
+ podman run --privileged --rm --env HOME=/root -v $(CURDIR):/src -w /src docker.io/library/golang:1.16 make vendor
.PHONY: package
package: ## Build rpm packages