Makefile: Fixup config.h generation
Handle comments better, add comment to target
This commit is contained in:
		
							
								
								
									
										4
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								Makefile
									
									
									
									
									
								
							| @@ -70,9 +70,11 @@ aedrix-kernel.img: aedrix-kernel.elf | ||||
| 		rm -f $*.d | ||||
|  | ||||
| config.h: config | ||||
| 	@# Generate config header file from make-style include | ||||
| 	@echo ' 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/^\s*\(CONFIG_[A-Z0-9_]\+\)\s*=\s*[yY]/#define \1/g' config.h | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user