bsp,abstract-machine,Makefile: fix remake issue
* do not set a included Makefile as the target of a rule
This commit is contained in:
parent
e6aa8c45f8
commit
4b1e2858ae
1 changed files with 3 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue