1# -*- coding: utf-8; mode: makefile-gmake -*-
3ifeq (,$(wildcard /.lxcenv.mk))
4PHONY += lxc-activate lxc-purge
6 @$(MAKE) -s -f "$$(dirname $(abspath $(lastword $(MAKEFILE_LIST))))/makefile.lxc" lxc-activate
13ifeq (,$(wildcard /.lxcenv.mk))
18 @echo ' make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build'
19 @echo ' make V=2 [targets] 2 => give reason for rebuild of target'
21quiet_cmd_common_clean = CLEAN $@
23 find . -name '*.orig' -exec rm -f {} + ;\
24 find . -name '*.rej' -exec rm -f {} + ;\
25 find . -name '*~' -exec rm -f {} + ;\
26 find . -name '*.bak' -exec rm -f {} + ;\
29ifeq ($(shell which fmt >/dev/null 2>&1; echo $$?), 0)
35# For a minimal *make-environment*, I'am using the gnu-tools from:
37# - GNU MCU Eclipse Windows Build Tools, which brings 'make', 'rm' etc.
38# https://github.com/gnu-mcu-eclipse/windows-build-tools/releases
40# - git for Windows, which brings 'find', 'grep' etc.
41# https://git-scm.com/download/win
46# System-dependent normalization of the path name
48# usage: $(call normpath,/path/to/file)
51ifeq ($(OS),Windows_NT)
52 normpath = $(subst /,\,$1)
56# stolen from linux/Makefile
59ifeq ("$(origin V)", "command line")
66ifeq ($(KBUILD_VERBOSE),1)
74# stolen from linux/scripts/Kbuild.include
80#" this comment is only for emacs highlighting
82#' this comment is only for emacs highlighting
84space := $(empty) $(empty)
85space_escape := _-_SPACE_-_
87# Find any prerequisites that is newer than target or that does not exist.
88# PHONY targets skipped in both cases.
89any-prereq = $(filter-out $(PHONY),$?) $(filter-out $(PHONY) $(wildcard $^),$^)
92# why - tell why a a target got build
94# Output (listed in the order they are checked):
95# (1) - due to target is PHONY
96# (2) - due to target missing
97# (3) - due to: file1.h file2.h
98# (4) - due to command line change
99# (5) - due to missing .cmd file
100# (6) - due to target not in $(targets)
101# (1) PHONY targets are always build
102# (2) No target, so we better build it
103# (3) Prerequisite is newer than target
104# (4) The command line stored in the file named dir/.target.cmd
105# differed from actual command line. This happens when compiler
107# (5) No dir/.target.cmd file (used to store command line)
108# (6) No dir/.target.cmd file and target not listed in $(targets)
109# This is a good hint that there is a bug in the kbuild file
110ifeq ($(KBUILD_VERBOSE),2)
112 $(if $(filter $@, $(PHONY)),- due to target is PHONY, \
113 $(if $(wildcard $@), \
114 $(if $(strip $(any-prereq)),- due to: $(any-prereq), \
116 $(if $(cmd_$@),- due to command line change, \
117 $(if $(filter $@, $(targets)), \
118 - due to missing .cmd file, \
119 - due to $(notdir $@) not in $$(targets) \
124 - due to target missing \
128echo-why = $(call escsq, $(strip $(why)))
132# Escape single quote for use in echo statements
133escsq = $(subst $(squote),'\$(squote)',$1)
136# Short version is used, if $(quiet) equals `quiet_', otherwise full one.
137echo-cmd = $(if $($(quiet)cmd_$(1)),echo '$(call escsq,$($(quiet)cmd_$(1)))$(echo-why)';)
140cmd = @$(echo-cmd) $(cmd_$(1))
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list