File: Makefile

package info (click to toggle)
adequate 0.12.1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 332 kB
  • ctags: 55
  • sloc: perl: 1,114; python: 350; makefile: 139; sh: 89; ansic: 21
file content (32 lines) | stat: -rw-r--r-- 801 bytes parent folder | download | duplicates (2)
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
30
31
32
arch = $(shell dpkg-architecture -qDEB_HOST_ARCH)
changes = adequate-testpkg_1_$(arch).changes

.PHONY: all
all: $(changes)
	$(info Run "make run" as root.)
	$(info Alternatively, if you have user-mode-linux installed, you can try "make run-uml" as normal user.)
	$(info )@:

$(changes):
	cd testpkg && dpkg-buildpackage -b -us -uc

.PHONY: run
run: $(changes)
	./run-tests $(<)

.PHONY: run-uml
run-uml: $(changes)
	fallocate -l 1G uml-guest-swap
	linux init=$(CURDIR)/uml-guest-init \
		$(shell printf '%s' '$(CURDIR)' | base64 -w0 | tr = _) \
		$(shell printf '%s' '$(<)' | base64 -w0 | tr = _) \
		rootfstype=hostfs ubd0=uml-guest-swap mem=128M quiet con=null,fd:1 \
	| cat

.PHONY: clean
clean:
	cd testpkg && debian/rules clean
	rm -f *.changes *.deb
	rm -f uml-guest-swap

# vim:ts=4 sw=4 noet