summaryrefslogtreecommitdiff
path: root/doc
blob: abc6b421b0c5be46d73c9dd979d66995b9c87841 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/make -f
SHELL = bash -o pipefail

pkgbuilds = $(sort $(wildcard *.PKGBUILD))

config.mw: .var.pkgbuilds $(patsubst %.PKGBUILD,%.mw,$(pkgbuilds))
	cat $(sort $(filter %.mw,$^)) > $@

%.mw: %.PKGBUILD ./pkgbuild2mw.0 ./pkgbuild2mw.1 ./pkgbuild2mw.2
	< $< ./pkgbuild2mw.0 | ./pkgbuild2mw.1 | ./pkgbuild2mw.2 | cat -s > $@

.var.%: FORCE
	@printf '%s' '$(subst ','\\'',$($*))' | sed 's/^/#/' | ./write-ifchanged $@
-include $(wildcard .var.*)
.PHONY: FORCE
.SECONDARY: