Commit 665c70a4 authored by Michael Shigorin's avatar Michael Shigorin

use PATH instead of hardwired pathlets

bin/ prefix tried to become a permatemp(tm). No way.
parent 68022a32
...@@ -12,10 +12,12 @@ endif ...@@ -12,10 +12,12 @@ endif
endif endif
export ARCHES export ARCHES
export PATH := $(CURDIR)/bin:$(PATH)
# supervise target tracing; leave stderr alone # supervise target tracing; leave stderr alone
ifdef REPORT ifdef REPORT
export REPORT_PATH := $(shell mktemp --tmpdir mkimage-profiles.report.XXXXXXX) export REPORT_PATH := $(shell mktemp --tmpdir mkimage-profiles.report.XXXXXXX)
POSTPROC := | bin/report-filter > $(REPORT_PATH) POSTPROC := | report-filter > $(REPORT_PATH)
endif endif
# recursive make considered useful for m-p # recursive make considered useful for m-p
......
...@@ -47,7 +47,8 @@ add_feature = $(call add,FEATURES,$(word 2,$(subst /, ,$@))) ...@@ -47,7 +47,8 @@ add_feature = $(call add,FEATURES,$(word 2,$(subst /, ,$@)))
# convert tag list into a list of relative package list paths # convert tag list into a list of relative package list paths
# NB: tags can do boolean expressions: (tag1 && !(tag2 || tag3)) # NB: tags can do boolean expressions: (tag1 && !(tag2 || tag3))
tags = $(and $(strip $(1)),$(addprefix tagged/,$(shell echo "$(1)" | bin/tags2lists pkg.in/lists/tagged))) tags = $(and $(strip $(1)),$(addprefix tagged/,$(shell echo "$(1)" \
| tags2lists pkg.in/lists/tagged)))
# toplevel Makefile convenience # toplevel Makefile convenience
addsuffices = $(foreach s,$(1),$(call addsuffix,$s,$(2))) addsuffices = $(foreach s,$(1),$(call addsuffix,$s,$(2)))
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
help/distro: help/distro:
@echo '** available distribution targets:'; \ @echo '** available distribution targets:'; \
bin/columnize $(sort $(DISTROS:distro/%=%)) columnize $(sort $(DISTROS:distro/%=%))
help/ve: help/ve:
@echo '** available virtual environment targets:'; \ @echo '** available virtual environment targets:'; \
bin/columnize $(sort $(VES)) columnize $(sort $(VES))
help: | help/distro help/space help/ve; @: help: | help/distro help/space help/ve; @:
help/space:; @echo help/space:; @echo
...@@ -15,7 +15,7 @@ if [ -s "$(SYMLINK)" -a "$(NUM_TARGETS)" = 1 ] && \ ...@@ -15,7 +15,7 @@ if [ -s "$(SYMLINK)" -a "$(NUM_TARGETS)" = 1 ] && \
then \ then \
echo "$(BUILDLINK)"; \ echo "$(BUILDLINK)"; \
else \ else \
bin/mktmpdir $(BUILDDIR_PREFIX) || exit 200; \ mktmpdir $(BUILDDIR_PREFIX) || exit 200; \
fi; ) fi; )
endif endif
...@@ -26,9 +26,7 @@ endif ...@@ -26,9 +26,7 @@ endif
# even smart caching only hurts when every build goes from scratch # even smart caching only hurts when every build goes from scratch
NO_CACHE ?= 1 NO_CACHE ?= 1
PATH := $(CURDIR)/bin:$(PATH) export BUILDDIR NO_CACHE
export BUILDDIR NO_CACHE PATH
CONFIG := $(BUILDDIR)/distcfg.mk CONFIG := $(BUILDDIR)/distcfg.mk
RC := $(HOME)/.mkimage/profiles.mk RC := $(HOME)/.mkimage/profiles.mk
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
# --- in BUILDDIR # --- in BUILDDIR
# 4. build subprofiles and subsequently an image # 4. build subprofiles and subsequently an image
MKIMAGE_PROFILES = $(dir $(lastword $(MAKEFILE_LIST))) MKIMAGE_PROFILES := $(dir $(lastword $(MAKEFILE_LIST)))
# deal with one target at a time # deal with one target at a time
IMAGE_TARGET := $(firstword $(MAKECMDGOALS))# ve/generic.tar.gz IMAGE_TARGET := $(firstword $(MAKECMDGOALS))# ve/generic.tar.gz
......
...@@ -7,7 +7,7 @@ reports/targets: ...@@ -7,7 +7,7 @@ reports/targets:
BUILDDIR="`sed -n 's/^.* BUILDDIR = \(.*\)/\1/p' \ BUILDDIR="`sed -n 's/^.* BUILDDIR = \(.*\)/\1/p' \
"$$REPORT_PATH"`"; \ "$$REPORT_PATH"`"; \
REPORT_IMAGE="$$BUILDDIR/targets.png"; \ REPORT_IMAGE="$$BUILDDIR/targets.png"; \
bin/report-targets < "$$REPORT_PATH" \ report-targets < "$$REPORT_PATH" \
| dot -Tpng -o "$$REPORT_IMAGE" \ | dot -Tpng -o "$$REPORT_IMAGE" \
&& echo "** target graph report: $$REPORT_IMAGE" \ && echo "** target graph report: $$REPORT_IMAGE" \
&& mv "$$REPORT_PATH" "$$BUILDDIR/targets.log"; \ && mv "$$REPORT_PATH" "$$BUILDDIR/targets.log"; \
......
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