OCPI_HDL_PLATFORM_PATH trailing /

Description

In working with platform libraries external from a "base" repo for which one is building, there have been issues with needing/not needing a trailing forward slash in the HDL_PLATFORM_PATH. The culprit is GNU make's 'notdir' function which strips a string containing a directory path of everything behind the last "/" - and if "/" is the last thing in the string, it unfortunately returns an empty string (see https://www.gnu.org/software/make/manual/html_node/File-Name-Functions.html). This 'notdir' function occurs multiple times in OpenCPI's Makefiles.

In my opinion, any environment variable that ever has a chance of getting passed through a "notdir" function in Makefiles should be preprocessed to have any trailing forward slashes stripped. That or we should avoid 'notdir' altogether, which I'm not sure if that is possible.

Environment

git commit 1a53d7c5580c3df3a383245e1c080aa2914602cc on https://github.com/opencpi/opencpi.git, using RHEL6

Activity

Show:
James Kulp
April 12, 2017, 11:37 AM

Trailing slashes are never necessary.
notdir is what it is, and the build engine code deals with it, but perhaps not everywhere.
This is not really bug report. If there is a case that fails please resubmit.

Assignee

Unassigned

Reporter

Davis Hoover

Labels

None

Components

Priority

Minor
Configure