chore: Fix make_single_file to support core-only.

This commit is contained in:
iphydf 2023-12-19 20:19:02 +00:00
parent 0ce46b644e
commit d3c2704fa9
No known key found for this signature in database
GPG Key ID: 3855DBA2D74403C9
2 changed files with 20 additions and 5 deletions

View File

@ -39,7 +39,7 @@ RUN tcc \
COPY other/make_single_file /work/other/ COPY other/make_single_file /work/other/
RUN \ RUN \
other/make_single_file \ other/make_single_file -core \
auto_tests/auto_test_support.c \ auto_tests/auto_test_support.c \
auto_tests/send_message_test.c \ auto_tests/send_message_test.c \
testing/misc_tools.c | \ testing/misc_tools.c | \
@ -47,5 +47,17 @@ RUN \
-o send_message_test \ -o send_message_test \
-Wall -Werror \ -Wall -Werror \
-bench -g \ -bench -g \
$(pkg-config --cflags --libs libsodium opus vpx) \ $(pkg-config --cflags --libs libsodium) \
&& ./send_message_test | grep 'tox clients connected' && ./send_message_test | grep 'tox clients connected'
RUN \
other/make_single_file \
auto_tests/auto_test_support.c \
auto_tests/toxav_basic_test.c \
testing/misc_tools.c | \
tcc - \
-o toxav_basic_test \
-Wall -Werror \
-bench -g \
$(pkg-config --cflags --libs libsodium opus vpx) \
&& ./toxav_basic_test | grep 'Test successful'

View File

@ -6,8 +6,11 @@
# #
# Example: # Example:
# #
# other/make_single_file testing/misc_tools.c auto_tests/send_message_test.c | \ # other/make_single_file auto_tests/toxav_basic_test.c auto_tests/auto_test_support.c testing/misc_tools.c | \
# tcc -o send_message_test - $(pkg-config --cflags --libs libsodium opus vpx) # tcc -o toxav_basic_test - $(pkg-config --cflags --libs libsodium opus vpx)
#
# other/make_single_file -core auto_tests/send_message_test.c auto_tests/auto_test_support.c testing/misc_tools.c | \
# tcc -o send_message_test - $(pkg-config --cflags --libs libsodium)
use strict; use strict;
use warnings; use warnings;
@ -44,7 +47,7 @@ sub emit {
if (@ARGV and $ARGV[0] eq "-core") { if (@ARGV and $ARGV[0] eq "-core") {
shift @ARGV; shift @ARGV;
for my $fn (<toxcore/*.c>, <third_party/cmp/*.c>) { for my $fn (<toxcore/*.c>, <toxcore/*/*.c>, <third_party/cmp/*.c>) {
emit(abs_path $fn); emit(abs_path $fn);
} }
} else { } else {