forked from Telodendria/Telodendria
Fix log output by changing __FILE__
This commit is contained in:
parent
ea1828e95e
commit
7cd9fe8bd7
2 changed files with 14 additions and 8 deletions
|
@ -1,4 +1,4 @@
|
||||||
.Dd $Mdocdate: December 28 2022 $
|
.Dd $Mdocdate: January 6 2023 $
|
||||||
.Dt TELODENDRIA-CHANGELOG 7
|
.Dt TELODENDRIA-CHANGELOG 7
|
||||||
.Os Telodendria Project
|
.Os Telodendria Project
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
|
@ -104,6 +104,9 @@ database that contains cached objects.
|
||||||
.It
|
.It
|
||||||
Fixed a memory leak that would occur when deleting database
|
Fixed a memory leak that would occur when deleting database
|
||||||
objects.
|
objects.
|
||||||
|
.It
|
||||||
|
Fixed a few non-fatal memory warnings that would show up
|
||||||
|
as a result of passing a constant string into certain APIs.
|
||||||
.El
|
.El
|
||||||
.Pp
|
.Pp
|
||||||
Misc:
|
Misc:
|
||||||
|
@ -121,6 +124,9 @@ files. This makes it easier to release
|
||||||
versions.
|
versions.
|
||||||
.It
|
.It
|
||||||
Fix whitespace issues in various shell scripts.
|
Fix whitespace issues in various shell scripts.
|
||||||
|
.It
|
||||||
|
Fixed the debug log output so that it only shows the file name,
|
||||||
|
not the entire file path in the repository.
|
||||||
.El
|
.El
|
||||||
.Sh v0.1.0
|
.Sh v0.1.0
|
||||||
.Pp
|
.Pp
|
||||||
|
|
14
tools/bin/td
14
tools/bin/td
|
@ -23,7 +23,6 @@
|
||||||
: "${CVS_TAG:=Telodendria-$(echo $TELODENDRIA_VERSION | sed 's/\./_/g')}"
|
: "${CVS_TAG:=Telodendria-$(echo $TELODENDRIA_VERSION | sed 's/\./_/g')}"
|
||||||
|
|
||||||
: "${DEFINES:=-D_DEFAULT_SOURCE -DTELODENDRIA_VERSION=\"$TELODENDRIA_VERSION\"}"
|
: "${DEFINES:=-D_DEFAULT_SOURCE -DTELODENDRIA_VERSION=\"$TELODENDRIA_VERSION\"}"
|
||||||
: "${INCLUDES:=-Isrc/include}"
|
|
||||||
|
|
||||||
: "${CC:=cc}"
|
: "${CC:=cc}"
|
||||||
: "${CFLAGS:=-Wall -Wextra -pedantic -ansi -O3}"
|
: "${CFLAGS:=-Wall -Wextra -pedantic -ansi -O3}"
|
||||||
|
@ -84,28 +83,29 @@ setsubst() {
|
||||||
# Build the source code, and generate the 'build/telodendria'
|
# Build the source code, and generate the 'build/telodendria'
|
||||||
# binary.
|
# binary.
|
||||||
recipe_build() {
|
recipe_build() {
|
||||||
mkdir -p build
|
cd src
|
||||||
|
mkdir -p ../build
|
||||||
|
|
||||||
do_rebuild=0
|
do_rebuild=0
|
||||||
objs=""
|
objs=""
|
||||||
for src in $(find src -name '*.c'); do
|
for src in $(find . -name '*.c' | cut -d '/' -f 2-); do
|
||||||
obj=$(echo "$src" | sed -e 's/^src/build/' -e 's/\.c$/\.o/')
|
obj=$(echo "../build/$src" | sed -e 's/\.c$/\.o/')
|
||||||
objs="$objs $obj"
|
objs="$objs $obj"
|
||||||
|
|
||||||
if [ $(mod_time "$src") -ge $(mod_time "$obj") ]; then
|
if [ $(mod_time "$src") -ge $(mod_time "$obj") ]; then
|
||||||
echo "CC $(basename $obj)"
|
echo "CC $(basename $obj)"
|
||||||
obj_dir=$(dirname "$obj")
|
obj_dir=$(dirname "$obj")
|
||||||
mkdir -p "$obj_dir"
|
mkdir -p "$obj_dir"
|
||||||
if ! $CC $CFLAGS -c -o "$obj" "$src"; then
|
if ! $CC $CFLAGS -Iinclude -c -o "$obj" "$src"; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
do_rebuild=1
|
do_rebuild=1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ $do_rebuild -eq 1 ] || [ ! -f "build/$PROG" ]; then
|
if [ $do_rebuild -eq 1 ] || [ ! -f "../build/$PROG" ]; then
|
||||||
echo "LD $PROG"
|
echo "LD $PROG"
|
||||||
$CC $LDFLAGS -o "build/$PROG" $objs
|
$CC $LDFLAGS -o "../build/$PROG" $objs
|
||||||
else
|
else
|
||||||
echo "Up to date."
|
echo "Up to date."
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue