Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a-f: Use language-specific heredoc delimiters for C code #195127

Merged
merged 93 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
93da4ba
aarch64-elf-gcc: Use language-specific heredoc delimiters
issyl0 Oct 19, 2024
9f5e4d6
acl: Use language-specific heredoc delimiters
issyl0 Oct 19, 2024
63727e6
airspy: Use language-specific heredoc delimiters
issyl0 Oct 19, 2024
c64a715
airspyhf: Use language-specific heredoc delimiters
issyl0 Oct 19, 2024
401935f
alsa-lib: Use language-specific heredoc delimiters
issyl0 Oct 19, 2024
e8747b3
appstream-glib: Use language-specific heredoc delimiters
issyl0 Oct 19, 2024
d09fd46
appstream: Use language-specific heredoc delimiters
issyl0 Oct 19, 2024
acb0c9d
apr: Use language-specific heredoc delimiters
issyl0 Oct 19, 2024
9aae5e8
arb: Use language-specific heredoc delimiters
issyl0 Oct 19, 2024
3128762
argp-standalone: Use language-specific heredoc delimiters
issyl0 Oct 19, 2024
fd3b0ca
argtable: Use language-specific heredoc delimiters
issyl0 Oct 19, 2024
8cad34a
argtable3: Use language-specific heredoc delimiters
issyl0 Oct 19, 2024
61ffc99
aribb24: Use language-specific heredoc delimiters
issyl0 Oct 19, 2024
7d22761
arm-none-eabi-gcc: Use language-specific heredoc delimiters
issyl0 Oct 19, 2024
c22e13d
at-spi2-core: Use language-specific heredoc delimiters
issyl0 Oct 19, 2024
89f8ea9
automake: Use language-specific heredoc delimiters
issyl0 Oct 19, 2024
0d6f59f
avahi: Use language-specific heredoc delimiters
issyl0 Oct 19, 2024
34edc6f
babl: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
89e99b8
bam: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
6c74cb6
bdw-gc: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
c19fe0e
bear: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
9ac5a1a
beecrypt: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
65695f8
bgpstream: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
76ffa66
bic: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
1d372af
bingrep: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
2fd586b
blake3: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
d366eea
blis: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
6ac2fb2
c-ares: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
bb6a8e1
cahute: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
9289b19
cairo: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
c81e618
calceph: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
e7fba22
canfigger: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
cca5ed9
capstone: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
d19a336
cassandra-cpp-driver: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
adffe36
cbmc: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
4450b40
cffi: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
9dd7848
cflow: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
8b93e6e
cgif: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
74e1611
cglm: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
0386ba7
cgns: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
56cbaee
cheapglk: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
9d969f1
chipmunk: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
ef024eb
chmlib: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
fa923a0
cjson: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
349efdd
clang-format: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
add1c58
clang-format@11: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
1156011
clang-format@8: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
8d95003
clangql: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
dc3b07c
cloc: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
639d021
cloudflare-quiche: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
062c627
cminpack: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
47c415d
cmocka: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
70b4d2d
cnats: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
645d9bb
compiledb: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
f7d1227
concurrencykit: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
afbc512
confuse: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
632d1b6
cppp: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
e78cb6c
creduce: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
213530e
criterion: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
0c9e825
croaring: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
a2c4453
cscope: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
e5b6303
csfml: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
60c50b9
ctags: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
075eab0
cubeb: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
f0c207f
cunit: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
488e7a9
cxgo: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
828ce94
czmq: Use language-specific heredoc delimiters
issyl0 Oct 20, 2024
ae92537
daq: Use language-specific heredoc delimiters
issyl0 Oct 21, 2024
e410c0e
datatype99: Use language-specific heredoc delimiters
issyl0 Oct 21, 2024
b6e6ca4
debugbreak: Use language-specific heredoc delimiters
issyl0 Oct 21, 2024
8c5c70d
deheader: Use language-specific heredoc delimiters
issyl0 Oct 21, 2024
b34f7d5
device-mapper: Use language-specific heredoc delimiters
issyl0 Oct 21, 2024
3ee5381
dpp: Use language-specific heredoc delimiters
issyl0 Oct 21, 2024
0a4cb94
dwarf: Use language-specific heredoc delimiters
issyl0 Oct 21, 2024
18aa299
dwarfutils: Use language-specific heredoc delimiters
issyl0 Oct 21, 2024
a214c29
ejdb: Use language-specific heredoc delimiters
issyl0 Oct 21, 2024
9087be8
embree: Use language-specific heredoc delimiters
issyl0 Oct 21, 2024
8545241
emscripten: Use language-specific heredoc delimiters
issyl0 Oct 21, 2024
718af82
enet: Use language-specific heredoc delimiters
issyl0 Oct 21, 2024
b0204fd
enzyme: Use language-specific heredoc delimiters
issyl0 Oct 21, 2024
4272578
epoll-shim: Use language-specific heredoc delimiters
issyl0 Oct 21, 2024
b328786
expat: Use language-specific heredoc delimiters
issyl0 Oct 21, 2024
f18bdd1
fann: Use language-specific heredoc delimiters
issyl0 Oct 21, 2024
bdfb2c1
faudio: Use language-specific heredoc delimiters
issyl0 Oct 21, 2024
6851db0
fcgi: Use language-specific heredoc delimiters
issyl0 Oct 21, 2024
4cd492d
fftw: Use language-specific heredoc delimiters
issyl0 Oct 21, 2024
2e41236
flawfinder: Use language-specific heredoc delimiters
issyl0 Oct 21, 2024
97a0fd7
flexiblas: Use language-specific heredoc delimiters
issyl0 Oct 21, 2024
f57ce9a
freeimage: Use language-specific heredoc delimiters
issyl0 Oct 21, 2024
aae1bc2
freexl: Use language-specific heredoc delimiters
issyl0 Oct 21, 2024
822badc
frei0r: Use language-specific heredoc delimiters
issyl0 Oct 21, 2024
98afbde
ftgl: Use language-specific heredoc delimiters
issyl0 Oct 21, 2024
f6f2529
fwupd: Use language-specific heredoc delimiters
issyl0 Oct 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Formula/a/aarch64-elf-gcc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ def install
end

