Makefiles: Centralise some use of VIRTUAL_PNOR_ENABLED

Better that we try to keep all the conditional junk near the top of the
tree.

Change-Id: Ic9e8dca892dcf15607bace9f630f4d107e1a4b4e
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
diff --git a/Makefile.am b/Makefile.am
index 27d63a4..0266a53 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -42,7 +42,10 @@
 AM_CXXFLAGS = $(CODE_COVERAGE_CXXFLAGS)
 
 include test/Makefile.am.include
+
+if VIRTUAL_PNOR_ENABLED
 include vpnor/test/Makefile.am.include
+endif
 
 TESTS = $(check_PROGRAMS)
 
diff --git a/vpnor/test/Makefile.am.include b/vpnor/test/Makefile.am.include
index de081fd..3e2edaa 100644
--- a/vpnor/test/Makefile.am.include
+++ b/vpnor/test/Makefile.am.include
@@ -226,7 +226,6 @@
 vpnor_test_force_readonly_toc_LDFLAGS = $(OESDK_TESTCASE_FLAGS)
 vpnor_test_force_readonly_toc_LDADD = $(VPNOR_LDADD)
 
-if VIRTUAL_PNOR_ENABLED
 check_PROGRAMS += \
 	%reldir%/create_pnor_partition_table \
 	%reldir%/create_read_window_partition_exists \
@@ -261,4 +260,3 @@
 
 XFAIL_TESTS += \
 	%reldir%/write_toc
-endif