Description: Fix test ordering under make shuffle mode
 The PNG output files are generated only when the test programs are run.
 Under GNU make shuffle mode, the PNG verification step could run before
 the tests, causing build failures.
 
 This patch makes the PNG check run after test execution by using
 Automake's check-local hook with an explicit dependency on check-TESTS.


 Bug-Debian: https://bugs.debian.org/1105355 
 Forwarded: no
 Author: Trupti Shirsat <trupti@linux.ibm.com>
 Last-Update: 2026-02-05
 
--- giza-1.5.0.orig/test/F90/Makefile.am
+++ giza-1.5.0/test/F90/Makefile.am
@@ -10,13 +10,10 @@ TESTS = $(ftests)
 check_PROGRAMS = $(ftests)
 AM_DEFAULT_SOURCE_EXT = .f90
 
-# Ensure that the tests are built as part of the 'check' target
-check: $(ftests) check_output_files
-
 test_output_files = giza-test.png giza-test-2D.png
 
 # Custom target to check for the existence of expected output files from the Fortran tests
-check_output_files: $(ftests)
+check-local: check-TESTS
 	@echo "Checking for required png files..."
 	@for i in $(test_output_files); do \
 	    if [ ! -s $$i ]; then \
@@ -26,4 +23,6 @@ check_output_files: $(ftests)
 	        echo "$$i exists"; \
 	    fi; \
 	done
-	@echo "All required png files exist."
\ No newline at end of file
+	@echo "All required png files exist."
+
+
