Makefile 774 Bytes
Newer Older
Michael Shigorin's avatar
Michael Shigorin committed
1 2 3 4 5 6 7
# 1. configure distro
# 2. configure subprofiles, prepare package lists
# 3. build subprofiles
# 4. build image

include clean.mk
include distro.mk
Michael Shigorin's avatar
Michael Shigorin committed
8
include profile.mk
9 10
include iso.mk

Michael Shigorin's avatar
Michael Shigorin committed
11
# this could have come from environment;
Michael Shigorin's avatar
Michael Shigorin committed
12 13 14 15
# if not, can be symlinked if r/w, or made anew
ifndef BUILDDIR
BUILDDIR := $(shell realpath build || bin/mktmpdir mkimage-profiles.build)
endif
Michael Shigorin's avatar
Michael Shigorin committed
16
export BUILDDIR
Michael Shigorin's avatar
Michael Shigorin committed
17

18 19 20 21 22
ifdef DEBUG
GLOBAL_VERBOSE ?= 1
SHELL += -x
endif

23
# we can't use implicit rules for top-level targets, only for prereqs
24 25
CONFIGS := $(shell sed -n 's,^distro/\([^:]\+\):.*$$,\1,p' distro.mk)
DISTROS := $(addsuffix .iso,$(CONFIGS))
26 27 28 29 30

all:
	@echo '** available distribution targets:'
	@echo $(DISTROS) | fmt -sw65 | column -t

Michael Shigorin's avatar
Michael Shigorin committed
31
$(DISTROS): %.iso: | profile/init distro/% profile/populate iso