2011-05-11 23:40:47 +04:00
# this makefile is designed to be included in toplevel one
2011-06-12 19:06:36 +04:00
2011-09-02 00:01:52 +04:00
SYMLINK = build
2011-06-12 19:06:36 +04:00
# this could have come from environment;
# if not, can be symlinked if r/w, or made anew
2011-08-16 00:30:20 +04:00
# NB: immediate assignment matters
2011-09-13 19:54:43 +04:00
# NB: PATH has no effect here
2011-06-12 19:06:36 +04:00
i f n d e f B U I L D D I R
2011-09-02 00:01:52 +04:00
BUILDDIR := $( shell [ -s " $( SYMLINK) " ] \
&& realpath " $( SYMLINK) " \
2011-06-12 19:06:36 +04:00
|| bin/mktmpdir mkimage-profiles.build)
e n d i f
# even smart caching only hurts when every build goes from scratch
NO_CACHE ?= 1
2011-09-13 19:54:43 +04:00
PATH := $( CURDIR) /bin:$( PATH)
export BUILDDIR NO_CACHE PATH
2011-05-11 23:40:47 +04:00
2011-08-22 20:29:22 +04:00
# holds a postprocessor; shell test executes in particular situation
# NB: not exported, for toplevel use only
2011-09-02 00:01:52 +04:00
SHORTEN = $( shell [ " $( DEBUG) " != 2 -a -s " $( SYMLINK) " ] \
&& echo " | sed 's, $( BUILDDIR) , $( SYMLINK) ,' " )
2011-08-22 20:29:22 +04:00
server-ovz; KDEFAULT; syslinux features reworked
Renamed server-light.iso into server-ovz.iso to avoid brand dilution
and confusion (rider@'s server-light rather favours kvm, anyways).
Introduced KDEFAULT: a reliable default kernel chooser knob
since apt's regex ordering proved pretty unreliable.
Spelling things explicitly is better anyways.
SYSLINUX related features undergone pretty major rewrite
(that includes syslinux, hdt and memtest).
The problem to tackle was features.in/syslinux/generate.mk
assuming syslinux and pciids available in build *host* system;
this well might not be the case (or worse yet, those can be
just different). So now we're a bit less elegant and a bit
more enterprise, stuffing things into chroot and working there.
Bunch of other fixes along the road, including ; to name a few:
- fixed memtest entry (overlooked while renaming SYSLINUX_ITEMS)
- new and shiny doc/CodingStyle
- gfxboot, stage1 target chain, hdt tweaks
- distro.mk rehashed
- README++
- TODO: dropped (integer overflow anyways)
+ actually moved off-tree to reduce commit spam
- s,\.config\.mk,distcfg.mk,g
- doc/profiles.mk.sample: sample ~/.mkimage/profiles.mk
- ...and assorted fixups/additions
Sorry for convoluted commit, this would have been pretty hard to
rework into some really readable shape (and you might be interested
in the original repo's history horrors then, anyways).
2011-05-31 02:05:33 +04:00
# step 1: initialize the off-tree mkimage profile (BUILDDIR)
2011-05-11 23:40:47 +04:00
profile/init : distclean
@echo -n "** initializing BUILDDIR: "
2010-09-09 13:50:29 +04:00
@rsync -qaH --delete image.in/ " $( BUILDDIR) " /
2011-09-14 00:45:57 +04:00
@{ \
echo "ifndef DISTCFG_MK" ; \
echo "DISTCFG_MK = 1" ; \
} > " $( BUILDDIR) " /distcfg.mk
2011-06-12 19:06:36 +04:00
@{ \
git show-ref --head -d -s -- HEAD && \
git status -s && \
echo; \
2011-09-02 00:01:52 +04:00
} $( LOG)
2010-09-27 23:02:57 +04:00
@mkdir " $( BUILDDIR) " /.mki # mkimage toplevel marker
2010-09-18 18:46:32 +04:00
@type -t git >& /dev/null && \
cd $( BUILDDIR) && \
git init -q && \
git add . && \
2011-08-22 20:29:22 +04:00
git commit -qam 'distribution profile initialized'
2011-09-02 00:01:52 +04:00
@rm -f " $( SYMLINK) " && \
server-ovz; KDEFAULT; syslinux features reworked
Renamed server-light.iso into server-ovz.iso to avoid brand dilution
and confusion (rider@'s server-light rather favours kvm, anyways).
Introduced KDEFAULT: a reliable default kernel chooser knob
since apt's regex ordering proved pretty unreliable.
Spelling things explicitly is better anyways.
SYSLINUX related features undergone pretty major rewrite
(that includes syslinux, hdt and memtest).
The problem to tackle was features.in/syslinux/generate.mk
assuming syslinux and pciids available in build *host* system;
this well might not be the case (or worse yet, those can be
just different). So now we're a bit less elegant and a bit
more enterprise, stuffing things into chroot and working there.
Bunch of other fixes along the road, including ; to name a few:
- fixed memtest entry (overlooked while renaming SYSLINUX_ITEMS)
- new and shiny doc/CodingStyle
- gfxboot, stage1 target chain, hdt tweaks
- distro.mk rehashed
- README++
- TODO: dropped (integer overflow anyways)
+ actually moved off-tree to reduce commit spam
- s,\.config\.mk,distcfg.mk,g
- doc/profiles.mk.sample: sample ~/.mkimage/profiles.mk
- ...and assorted fixups/additions
Sorry for convoluted commit, this would have been pretty hard to
rework into some really readable shape (and you might be interested
in the original repo's history horrors then, anyways).
2011-05-31 02:05:33 +04:00
if [ -w . ] ; then \
2011-09-02 00:01:52 +04:00
ln -sf " $( BUILDDIR) " " $( SYMLINK) " && \
echo " $( SYMLINK) / " ; \
server-ovz; KDEFAULT; syslinux features reworked
Renamed server-light.iso into server-ovz.iso to avoid brand dilution
and confusion (rider@'s server-light rather favours kvm, anyways).
Introduced KDEFAULT: a reliable default kernel chooser knob
since apt's regex ordering proved pretty unreliable.
Spelling things explicitly is better anyways.
SYSLINUX related features undergone pretty major rewrite
(that includes syslinux, hdt and memtest).
The problem to tackle was features.in/syslinux/generate.mk
assuming syslinux and pciids available in build *host* system;
this well might not be the case (or worse yet, those can be
just different). So now we're a bit less elegant and a bit
more enterprise, stuffing things into chroot and working there.
Bunch of other fixes along the road, including ; to name a few:
- fixed memtest entry (overlooked while renaming SYSLINUX_ITEMS)
- new and shiny doc/CodingStyle
- gfxboot, stage1 target chain, hdt tweaks
- distro.mk rehashed
- README++
- TODO: dropped (integer overflow anyways)
+ actually moved off-tree to reduce commit spam
- s,\.config\.mk,distcfg.mk,g
- doc/profiles.mk.sample: sample ~/.mkimage/profiles.mk
- ...and assorted fixups/additions
Sorry for convoluted commit, this would have been pretty hard to
rework into some really readable shape (and you might be interested
in the original repo's history horrors then, anyways).
2011-05-31 02:05:33 +04:00
else \
echo " $( BUILDDIR) / " ; \
fi
2010-09-09 13:50:29 +04:00
2011-09-14 00:45:57 +04:00
profile/finalize : distro /.rc
@echo "endif" >> " $( BUILDDIR) " /distcfg.mk
2011-09-02 00:01:52 +04:00
# requires already formed distcfg.mk for useful output
profile/dump-vars :
@if [ -s " $( SYMLINK) " ] ; then \
$( MAKE) --no-print-directory -C " $( SYMLINK) / " -f vars.mk; \
echo; \
fi $( LOG)
server-ovz; KDEFAULT; syslinux features reworked
Renamed server-light.iso into server-ovz.iso to avoid brand dilution
and confusion (rider@'s server-light rather favours kvm, anyways).
Introduced KDEFAULT: a reliable default kernel chooser knob
since apt's regex ordering proved pretty unreliable.
Spelling things explicitly is better anyways.
SYSLINUX related features undergone pretty major rewrite
(that includes syslinux, hdt and memtest).
The problem to tackle was features.in/syslinux/generate.mk
assuming syslinux and pciids available in build *host* system;
this well might not be the case (or worse yet, those can be
just different). So now we're a bit less elegant and a bit
more enterprise, stuffing things into chroot and working there.
Bunch of other fixes along the road, including ; to name a few:
- fixed memtest entry (overlooked while renaming SYSLINUX_ITEMS)
- new and shiny doc/CodingStyle
- gfxboot, stage1 target chain, hdt tweaks
- distro.mk rehashed
- README++
- TODO: dropped (integer overflow anyways)
+ actually moved off-tree to reduce commit spam
- s,\.config\.mk,distcfg.mk,g
- doc/profiles.mk.sample: sample ~/.mkimage/profiles.mk
- ...and assorted fixups/additions
Sorry for convoluted commit, this would have been pretty hard to
rework into some really readable shape (and you might be interested
in the original repo's history horrors then, anyways).
2011-05-31 02:05:33 +04:00
# step 3 entry point: copy the needed parts into BUILDDIR
2011-09-14 00:45:57 +04:00
profile/populate : profile /init profile /finalize profile /dump -vars
2010-09-14 14:18:53 +04:00
@for dir in sub.in features.in pkg.in; do \
2011-05-11 23:40:47 +04:00
$( MAKE) -C $$ dir $( LOG) ; \
2010-09-09 13:50:29 +04:00
done