Skip to content

Commit eac4a73

Browse files
ranj063lgirdwood
authored andcommitted
scripts: use project root directory instead of relative path
Use the SOF project root directory in get_abi.sh to read the ABI macros instead of using the relative path. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
1 parent ad0ff1f commit eac4a73

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

tools/topology/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ file(GLOB TPLG_DEPS
77
)
88

99
add_custom_target(abi
10-
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/get_abi.sh
10+
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/get_abi.sh ${SOF_ROOT_SOURCE_DIRECTORY}
1111
DEPENDS ${TPLG_DEPS}
1212
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
1313
VERBATIM

tools/topology/get_abi.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
MAJOR=`grep '#define SOF_ABI_MAJOR ' ../../../src/include/uapi/abi.h | grep -E ".[[:digit:]]$" -o`
2-
MINOR=`grep '#define SOF_ABI_MINOR ' ../../../src/include/uapi/abi.h | grep -E ".[[:digit:]]$" -o`
3-
PATCH=`grep '#define SOF_ABI_PATCH ' ../../../src/include/uapi/abi.h | grep -E ".[[:digit:]]$" -o`
1+
MAJOR=`grep '#define SOF_ABI_MAJOR ' $1/src/include/uapi/abi.h | grep -E ".[[:digit:]]$" -o`
2+
MINOR=`grep '#define SOF_ABI_MINOR ' $1/src/include/uapi/abi.h | grep -E ".[[:digit:]]$" -o`
3+
PATCH=`grep '#define SOF_ABI_PATCH ' $1/src/include/uapi/abi.h | grep -E ".[[:digit:]]$" -o`
44
printf "define(\`SOF_ABI_MAJOR', \`0x%02x')\n" $MAJOR > abi.h
55
printf "define(\`SOF_ABI_MINOR', \`0x%02x')\n" $MINOR >> abi.h
66
printf "define(\`SOF_ABI_PATCH', \`0x%02x')\n" $PATCH >> abi.h

0 commit comments

Comments
 (0)