From fd237b4dc6759f72897d52ccd7c4c71c84027771 Mon Sep 17 00:00:00 2001
From: Tavian Barnes <tavianator@tavianator.com>
Date: Mon, 9 May 2022 12:06:28 -0400
Subject: Makefile: New check-install target

---
 Makefile | 8 ++++++++
 1 file changed, 8 insertions(+)

(limited to 'Makefile')

diff --git a/Makefile b/Makefile
index c10814a..e23642b 100644
--- a/Makefile
+++ b/Makefile
@@ -270,6 +270,7 @@ ifeq ($(OS) $(ARCH),Linux x86_64)
 endif
 	+$(MAKE) -B release check $(DISTCHECK_FLAGS)
 	+$(MAKE) -B check $(DISTCHECK_FLAGS)
+	+$(MAKE) check-install
 .PHONY: distcheck
 
 clean:
@@ -294,6 +295,13 @@ uninstall:
 	$(RM) $(DESTDIR)$(PREFIX)/bin/bfs
 .PHONY: uninstall
 
+check-install:
+	+$(MAKE) install DESTDIR=build/pkg
+	+$(MAKE) uninstall DESTDIR=build/pkg
+	./bfs build/pkg -not -type d -print -exit 1
+	$(RM) -r build/pkg
+.PHONY: check-install
+
 .SUFFIXES:
 
 -include $(wildcard build/*.d build/tests/*.d)
-- 
cgit v1.2.3