303 endif |
303 endif |
304 $(BUILD_LOG_WRAPPER) $(PRINTF) "Finished building $(TARGET_DESCRIPTION)\n" |
304 $(BUILD_LOG_WRAPPER) $(PRINTF) "Finished building $(TARGET_DESCRIPTION)\n" |
305 endif |
305 endif |
306 |
306 |
307 on-failure: |
307 on-failure: |
308 ifneq ($(wildcard $(MAKESUPPORT_OUTPUTDIR)/failure-logs/*), ) |
308 $(call PrintFailureReports) |
309 $(PRINTF) "=== Output from failing command(s) repeated here ===\n" |
309 $(call PrintBuildLogFailures) |
310 $(foreach logfile, $(sort $(wildcard $(MAKESUPPORT_OUTPUTDIR)/failure-logs/*)), \ |
|
311 $(PRINTF) "* For target $(notdir $(basename $(logfile))):\n" $(NEWLINE) \ |
|
312 $(CAT) $(logfile) | $(GREP) -v -e "^Note: including file:" $(NEWLINE) \ |
|
313 ) |
|
314 $(PRINTF) "=== End of repeated output ===\n" |
|
315 endif |
|
316 if $(GREP) -q "recipe for target .* failed" $(BUILD_LOG) 2> /dev/null; then \ |
|
317 $(PRINTF) "=== Make failure sequence repeated here ===\n" ; \ |
|
318 $(GREP) "recipe for target .* failed" $(BUILD_LOG) ; \ |
|
319 $(PRINTF) "=== End of repeated output ===\n" ; \ |
|
320 $(PRINTF) "Hint: Try searching the build log for the name of the first failed target.\n" ; \ |
|
321 else \ |
|
322 $(PRINTF) "No indication of failed target found.\n" ; \ |
|
323 $(PRINTF) "Hint: Try searching the build log for '] Error'.\n" ; \ |
|
324 fi |
|
325 $(PRINTF) "Hint: If caused by a warning, try configure --disable-warnings-as-errors.\n\n" |
310 $(PRINTF) "Hint: If caused by a warning, try configure --disable-warnings-as-errors.\n\n" |
|
311 ifneq ($(COMPARE_BUILD), ) |
|
312 $(call CleanupCompareBuild) |
|
313 endif |
326 |
314 |
327 # Support targets for COMPARE_BUILD, used for makefile development |
315 # Support targets for COMPARE_BUILD, used for makefile development |
328 pre-compare-build: |
316 pre-compare-build: |
329 $(ECHO) "Preparing for comparison rebuild" |
317 $(call PrepareCompareBuild) |
330 # Apply patch, if any |
|
331 ifneq ($(COMPARE_BUILD_PATCH), ) |
|
332 $(PATCH) -p1 < $(COMPARE_BUILD_PATCH) |
|
333 endif |
|
334 # Move the first build away and re-create the output directory |
|
335 ( cd $(TOPDIR) && \ |
|
336 $(MV) $(OUTPUT_ROOT) $(OUTPUT_ROOT).OLD && \ |
|
337 $(MKDIR) -p $(OUTPUT_ROOT) ) |
|
338 # Re-run configure with the same arguments (and possibly some additional), |
|
339 # must be done after patching. |
|
340 ( cd $(OUTPUT_ROOT) && PATH="$(ORIGINAL_PATH)" \ |
|
341 $(BASH) $(TOPDIR)/configure $(CONFIGURE_COMMAND_LINE) $(COMPARE_BUILD_CONF)) |
|
342 |
318 |
343 post-compare-build: |
319 post-compare-build: |
344 # Compare first and second build. Ignore any error code from compare.sh. |
320 $(call CleanupCompareBuild) |
345 $(ECHO) "Comparing between comparison rebuild (this/new) and baseline (other/old)" |
321 $(call CompareBuildDoComparison) |
346 ifneq ($(COMPARE_BUILD_COMP_DIR), ) |
|
347 +(cd $(OUTPUT_ROOT) && ./compare.sh $(COMPARE_BUILD_COMP_OPTS) -2dirs $(OUTPUT_ROOT)/$(COMPARE_BUILD_COMP_DIR) $(OUTPUT_ROOT).OLD/$(COMPARE_BUILD_COMP_DIR) || true) |
|
348 else |
|
349 +(cd $(OUTPUT_ROOT) && ./compare.sh $(COMPARE_BUILD_COMP_OPTS) -o $(OUTPUT_ROOT).OLD || true) |
|
350 endif |
|
351 |
322 |
352 .PHONY: print-targets print-modules reconfigure main on-failure |
323 .PHONY: print-targets print-modules reconfigure main on-failure |
353 endif |
324 endif |