test do
(testpath/"test-c.c").write <<~EOS
(testpath/"test-c.c").write <<~C
int main(void)
{
int i=0;
while(i<10) i++;
return i;
}
EOS
C
system bin/"aarch64-elf-gcc", "-c", "-o", "test-c.o", "test-c.c"
assert_match "file format elf64-littleaarch64",
shell_output("#{Formula["aarch64-elf-binutils"].bin}/aarch64-elf-objdump -a test-c.o")
Expand Down
4 changes: 2 additions & 2 deletions Formula/a/acl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def install
other::r-x
EOS

(testpath/"test.c").write <<~EOS
(testpath/"test.c").write <<~C
#include <stdio.h>
#include <sys/acl.h>

Expand All @@ -64,7 +64,7 @@ def install
acl_free(acl_text);
return 0;
}
EOS
C
system ENV.cc, "test.c", "-o", "test", "-I#{include}", "-L#{lib}", "-lacl"
assert_equal <<~EOS, shell_output("./test").chomp
user::rwx
Expand Down
4 changes: 2 additions & 2 deletions Formula/a/airspy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def install
end

test do
(testpath/"test.c").write <<~EOS
(testpath/"test.c").write <<~C
#include <stdio.h>
#include <libairspy/airspy.h>

Expand All @@ -47,7 +47,7 @@ def install

return 0;
}
EOS
C

system ENV.cc, "test.c", "-L#{lib}", "-lairspy", "-o", "test"
assert_match version.to_s, shell_output("./test")
Expand Down
4 changes: 2 additions & 2 deletions Formula/a/airspyhf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def install
end

test do
(testpath/"test.c").write <<~EOS
(testpath/"test.c").write <<~C
#include <libairspyhf/airspyhf.h>

int main() {
Expand All @@ -51,7 +51,7 @@ def install

return 1;
}
EOS
C

system ENV.cc, "test.c", "-o", "test", "-I#{include}", "-L#{lib}", "-lairspyhf", "-lm"
system "./test"
Expand Down
4 changes: 2 additions & 2 deletions Formula/a/alsa-lib.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ def install
end

test do
(testpath/"test.c").write <<~EOS
(testpath/"test.c").write <<~C
#include <alsa/asoundlib.h>
int main(void)
{
snd_ctl_card_info_t *info;
snd_ctl_card_info_alloca(&info);
return 0;
}
EOS
C
system ENV.cc, "test.c", "-L#{lib}", "-lasound", "-o", "test"
system "./test"
end
Expand Down
4 changes: 2 additions & 2 deletions Formula/a/appstream-glib.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ def install
end

