Skip to content

Commit 8a3ccc2

Browse files
committed
Fixing makefile to run inside EKS-A build tooling
1 parent f6ca814 commit 8a3ccc2

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

Makefile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,17 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
ROOT_DIR_RELATIVE := .
15+
export REPO_ROOT := $(shell git rev-parse --show-toplevel)
1616

17-
include $(ROOT_DIR_RELATIVE)/common.mk
17+
include $(REPO_ROOT)/common.mk
1818

1919
# Directories
20-
TOOLS_DIR := hack/tools
20+
TOOLS_DIR := $(REPO_ROOT)/hack/tools
2121
TOOLS_DIR_DEPS := $(TOOLS_DIR)/go.sum $(TOOLS_DIR)/go.mod $(TOOLS_DIR)/Makefile
2222
TOOLS_BIN_DIR := $(TOOLS_DIR)/bin
2323
BIN_DIR ?= bin
2424
RELEASE_DIR ?= out
2525

26-
export REPO_ROOT := $(shell git rev-parse --show-toplevel)
2726
GH_REPO ?= kubernetes-sigs/cluster-api-provider-cloudstack
2827

2928
# Binaries
@@ -71,7 +70,6 @@ endif
7170
# Options are set to exit when a recipe line exits non-zero or a piped command fails.
7271
# SHELL = /usr/bin/env bash -o pipefail
7372
.SHELLFLAGS = -ec
74-
7573
# Quiet Ginkgo for now.
7674
# The warnings are in regards to a future release.
7775
export ACK_GINKGO_DEPRECATIONS := 1.16.5

common.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
include $(ROOT_DIR_RELATIVE)/versions.mk
15+
include $(REPO_ROOT)/versions.mk
1616

1717
# Ensure Make is run with bash shell as some syntax below is bash-specific
1818
SHELL:=bash
1919
.ONESHELL:
20-
.SHELLFLAGS := -eu -o pipefail -c
20+
# .SHELLFLAGS := -eu -o pipefail -c
2121
.DELETE_ON_ERROR:
2222
MAKEFLAGS += --no-builtin-rules
2323

24-
TOOLS_DIR := $(ROOT_DIR_RELATIVE)/hack/tools
24+
TOOLS_DIR := $(REPO_ROOT)/hack/tools
2525
TOOLS_DIR_DEPS := $(TOOLS_DIR)/go.sum $(TOOLS_DIR)/go.mod $(TOOLS_DIR)/Makefile
2626
TOOLS_BIN_DIR := $(TOOLS_DIR)/bin
2727
UID := $(shell id -u)

hack/tools/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
ROOT_DIR_RELATIVE := ../..
16-
include $(ROOT_DIR_RELATIVE)/common.mk
15+
export REPO_ROOT := $(shell git rev-parse --show-toplevel)
16+
include $(REPO_ROOT)/common.mk
1717

1818
UNAME := $(shell uname -s)
1919

0 commit comments

Comments
 (0)