Christ van Willegen | 6a15942 | 2025-02-21 20:23:26 +0100 | [diff] [blame] | 1 | # vim: ft=make |
| 2 | SHELL = /bin/bash |
| 3 | |
| 4 | # Default target to actually run the comparison: |
| 5 | .PHONY: check |
| 6 | .INTERMEDIATE: hlgroups deflinks hlgroups.stripped |
| 7 | |
| 8 | check: hlgroups.stripped deflinks |
| 9 | diff hlgroups.stripped deflinks |
| 10 | |
| 11 | hlgroups: |
| 12 | grep '\*hl-' ../runtime/doc/*txt | sed -E -e 's/.*:<?\s*//' -e 's/hl-//g' -e 's/\*//g' -e 's/ /\n/g' | sort > hlgroups |
| 13 | |
| 14 | deflinks: ../src/highlight.c |
| 15 | grep '"default link' $< | sed 's/.*default link\s*\(.*\)\s.*/\1/' | sort > deflinks |
| 16 | |
| 17 | hlgroups.stripped: hlgroups.ignore hlgroups |
| 18 | grep -v -x -F -f hlgroups.ignore hlgroups > hlgroups.stripped |