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

관련 정보