Updated Makefile to work correctly when running verify scripts with the project in a symbolically linked directory.
diff --git a/Makefile b/Makefile
index b6043f6..476d24d 100644
--- a/Makefile
+++ b/Makefile
@@ -15,9 +15,10 @@
# SPDX-License-Identifier: Apache-2.0
MAKEFLAGS+=--warn-undefined-variables
-CARAVEL_ROOT?=$(PWD)/caravel
+WORKING_DIR = $(shell pwd -P)
+CARAVEL_ROOT?=$(WORKING_DIR)/caravel
PRECHECK_ROOT?=${HOME}/mpw_precheck
-MCW_ROOT?=$(PWD)/mgmt_core_wrapper
+MCW_ROOT?=$(WORKING_DIR)/mgmt_core_wrapper
SIM?=RTL
export SKYWATER_COMMIT=c094b6e83a4f9298e47f696ec5a7fd53535ec5eb
@@ -74,7 +75,7 @@
dv-targets-gl=$(dv_patterns:%=verify-%-gl)
dv-targets-gl-sdf=$(dv_patterns:%=verify-%-gl-sdf)
-TARGET_PATH=$(shell pwd)
+TARGET_PATH=$(shell pwd -P)
verify_command="cd ${TARGET_PATH}/verilog/dv/$* && export SIM=${SIM} && make"
dv_base_dependencies=simenv
docker_run_verify=\
@@ -174,7 +175,7 @@
.PHONY: run-precheck
run-precheck: check-pdk check-precheck
- $(eval INPUT_DIRECTORY := $(shell pwd))
+ $(eval INPUT_DIRECTORY := $(shell pwd -P))
cd $(PRECHECK_ROOT) && \
docker run -v $(PRECHECK_ROOT):$(PRECHECK_ROOT) -v $(INPUT_DIRECTORY):$(INPUT_DIRECTORY) -v $(PDK_ROOT):$(PDK_ROOT) -e INPUT_DIRECTORY=$(INPUT_DIRECTORY) -e PDK_ROOT=$(PDK_ROOT) \
-u $(shell id -u $(USER)):$(shell id -g $(USER)) efabless/mpw_precheck:latest bash -c "cd $(PRECHECK_ROOT) ; python3 mpw_precheck.py --input_directory $(INPUT_DIRECTORY) --pdk_root $(PDK_ROOT)"