lib/build.mk: add basic CHECK support
The idea is to check: - the reachability of every target used to build the image in question; - the availability of all the package lists and subsequently packages for that image; - the lack of "dangling" intermediate targets, features, pkglists, hooks etc. So far only the first step is implemented -- it's easy and somewhat helpful already for make CHECK=1 all
This commit is contained in:
parent
a1d0b4a7c0
commit
390f4f6bc8
@ -22,6 +22,11 @@
|
||||
+ значение: пусто (по умолчанию авто) либо строка
|
||||
+ см. ../lib/profile.mk
|
||||
|
||||
- CHECK
|
||||
+ включает режим проверки сборки конфигурации
|
||||
+ значение: пусто (по умолчанию) либо любая строка
|
||||
+ см. ../lib/build.mk
|
||||
|
||||
- CLEAN
|
||||
+ экономия RAM+swap при сборке в tmpfs, иначе места на диске
|
||||
+ очистка рабочего каталога после успешной сборки очередной стадии
|
||||
|
16
lib/build.mk
16
lib/build.mk
@ -29,8 +29,12 @@ IMAGEDIR ?= $(shell [ -d "$$HOME/out" -a -w "$$HOME/out" ] \
|
||||
|
||||
# poehali
|
||||
build: profile/populate
|
||||
@echo -n "$(TIME) starting image build"
|
||||
@if [ -n "$(DEBUG)" ]; then \
|
||||
@if [ -n "$(CHECK)" ]; then \
|
||||
echo "$(TIME) skipping actual image build (CHECK is set)"; \
|
||||
exit; \
|
||||
fi; \
|
||||
echo -n "$(TIME) starting image build"; \
|
||||
if [ -n "$(DEBUG)" ]; then \
|
||||
echo ": tail -f $(BUILDLOG)" $(SHORTEN); \
|
||||
else \
|
||||
if [ -n "$(ALL)" ]; then \
|
||||
@ -38,8 +42,8 @@ build: profile/populate
|
||||
else \
|
||||
echo " (coffee time)"; \
|
||||
fi; \
|
||||
fi
|
||||
@if $(START) $(MAKE) -C $(BUILDDIR)/ $(LOG); then \
|
||||
fi; \
|
||||
if $(START) $(MAKE) -C $(BUILDDIR)/ $(LOG); then \
|
||||
echo "$(TIME) done (`tail -1 $(BUILDLOG) | cut -f1 -d.`)"; \
|
||||
tail -200 "$(BUILDLOG)" \
|
||||
| GREP_COLOR="$(ANSI_OK)" \
|
||||
@ -54,5 +58,5 @@ build: profile/populate
|
||||
egrep --color=always "^(E:|[Ee]rror|[Ww]arning).*"; \
|
||||
df -P $(BUILDDIR) | awk 'END { if ($$4 < $(LOWSPACE)) \
|
||||
{ print "NB: low space on "$$6" ("$$5" used)"}}'; \
|
||||
fi
|
||||
@if [ -n "$(BELL)" ]; then echo -ne '\a' >&2; fi
|
||||
fi; \
|
||||
if [ -n "$(BELL)" ]; then echo -ne '\a' >&2; fi
|
||||
|
Loading…
Reference in New Issue
Block a user