make ファイルのログ出力 (stdout)

make ファイルのログ出力 (stdout)

makeファイル内からログファイルに出力(stdout)を送信するには?私は "make> build.log"のようなコマンドラインソリューションには興味がありません。以下のリストは私の一般的なmakeファイルです。

#  +--------------------------------------------------------------------------+
#  :      Uncomment the appropriate section below (comment all others)        :
#  +--------------------------------------------------------------------------+

# --- For TERMINAL program library files ---
# LIBS := -lm


# --- For RAYLIB program library files ---
LIBS := -l:raylib/libraylib.a -lm


# --- For NCURSES program library files ---
# LIBS := -lform -lmenu -lncurses -lm


# --- For SDL program library files ---
# SDLALL := -lSDL2_image -lSDL2_mixer -lSDL2_net -lSDL2_ttf -lSDL2_gfx
# LIBS := `sdl2-config --libs --cflags` $(SDLALL) -lm

# ------------------------- End of user editable code -------------------------
DASH    := "  +--------------------------+"
VERSION := "  :    Script: 2024.02.12    :"
TARGET  := "  :   For Raylib Makefiles   :"
AUTHOR  := "  :    By: Jan W. Zumwalt    :"

# set compiler
CC := gcc

# additional header files
HDRS :=

# additional include files
INCS :=

# additional source files
SRCS := main.c

# name of executable
EXEC := test

# generate object file names
OBJS := $(SRCS:.c=.o)

# set compiler flags
CFLAGS :=  -ggdb3 -O0 $(LIBS) --std=c17 -Wall

# default recipe
all: $(EXEC)

# recipe for building final executable
$(EXEC): $(OBJS) $(HDRS) $(INCS) Makefile > build.log
    $(CC) -o $@ $(OBJS) $(CFLAGS)
    make clean
    @echo $(\n)
    @echo $(DASH)
    @echo $(VERSION)
    @echo $(TARGET)
    @echo $(AUTHOR)
    @echo $(DASH)
    @echo $(\n)

# recipe for building object files
  # $(OBJS): $(@:.o=.c) $(HDRS) Makefile
  # $(CC) -o $@ $(@:.o=.c) -c $(CFLAGS)

# recipe to clean workspace
clean:
    rm -f $(OBJS)

# recipe to clean workspace
test: test
    ./test

.PHONY: all clean test

関連情報