From 4b1e2858aed69b0189841f2577e81a0f354eaedd Mon Sep 17 00:00:00 2001 From: Zihao Yu Date: Fri, 26 May 2023 08:00:15 +0800 Subject: [PATCH] bsp,abstract-machine,Makefile: fix remake issue * do not set a included Makefile as the target of a rule --- bsp/abstract-machine/Makefile | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/bsp/abstract-machine/Makefile b/bsp/abstract-machine/Makefile index 060f0f8..a09cceb 100644 --- a/bsp/abstract-machine/Makefile +++ b/bsp/abstract-machine/Makefile @@ -15,11 +15,11 @@ $(RTCONFIG_H): touch $@ scons --useconfig=.config -$(FILE_MK): $(RTCONFIG_H) +init: $(RTCONFIG_H) scons -c scons --verbose -n > $(FILE_TMP) - cat $(FILE_TMP) | grep -o '[^ ]*.c$$' | awk '{print "SRCS += " $$1}' > $@ - cat $(FILE_TMP) | grep 'gcc ' | head -n 1 | grep -o " -I[^ ]*" | awk '{print "CFLAGS += " $$1}' >> $@ + cat $(FILE_TMP) | grep -o '[^ ]*.c$$' | awk '{print "SRCS += " $$1}' > $(FILE_MK) + cat $(FILE_TMP) | grep 'gcc ' | head -n 1 | grep -o " -I[^ ]*" | awk '{print "CFLAGS += " $$1}' >> $(FILE_MK) rm $(FILE_TMP) if [ "`sed -n '3p' $^`"x = x ]; then sed -i -e '2a#include "extra.h"' $^; fi @@ -28,6 +28,4 @@ menuconfig: scons --genconfig $(MAKE) init -init: $(FILE_MK) - .PHONY: init menuconfig