Commit 9b0aed8c authored by Ben Avison's avatar Ben Avison Committed by ROOL
Browse files

Support links for extension-less files in subdirectories

This only applies to cross-compilation builds. The `make links` rules don't
know a pre-determined list of subdirectories that need to be converted into
filename extensions. Instead, files that should have no filename extension
are usually simply identified by the absence of a `/` in their specification
in `SOURCES_TO_SYMLINK`. However, this is insufficient to handle some rarer
cases, such as a `Makefile` within a `Test` subdirectory.

To handle this, we introduce explicit support for specifying such files in
`SOURCES_TO_SYMLINK`, using a double slash where there would otherwise be a
filetype subdirectory name, such as `Test//Makefile`. (Conveniently, this is
also valid Posix filename syntax anyway.) The way this is achieved is to
tweak the regular expressions to require the directory and leafnames between
slashes to be at least one character long.

Version 7.58. Tagged as 'BuildSys-7_58'
parent 7118b699
...@@ -151,16 +151,16 @@ clean:: ...@@ -151,16 +151,16 @@ clean::
@echo ${COMPONENT}: cleaned @echo ${COMPONENT}: cleaned
else else
ifneq (,${SYMLINK_EXT_FIRST}) ifneq (,${SYMLINK_EXT_FIRST})
SYMLINK_SED_PATTERN = 's,^\([^/]*\)/\(.*\),\2.\1,' SYMLINK_SED_PATTERN = 's,^\([^/]\+\)/\(.\+\),\2.\1,'
else else
SYMLINK_SED_PATTERN = 's,\([^/]*\)/\([^/]*\)$$,\2.\1,' SYMLINK_SED_PATTERN = 's,\([^/]\+\)/\([^/]\+\)$$,\2.\1,'
endif endif
all debug export export_hdrs export_libs gpa_debug install install_rom rom_link links resources rom standalone: ${SYMLINK_DEPEND} all debug export export_hdrs export_libs gpa_debug install install_rom rom_link links resources rom standalone: ${SYMLINK_DEPEND}
$(foreach linksource,${SOURCES_TO_SYMLINK}, \ $(foreach linksource,${SOURCES_TO_SYMLINK}, \
$(shell \ $(shell \
linkdest=`echo ${linksource} | sed -e ${SYMLINK_SED_PATTERN} -e 's,^,objs/,'`; \ linkdest=`echo ${linksource} | sed -e ${SYMLINK_SED_PATTERN} -e 's,^,objs/,'`; \
linkdestdir=`echo $$linkdest | sed -e 's,/[^/]*$$,,'`; \ linkdestdir=`echo $$linkdest | sed -e 's,/[^/]\+$$,,'`; \
linkbackpath=`echo $$linkdestdir | sed -e 's,[^/]*,..,g'`; \ linkbackpath=`echo $$linkdestdir | sed -e 's,[^/]\+,..,g'`; \
[ -d ${linksource} ] || [ -L $$linkdest ] || mkdir -p $$linkdestdir; \ [ -d ${linksource} ] || [ -L $$linkdest ] || mkdir -p $$linkdestdir; \
[ -d ${linksource} ] || [ -L $$linkdest ] || ln -s $$linkbackpath/${linksource} $$linkdest; \ [ -d ${linksource} ] || [ -L $$linkdest ] || ln -s $$linkbackpath/${linksource} $$linkdest; \
) \ ) \
......
...@@ -139,9 +139,9 @@ else ...@@ -139,9 +139,9 @@ else
all install debug resources rom rom_link links: ${SYMLINK_DEPEND} all install debug resources rom rom_link links: ${SYMLINK_DEPEND}
$(foreach linksource,${SOURCES_TO_SYMLINK}, \ $(foreach linksource,${SOURCES_TO_SYMLINK}, \
$(shell \ $(shell \
linkdest=`echo ${linksource} | sed -e 's,\([^/]*\)/\([^/]*\)$$,\2.\1,' -e 's,^,objs/,'`; \ linkdest=`echo ${linksource} | sed -e 's,\([^/]\+\)/\([^/]\+\)$$,\2.\1,' -e 's,^,objs/,'`; \
linkdestdir=`echo $$linkdest | sed -e 's,/[^/]*$$,,'`; \ linkdestdir=`echo $$linkdest | sed -e 's,/[^/]\+$$,,'`; \
linkbackpath=`echo $$linkdestdir | sed -e 's,[^/]*,..,g'`; \ linkbackpath=`echo $$linkdestdir | sed -e 's,[^/]\+,..,g'`; \
[ -d ${linksource} ] || [ -L $$linkdest ] || mkdir -p $$linkdestdir; \ [ -d ${linksource} ] || [ -L $$linkdest ] || mkdir -p $$linkdestdir; \
[ -d ${linksource} ] || [ -L $$linkdest ] || ln -s $$linkbackpath/${linksource} $$linkdest; \ [ -d ${linksource} ] || [ -L $$linkdest ] || ln -s $$linkbackpath/${linksource} $$linkdest; \
) \ ) \
......
...@@ -135,9 +135,9 @@ else ...@@ -135,9 +135,9 @@ else
all_libs export export_hdrs export_libs links: ${SYMLINK_DEPEND} all_libs export export_hdrs export_libs links: ${SYMLINK_DEPEND}
$(foreach linksource,${SOURCES_TO_SYMLINK}, \ $(foreach linksource,${SOURCES_TO_SYMLINK}, \
$(shell \ $(shell \
linkdest=`echo ${linksource} | sed -e 's,\([^/]*\)/\([^/]*\)$$,\2.\1,' -e 's,^,objs/,'`; \ linkdest=`echo ${linksource} | sed -e 's,\([^/]\+\)/\([^/]\+\)$$,\2.\1,' -e 's,^,objs/,'`; \
linkdestdir=`echo $$linkdest | sed -e 's,/[^/]*$$,,'`; \ linkdestdir=`echo $$linkdest | sed -e 's,/[^/]\+$$,,'`; \
linkbackpath=`echo $$linkdestdir | sed -e 's,[^/]*,..,g'`; \ linkbackpath=`echo $$linkdestdir | sed -e 's,[^/]\+,..,g'`; \
[ -d ${linksource} ] || [ -L $$linkdest ] || mkdir -p $$linkdestdir; \ [ -d ${linksource} ] || [ -L $$linkdest ] || mkdir -p $$linkdestdir; \
[ -d ${linksource} ] || [ -L $$linkdest ] || ln -s $$linkbackpath/${linksource} $$linkdest; \ [ -d ${linksource} ] || [ -L $$linkdest ] || ln -s $$linkbackpath/${linksource} $$linkdest; \
) \ ) \
......
...@@ -234,9 +234,9 @@ else ...@@ -234,9 +234,9 @@ else
all export export_hdrs export_libs resources rom rom_link standalone install debug gpa_debug prepro links: ${SYMLINK_DEPEND} all export export_hdrs export_libs resources rom rom_link standalone install debug gpa_debug prepro links: ${SYMLINK_DEPEND}
$(foreach linksource,${SOURCES_TO_SYMLINK}, \ $(foreach linksource,${SOURCES_TO_SYMLINK}, \
$(shell \ $(shell \
linkdest=`echo ${linksource} | sed -e 's,\([^/]*\)/\([^/]*\)$$,\2.\1,' -e 's,^,objs/,'`; \ linkdest=`echo ${linksource} | sed -e 's,\([^/]\+\)/\([^/]\+\)$$,\2.\1,' -e 's,^,objs/,'`; \
linkdestdir=`echo $$linkdest | sed -e 's,/[^/]*$$,,'`; \ linkdestdir=`echo $$linkdest | sed -e 's,/[^/]\+$$,,'`; \
linkbackpath=`echo $$linkdestdir | sed -e 's,[^/]*,..,g'`; \ linkbackpath=`echo $$linkdestdir | sed -e 's,[^/]\+,..,g'`; \
[ -d ${linksource} ] || [ -L $$linkdest ] || mkdir -p $$linkdestdir; \ [ -d ${linksource} ] || [ -L $$linkdest ] || mkdir -p $$linkdestdir; \
[ -d ${linksource} ] || [ -L $$linkdest ] || ln -s $$linkbackpath/${linksource} $$linkdest; \ [ -d ${linksource} ] || [ -L $$linkdest ] || ln -s $$linkbackpath/${linksource} $$linkdest; \
) \ ) \
......
/* (7.57) /* (7.58)
* *
* This file is automatically maintained by srccommit, do not edit manually. * This file is automatically maintained by srccommit, do not edit manually.
* *
*/ */
#define Module_MajorVersion_CMHG 7.57 #define Module_MajorVersion_CMHG 7.58
#define Module_MinorVersion_CMHG #define Module_MinorVersion_CMHG
#define Module_Date_CMHG 19 Apr 2021 #define Module_Date_CMHG 15 May 2021
#define Module_MajorVersion "7.57" #define Module_MajorVersion "7.58"
#define Module_Version 757 #define Module_Version 758
#define Module_MinorVersion "" #define Module_MinorVersion ""
#define Module_Date "19 Apr 2021" #define Module_Date "15 May 2021"
#define Module_ApplicationDate "19-Apr-21" #define Module_ApplicationDate "15-May-21"
#define Module_ComponentName "BuildSys" #define Module_ComponentName "BuildSys"
#define Module_FullVersion "7.57" #define Module_FullVersion "7.58"
#define Module_HelpVersion "7.57 (19 Apr 2021)" #define Module_HelpVersion "7.58 (15 May 2021)"
#define Module_LibraryVersionInfo "7:57" #define Module_LibraryVersionInfo "7:58"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment