Skip to content
Snippets Groups Projects
Commit 6ddf26c8 authored by Andreas Fritiofson's avatar Andreas Fritiofson Committed by Paul Fertser
Browse files

Search for scripts relative to the executable on all(?) platforms

Add a helper to hide the platform-dependent method to get a
canonical, absolute, /-separated path to the executable.

Use this and the relative path from BINDIR to PKGDATADIR to
construct a search path that finds the scripts even if the
installation dir is moved, as long as the structure below $prefix
is maintained.

This method should fully support all the tricks you can to with
autotools to customize the installed layout such as overriding the
default directories at configure-time and overriding the configured
directories at build-time.

The exe path detection methods are combined from
http://openocd.zylin.com/3388 by Rick Foos and
http://openocd.zylin.com/3537

 by Steven Stallion, as well as tips
found all over internet.

Change-Id: Ifc9cc9dd0bf52fbd67b1b0f2383318cda0c422c4
Signed-off-by: default avatarAndreas Fritiofson <andreas.fritiofson@gmail.com>
Signed-off-by: default avatarSteven Stallion <sstallion@gmail.com>
Reviewed-on: http://openocd.zylin.com/3889


Tested-by: jenkins
Reviewed-by: default avatarRick Foos <rfoos@solengtech.com>
Reviewed-by: default avatarPaul Fertser <fercerpav@gmail.com>
parent 56d163ce
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment