< prev index next >

make/InitSupport.gmk

Print this page

162 	$(if $(COMPARE_BUILD_COMP_DIR), \
163 	  +(cd $(COMPARE_BUILD_OUTPUTDIR) && ./compare.sh --diffs $(COMPARE_BUILD_COMP_OPTS) \
164 	      -2dirs $(COMPARE_BUILD_OUTPUTDIR)/$(COMPARE_BUILD_COMP_DIR) \
165 	      $(OUTPUTDIR)/$(COMPARE_BUILD_COMP_DIR) $(COMPARE_BUILD_IGNORE_RESULT)), \
166 	  +(cd $(COMPARE_BUILD_OUTPUTDIR) && ./compare.sh --diffs $(COMPARE_BUILD_COMP_OPTS) \
167 	      -o $(OUTPUTDIR) $(COMPARE_BUILD_IGNORE_RESULT)) \
168 	)
169 endef
170 
171 define PrintFailureReports
172 	$(if $(filter none, $(LOG_REPORT)), , \
173 	  $(RM) $(MAKESUPPORT_OUTPUTDIR)/failure-summary.log ; \
174 	  $(if $(wildcard $(MAKESUPPORT_OUTPUTDIR)/failure-logs/*.log), \
175 	    ( \
176 	      $(PRINTF) "\n=== Output from failing command(s) repeated here ===\n" ;  \
177 	      $(foreach logfile, $(sort $(wildcard $(MAKESUPPORT_OUTPUTDIR)/failure-logs/*.log)), \
178 	          $(PRINTF) "* For target $(notdir $(basename $(logfile))):\n" ; \
179 	          $(if $(filter all, $(LOG_REPORT)), \
180 	            $(GREP) -v -e "^Note: including file:" <  $(logfile) || true ; \
181 	          , \
182 	            ($(GREP) -v -e "^Note: including file:" <  $(logfile) || true) | $(HEAD) -n 15 ; \
183 	            if test `$(WC) -l < $(logfile)` -gt 15; then \
184 	              $(ECHO) "   ... (rest of output omitted)" ; \
185 	            fi ; \
186 	          ) \
187 	      ) \
188 	      $(PRINTF) "\n* All command lines available in $(MAKESUPPORT_OUTPUTDIR)/failure-logs.\n" ; \
189 	      $(PRINTF) "=== End of repeated output ===\n" ; \
190 	    )  >> $(MAKESUPPORT_OUTPUTDIR)/failure-summary.log  \
191 	  ) \
192 	)
193 endef
194 
195 define PrintBuildLogFailures
196 	$(if $(filter none, $(LOG_REPORT)), , \
197 	  if $(GREP) -q "recipe for target .* failed" $(BUILD_LOG) 2> /dev/null; then  \
198 	    $(PRINTF) "\n=== Make failed targets repeated here ===\n" ; \
199 	    $(GREP) "recipe for target .* failed" $(BUILD_LOG) ; \
200 	    $(PRINTF) "=== End of repeated output ===\n" ; \
201 	    $(PRINTF) "\nHELP: Try searching the build log for the name of the first failed target.\n" ; \
202 	  else \

162 	$(if $(COMPARE_BUILD_COMP_DIR), \
163 	  +(cd $(COMPARE_BUILD_OUTPUTDIR) && ./compare.sh --diffs $(COMPARE_BUILD_COMP_OPTS) \
164 	      -2dirs $(COMPARE_BUILD_OUTPUTDIR)/$(COMPARE_BUILD_COMP_DIR) \
165 	      $(OUTPUTDIR)/$(COMPARE_BUILD_COMP_DIR) $(COMPARE_BUILD_IGNORE_RESULT)), \
166 	  +(cd $(COMPARE_BUILD_OUTPUTDIR) && ./compare.sh --diffs $(COMPARE_BUILD_COMP_OPTS) \
167 	      -o $(OUTPUTDIR) $(COMPARE_BUILD_IGNORE_RESULT)) \
168 	)
169 endef
170 
171 define PrintFailureReports
172 	$(if $(filter none, $(LOG_REPORT)), , \
173 	  $(RM) $(MAKESUPPORT_OUTPUTDIR)/failure-summary.log ; \
174 	  $(if $(wildcard $(MAKESUPPORT_OUTPUTDIR)/failure-logs/*.log), \
175 	    ( \
176 	      $(PRINTF) "\n=== Output from failing command(s) repeated here ===\n" ;  \
177 	      $(foreach logfile, $(sort $(wildcard $(MAKESUPPORT_OUTPUTDIR)/failure-logs/*.log)), \
178 	          $(PRINTF) "* For target $(notdir $(basename $(logfile))):\n" ; \
179 	          $(if $(filter all, $(LOG_REPORT)), \
180 	            $(GREP) -v -e "^Note: including file:" <  $(logfile) || true ; \
181 	          , \
182 	            ($(GREP) -v -e "^Note: including file:" <  $(logfile) || true); \
183 	            if test `$(WC) -l < $(logfile)` -gt 15; then \
184 	              $(ECHO) "   ... (rest of output omitted)" ; \
185 	            fi ; \
186 	          ) \
187 	      ) \
188 	      $(PRINTF) "\n* All command lines available in $(MAKESUPPORT_OUTPUTDIR)/failure-logs.\n" ; \
189 	      $(PRINTF) "=== End of repeated output ===\n" ; \
190 	    )  >> $(MAKESUPPORT_OUTPUTDIR)/failure-summary.log  \
191 	  ) \
192 	)
193 endef
194 
195 define PrintBuildLogFailures
196 	$(if $(filter none, $(LOG_REPORT)), , \
197 	  if $(GREP) -q "recipe for target .* failed" $(BUILD_LOG) 2> /dev/null; then  \
198 	    $(PRINTF) "\n=== Make failed targets repeated here ===\n" ; \
199 	    $(GREP) "recipe for target .* failed" $(BUILD_LOG) ; \
200 	    $(PRINTF) "=== End of repeated output ===\n" ; \
201 	    $(PRINTF) "\nHELP: Try searching the build log for the name of the first failed target.\n" ; \
202 	  else \
< prev index next >