From 7ba556b15ce69a1f6e0e4e166760e91cea0d5a4d Mon Sep 17 00:00:00 2001 From: Alexandre Pujol Date: Wed, 2 Oct 2024 19:49:21 +0100 Subject: [PATCH] build: add make dev name=. --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 88febbb5..8057a171 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ PKGDEST := /tmp/pkg PKGNAME := apparmor.d P = $(filter-out dpkg,$(notdir $(wildcard ${BUILD}/apparmor.d/*))) -.PHONY: all build enforce full install local $(P) pkg dpkg rpm tests lint man docs serve clean +.PHONY: all build enforce full install local $(P) dev package pkg dpkg rpm tests lint man docs serve clean all: build @./${BUILD}/prebuild --complain @@ -71,6 +71,12 @@ $(P): done; @systemctl restart apparmor || systemctl status apparmor +name ?= +dev: + @go run ./cmd/prebuild --complain --file $(shell find apparmor.d -iname ${name}) + @sudo install -Dm644 ${BUILD}/${name} /etc/apparmor.d/${name} + @sudo systemctl restart apparmor || systemctl status apparmor + dist ?= archlinux package: @bash dists/docker.sh ${dist}