Commit fbceed276169dca1e44e32d08e41f412e72190a5

Klemens Nanni 2021-10-07T15:38:38

Provide lib/Makefile to enable tags file generation The root Makefile does not hook into lib/ via <bsd.subdir.mk> since it is not a program itself and thus gets included by all others. This means `make tags` skips lib/ and `make -C lib/ tags` does not know what to do; provide a minimal <bsd.lib.mk> stub and hook it up just for the "tags" such that *all* source is browsable via tags. See /usr/share/mk/bsd.README for details. Feedback stsp tb OK tb

diff --git a/Makefile b/Makefile
index 5e96ac3..8a7d489 100644
--- a/Makefile
+++ b/Makefile
@@ -10,6 +10,10 @@ SUBDIR += regress
 SUBDIR += gotweb
 .endif
 
+.if make(tags) || make(cleandir)
+SUBDIR += lib
+.endif
+
 .include "got-version.mk"
 
 release: clean
diff --git a/lib/Makefile b/lib/Makefile
new file mode 100644
index 0000000..1026646
--- /dev/null
+++ b/lib/Makefile
@@ -0,0 +1,4 @@
+# simple Makefile stub to make the "tags" target work
+SRCS =	*.c
+
+.include <bsd.lib.mk>