From c93a49875a4c27563dbb58bbbc62f25c689718a2 Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Thu, 5 Dec 2024 17:45:43 -0500 Subject: [PATCH 1/7] bmake: use MAKE heredoc delimiter for Makefile --- Formula/b/bmake.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Formula/b/bmake.rb b/Formula/b/bmake.rb index 0a64165e5e17d..8250f3442a315 100644 --- a/Formula/b/bmake.rb +++ b/Formula/b/bmake.rb @@ -31,15 +31,15 @@ def install end test do - (testpath/"Makefile").write <<~EOS + (testpath/"Makefile").write <<~MAKE all: hello hello: - \t@echo 'Test successful.' + @echo 'Test successful.' clean: - \trm -rf Makefile - EOS + rm -rf Makefile + MAKE system bin/"bmake" system bin/"bmake", "clean" end From 2985a6e4ba06b4642c565081f550a96f50ef067c Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Thu, 5 Dec 2024 17:45:25 -0500 Subject: [PATCH 2/7] bsdmake: use MAKE heredoc delimiter for Makefile --- Formula/b/bsdmake.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Formula/b/bsdmake.rb b/Formula/b/bsdmake.rb index 9cc9f12202904..6d2fe98ca3e34 100644 --- a/Formula/b/bsdmake.rb +++ b/Formula/b/bsdmake.rb @@ -72,12 +72,12 @@ def install end test do - (testpath/"Makefile").write <<~EOS + (testpath/"Makefile").write <<~MAKE foo: - \ttouch $@ - EOS + touch $@ + MAKE system bin/"bsdmake" - assert_predicate testpath/"foo", :exist? + assert_path_exists testpath/"foo" end end From b902596ee200045de6e94a234028ed8e2e6ee9b7 Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Thu, 5 Dec 2024 17:44:59 -0500 Subject: [PATCH 3/7] compiledb: use MAKE heredoc delimiter for Makefile --- Formula/c/compiledb.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Formula/c/compiledb.rb b/Formula/c/compiledb.rb index a60e2d8bfc951..4f1d2aaf78061 100644 --- a/Formula/c/compiledb.rb +++ b/Formula/c/compiledb.rb @@ -34,15 +34,15 @@ def install end test do - (testpath/"Makefile").write <<~EOS + (testpath/"Makefile").write <<~MAKE all: cc main.c -o test - EOS + MAKE (testpath/"main.c").write <<~C int main(void) { return 0; } C system bin/"compiledb", "-n", "make" - assert_predicate testpath/"compile_commands.json", :exist?, "compile_commands.json should be created" + assert_path_exists testpath/"compile_commands.json", "compile_commands.json should be created" end end From 4a7172d4f44d3486e6bc14b9c85e3f7f15c6d3d8 Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Thu, 5 Dec 2024 17:44:45 -0500 Subject: [PATCH 4/7] distcc: use MAKE heredoc delimiter for Makefile --- Formula/d/distcc.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Formula/d/distcc.rb b/Formula/d/distcc.rb index 493421230490b..df8d3785a1989 100644 --- a/Formula/d/distcc.rb +++ b/Formula/d/distcc.rb @@ -83,10 +83,10 @@ def install test do system bin/"distcc", "--version" - (testpath/"Makefile").write <<~EOS + (testpath/"Makefile").write <<~MAKE default: - \t@echo Homebrew - EOS + @echo Homebrew + MAKE assert_match "distcc hosts list does not contain any hosts", shell_output("#{bin}/pump make 2>&1", 1) # `pump make` timeout on linux runner and is not reproducible, so only run this test for macOS runners From aaee6a87ecbf5d3687b79c84a2b2d1bd9307d53e Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Thu, 5 Dec 2024 17:46:00 -0500 Subject: [PATCH 5/7] make: use MAKE heredoc delimiter for Makefile --- Formula/m/make.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Formula/m/make.rb b/Formula/m/make.rb index 74f56674265b4..5cbab0dd8f22a 100644 --- a/Formula/m/make.rb +++ b/Formula/m/make.rb @@ -70,14 +70,14 @@ def caveats end test do - (testpath/"Makefile").write <<~EOS + (testpath/"Makefile").write <<~MAKE default: - \t@echo Homebrew - EOS + @echo Homebrew + MAKE if OS.mac? - assert_equal "Homebrew\n", shell_output("#{bin}/gmake") - assert_equal "Homebrew\n", shell_output("#{opt_libexec}/gnubin/make") + assert_equal "Homebrew\n", shell_output(bin/"gmake") + assert_equal "Homebrew\n", shell_output(libexec/"gnubin/make") else assert_equal "Homebrew\n", shell_output(bin/"make") end From dae72e3ca196d1a500335c9a80f6c13fb98ad9e2 Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Thu, 5 Dec 2024 17:43:58 -0500 Subject: [PATCH 6/7] netsurf-buildsystem: use MAKE heredoc delimiter for Makefile --- Formula/n/netsurf-buildsystem.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Formula/n/netsurf-buildsystem.rb b/Formula/n/netsurf-buildsystem.rb index 6af07712c3ecb..7f04e37806c62 100644 --- a/Formula/n/netsurf-buildsystem.rb +++ b/Formula/n/netsurf-buildsystem.rb @@ -21,19 +21,19 @@ def install test do (testpath/"src").mkpath - (testpath/"Makefile").write <<~EOS + (testpath/"Makefile").write <<~MAKE COMPONENT := hello COMPONENT_VERSION := 0.1.0 COMPONENT_TYPE ?= binary include $(NSSHARED)/makefiles/Makefile.tools include $(NSBUILD)/Makefile.top INSTALL_ITEMS := $(INSTALL_ITEMS) /bin:$(BUILDDIR)/$(COMPONENT) - EOS + MAKE - (testpath/"src/Makefile").write <<~EOS + (testpath/"src/Makefile").write <<~MAKE DIR_SOURCES := main.c include $(NSBUILD)/Makefile.subdir - EOS + MAKE (testpath/"src/main.c").write <<~C #include From 317441d3b5cb818833dc4507ca0446c651cad123 Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Thu, 5 Dec 2024 17:44:30 -0500 Subject: [PATCH 7/7] remake: use MAKE heredoc delimiter for Makefile --- Formula/r/remake.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Formula/r/remake.rb b/Formula/r/remake.rb index fae399b839797..37bba08c242b0 100644 --- a/Formula/r/remake.rb +++ b/Formula/r/remake.rb @@ -34,17 +34,17 @@ class Remake < Formula depends_on "readline" def install - system "./configure", *std_configure_args, "--disable-silent-rules" + system "./configure", "--disable-silent-rules", *std_configure_args system "make", "install" # Remove texinfo files for make to avoid conflict - info.glob("make.info*").map(&:unlink) + rm info.glob("make.info*") end test do - (testpath/"Makefile").write <<~EOS + (testpath/"Makefile").write <<~MAKE all: - \techo "Nothing here, move along" - EOS + echo "Nothing here, move along" + MAKE system bin/"remake", "-x" end end