umorpha-boxes/Makefile

22 lines
495 B
Makefile
Raw Normal View History

2023-10-28 20:37:09 +00:00
# Copyright (C) 2023 Umorpha Systems
# SPDX-License-Identifier: AGPL-3.0-or-later
export osi_tools = $(CURDIR)/../notsystemd-tests
PATH := $(osi_tools):$(PATH)
all: $(patsubst boxes/%.sh,out/%.img,$(wildcard boxes/*.sh))
.PHONY: all
deps.mk: boxes $(wildcard boxes/*.sh) | out
grep -H -o -e '--module=\S*' boxes/*.sh | sed -E 's,boxes/([^:]*).sh:--module=(.*),out/\1.img: \2,' >$@
-include deps.mk
out:
mkdir $@
out/%.img: boxes/%.sh | out
rm -f $@
$< $@
.SECONDARY:
.DELETE_ON_ERROR: