aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 708ba51e3d721cef62b80d5cd89b3d7c12fb826b (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
26
27
28
29
# For bootstrapping:
cibs-root := .

# Define to "deb" to build a deb package:
# gmake package=deb
package ?= ips

# This is it forever ever:
cibs-inst-root := /usr/share/cibs

include $(cibs-root)/rules/$(package).mk

version := 0.3.0

install-stamp: rules-mogrify-stamp

# Replace $(cibs-root) -> /usr/share/cibs
rules-mogrify-stamp:
	mkdir -p mogrified/rules
	for r in $(cibs-root)/rules/*.mk; do \
		echo "Mogrifying $$r ..."; \
		sed -e 's,$$(cibs-root),$(cibs-inst-root),g' \
		$$r > mogrified/rules/`basename $$r`; \
	done
	touch $@

clean::
	rm -rf mogrified