diff --git a/tools/extract-debug-symbols.sh b/tools/extract-debug-symbols.sh index 92507e7b62c..f4bf1febe90 100755 --- a/tools/extract-debug-symbols.sh +++ b/tools/extract-debug-symbols.sh @@ -13,26 +13,35 @@ STRIP="${STRIP:-strip}" function extract_linux_or_android { -for input in $@ ; do - output="${input}${suffix}" +for input in "$@" ; do + output="${input}${suffix}" + + # The --preserve-dates flag for strip and objcopy only has whole + # second resolution, so save the timestamps in a separate file + # instead. + touch -m -r "$input" "$input.timestamps" # Extract a copy of the debugging information $OBJCOPY --only-keep-debug "$input" "$output" # Because we export symbols from the engine, only debug symbols # should be stripped. - $STRIP -x --preserve-dates --strip-debug "$input" + $STRIP -x --strip-debug "$input" # Add a hint for the debugger so it can find the debug info - $OBJCOPY --preserve-dates --remove-section=.gnu_debuglink "$input" - $OBJCOPY --preserve-dates --add-gnu-debuglink="$output" "$input" + $OBJCOPY --remove-section=.gnu_debuglink "$input" + $OBJCOPY --add-gnu-debuglink="$output" "$input" + + # Restore the original modification time + touch -m -r "$input.timestamps" "$input" + rm "$input.timestamps" 2>&1 done } function extract_emscripten { -for input in $@ ; do +for input in "$@" ; do touch "${input}${suffix}" done @@ -40,7 +49,7 @@ done function extract_mac_or_ios { -for input in $@ ; do +for input in "$@" ; do output="${input}${suffix}" # If this is an app bundle, find the executable name diff --git a/util/build-extensions.sh b/util/build-extensions.sh index 583d33abd54..55c072b40fb 100755 --- a/util/build-extensions.sh +++ b/util/build-extensions.sh @@ -44,9 +44,5 @@ build_order=$(${lc_compile} --modulepath ${module_dir} --deps changed-order -- $ # Loop over the extensions that need to be (re-)built for ext in ${build_order} ; do - # Create the output directory - mkdir -p "${destination_dir}"/com.livecode.extensions.livecode.$(basename -s .lcb "${ext}") - - # Build this extension build_widget $(dirname "${ext}") "${destination_dir}" "${module_dir}" "${lc_compile}" done