Add LIBDIR variable.
Allow to put the log files and reports in a custom directory instead of IMIGEDIR.
This commit is contained in:
parent
fc716ec048
commit
9bd853e88c
@ -74,12 +74,14 @@ postprocess: | $(addprefix postprocess-,$(sort $(POSTPROCESS_TARGETS)))
|
||||
@OUTSIZE="`ls -lh "$(IMAGE_OUTPATH)" | cut -f5 -d' '`"; \
|
||||
echo "** image: $(IMAGE_OUTPATH) [$$OUTSIZE]" >&2 && \
|
||||
echo "IMAGE_OUTPATH = $(IMAGE_OUTPATH)" && \
|
||||
echo "IMAGE_OUTFILE = $(IMAGE_OUTFILE)" && \
|
||||
ln -sf "$(IMAGE_RELPATH)" "$(IMAGE_LINKPATH)" && \
|
||||
ln -sf "$(IMAGE_RELDIR)" "$(OUT_LINK)" && \
|
||||
ln -sf "$(IMAGE_LINK)" "$(IMAGEDIR)/$(CURRENT_LINK).$(IMAGE_TYPE)"; \
|
||||
if [ -n "$(GLOBAL_DEBUG)" ]; then \
|
||||
cp -a build.log "$(IMAGE_OUTPATH).log"; \
|
||||
cp -a distcfg.mk "$(IMAGE_OUTPATH).cfg"; \
|
||||
mkdir -p "$(LOGDIR)"; \
|
||||
cp -a build.log "$(LOGDIR)/$(IMAGE_OUTFILE).log"; \
|
||||
cp -a distcfg.mk "$(LOGDIR)/$(IMAGE_OUTFILE).cfg"; \
|
||||
fi
|
||||
|
||||
debug:
|
||||
|
@ -33,6 +33,8 @@ IMAGEDIR ?= $(shell \
|
||||
fi; \
|
||||
)
|
||||
|
||||
LOGDIR ?= $(IMAGEDIR)
|
||||
|
||||
# actual build starter
|
||||
# NB: our output MUST go into stderr to escape POSTPROC
|
||||
build-image: profile/populate
|
||||
|
@ -84,6 +84,7 @@ profile/bare: profile/init
|
||||
@$(call try,MKIMAGE_PREFIX,/usr/share/mkimage)
|
||||
@$(call try,GLOBAL_VERBOSE,)
|
||||
@$(call try,IMAGEDIR,$(IMAGEDIR))
|
||||
@$(call try,LOGDIR,$(LOGDIR))
|
||||
@$(call try,BRANDING,altlinux-sisyphus)
|
||||
@$(call set,IMAGE_INIT_LIST,+branding-$$(BRANDING)-release)
|
||||
@if type -t git >&/dev/null && cd $(BUILDDIR); then \
|
||||
|
@ -8,6 +8,8 @@ BUILDDIR := $(shell sed -n 's/^.* BUILDDIR = \(.*\)/\1/p' "$(REPORT_PATH)")
|
||||
BUILDLOG := $(BUILDDIR)/$(BUILD_LOG)
|
||||
REPORTDIR := $(BUILDDIR)/reports
|
||||
IMAGE_OUTPATH := $(shell sed -n 's/^IMAGE_OUTPATH = \(.*\)/\1/p' $(BUILDLOG))
|
||||
IMAGE_OUTFILE := $(shell sed -n 's/^IMAGE_OUTFILE = \(.*\)/\1/p' $(BUILDLOG))
|
||||
LOGDIR := $(shell sed -n 's/^LOGDIR = \(.*\)/\1/p' $(BUILDLOG))
|
||||
|
||||
# for a multi-image build there's no sense to refer to buildroot
|
||||
# contained reports as these are very ephemeral between builds
|
||||
@ -17,7 +19,7 @@ endif
|
||||
|
||||
all: reports/targets reports/scripts
|
||||
@if [ -n "$(IMAGE_OUTPATH)" ]; then \
|
||||
cp -a $(REPORTDIR) $(IMAGE_OUTPATH).reports; \
|
||||
cp -a "$(REPORTDIR)" "$(LOGDIR)/$(IMAGE_OUTFILE).reports"; \
|
||||
fi
|
||||
|
||||
reports/prep:
|
||||
|
Loading…
Reference in New Issue
Block a user