[MERGED] docker-playground[master]: fix 'make -C subdir': use $(CURDIR) instead of $PWD

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Thu Apr 5 13:48:53 UTC 2018


Harald Welte has submitted this change and it was merged.

Change subject: fix 'make -C subdir': use $(CURDIR) instead of $PWD
......................................................................


fix 'make -C subdir': use $(CURDIR) instead of $PWD

$(PWD) reflects the dir of 'make' invocation, $(CURDIR) the dir stepped into.
So obtain the current dir from $(CURDIR) instead of $(PWD).

So far, when doing 'make -C osmo-foo-maser', the image's name would be derived
from the root dir's basename and all images were tagged as 'docker-playground'.
With this fix, 'make -C' from anywhere still tags with the proper name.

Change-Id: I1dd0fd1ad89fdee18fdbea851ccc831ad60aeccf
---
M make/Makefile
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Neels Hofmeyr: Verified
  Harald Welte: Looks good to me, approved



diff --git a/make/Makefile b/make/Makefile
index 14d4c52..21614a8 100644
--- a/make/Makefile
+++ b/make/Makefile
@@ -15,7 +15,7 @@
 #
 REGISTRY_HOST=docker.io
 USERNAME=$(USER)
-NAME=$(shell basename $(PWD))
+NAME=$(shell basename $(CURDIR))
 
 RELEASE_SUPPORT := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))/.make-release-support
 IMAGE=$(REGISTRY_HOST)/$(USERNAME)/$(NAME)

-- 
To view, visit https://gerrit.osmocom.org/7633
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I1dd0fd1ad89fdee18fdbea851ccc831ad60aeccf
Gerrit-PatchSet: 2
Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>



More information about the gerrit-log mailing list