Commit 4cb23d7c authored by Michael Shigorin's avatar Michael Shigorin

drop the dummy configure

It wasn't serving any good by now... README++ and cleanups all over the place
parent 9a8f8ef7
see also http://www.altlinux.org/Mkimage/Profiles/next see also http://www.altlinux.org/Mkimage/Profiles/next;
quickstart:
make distclean server-light.iso
Концепция:
- метапрофиль служит репозиторием всего возможно нужного для
построения индивидуального профиля, по которому создаётся
итоговый дистрибутив
Особенности:
- метапрофиль может быть полностью read-only
- для сборки подыскивается предпочтительно tmpfs
- в профиль копируются только нужные объекты
Объекты: Объекты:
- дистрибутивы: distro.mk, могут основываться один на другом; - дистрибутивы: distro.mk, могут основываться один на другом;
......
clean: clean:
@echo '** cleaning up...' @echo '** cleaning up...'
@[ -d build/ ] && \ @[ -d build/ ] && \
make -C build/ $@ GLOBAL_BUILDDIR=$(shell readlink build) \ $(MAKE) -C build/ $@ GLOBAL_BUILDDIR=$(shell readlink build) \
||: ||:
distclean: clean distclean: clean
@[ -d build/ ] && \ @[ -d build/ ] && \
rm -rf build/.git; \ rm -rf build/.git; \
make -C build/ $@ GLOBAL_BUILDDIR=$(shell readlink build) && \ $(MAKE) -C build/ $@ GLOBAL_BUILDDIR=$(shell readlink build) && \
rm -r $(shell readlink build) && \ rm -r $(shell readlink build) && \
rm build \ rm build \
||: ||:
#!/bin/sh
# this is a chinese configure script:
# it would take any parameters,
# nod the head intelligently,
# and hide 'em beneath the clothes
# (until time comes)
PARAMS="$@"
# TODO: grep/validate?
# create suitable temporary directory for this build, then
# copy profiles there to configure a copy, not master tree
# keeping profile itself completely readonly would be nice
#export BUILDDIR="$(bin/mktmpdir mkimage-profiles.build)"
#ls -ld $BUILDDIR
#find image.in -type f -print0 | xargs -r0 cp -at "$BUILDDIR"/ --
#rsync -qaH --delete image.in/ "$BUILDDIR"/
#rm -f "$BUILDDIR"/.config.mk
#touch "$BUILDDIR"/.config.mk
#mkdir "$BUILDDIR"/.mki
#rm -f build
#[ -w . ] \
#&& ln -sf "$BUILDDIR" build \
#|| echo "profile directory readonly: skipping symlinks, env only"
# remember all those --with-*? we'll pass them downstream, honestly
#echo "$PARAMS" > "$BUILDDIR"/.with
...@@ -5,13 +5,8 @@ CONFIG = $(BUILDDIR)/.config.mk ...@@ -5,13 +5,8 @@ CONFIG = $(BUILDDIR)/.config.mk
-include features.in/*/config.mk -include features.in/*/config.mk
# put(), add(), set(), tags() # put(), add(), set(), tags()
include functions.mk #
# package list names are considered relative to pkg/lists/
# request particular image subprofile inclusion
sub/%:
$(call put,SUBPROFILES+=$(@:sub/%=%))
# package list names are relative to pkg/lists/
# #
# $(VAR) will be substituted before writing them to $(CONFIG); # $(VAR) will be substituted before writing them to $(CONFIG);
# $$(VAR) will remain unsubstituted util $(CONFIG) is included # $$(VAR) will remain unsubstituted util $(CONFIG) is included
...@@ -19,7 +14,12 @@ sub/%: ...@@ -19,7 +14,12 @@ sub/%:
# can change its value during configuration _before_ # can change its value during configuration _before_
# it's actually used) # it's actually used)
# #
# tags do boolean expressions: (tag1 && !(tag2 || tag3)) # tags can do boolean expressions: (tag1 && !(tag2 || tag3))
include functions.mk
# request particular image subprofile inclusion
sub/%:
$(call add,SUBPROFILES,$(@:sub/%=%))
distro/init: distro/init:
@echo "** starting distro configuration build process" @echo "** starting distro configuration build process"
......
...@@ -2,18 +2,16 @@ include $(BUILDDIR)/.config.mk ...@@ -2,18 +2,16 @@ include $(BUILDDIR)/.config.mk
# make rsync backups # make rsync backups
all: all:
for dir in $(FEATURES); do \ @for dir in $(FEATURES); do \
for sub in $(SUBPROFILES); do \ for sub in $(SUBPROFILES); do \
dest=$${sub%stage1}; \ dest=$${sub%stage1}; \
echo "dir/sub: [$$dir/$$sub/]" && \
[ -d $$dir/$$sub/ ] && \ [ -d $$dir/$$sub/ ] && \
echo rsync -ab $$dir/$$sub/ $(BUILDDIR)/$$dest/ && \
rsync -ab $$dir/$$sub/ $(BUILDDIR)/$$dest/ && \ rsync -ab $$dir/$$sub/ $(BUILDDIR)/$$dest/ && \
cd $(BUILDDIR)/$$dest/ && \ cd $(BUILDDIR)/$$dest/ && \
git add . && \ git add . && \
git commit -qam "$@/$$dir/$$sub" && \ git commit -qam "$@/$$dir/$$sub" && \
cd ->&/dev/null; \ cd ->&/dev/null; \
done; \ done; \
done; \ done
find $(BUILDDIR) -name '*~'
@# these might signal of file clashes (or plain dirt) @# these might signal of file clashes (or plain dirt)
@find $(BUILDDIR) -name '*~'
export export
MKIMAGE_PREFIX=@MKIMAGE_PREFIX@ MKIMAGE_PREFIX = @MKIMAGE_PREFIX@
GLOBAL_HSH_APT_CONFIG=@APTCONF@ GLOBAL_HSH_APT_CONFIG = @APTCONF@
GLOBAL_VERBOSE=0 GLOBAL_VERBOSE ?= 0
iso: iso:
@echo "** starting image build process" @echo "** starting image build process"
@### setup GLOBAL_BOOT_TYPE, etc
(cd $(BUILDDIR)/; autoconf; ./configure --with-aptconf=$(HOME)/apt/apt.conf) ### (cd $(BUILDDIR)/; autoconf; ./configure --with-aptconf=$(HOME)/apt/apt.conf) ###
$(MAKE) -C $(BUILDDIR)/ GLOBAL_BUILDDIR=$(BUILDDIR) $(MAKE) -C $(BUILDDIR)/ GLOBAL_BUILDDIR=$(BUILDDIR)
@# check iso size
profile/init: profile/init:
@echo "** BUILDDIR: $(BUILDDIR)" @echo "** BUILDDIR: $(BUILDDIR)"
# ls -ld $(BUILDDIR)
@rsync -qaH --delete image.in/ "$(BUILDDIR)"/ @rsync -qaH --delete image.in/ "$(BUILDDIR)"/
@touch "$(BUILDDIR)"/.config.mk @touch "$(BUILDDIR)"/.config.mk
@mkdir "$(BUILDDIR)"/.mki @mkdir "$(BUILDDIR)"/.mki
......
include $(BUILDDIR)/.config.mk include $(BUILDDIR)/.config.mk
all: all:
ls -l $(BUILDDIR)/.config.mk @for dir in $(SUBPROFILES); do \
echo -- SUBPROFILES: $(SUBPROFILES)
for dir in $(SUBPROFILES); do \
echo -- rsync -a $$dir/ $(BUILDDIR)/$$dir/ && \
rsync -a $$dir/ $(BUILDDIR)/$$dir/ && \ rsync -a $$dir/ $(BUILDDIR)/$$dir/ && \
cd $(BUILDDIR)/$$dir/ && \ cd $(BUILDDIR)/$$dir/ && \
git add . && \ git add . && \
...@@ -13,7 +10,7 @@ all: ...@@ -13,7 +10,7 @@ all:
done done
clean: clean:
for dir in $(SUBPROFILES); do \ @for dir in $(SUBPROFILES); do \
[ -n "$$dir" ] && \ [ -n "$$dir" ] && \
rm -rf $(BUILDDIR)/$$dir && \ rm -rf $(BUILDDIR)/$$dir && \
mkdir -p $(BUILDDIR)/$$dir ||:; \ mkdir -p $(BUILDDIR)/$$dir ||:; \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment