mirror of
https://github.com/facebook/zstd.git
synced 2025-08-05 19:15:58 +03:00
Yay It Works, Clean Up Logging A Bit
This commit is contained in:
@@ -83,12 +83,12 @@ resolve_include() {
|
|||||||
# Try to reduce the file path into a canonical form (so that multiple)
|
# Try to reduce the file path into a canonical form (so that multiple)
|
||||||
# includes of the same file are successfully deduplicated, even if they
|
# includes of the same file are successfully deduplicated, even if they
|
||||||
# are expressed differently.
|
# are expressed differently.
|
||||||
local relpath="$(realpath --relative-to . "$root/$inc")"
|
local relpath="$(realpath --relative-to . "$root/$inc" 2>/dev/null)"
|
||||||
if [ "$relpath" != "" ]; then # not all realpaths support --relative-to
|
if [ "$relpath" != "" ]; then # not all realpaths support --relative-to
|
||||||
echo "$relpath"
|
echo "$relpath"
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
local relpath="$(realpath "$root/$inc")"
|
local relpath="$(realpath "$root/$inc" 2>/dev/null)"
|
||||||
if [ "$relpath" != "" ]; then # not all distros have realpath...
|
if [ "$relpath" != "" ]; then # not all distros have realpath...
|
||||||
echo "$relpath"
|
echo "$relpath"
|
||||||
return 0
|
return 0
|
||||||
@@ -125,7 +125,7 @@ add_file() {
|
|||||||
if list_has_item "$XINCS" "$inc"; then
|
if list_has_item "$XINCS" "$inc"; then
|
||||||
# The file was excluded so error if the source attempts to use it
|
# The file was excluded so error if the source attempts to use it
|
||||||
write_line "#error Using excluded file: $inc"
|
write_line "#error Using excluded file: $inc"
|
||||||
log_line "Excluding: $res_inc ($inc)"
|
log_line "Excluding: $inc"
|
||||||
else
|
else
|
||||||
if ! list_has_item "$FOUND" "$res_inc"; then
|
if ! list_has_item "$FOUND" "$res_inc"; then
|
||||||
# The file was not previously encountered
|
# The file was not previously encountered
|
||||||
@@ -134,7 +134,7 @@ add_file() {
|
|||||||
# But the include was flagged to keep as included
|
# But the include was flagged to keep as included
|
||||||
write_line "/**** *NOT* inlining $inc ****/"
|
write_line "/**** *NOT* inlining $inc ****/"
|
||||||
write_line "$line"
|
write_line "$line"
|
||||||
log_line "Not Inlining: $res_inc ($inc)"
|
log_line "Not Inlining: $inc"
|
||||||
else
|
else
|
||||||
# The file was neither excluded nor seen before so inline it
|
# The file was neither excluded nor seen before so inline it
|
||||||
write_line "/**** start inlining $inc ****/"
|
write_line "/**** start inlining $inc ****/"
|
||||||
@@ -143,7 +143,6 @@ add_file() {
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
write_line "/**** skipping file: $inc ****/"
|
write_line "/**** skipping file: $inc ****/"
|
||||||
log_line "Skipping: $res_inc ($inc)"
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user