Skip to content

Commit d3c2704

Browse files
committed
chore: Fix make_single_file to support core-only.
1 parent 0ce46b6 commit d3c2704

File tree

2 files changed

+20
-5
lines changed

2 files changed

+20
-5
lines changed

other/docker/tcc/Dockerfile

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,25 @@ RUN tcc \
3939

4040
COPY other/make_single_file /work/other/
4141
RUN \
42-
other/make_single_file \
42+
other/make_single_file -core \
4343
auto_tests/auto_test_support.c \
4444
auto_tests/send_message_test.c \
4545
testing/misc_tools.c | \
4646
tcc - \
4747
-o send_message_test \
4848
-Wall -Werror \
4949
-bench -g \
50-
$(pkg-config --cflags --libs libsodium opus vpx) \
50+
$(pkg-config --cflags --libs libsodium) \
5151
&& ./send_message_test | grep 'tox clients connected'
52+
53+
RUN \
54+
other/make_single_file \
55+
auto_tests/auto_test_support.c \
56+
auto_tests/toxav_basic_test.c \
57+
testing/misc_tools.c | \
58+
tcc - \
59+
-o toxav_basic_test \
60+
-Wall -Werror \
61+
-bench -g \
62+
$(pkg-config --cflags --libs libsodium opus vpx) \
63+
&& ./toxav_basic_test | grep 'Test successful'

other/make_single_file

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@
66
#
77
# Example:
88
#
9-
# other/make_single_file testing/misc_tools.c auto_tests/send_message_test.c | \
10-
# tcc -o send_message_test - $(pkg-config --cflags --libs libsodium opus vpx)
9+
# other/make_single_file auto_tests/toxav_basic_test.c auto_tests/auto_test_support.c testing/misc_tools.c | \
10+
# tcc -o toxav_basic_test - $(pkg-config --cflags --libs libsodium opus vpx)
11+
#
12+
# other/make_single_file -core auto_tests/send_message_test.c auto_tests/auto_test_support.c testing/misc_tools.c | \
13+
# tcc -o send_message_test - $(pkg-config --cflags --libs libsodium)
1114

1215
use strict;
1316
use warnings;
@@ -44,7 +47,7 @@ sub emit {
4447

4548
if (@ARGV and $ARGV[0] eq "-core") {
4649
shift @ARGV;
47-
for my $fn (<toxcore/*.c>, <third_party/cmp/*.c>) {
50+
for my $fn (<toxcore/*.c>, <toxcore/*/*.c>, <third_party/cmp/*.c>) {
4851
emit(abs_path $fn);
4952
}
5053
} else {

0 commit comments

Comments
 (0)