mirror of
				https://source.denx.de/u-boot/u-boot.git
				synced 2025-11-04 02:11:25 +01:00 
			
		
		
		
	Makefile: Do not create empty autoconf.mk on error
The build rules of - include/autoconf.mk.dep - include/autoconf.mk - include/spl-autoconf.mk - include/tpl-autoconf.mk were not nice. They created empty files (which are never updated) if an error occurs during preprocessing. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
This commit is contained in:
		
							parent
							
								
									6496d00fb8
								
							
						
					
					
						commit
						65947ab4c9
					
				
							
								
								
									
										25
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										25
									
								
								Makefile
									
									
									
									
									
								
							@ -638,36 +638,33 @@ checkdtc:
 | 
				
			|||||||
# to regenerate the autoconf.mk file.
 | 
					# to regenerate the autoconf.mk file.
 | 
				
			||||||
$(obj)include/autoconf.mk.dep: $(obj)include/config.h include/common.h
 | 
					$(obj)include/autoconf.mk.dep: $(obj)include/config.h include/common.h
 | 
				
			||||||
	@$(XECHO) Generating $@ ; \
 | 
						@$(XECHO) Generating $@ ; \
 | 
				
			||||||
	set -e ; \
 | 
					 | 
				
			||||||
	: Generate the dependancies ; \
 | 
						: Generate the dependancies ; \
 | 
				
			||||||
	$(CC) -x c -DDO_DEPS_ONLY -M $(CFLAGS) $(CPPFLAGS) \
 | 
						$(CC) -x c -DDO_DEPS_ONLY -M $(CFLAGS) $(CPPFLAGS) \
 | 
				
			||||||
		-MQ $(obj)include/autoconf.mk include/common.h > $@
 | 
							-MQ $(obj)include/autoconf.mk include/common.h > $@ || \
 | 
				
			||||||
 | 
							rm $@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$(obj)include/autoconf.mk: $(obj)include/config.h
 | 
					$(obj)include/autoconf.mk: $(obj)include/config.h
 | 
				
			||||||
	@$(XECHO) Generating $@ ; \
 | 
						@$(XECHO) Generating $@ ; \
 | 
				
			||||||
	set -e ; \
 | 
					 | 
				
			||||||
	: Extract the config macros ; \
 | 
						: Extract the config macros ; \
 | 
				
			||||||
	$(CPP) $(CFLAGS) -DDO_DEPS_ONLY -dM include/common.h | \
 | 
						$(CPP) $(CFLAGS) -DDO_DEPS_ONLY -dM include/common.h > $@.tmp && \
 | 
				
			||||||
		sed -n -f tools/scripts/define2mk.sed > $@.tmp && \
 | 
							sed -n -f tools/scripts/define2mk.sed $@.tmp > $@; \
 | 
				
			||||||
	mv $@.tmp $@
 | 
						rm $@.tmp
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Auto-generate the spl-autoconf.mk file (which is included by all makefiles for SPL)
 | 
					# Auto-generate the spl-autoconf.mk file (which is included by all makefiles for SPL)
 | 
				
			||||||
$(obj)include/tpl-autoconf.mk: $(obj)include/config.h
 | 
					$(obj)include/tpl-autoconf.mk: $(obj)include/config.h
 | 
				
			||||||
	@$(XECHO) Generating $@ ; \
 | 
						@$(XECHO) Generating $@ ; \
 | 
				
			||||||
	set -e ; \
 | 
					 | 
				
			||||||
	: Extract the config macros ; \
 | 
						: Extract the config macros ; \
 | 
				
			||||||
	$(CPP) $(CFLAGS) -DCONFIG_TPL_BUILD  -DCONFIG_SPL_BUILD\
 | 
						$(CPP) $(CFLAGS) -DCONFIG_TPL_BUILD  -DCONFIG_SPL_BUILD\
 | 
				
			||||||
			-DDO_DEPS_ONLY -dM include/common.h | \
 | 
								-DDO_DEPS_ONLY -dM include/common.h > $@.tmp && \
 | 
				
			||||||
	sed -n -f tools/scripts/define2mk.sed > $@.tmp && \
 | 
							sed -n -f tools/scripts/define2mk.sed $@.tmp > $@; \
 | 
				
			||||||
	mv $@.tmp $@
 | 
						rm $@.tmp
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$(obj)include/spl-autoconf.mk: $(obj)include/config.h
 | 
					$(obj)include/spl-autoconf.mk: $(obj)include/config.h
 | 
				
			||||||
	@$(XECHO) Generating $@ ; \
 | 
						@$(XECHO) Generating $@ ; \
 | 
				
			||||||
	set -e ; \
 | 
					 | 
				
			||||||
	: Extract the config macros ; \
 | 
						: Extract the config macros ; \
 | 
				
			||||||
	$(CPP) $(CFLAGS) -DCONFIG_SPL_BUILD -DDO_DEPS_ONLY -dM include/common.h | \
 | 
						$(CPP) $(CFLAGS) -DCONFIG_SPL_BUILD -DDO_DEPS_ONLY -dM include/common.h > $@.tmp && \
 | 
				
			||||||
	sed -n -f tools/scripts/define2mk.sed > $@.tmp && \
 | 
							sed -n -f tools/scripts/define2mk.sed $@.tmp > $@; \
 | 
				
			||||||
	mv $@.tmp $@
 | 
						rm $@.tmp
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$(obj)include/generated/generic-asm-offsets.h:	$(obj)include/autoconf.mk.dep \
 | 
					$(obj)include/generated/generic-asm-offsets.h:	$(obj)include/autoconf.mk.dep \
 | 
				
			||||||
	$(obj)include/spl-autoconf.mk \
 | 
						$(obj)include/spl-autoconf.mk \
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user