123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- ifeq (,$(wildcard /.lxcenv.mk))
- PHONY += lxc-activate lxc-purge
- lxc-activate:
- @$(MAKE) -s -f "$$(dirname $(abspath $(lastword $(MAKEFILE_LIST))))/makefile.lxc" lxc-activate
- lxc-purge:
- $(Q)rm -rf ./lxc-env
- else
- include /.lxcenv.mk
- endif
- PHONY += make-help
- ifeq (,$(wildcard /.lxcenv.mk))
- make-help:
- else
- make-help: lxc-help
- endif
- @echo 'options:'
- @echo ' make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build'
- @echo ' make V=2 [targets] 2 => give reason for rebuild of target'
- ifeq ("$(origin V)", "command line")
- VERBOSE = $(V)
- endif
- ifndef VERBOSE
- VERBOSE = 0
- endif
- export VERBOSE
- ifeq ($(VERBOSE),1)
- quiet =
- Q =
- else
- quiet=quiet_
- Q = @
- endif
- squote := '
- #' this comment is only for emacs highlighting
- any-prereq = $(filter-out $(PHONY),$?) $(filter-out $(PHONY) $(wildcard $^),$^)
- ifeq ($(VERBOSE),2)
- why = \
- $(if $(filter $@, $(PHONY)),- due to target is PHONY, \
- $(if $(wildcard $@), \
- $(if $(strip $(any-prereq)),- due to: $(any-prereq), \
- $(if $(arg-check), \
- $(if $(cmd_$@),- due to command line change, \
- $(if $(filter $@, $(targets)), \
- - due to missing .cmd file, \
- - due to $(notdir $@) not in $$(targets) \
- ) \
- ) \
- ) \
- ), \
- - due to target missing \
- ) \
- )
- echo-why = $(call escsq, $(strip $(why)))
- endif
- escsq = $(subst $(squote),'\$(squote)',$1)
- echo-cmd = $(if $($(quiet)cmd_$(1)),echo '$(call escsq,$($(quiet)cmd_$(1)))$(echo-why)';)
- cmd = @$(echo-cmd) $(cmd_$(1))
- .PHONY: $(PHONY)
|