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 )@: .PHONY: changes changes: $(changes) $(changes): cd testpkg && debian/rules debian/control 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) testpkg/debian/control rm -f *.changes *.buildinfo *.deb rm -f uml-guest-swap # vim:ts=4 sts=4 sw=4 noet