1
0

Makefile: Fixup config.h generation

Handle comments better, add comment to target
This commit is contained in:
Aaron Lindsay 2012-10-03 07:35:10 -04:00
parent 3876937ae9
commit 9b66a78569

View File

@ -70,9 +70,11 @@ aedrix-kernel.img: aedrix-kernel.elf
rm -f $*.d rm -f $*.d
config.h: config config.h: config
@# Generate config header file from make-style include
@echo ' CONFIG config.h' @echo ' CONFIG config.h'
@cp config config.h @cp config config.h
@sed -i '/^\w*#/d' config.h @sed -i '/^\s*#/d' config.h
@sed -i 's/#.*$$//g' config.h
@sed -i '/^\s*\(CONFIG_[A-Z0-9_]\+\)\s*=\s*[nN]/d' config.h @sed -i '/^\s*\(CONFIG_[A-Z0-9_]\+\)\s*=\s*[nN]/d' config.h
@sed -i 's/^\s*\(CONFIG_[A-Z0-9_]\+\)\s*=\s*[yY]/#define \1/g' config.h @sed -i 's/^\s*\(CONFIG_[A-Z0-9_]\+\)\s*=\s*[yY]/#define \1/g' config.h