1# -*- coding: utf-8; mode: makefile-gmake -*-
3ifeq (,$(wildcard /.lxcenv.mk))
6 @$(MAKE) -s -f /share/searx/utils/makefile.lxc lxc-activate
11ifeq (,$(wildcard /.lxcenv.mk))
16 @echo ' make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build'
17 @echo ' make V=2 [targets] 2 => give reason for rebuild of target'
19quiet_cmd_common_clean = CLEAN $@
21 find . -name '*.orig' -exec rm -f {} + ;\
22 find . -name '*.rej' -exec rm -f {} + ;\
23 find . -name '*~' -exec rm -f {} + ;\
24 find . -name '*.bak' -exec rm -f {} + ;\
27ifeq ($(shell which fmt >/dev/null 2>&1; echo $$?), 0)
33# For a minimal *make-environment*, I'am using the gnu-tools from:
35# - GNU MCU Eclipse Windows Build Tools, which brings 'make', 'rm' etc.
36# https://github.com/gnu-mcu-eclipse/windows-build-tools/releases
38# - git for Windows, which brings 'find', 'grep' etc.
39# https://git-scm.com/download/win
44# System-dependent normalization of the path name
46# usage: $(call normpath,/path/to/file)
49ifeq ($(OS),Windows_NT)
50 normpath = $(subst /,\,$1)
54# stolen from linux/Makefile
57ifeq ("$(origin V)", "command line")
64ifeq ($(KBUILD_VERBOSE),1)
72# stolen from linux/scripts/Kbuild.include
78#" this comment is only for emacs highlighting
80#' this comment is only for emacs highlighting
82space := $(empty) $(empty)
83space_escape := _-_SPACE_-_
85# Find any prerequisites that is newer than target or that does not exist.
86# PHONY targets skipped in both cases.
87any-prereq = $(filter-out $(PHONY),$?) $(filter-out $(PHONY) $(wildcard $^),$^)
90# why - tell why a a target got build
92# Output (listed in the order they are checked):
93# (1) - due to target is PHONY
94# (2) - due to target missing
95# (3) - due to: file1.h file2.h
96# (4) - due to command line change
97# (5) - due to missing .cmd file
98# (6) - due to target not in $(targets)
99# (1) PHONY targets are always build
100# (2) No target, so we better build it
101# (3) Prerequisite is newer than target
102# (4) The command line stored in the file named dir/.target.cmd
103# differed from actual command line. This happens when compiler
105# (5) No dir/.target.cmd file (used to store command line)
106# (6) No dir/.target.cmd file and target not listed in $(targets)
107# This is a good hint that there is a bug in the kbuild file
108ifeq ($(KBUILD_VERBOSE),2)
110 $(if $(filter $@, $(PHONY)),- due to target is PHONY, \
111 $(if $(wildcard $@), \
112 $(if $(strip $(any-prereq)),- due to: $(any-prereq), \
114 $(if $(cmd_$@),- due to command line change, \
115 $(if $(filter $@, $(targets)), \
116 - due to missing .cmd file, \
117 - due to $(notdir $@) not in $$(targets) \
122 - due to target missing \
126echo-why = $(call escsq, $(strip $(why)))
130# Escape single quote for use in echo statements
131escsq = $(subst $(squote),'\$(squote)',$1)
134# Short version is used, if $(quiet) equals `quiet_', otherwise full one.
135echo-cmd = $(if $($(quiet)cmd_$(1)),echo '$(call escsq,$($(quiet)cmd_$(1)))$(echo-why)';)
138cmd = @$(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