test do
(testpath/"test.c").write <<~EOS
(testpath/"test.c").write <<~C
#include <appstream-glib.h>

int main(int argc, char *argv[]) {
AsScreenshot *screen_shot = as_screenshot_new();
g_assert_nonnull(screen_shot);
return 0;
}
EOS
C
gdk_pixbuf = Formula["gdk-pixbuf"]
gettext = Formula["gettext"]
glib = Formula["glib"]
Expand Down
4 changes: 2 additions & 2 deletions Formula/a/appstream.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def install
<name>Test App</name>
</component>
EOS
(testpath/"test.c").write <<~EOS
(testpath/"test.c").write <<~C
#include "appstream.h"

int main(int argc, char *argv[]) {
Expand All @@ -95,7 +95,7 @@ def install
g_clear_error (&error);
}
}
EOS
C
flags = shell_output("pkg-config --cflags --libs appstream").strip.split
system ENV.cc, "test.c", "-o", "test", *flags
system "./test"
Expand Down
4 changes: 2 additions & 2 deletions Formula/a/apr.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ def install

test do
assert_match opt_prefix.to_s, shell_output("#{bin}/apr-#{version.major}-config --prefix")
(testpath/"test.c").write <<~EOS
(testpath/"test.c").write <<~C
#include <stdio.h>
#include <apr-#{version.major}/apr_version.h>
int main() {
printf("%s", apr_version_string());
return 0;
}
EOS
C
system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lapr-#{version.major}", "-o", "test"
assert_equal version.to_s, shell_output("./test")
end
Expand Down
4 changes: 2 additions & 2 deletions Formula/a/arb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def install
end

test do
(testpath/"test.c").write <<~EOS
(testpath/"test.c").write <<~C
#include <arb.h>

int main()
Expand All @@ -58,7 +58,7 @@ def install
arb_clear(x); arb_clear(y);
flint_cleanup();
}
EOS
C

system ENV.cc, "test.c", "-I#{include}", "-I#{Formula["flint"].opt_include}",
"-L#{lib}", "-L#{Formula["flint"].opt_lib}",
Expand Down
4 changes: 2 additions & 2 deletions Formula/a/argp-standalone.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ def install
end

test do
(testpath/"test.c").write <<~EOS
(testpath/"test.c").write <<~C
#include <stdio.h>
#include <argp.h>

int main(int argc, char ** argv)
{
return argp_parse(0, argc, argv, 0, 0, 0);
}
EOS
C
system ENV.cc, "test.c", "-L#{lib}", "-largp", "-o", "test"
system "./test"
end
Expand Down
4 changes: 2 additions & 2 deletions Formula/a/argtable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def install
end

test do
(testpath/"test.c").write <<~EOS
(testpath/"test.c").write <<~C
#include "argtable2.h"
#include <assert.h>
#include <stdio.h>
Expand All @@ -57,7 +57,7 @@ def install
puts ("Invalid option");
}
}
EOS
C
system ENV.cc, "test.c", "-L#{lib}", "-I#{include}", "-largtable2",
"-o", "test"
assert_match "Received option", shell_output("./test -a")
Expand Down
4 changes: 2 additions & 2 deletions Formula/a/argtable3.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def install
end

test do
(testpath/"test.c").write <<~EOS
(testpath/"test.c").write <<~C
#include "argtable3.h"
#include <assert.h>
#include <stdio.h>
Expand All @@ -50,7 +50,7 @@ def install
puts ("Invalid option");
}
}
EOS
C

system ENV.cc, "test.c", "-L#{lib}", "-I#{include}", "-largtable3",
"-o", "test"
Expand Down
4 changes: 2 additions & 2 deletions Formula/a/aribb24.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def install
end

test do
(testpath/"test.c").write <<~EOS
(testpath/"test.c").write <<~C
#include <aribb24/aribb24.h>
#include <stdlib.h>
int main() {
Expand All @@ -42,7 +42,7 @@ def install
arib_instance_destroy(ptr);
return 0;
}
EOS
C
system ENV.cc, "-o", "test", "test.c", "-I#{include}",
"-L#{lib}", "-laribb24"
system "./test"
Expand Down
4 changes: 2 additions & 2 deletions Formula/a/arm-none-eabi-gcc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ def install
end

