Skip to content

Commit

Permalink
Provide PDO_SOURCE_ROOT default for docker to allow zero-config build
Browse files Browse the repository at this point in the history
Co-authored-by: Bruno Vavala <[email protected]>
Signed-off-by: g2flyer <[email protected]>
  • Loading branch information
g2flyer and bvavala committed Mar 18, 2024
1 parent e91a785 commit de726ed
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions docker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@
# limitations under the License.
# ------------------------------------------------------------------------------

# PDO_SOURCE_ROOT
# The directory to pick up PDO source when building containers.
# Usually, below default should do the "right thing" but if your path
# contains spaces or you want source from another directory than the parent,
# you will have to explicitly pass, e.g. via make.loc (see below),
# the desired PDO_SOURCE_ROOT when invoking make.
PDO_SOURCE_ROOT ?= $(realpath $(dir $(abspath $(lastword $(MAKEFILE_LIST))))/../)

# PDO_REPO --
# The URL or path to the git repository, the default uses the current repository
# though it might be reasonable to build a particular branch from the primary
Expand All @@ -37,11 +45,7 @@ PDO_GROUP_UID ?= $(shell id -g)
# Include local customizations if they are available
-include make.loc

# Turns out that setting the script directory from the Makefile's name
# does not work very well if the path contains spaces in the name; in
# fact lots of things break very badly; set this explicitly
DOCKER_DIR ?= ${PDO_SOURCE_ROOT}/docker

DOCKER_DIR = ${PDO_SOURCE_ROOT}/docker
DOCKER_USERNAME = $(LOGNAME)
DOCKER_BUILDARGS += --build-arg UID=$(PDO_USER_UID)
DOCKER_BUILDARGS += --build-arg GID=$(PDO_GROUP_UID)
Expand Down

0 comments on commit de726ed

Please sign in to comment.