summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--www/git.causal.agency/.gitignore1
-rw-r--r--www/git.causal.agency/Makefile4
-rw-r--r--www/git.causal.agency/source-filter.sh8
3 files changed, 9 insertions, 4 deletions
diff --git a/www/git.causal.agency/.gitignore b/www/git.causal.agency/.gitignore
index 4f4682af..db5a9275 100644
--- a/www/git.causal.agency/.gitignore
+++ b/www/git.causal.agency/.gitignore
@@ -1,4 +1,5 @@
 about-filter
 hilex
 htagml
+mtags
 source-filter
diff --git a/www/git.causal.agency/Makefile b/www/git.causal.agency/Makefile
index 0509975f..6fdbf129 100644
--- a/www/git.causal.agency/Makefile
+++ b/www/git.causal.agency/Makefile
@@ -3,14 +3,14 @@ WWW = /usr/local/www/cgit
 LIBEXEC = /usr/local/libexec
 
 BIN = ../../bin
-BINS = about-filter source-filter hilex htagml
+BINS = about-filter source-filter hilex htagml mtags
 
 install: cgitrc custom.css ${BINS}
 	install -m 644 cgitrc ${ETC}
 	install -m 644 custom.css ${WWW}
 	install ${BINS} ${LIBEXEC}
 
-hilex htagml::
+hilex htagml mtags::
 	${MAKE} -C ${BIN} $@
 	ln -f ${BIN}/$@ $@
 
diff --git a/www/git.causal.agency/source-filter.sh b/www/git.causal.agency/source-filter.sh
index be04e0c1..87875bd1 100644
--- a/www/git.causal.agency/source-filter.sh
+++ b/www/git.causal.agency/source-filter.sh
@@ -2,17 +2,21 @@
 set -eu
 
 ctags=/usr/bin/ctags
+mtags=/usr/local/libexec/mtags
 hilex=/usr/local/libexec/hilex
 htagml=/usr/local/libexec/htagml
 
 case "$1" in
-	(*.[chlmy])
+	(*.[chlmy]|Makefile|*.mk|*.[1-9])
 		tmp=$(mktemp -d -t source-filter)
 		trap 'rm -fr "${tmp}"' EXIT
 		cd "${tmp}"
 		cat >"$1"
 		touch tags
-		$ctags -w "$1"
+		case "$1" in
+			(*.[chlmy]) $ctags -w "$1";;
+			(*) $mtags "$1";;
+		esac
 		$hilex -f html "$1" | $htagml -i "$1"
 		;;
 	(*)