summaryrefslogtreecommitdiff
blob: 621742c61a79672acf0c0c136f525c95a0769da9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
.%.expected-format.xml: %.xml
	xmllint --format $^ > $@

.ONESHELL:
.%.expected-format.xml.ok: SHELL = /bin/bash
.%.expected-format.xml.ok: .%.expected-format.xml
	if ! cmp -s $*.xml $^; then
		diff -u $*.xml $^
		exit 1
	fi
	touch $@

.PHONY: check
check: .distfiles.expected-format.xml.ok .rsync.expected-format.xml.ok

.PHONY: format
.ONESHELL:
format: SHELL = /bin/bash
format:.distfiles.expected-format.xml .rsync.expected-format.xml
	for FILE in distfiles rsync; do
		if cmp -s "$${FILE}.xml" ".$${FILE}.expected-format.xml"; then
			continue
		fi
		cp ".$${FILE}.expected-format.xml" "$${FILE}.xml"
	done