test do
(testpath/"test-c.c").write <<~EOS
(testpath/"test-c.c").write <<~C
int main(void)
{
int i=0;
while(i<10) i++;
return i;
}
EOS
C
system bin/"arm-none-eabi-gcc", "-c", "-o", "test-c.o", "test-c.c"
assert_match "file format elf32-littlearm",
shell_output("#{Formula["arm-none-eabi-binutils"].bin}/arm-none-eabi-objdump -a test-c.o")
Expand Down
4 changes: 2 additions & 2 deletions Formula/a/at-spi2-core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def install
end

test do
(testpath/"test.c").write <<~EOS
(testpath/"test.c").write <<~C
/*
* List the applications registered on at-spi.
*/
Expand Down Expand Up @@ -70,7 +70,7 @@ def install

return 1;
}
EOS
C

pkg_config_cflags = shell_output("pkg-config --cflags --libs atspi-2").chomp.split
system ENV.cc, "test.c", *pkg_config_cflags, "-lgobject-2.0", "-o", "test"
Expand Down
4 changes: 2 additions & 2 deletions Formula/a/automake.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ def install
end

test do
(testpath/"test.c").write <<~EOS
(testpath/"test.c").write <<~C
int main() { return 0; }
EOS
C
(testpath/"configure.ac").write <<~EOS
AC_INIT(test, 1.0)
AM_INIT_AUTOMAKE
Expand Down
4 changes: 2 additions & 2 deletions Formula/a/avahi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def install
end

test do
(testpath/"test.c").write <<~EOS
(testpath/"test.c").write <<~C
#include <glib.h>

#include <avahi-client/client.h>
Expand Down Expand Up @@ -97,7 +97,7 @@ def install

return 0;
}
EOS
C

pkg_config_flags = shell_output("pkg-config --cflags --libs avahi-client avahi-core avahi-glib").chomp.split
system ENV.cc, "test.c", *pkg_config_flags, "-o", "test"
Expand Down
4 changes: 2 additions & 2 deletions Formula/b/babl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def install
end

test do
(testpath/"test.c").write <<~EOS
(testpath/"test.c").write <<~C
#include <babl/babl.h>
int main() {
babl_init();
Expand All @@ -49,7 +49,7 @@ def install
babl_exit();
return 0;
}
EOS
C
system ENV.cc, "-I#{include}/babl-0.1", testpath/"test.c", "-L#{lib}", "-lbabl-0.1", "-o", "test"
system testpath/"test"

Expand Down
4 changes: 2 additions & 2 deletions Formula/b/bam.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ def install
end

test do
(testpath/"hello.c").write <<~EOS
(testpath/"hello.c").write <<~C
#include <stdio.h>
int main() {
printf("hello\\n");
return 0;
}
EOS
C

(testpath/"bam.lua").write <<~EOS
settings = NewSettings()
Expand Down
4 changes: 2 additions & 2 deletions Formula/b/bdw-gc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def install
end

test do
(testpath/"test.c").write <<~EOS
(testpath/"test.c").write <<~C
#include <assert.h>
#include <stdio.h>
#include "gc.h"
Expand All @@ -73,7 +73,7 @@ def install
}
return 0;
}
EOS
C

system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lgc", "-o", "test"
system "./test"
Expand Down
4 changes: 2 additions & 2 deletions Formula/b/bear.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ def install
end

test do
(testpath/"test.c").write <<~EOS
(testpath/"test.c").write <<~C
#include <stdio.h>
int main() {
printf("hello, world!\\n");
return 0;
}
EOS
C
system bin/"bear", "--", "clang", "test.c"
assert_predicate testpath/"compile_commands.json", :exist?
end
Expand Down
4 changes: 2 additions & 2 deletions Formula/b/beecrypt.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def install
end

test do
(testpath/"test.c").write <<~EOS
(testpath/"test.c").write <<~C
#include "beecrypt/base64.h"
#include "beecrypt/sha256.h"
#include <stdio.h>
Expand All @@ -76,7 +76,7 @@ def install

return 0;
}
EOS
C
system ENV.cc, "test.c", "-L#{lib}", "-lbeecrypt", "-o", "test"
assert_match "FJOO", shell_output("./test")
end
Expand Down
Loading
Loading