[819] | 1 | # $Id: brief2.kmk 3130 2018-01-31 19:28:35Z bird $
|
---|
| 2 | ## @file
|
---|
| 3 | # kBuild Message Style - 'brief'
|
---|
| 4 | #
|
---|
[1547] | 5 |
|
---|
| 6 | #
|
---|
[3121] | 7 | # Copyright (c) 2007-2017 knut st. osmundsen <bird-kBuild-spam-xviiv@anduin.net>
|
---|
[819] | 8 | #
|
---|
| 9 | # This file is part of kBuild.
|
---|
| 10 | #
|
---|
| 11 | # kBuild is free software; you can redistribute it and/or modify
|
---|
| 12 | # it under the terms of the GNU General Public License as published by
|
---|
| 13 | # the Free Software Foundation; either version 2 of the License, or
|
---|
| 14 | # (at your option) any later version.
|
---|
| 15 | #
|
---|
| 16 | # kBuild is distributed in the hope that it will be useful,
|
---|
| 17 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 18 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 19 | # GNU General Public License for more details.
|
---|
| 20 | #
|
---|
| 21 | # You should have received a copy of the GNU General Public License
|
---|
| 22 | # along with kBuild; if not, write to the Free Software
|
---|
| 23 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
---|
| 24 | #
|
---|
| 25 | #
|
---|
[1547] | 26 | # As a special exception you are granted permission to include this file, via
|
---|
[2243] | 27 | # the kmk include directive, as you wish without this in itself causing the
|
---|
| 28 | # resulting makefile, program or whatever to be covered by the GPL license.
|
---|
[1547] | 29 | # This exception does not however invalidate any other reasons why the makefile,
|
---|
| 30 | # program, whatever should not be covered the GPL.
|
---|
| 31 | #
|
---|
| 32 | #
|
---|
[819] | 33 |
|
---|
| 34 | # Indent the messages, drop the kBuild: prefix, and shorten paths.
|
---|
| 35 | ifndef KBUILD_VERBOSE
|
---|
[892] | 36 | ifndef MSG_L1
|
---|
[3130] | 37 | MSG_L1 = %@$(PRINTF) " %-7s %s\n" \
|
---|
[890] | 38 | "$(subst $(PATH_ROOT)/,{R}/,$(subst $(PATH_OUT)/,{O}/,$(subst $(CURDIR)/,{C}/,$(subst $(PATH_TARGET)/,{T}/,$1))))" \
|
---|
| 39 | "$(subst $(PATH_ROOT)/,{R}/,$(subst $(PATH_OUT)/,{O}/,$(subst $(CURDIR)/,{C}/,$(subst $(PATH_TARGET)/,{T}/,$2))))"
|
---|
[892] | 40 | endif
|
---|
[2404] | 41 | ifndef MSG_L1I
|
---|
[3130] | 42 | MSG_L1I = %@$(PRINTF) " %-7s %s\n" "$1" "$2"
|
---|
[2404] | 43 | endif
|
---|
[819] | 44 | else
|
---|
[3130] | 45 | MSG_L1 ?= %@$(ECHO) " $(subst $(PATH_ROOT)/,{R}/,$(subst $(PATH_OUT)/,{O}/,$(subst $(CURDIR)/,{C}/,$(subst $(PATH_TARGET)/,{T}/,$1 $2))))"
|
---|
| 46 | MSG_L1I?= %@$(ECHO) " $1 $2"
|
---|
| 47 | MSG_L2 ?= %@$(ECHO) " $(subst $(PATH_ROOT)/,{R}/,$(subst $(PATH_OUT)/,{O}/,$(subst $(CURDIR)/,{C}/,$(subst $(PATH_TARGET)/,{T}/,$1))))"
|
---|
[819] | 48 | endif
|
---|
| 49 |
|
---|
| 50 | ## Fetch starting.
|
---|
| 51 | # @param 1 Target name.
|
---|
[890] | 52 | MSG_FETCH ?= $(call MSG_L1,FTCH,$1...)
|
---|
[819] | 53 | ## Re-fetch starting.
|
---|
| 54 | # @param 1 Target name.
|
---|
[890] | 55 | MSG_REFETCH ?= $(call MSG_L1,RFTCH,$1...)
|
---|
[819] | 56 | ## Downloading a fetch component.
|
---|
| 57 | # @param 1 Target name.
|
---|
| 58 | # @param 2 The source URL.
|
---|
| 59 | # @param 3 The destination file name.
|
---|
[890] | 60 | MSG_FETCH_DL ?= $(call MSG_L1,GET,$1 - $2,=> $3)
|
---|
[819] | 61 | ## Checking a fetch component.
|
---|
| 62 | # @param 1 Target name.
|
---|
| 63 | # @param 2 The source URL.
|
---|
| 64 | # @param 3 The destination file name.
|
---|
[890] | 65 | MSG_FETCH_CHK?= $(call MSG_L1,CHK,$1 - $3, ($2))
|
---|
[819] | 66 | ## Unpacking a fetch component.
|
---|
| 67 | # @param 1 Target name.
|
---|
| 68 | # @param 2 The archive file name.
|
---|
| 69 | # @param 3 The target directory.
|
---|
[890] | 70 | MSG_FETCH_UP ?= $(call MSG_L1,UNPK,$1 - $2,=> $3)
|
---|
[819] | 71 | ## Fetch completed.
|
---|
| 72 | # @param 1 Target name.
|
---|
[890] | 73 | MSG_FETCH_OK ?= $(call MSG_L1,DONE,$1)
|
---|
[819] | 74 | ## Unfetch a fetch target.
|
---|
| 75 | # @param 1 Target name.
|
---|
[890] | 76 | MSG_UNFETCH ?= $(call MSG_L1,RM,$1...)
|
---|
[819] | 77 | ## Compiling a source file.
|
---|
| 78 | # @param 1 Target name.
|
---|
| 79 | # @param 2 The source filename.
|
---|
| 80 | # @param 3 The primary link output file name.
|
---|
| 81 | # @param 4 The source type (CXX,C,AS,RC,++).
|
---|
[890] | 82 | MSG_COMPILE ?= $(call MSG_L1,$4,$1 - $2,=> $3)
|
---|
| 83 | ## Tool
|
---|
| 84 | # @param 1 The tool name (bin2c,...)
|
---|
| 85 | # @param 2 Target name.
|
---|
| 86 | # @param 3 The source filename.
|
---|
| 87 | # @param 4 The primary output file name.
|
---|
| 88 | MSG_TOOL ?= $(call MSG_L1,$1,$2 - $3,=> $4)
|
---|
| 89 | ## Generate a file, typically a source file.
|
---|
| 90 | # @param 1 Target name if applicable.
|
---|
| 91 | # @param 2 Output file name.
|
---|
| 92 | # @param 3 What it's generated from
|
---|
| 93 | MSG_GENERATE ?= $(call MSG_L1,GEN,$2)
|
---|
[819] | 94 | ## Linking a bldprog/dll/program/sysmod target.
|
---|
| 95 | # @param 1 Target name.
|
---|
| 96 | # @param 2 The primary link output file name.
|
---|
| 97 | # @param 3 The link tool operation (LINK_LIBRARY,LINK_PROGRAM,LINK_DLL,LINK_SYSMOD,++).
|
---|
[2404] | 98 | MSG_LINK ?= $(call MSG_L1I,$(if $(eq $3,LINK_LIBRARY),AR,LD),$1 => $2,)
|
---|
[844] | 99 | ## Merging a library into the target (during library linking).
|
---|
| 100 | # @param 1 Target name.
|
---|
| 101 | # @param 2 The output library name.
|
---|
| 102 | # @param 3 The input library name.
|
---|
| 103 | MSG_AR_MERGE ?= $(NO_SUCH_VARIABLE)
|
---|
[819] | 104 | ## Creating a directory (build).
|
---|
| 105 | # @param 1 Directory name.
|
---|
[890] | 106 | MSG_MKDIR ?= $(call MSG_L2,DIR,$1)
|
---|
[819] | 107 | ## Cleaning.
|
---|
| 108 | MSG_CLEAN ?= $(call MSG_L1,CLEAN)
|
---|
| 109 | ## Nothing.
|
---|
| 110 | MSG_NOTHING ?= $(call MSG_L1,NOTHING $(CURDIR))
|
---|
| 111 | ## Installing a bldprog/lib/dll/program/sysmod target.
|
---|
| 112 | # @param 1 Target name.
|
---|
| 113 | # @param 2 The source filename.
|
---|
| 114 | # @param 3 The destination file name.
|
---|
[2404] | 115 | MSG_INST_TRG ?= $(call MSG_L1I,INST,$1 => $3)
|
---|
[819] | 116 | ## Installing a file (install target).
|
---|
| 117 | # @param 1 The source filename.
|
---|
| 118 | # @param 2 The destination filename.
|
---|
[2404] | 119 | MSG_INST_FILE?= $(call MSG_L1I,IFIL,$2,(<= $1))
|
---|
[819] | 120 | ## Installing a symlink.
|
---|
| 121 | # @param 1 Symlink
|
---|
| 122 | # @param 2 Link target
|
---|
[2404] | 123 | MSG_INST_SYM ?= $(call MSG_L1I,ISYM,$1,=> $2)
|
---|
[819] | 124 | ## Installing a directory.
|
---|
| 125 | # @param 1 Directory name.
|
---|
[2404] | 126 | MSG_INST_DIR ?= $(call MSG_L1I,IDIR,$1)
|
---|
[819] | 127 |
|
---|