From 53af198ccb3c84d96ac3369d439567e98575753a Mon Sep 17 00:00:00 2001
From: Adam Novak <anovak@soe.ucsc.edu>
Date: Thu, 19 Oct 2023 19:36:40 -0400
Subject: [PATCH] Hide the vg build environment from the doc tests, so they can
 exercise build dependency finding

---
 Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 9f7dfe92105..01012eac31a 100644
--- a/Makefile
+++ b/Makefile
@@ -506,7 +506,10 @@ deps: $(DEPS)
 
 test: $(BIN_DIR)/$(EXE) $(LIB_DIR)/libvg.a test/build_graph $(BIN_DIR)/shuf $(BIN_DIR)/vcf2tsv $(FASTAHACK_DIR)/fastahack $(BIN_DIR)/rapper
 	. ./source_me.sh && cd test && prove -v t
-	. ./source_me.sh && doc/test-docs.sh
+	# Hide the compiler configuration from the doc tests, so that the ones that
+	# build code can't pick up libraries out of the bg build itself. Definitely
+	# don't source source_me.sh!
+	CFLAGS= CXXFLAGS= CPPFLAGS= LDFLAGS= INCLUDE_FLAGS= LIBRARY_PATH= LD_LIBRARY_PATH= DYLD_LIBRARY_PATH= DYLD_FALLBACK_LIBRARY_PATH= LD_INCLUDE_PATH= CC= CXX= CXX_STANDARD= doc/test-docs.sh
 
 # Somebody has been polluting the test directory with temporary files that are not deleted after the tests.
 # To make git status more useful, we delete everything that looks like a temporary file.