From ca754c34f5461766a72dae5969ac6a193c26dce9 Mon Sep 17 00:00:00 2001 From: Ariel Otilibili Date: Sun, 8 Dec 2024 17:54:49 +0100 Subject: [PATCH] build: improve readability of `Makefile.am` * replaced suffix rules by pattern rules * such pattern rules are already used in Makefile.am * so doing, the suffixes `.lo.bc` & `.o.bc` are no more needed in SUFFIXES. Link: https://www.gnu.org/software/make/manual/html_node/Suffix-Rules.html Link: https://www.gnu.org/s/make/manual/html_node/Pattern-Rules.html Signed-off-by: Ariel Otilibili --- Makefile.am | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Makefile.am b/Makefile.am index 0ce716e345c7..457c4933d5d0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -304,12 +304,10 @@ am__v_LLVM_LD_ = $(am__v_LLVM_LD_$(AM_DEFAULT_VERBOSITY)) am__v_LLVM_LD_0 = @echo " LLVM.LD " $@; am__v_LLVM_LD_1 = -SUFFIXES += .lo.bc .o.bc - -.o.o.bc: - $(AM_V_LLVM_BC)$(COMPILE) -emit-llvm -c -o $@ $(patsubst %.o,%.c,$<) -.lo.lo.bc: - $(AM_V_LLVM_BC)$(COMPILE) -emit-llvm -c -o $@ $(patsubst %.lo,%.c,$<) +%.o.bc: %.o + $(AM_V_LLVM_BC)$(COMPILE) -emit-llvm -c -o $@ $*.c +%.lo.bc: %.lo + $(AM_V_LLVM_BC)$(COMPILE) -emit-llvm -c -o $@ $*.c %.cg.json: %.bc tools/frr-llvm-cg tools/frr-llvm-cg -o $@ $<