2010-12-03 17:53:02 +03:00
# steps to build a distribution image:
2010-09-27 23:02:57 +04:00
# --- here
2010-12-03 17:53:02 +03:00
# 1. initialize new profile (BUILDDIR) as a copy of image.in/
# 2. configure distro
# 3. copy subprofiles, package lists/groups and script hooks
# from metaprofile to new profile (as needed)
2010-09-27 23:02:57 +04:00
# --- in BUILDDIR
2010-12-03 17:53:02 +03:00
# 4. build subprofiles and subsequently image
2010-09-27 23:02:57 +04:00
all help :
@echo '** available distribution targets:'
@echo $( DISTROS) | fmt -sw65 | column -t
2010-08-24 13:48:35 +04:00
i n c l u d e c l e a n . m k
i n c l u d e d i s t r o . m k
2010-09-09 13:50:29 +04:00
i n c l u d e p r o f i l e . m k
2010-08-28 20:28:42 +04:00
i n c l u d e i s o . m k
2010-09-09 13:50:29 +04:00
# this could have come from environment;
2010-09-18 18:46:32 +04:00
# if not, can be symlinked if r/w, or made anew (NB: immediate assignment)
2010-09-08 19:19:23 +04:00
i f n d e f B U I L D D I R
2010-12-03 17:53:02 +03:00
PREFIX := mkimage-profiles.build
BUILDDIR := $( shell [ -s build ] && realpath build || bin/mktmpdir $( PREFIX) )
2010-09-08 19:19:23 +04:00
e n d i f
2010-09-13 18:22:05 +04:00
i f d e f D E B U G
GLOBAL_VERBOSE ?= 1
SHELL += -x
e n d i f
2010-08-28 20:28:42 +04:00
# we can't use implicit rules for top-level targets, only for prereqs
2010-09-27 23:02:57 +04:00
CONFIGS := $( shell sed -n 's,^distro/\([^:.]\+\):.*$$,\1,p' distro.mk)
2010-09-13 18:22:05 +04:00
DISTROS := $( addsuffix .iso,$( CONFIGS) )
2010-09-27 23:02:57 +04:00
ARCH ?= $( shell arch | sed 's/i686/i586/' )
2010-08-28 20:28:42 +04:00
2010-09-27 23:02:57 +04:00
export ARCH BUILDDIR DEBUG GLOBAL_VERBOSE SHELL
2010-08-28 20:28:42 +04:00
2010-09-14 14:18:53 +04:00
$(DISTROS) : %.iso : | profile /init distro /% boot /isolinux profile /populate iso