fix bugs when using make -B

修复在make -B 时产生的错误
This commit is contained in:
wenz-jam 2023-10-17 23:14:37 +08:00
parent 69040366c7
commit a7c2db4e63

View file

@ -14,6 +14,7 @@ include $(AM_HOME)/Makefile
$(RTCONFIG_H): $(RTCONFIG_H):
touch $@ touch $@
scons --useconfig=.config scons --useconfig=.config
if [ "`sed -n '3p' $@`"x = x ]; then sed -i -e '2a#include "extra.h"' $@; fi
init: $(RTCONFIG_H) init: $(RTCONFIG_H)
scons -c scons -c
@ -21,7 +22,6 @@ init: $(RTCONFIG_H)
cat $(FILE_TMP) | grep -o '[^ ]*.c$$' | awk '{print "SRCS += " $$1}' > $(FILE_MK) 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) cat $(FILE_TMP) | grep 'gcc ' | head -n 1 | grep -o " -I[^ ]*" | awk '{print "CFLAGS += " $$1}' >> $(FILE_MK)
rm $(FILE_TMP) rm $(FILE_TMP)
if [ "`sed -n '3p' $^`"x = x ]; then sed -i -e '2a#include "extra.h"' $^; fi
menuconfig: menuconfig:
scons --menuconfig scons --menuconfig