diff options
-rw-r--r-- | Mk/Scripts/check-stagedir.sh | 6 | ||||
-rw-r--r-- | Mk/Scripts/generate-symbols.sh | 9 |
2 files changed, 12 insertions, 3 deletions
diff --git a/Mk/Scripts/check-stagedir.sh b/Mk/Scripts/check-stagedir.sh index 9037df598e6b..231affabe58a 100644 --- a/Mk/Scripts/check-stagedir.sh +++ b/Mk/Scripts/check-stagedir.sh @@ -98,13 +98,15 @@ setup_plist_seds() { \#${LOCALBASE}/lib/debug#d;" sed_dirs_gen="s,^,@dir ,; \ ${sed_portdocsexamples} \ - /^@dir share\/licenses/d;" + /^@dir share\/licenses/d; \ + \#@dir ${LOCALBASE}/lib/debug#d;" # These prevent ignoring DOCS/EXAMPLES dirs with sed_portdocsexamples sed_files="/^share\/licenses/d; \ \#${LOCALBASE}/lib/debug#d;" sed_dirs="s,^,@dir ,; \ - /^@dir share\/licenses/d;" + /^@dir share\/licenses/d; \ + \#@dir ${LOCALBASE}/lib/debug#d;" } diff --git a/Mk/Scripts/generate-symbols.sh b/Mk/Scripts/generate-symbols.sh index 4e1633fcca51..4ebb8c87de24 100644 --- a/Mk/Scripts/generate-symbols.sh +++ b/Mk/Scripts/generate-symbols.sh @@ -6,7 +6,7 @@ # the symbols to LOCALBASE/lib/debug/<original path>. # For example: # /var/qmail/bin/qmaild -> /usr/local/lib/debug/var/qmail/bin/qmaild.debug -# /usr/local/bin/ssh -> /usr/local/lib/debug/usr/local/bin/ssh +# /usr/local/bin/ssh -> /usr/local/lib/debug/usr/local/bin/ssh.debug LIB_DIR_PREFIX="${LOCALBASE}/lib/debug" msg() { @@ -43,4 +43,11 @@ while read -r staged_elf_file; do echo "${debug_file_name#${STAGEDIR}}" >&3 done < ${ELF_FILES} 3>> ${TMPPLIST} +# Need @dir entries if PREFIX != LOCALBASE +if [ "${PREFIX}" != "${LOCALBASE}" ] && [ -d "${lib_dir}" ]; then + find -sd "${lib_dir}" -type d | sed -e "s,^${STAGEDIR},," \ + -e 's,^,@dir ,' \ + >> ${TMPPLIST} +fi + rm -f ${ELF_FILES} |