Merge pull request #1 from Wenz-jam/master

fix bugs when using make -B
This commit is contained in:
Zihao Yu 2024-01-02 04:53:53 +08:00 committed by GitHub
commit 251692a139
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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