Can this be replaced with the ?= operator instead so that we can override it from our own Makefile?
Also in this line I think it would be better in any case to amend the find command with the filetype so that we are not just searching for any symlinks but rather only XML files, e.g.
SYM_LNK_XMLS?= $(shell find ./src -type l -iname "*.xml")
the relative path does not play well for me when calling the script from a different Makefile
what I am doing right now that seems to work for both the Hog workflow and the CM_KINTEX_FW is to pass the absolute path of the regmap tool to the XML2VHD_PATH variable so that
in the CM_KINTEX_FW makefile I change the XML2VHD_PATH to
XML2VHD_PATH=$(shell pwd)/regmap_helper
ifneq ("$(wildcard $(XML2VHD_PATH)/xml_regmap.mk)","")
include $(XML2VHD_PATH)/xml_regmap.mk
endif
Change the call to generate_test_xml and so on in xml_regmap.mk to use this new absolute path
In the regmap folder I added very simple a standalone makefile
#################################################################################
# Generate MAP and PKG files from address table
#################################################################################
export LD_LIBRARY_PATH=/opt/cactus/lib
XML2VHD_PATH?=$(shell pwd)
SYM_LNK_XMLS?= $(shell find ../ -type l -name "*.xml")
include xml_regmap.mk
.DEFAULT_GOAL := xml_regmap
clean: clean_regmap
With these changes I can run the XML regmap tool either by simply calling make from the regmap folder (new feature), or by calling make xml_regmap from the root of the project (current behavior).
This gives the flexibility for something like Hog which does not have a central makefile to just execute from Tcl
In xml_regmap.mk there are some hardcoded paths that conflict with the file structure used by L0MDT.
First, in: https://github.com/BU-Tools/uHAL_AXI_regmap/blob/e1161cef400a03706e261af5ae21ca8d2e24ec63/xml_regmap.mk#L8
Can this be replaced with the ?= operator instead so that we can override it from our own Makefile?
Also in this line I think it would be better in any case to amend the find command with the filetype so that we are not just searching for any symlinks but rather only XML files, e.g.
Second, in: https://github.com/BU-Tools/uHAL_AXI_regmap/blob/e1161cef400a03706e261af5ae21ca8d2e24ec63/xml_regmap.mk#L20-L23
the relative path does not play well for me when calling the script from a different Makefile
what I am doing right now that seems to work for both the Hog workflow and the CM_KINTEX_FW is to pass the absolute path of the regmap tool to the XML2VHD_PATH variable so that
With these changes I can run the XML regmap tool either by simply calling
make
from the regmap folder (new feature), or by callingmake xml_regmap
from the root of the project (current behavior).This gives the flexibility for something like Hog which does not have a central makefile to just execute from Tcl