source: trunk/kBuild/header.kmk@ 2519

Last change on this file since 2519 was 2515, checked in by bird, 14 years ago

header.kmk: Added PERCENT.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 44.9 KB
RevLine 
[69]1# $Id: header.kmk 2515 2011-07-26 09:07:53Z bird $
2## @file
[978]3# kBuild - File included at top of a makefile.
[69]4#
[1547]5
6#
[2413]7# Copyright (c) 2004-2010 knut st. osmundsen <bird-kBuild-spamx@anduin.net>
[69]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
[1561]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#
[69]33
34ifndef __header_kmk__
35# start-of-file-content
[988]36ifdef KBUILD_PROFILE_SELF
37 _KBUILD_TS_HEADER_START := $(nanots ) # just a dummy warm up query
[2008]38 $(info prof: since start - since previous -- event description)
39 ifeq ($(KBUILD_PROFILE_SELF),2)
40 $(info stat: $(make-stats ))
41 endif
[988]42 _KBUILD_TS_HEADER_START := $(nanots )
43 _KBUILD_TS_PREV := $(_KBUILD_TS_HEADER_START)
[2008]44
45 _KBUILD_FMT_ELAPSED_EX = $(int-div $(int-add $(int-sub $1, $2),500000),1000000)ms
46 _KBUILD_FMT_ELAPSED = $(call _KBUILD_FMT_ELAPSED_EX,$(_KBUILD_TS_NOW),$1)
47
48define def_profile_self
49 _KBUILD_TS_NOW := $(nanots )
50 $(info prof: $(call _KBUILD_FMT_ELAPSED,$(_KBUILD_TS_HEADER_START)) - $(call _KBUILD_FMT_ELAPSED, $(_KBUILD_TS_PREV)) -- $(strip $1))
51 ifeq ($(KBUILD_PROFILE_SELF),2)
52 $(info stat: $(make-stats ))
53 endif
54 _KBUILD_TS_PREV := $(_KBUILD_TS_NOW)
55endef
56
[988]57endif
[69]58
[978]59
[69]60#
[978]61# Check make version before we do anything else.
[69]62#
[978]63ifndef KMK_VERSION
[984]64 $(error kBuild: The kmk default variable KMK_VERSION isn't defined! Make sure you are using 'kmk' and not 'make', 'gmake', 'kmk_gmake', 'dmake' or any other make program)
[978]65endif
66ifneq ($(KBUILD_VERSION_MAJOR).$(KBUILD_VERSION_MINOR),0.1)
67 ifneq ($(KBUILD_VERSION_MAJOR),0)
[1348]68 $(warning kBuild: kmk major version mismatch! Expected '0' but found '$(KBUILD_VERSION_MAJOR)'!)
[978]69 else
[1348]70 $(warning kBuild: kmk minor version mismatch! Expected '1' but found '$(KBUILD_VERSION_MINOR)'!)
[978]71 endif
[1348]72else
[2512]73 if $(KBUILD_VERSION_PATCH) < 999
74 $(error kBuild: kmk version mismatch! Expected 0.1.999 or later. Actual version is $(KBUILD_VERSION).)
[1348]75 endif
[978]76endif
[69]77
78#
[978]79# The revision in which this file was last modified.
80# This can be useful when using development versions of kBuild.
[380]81#
[978]82KMK_REVISION := $(patsubst %:,, $Rev: 2515 $ )
[414]83
[978]84
[380]85#
[978]86# Define the default goal.
[69]87#
[1561]88.PHONY: all all_recursive
[978]89all: all_recursive
[69]90
[894]91#
[978]92# The phony FORCE target.
[894]93#
[1501]94.PHONY: FORCE
[978]95FORCE:
[72]96
[978]97
[69]98#
[1782]99# Enable delete on error and second expansion of prerequisites and targets.
[894]100#
[978]101.DELETE_ON_ERROR:
102
[894]103.SECONDEXPANSION:
104
[1782]105.SECONDTARGETEXPANSION:
[894]106
[1782]107
[894]108#
[95]109# General purpose macros.
110#
[204]111
[380]112##
113# Newline character(s).
114define NL
[95]115
[380]116
117endef
118
119##
120# Tab character.
121TAB := $(subst ., ,.)
122
123##
[896]124# Newline + tab characters (for generating commands).
125NLTAB = $(NL)$(TAB)
126
127##
[380]128# Space character.
129SP := $(subst ., ,.)
130
131##
[895]132# Hash character.
133define HASH
134#
135endef
[380]136
[895]137##
138# Colon character.
139COLON := :
140
141##
142# Semicolon character.
143SEMICOLON := ;
144
145##
146# Comma character.
147COMMA := ,
148
149##
150# Dot character.
151DOT := .
152
153##
154# Dollar character.
155DOLLAR := $$
156
157##
158# Equal character.
159EQUAL := =
160
[2515]161##
162# Percent character.
163PERCENT := %
[895]164
[2515]165
[95]166#
[1403]167# The list of standard build types in kBuild.
168#
[1416]169# This list can be extended in Config.kmk and it's possible to extend
[1403]170# (inherit) another build type.
171#
[1420]172KBUILD_BLD_TYPES := release profile debug
[1403]173
174
175#
[985]176# The OSes, Architectures and CPUs that kBuild recognizes.
[978]177#
178# When kBuild is ported to a new OS or architecture a unique keyword needs
179# to be assigned to it and added here. This strictness is required because
180# this keyword namespace is shared between OSes, architectures, cpus and
[984]181# build types. (PORTME)
[978]182#
[2087]183KBUILD_OSES := darwin dos dragonfly freebsd l4 linux netbsd nt openbsd os2 solaris win os-agnostic
[1381]184KBUILD_ARCHES := x86 amd64 sparc32 sparc64 s390 s390x ppc32 ppc64 mips32 mips64 ia64 hppa32 hppa64 arm alpha
[978]185
186
187#
[585]188# Set default build type.
[69]189#
[1504]190ifndef KBUILD_TYPE
191 ifdef BUILD_TYPE
192 KBUILD_TYPE := $(BUILD_TYPE)
193 endif
194else ifdef BUILD_TYPE
195 ifneq ($(KBUILD_TYPE),$(BUILD_TYPE))
196 ifeq ($(origin KBUILD_TYPE):$(origin BUILD_TYPE),environment:command line)
197 KBUILD_TYPE := $(BUILD_TYPE)
198 else ifneq ($(origin KBUILD_TYPE):$(origin BUILD_TYPE),command line:environment)
199 $(error kBuild: KBUILD_TYPE and BUILD_TYPE disagree.)
200 endif
201 endif
202endif
203override BUILD_TYPE = $(KBUILD_TYPE)
204
205ifndef KBUILD_TYPE
206 KBUILD_TYPE := release
[978]207else
[1504]208 if1of ($(KBUILD_TYPE), $(KBUILD_OSES) $(KBUILD_ARCHES))
209 $(error kBuild: The KBUILD_TYPE value '$(KBUILD_TYPE)' is an OS or architecture!)
[585]210 endif
[1504]211 ifneq (.$(words $(KBUILD_TYPE)).$(KBUILD_TYPE).,.1.$(strip $(KBUILD_TYPE)).)
212 $(error kBuild: The KBUILD_TYPE value '$(KBUILD_TYPE)' contains spaces/tabs!)
[978]213 endif
[72]214endif
[69]215
216
217#
[1561]218# Host platform legacy
[1504]219# kmk deals with this, so this is only temporary until I've rebuilt everything.
220#
221ifndef KBUILD_HOST
222 KBUILD_HOST := $(BUILD_PLATFORM)
223endif
224ifndef KBUILD_HOST_ARCH
225 KBUILD_HOST_ARCH := $(BUILD_PLATFORM_ARCH)
226endif
227ifndef KBUILD_HOST_CPU
228 KBUILD_HOST_CPU := $(BUILD_PLATFORM_CPU)
229endif
230
231
232#
[978]233# Assert valid build platform variables.
[70]234#
[978]235# All these are set by kmk so they shouldn't be any trouble
236# unless the user starts messing about with environment variables.
237#
[1504]238ifneq (.$(words $(KBUILD_HOST)).$(KBUILD_HOST).,.1.$(strip $(KBUILD_HOST)).)
239 $(error kBuild: The KBUILD_HOST value '$(KBUILD_HOST)' contains spaces/tabs!)
[72]240endif
[1504]241ifneq ($(words $(filter $(KBUILD_HOST),$(KBUILD_OSES))),1)
242 $(error kBuild: KBUILD_HOST value '$(KBUILD_HOST)' is not recognized (valid: $(KBUILD_OSES)))
[978]243endif
[70]244
[1504]245ifneq (.$(words $(KBUILD_HOST_ARCH)).$(KBUILD_HOST_ARCH).,.1.$(strip $(KBUILD_HOST_ARCH)).)
246 $(error kBuild: The KBUILD_HOST_ARCH value '$(KBUILD_HOST_ARCH)' contains spaces/tabs!)
[329]247endif
[1504]248ifneq ($(words $(filter $(KBUILD_HOST_ARCH),$(KBUILD_ARCHES))),1)
249 $(error kBuild: KBUILD_HOST_ARCH value '$(KBUILD_HOST_ARCH)' is not recognized (valid: $(KBUILD_ARCHES)))
[329]250endif
[72]251
[1504]252ifeq ($(strip $(KBUILD_HOST_CPU)),)
253 KBUILD_HOST_CPU := blend
[994]254else
[1504]255 ifneq (.$(words $(KBUILD_HOST_CPU)).$(KBUILD_HOST_CPU).,.1.$(strip $(KBUILD_HOST_CPU)).)
256 $(error kBuild: The KBUILD_HOST_CPU value '$(KBUILD_HOST_CPU)' contains spaces/tabs!)
[994]257 endif
[2403]258 if1of ($(KBUILD_HOST_CPU), $(KBUILD_OSES) $(KBUILD_ARCHES))
[1504]259 $(error kBuild: The KBUILD_HOST_CPU value '$(KBUILD_HOST_CPU)' was found in the OS or architecture keywords!)
[994]260 endif
[1504]261 ifeq ($(KBUILD_HOST_CPU),$(KBUILD_TYPE))
262 $(error kBuild: The KBUILD_HOST_CPU value '$(KBUILD_HOST_CPU)' is the same as the KBUILD_TYPE!)
[994]263 endif
[978]264endif
[72]265
[978]266
[70]267#
[1504]268# Deal with target platform legacy.
269#
270ifndef KBUILD_TARGET
271 ifdef BUILD_TARGET
272 KBUILD_TARGET := $(BUILD_TARGET)
273 endif
274else ifdef BUILD_TARGET
275 ifneq ($(KBUILD_TARGET),$(BUILD_TARGET))
276 ifeq ($(origin KBUILD_TARGET):$(origin BUILD_TARGET),environment:command line)
277 KBUILD_TARGET := $(BUILD_TARGET)
278 else ifneq ($(origin KBUILD_TARGET):$(origin BUILD_TARGET),command line:environment)
[1561]279 $(error kBuild: KBUILD_TARGET and BUILD_TARGET disagree)
[1504]280 endif
281 endif
282endif
283override BUILD_TARGET = $(KBUILD_TARGET)
284
285ifndef KBUILD_TARGET_ARCH
286 ifdef BUILD_TARGET_ARCH
287 KBUILD_TARGET_ARCH := $(BUILD_TARGET_ARCH)
288 endif
289else ifdef BUILD_TARGET_ARCH
290 ifneq ($(KBUILD_TARGET_ARCH),$(BUILD_TARGET_ARCH))
291 ifeq ($(origin KBUILD_TARGET_ARCH):$(origin BUILD_TARGET_ARCH),environment:command line)
292 KBUILD_TARGET_ARCH := $(BUILD_TARGET_ARCH)
293 else ifneq ($(origin KBUILD_TARGET_ARCH):$(origin BUILD_TARGET_ARCH),command line:environment)
[1561]294 $(error kBuild: KBUILD_TARGET_ARCH and BUILD_TARGET_ARCH disagree)
[1504]295 endif
296 endif
297endif
298override BUILD_TARGET_ARCH = $(KBUILD_TARGET_ARCH)
299
300ifndef KBUILD_TARGET_CPU
301 ifdef BUILD_TARGET_CPU
302 KBUILD_TARGET_CPU := $(BUILD_TARGET_CPU)
303 endif
304else ifdef BUILD_TARGET_CPU
305 ifneq ($(KBUILD_TARGET_CPU),$(BUILD_TARGET_CPU))
306 ifeq ($(origin KBUILD_TARGET_CPU):$(origin BUILD_TARGET_CPU),environment:command line)
307 KBUILD_TARGET_CPU := $(BUILD_TARGET_CPU)
308 else ifneq ($(origin KBUILD_TARGET_CPU):$(origin BUILD_TARGET_CPU),command line:environment)
[1561]309 $(error kBuild: KBUILD_TARGET_CPU and BUILD_TARGET_CPU disagree)
[1504]310 endif
311 endif
312endif
313override BUILD_TARGET_CPU = $(KBUILD_TARGET_CPU)
314
315
316#
[978]317# Assert or set default target platform.
[1504]318# When not defined use the corresponding KBUILD_HOST value.
[72]319#
[1504]320ifndef KBUILD_TARGET
321 KBUILD_TARGET := $(KBUILD_HOST)
[72]322else
[1504]323 ifneq (.$(words $(KBUILD_TARGET)).$(KBUILD_TARGET).,.1.$(strip $(KBUILD_TARGET)).)
324 $(error kBuild: The KBUILD_TARGET value '$(KBUILD_TARGET)' contains spaces/tabs!)
[478]325 endif
[1504]326 ifneq ($(words $(filter $(KBUILD_TARGET),$(KBUILD_OSES))),1)
327 $(error kBuild: KBUILD_TARGET value '$(KBUILD_TARGET)' is not recognized (valid: $(KBUILD_OSES)))
[978]328 endif
[72]329endif
330
[1504]331ifndef KBUILD_TARGET_ARCH
332 KBUILD_TARGET_ARCH := $(KBUILD_HOST_ARCH)
[978]333else
[1504]334 ifneq (.$(words $(KBUILD_TARGET_ARCH)).$(KBUILD_TARGET_ARCH).,.1.$(strip $(KBUILD_TARGET_ARCH)).)
335 $(error kBuild: The KBUILD_TARGET_ARCH value '$(KBUILD_TARGET_ARCH)' contains spaces/tabs!)
[978]336 endif
[1504]337 ifneq ($(words $(filter $(KBUILD_TARGET_ARCH),$(KBUILD_ARCHES))),1)
338 $(error kBuild: KBUILD_TARGET_ARCH value '$(KBUILD_TARGET_ARCH)' is not recognized (valid: $(KBUILD_ARCHES)))
[978]339 endif
[329]340endif
[978]341
[1504]342ifndef KBUILD_TARGET_CPU
343 KBUILD_TARGET_CPU := $(KBUILD_HOST_CPU)
344else ifeq ($(strip $(KBUILD_TARGET_CPU)),)
345 ifeq ($(KBUILD_TARGET_ARCH),$(KBUILD_HOST_ARCH))
346 KBUILD_TARGET_CPU := $(KBUILD_HOST_CPU)
[994]347 else
[1504]348 KBUILD_TARGET_CPU := blend
[994]349 endif
[978]350else
[1504]351 ifneq (.$(words $(KBUILD_TARGET_CPU)).$(KBUILD_TARGET_CPU).,.1.$(strip $(KBUILD_TARGET_CPU)).)
352 $(error kBuild: The KBUILD_TARGET_CPU value '$(KBUILD_TARGET_CPU)' contains spaces/tabs!)
[978]353 endif
[2403]354 if1of ($(KBUILD_TARGET_CPU), $(KBUILD_OSES) $(KBUILD_ARCHES))
[1504]355 $(error kBuild: The KBUILD_TARGET_CPU value was found in the OS or architecture keywords!)
[978]356 endif
[1504]357 ifeq ($(KBUILD_TARGET_CPU),$(KBUILD_TYPE))
358 $(error kBuild: The KBUILD_TARGET_CPU value '$(KBUILD_TARGET_CPU)' is the same as the KBUILD_TYPE!)
[978]359 endif
[329]360endif
[72]361
362
363#
[978]364# Paths and stuff.
[69]365#
[978]366
367# Adjust DEPTH first.
368DEPTH := $(strip $(DEPTH))
369ifeq ($(DEPTH),)
370 DEPTH := .
371endif
372
[725]373## PATH_CURRENT is the current directory (getcwd).
[306]374PATH_CURRENT := $(abspath $(CURDIR))
[725]375## PATH_SUB_CURRENT points to current directory of the current makefile.
376# Meaning that it will change value as we enter and exit sub-makefiles.
377PATH_SUB_CURRENT := $(PATH_CURRENT)
378## PATH_ROOT points to the project root directory.
379PATH_ROOT := $(abspath $(PATH_CURRENT)/$(DEPTH))
380## PATH_SUB_ROOT points to the directory of the top-level makefile.
[472]381ifneq ($(strip $(SUB_DEPTH)),)
[978]382 SUB_DEPTH := $(strip $(SUB_DEPTH))
[725]383 PATH_SUB_ROOT := $(abspath $(PATH_CURRENT)/$(SUB_DEPTH))
[472]384else
[725]385 PATH_SUB_ROOT := $(PATH_CURRENT)
[472]386endif
[306]387
[748]388## CURSUBDIR is PATH_SUB_ROOT described relative to PATH_ROOT.
[725]389# This variable is used to determin where the object files and other output goes.
[1390]390ifneq ($(PATH_ROOT),$(PATH_SUB_ROOT))
391 CURSUBDIR := $(patsubst $(PATH_ROOT)/%,%,$(PATH_SUB_ROOT))
[266]392else
[1390]393 CURSUBDIR := .
[266]394endif
[306]395
[2475]396# Install directory layout. Relative to PATH_INS.
[2479]397KBUILD_INST_PATHS := BIN DLL SYS LIB DOC DEBUG SBIN LIBEXEC SHARE
[2475]398INST_BIN = bin/
399if1of ($(KBUILD_TARGET), win)
400INST_DLL = bin/
401else
402INST_DLL = lib/
403endif
404if1of ($(KBUILD_TARGET), os2 win)
405INST_SYS = drivers/
406else
407INST_SYS = kernel/
408endif
409INST_LIB = lib/
410INST_DOC = share/doc/
411INST_DEBUG = debug/
412INST_SBIN = sbin/
413INST_LIBEXEC = libexec/
414INST_SHARE = share/
415
416# Staging directory layout. Relative to PATH_STAGE.
417STAGE_BIN = $(INST_BIN)
418STAGE_DLL = $(INST_DLL)
419STAGE_SYS = $(INST_SYS)
420STAGE_LIB = $(INST_LIB)
421STAGE_DOC = $(INST_DOC)
422STAGE_DEBUG = $(INST_DEBUG)
423STAGE_SBIN = $(INST_SBIN)
424STAGE_LIBEXEC = $(INST_LIBEXEC)
425STAGE_SHARE = $(INST_SHARE)
426
[2479]427# Install and staging directory paths.
428$(foreach path, $(KBUILD_INST_PATHS), \
429 $(eval PATH_STAGE_$(path) = $$(patsubst %/,%,$$(PATH_STAGE)/$$(STAGE_$(path)))) \
430 $(eval PATH_INST_$(path) = $$(patsubst %/,%,$$(PATH_INS)/$$(INST_$(path)))) \
431)
432
[70]433# Output directories.
[242]434ifndef PATH_OUT_BASE
[725]435 PATH_OUT_BASE := $(PATH_ROOT)/out
[242]436endif
[240]437ifndef PATH_OUT
[1504]438 ifdef BUILD_TARGET_SUB # (BUILD_TARGET_SUB is not currently recognized by kBuild in any other places - obsolete)
[1691]439 PATH_OUT = $(PATH_OUT_BASE)/$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH).$(BUILD_TARGET_SUB)/$(KBUILD_TYPE)
[725]440 else
[1691]441 PATH_OUT = $(PATH_OUT_BASE)/$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)/$(KBUILD_TYPE)
[725]442 endif
[329]443endif # !define PATH_OUT
[1051]444PATH_OBJCACHE = $(PATH_OUT_BASE)/kObjCache
[353]445PATH_OBJ = $(PATH_OUT)/obj
446PATH_TARGET = $(PATH_OBJ)/$(CURSUBDIR)
[2475]447PATH_STAGE = $(PATH_OUT)/stage
448ifndef PATH_INS
449 ifdef DESTROOT
450PATH_INS = $(DESTROOT)
451 else
452PATH_INS = $(PATH_OUT)/dist
453 endif
454endif
[70]455
[2513]456# Tripwire obsolete PATH defines.
457PATH_BIN = $(error kBuild: PATH_BIN is obsoleted in kBuild 0.1.2. Use PATH_STAGE_BIN or PATH_INST_BIN instead)
458PATH_DLL = $(error kBuild: PATH_LIB is obsoleted in kBuild 0.1.2. Use PATH_STAGE_DLL or PATH_INST_DLL instead)
459PATH_LIB = $(error kBuild: PATH_LIB is obsoleted in kBuild 0.1.2. Use PATH_STAGE_LIB or PATH_INST_LIB instead)
460PATH_SYS = $(error kBuild: PATH_SYS is obsoleted in kBuild 0.1.2. Use PATH_STAGE_SYS or PATH_INST_SYS instead)
461PATH_DOC = $(error kBuild: PATH_DOC is obsoleted in kBuild 0.1.2. Use PATH_STAGE_DOC or PATH_INST_DOC instead)
462
[2271]463# Development tool tree.
464KBUILD_DEVTOOLS = $(if $(PATH_DEVTOOLS),$(PATH_DEVTOOLS),$(PATH_ROOT)/tools)
465KBUILD_DEVTOOLS_TRG = $(KBUILD_DEVTOOLS)/$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)
466KBUILD_DEVTOOLS_HST = $(KBUILD_DEVTOOLS)/$(KBUILD_HOST).$(KBUILD_HOST_ARCH)
467
468if1of ($(KBUILD_TARGET_ARCH), amd64 hppa64 mips64 ppc64 s390x sparc64)
469 ifeq ($(KBUILD_TARGET_ARCH),amd64)
470 KBUILD_DEVTOOLS_TRG_ALT = $(PATH_DEVTOOLS)/$(KBUILD_TARGET).x86
471 else ifeq ($(KBUILD_TARGET_ARCH),hppa64)
472 KBUILD_DEVTOOLS_TRG_ALT = $(PATH_DEVTOOLS)/$(KBUILD_TARGET).hppa32
473 else ifeq ($(KBUILD_TARGET_ARCH),mips64)
474 KBUILD_DEVTOOLS_TRG_ALT = $(PATH_DEVTOOLS)/$(KBUILD_TARGET).mips32
475 else ifeq ($(KBUILD_TARGET_ARCH),ppc64)
476 KBUILD_DEVTOOLS_TRG_ALT = $(PATH_DEVTOOLS)/$(KBUILD_TARGET).ppc32
477 else ifeq ($(KBUILD_TARGET_ARCH),s390x)
478 KBUILD_DEVTOOLS_TRG_ALT = $(PATH_DEVTOOLS)/$(KBUILD_TARGET).s390
479 else ifeq ($(KBUILD_TARGET_ARCH),sparc64)
480 KBUILD_DEVTOOLS_TRG_ALT = $(PATH_DEVTOOLS)/$(KBUILD_TARGET).sparc32
481 endif
482endif
483
484if1of ($(KBUILD_HOST_ARCH), amd64 hppa64 mips64 ppc64 s390x sparc64)
485 ifeq ($(KBUILD_HOST_ARCH),amd64)
486 KBUILD_DEVTOOLS_HST_ALT = $(PATH_DEVTOOLS)/$(KBUILD_HOST).x86
487 else ifeq ($(KBUILD_HOST_ARCH),hppa64)
488 KBUILD_DEVTOOLS_HST_ALT = $(PATH_DEVTOOLS)/$(KBUILD_HOST).hppa32
489 else ifeq ($(KBUILD_HOST_ARCH),mips64)
490 KBUILD_DEVTOOLS_HST_ALT = $(PATH_DEVTOOLS)/$(KBUILD_HOST).mips32
491 else ifeq ($(KBUILD_HOST_ARCH),ppc64)
492 KBUILD_DEVTOOLS_HST_ALT = $(PATH_DEVTOOLS)/$(KBUILD_HOST).ppc32
493 else ifeq ($(KBUILD_HOST_ARCH),s390x)
494 KBUILD_DEVTOOLS_HST_ALT = $(PATH_DEVTOOLS)/$(KBUILD_HOST).s390
495 else ifeq ($(KBUILD_HOST_ARCH),sparc64)
496 KBUILD_DEVTOOLS_HST_ALT = $(PATH_DEVTOOLS)/$(KBUILD_HOST).sparc32
497 endif
498endif
499
500
[1504]501# KBUILD_PATH / PATH_KBUILD is determined by kmk.
502ifndef KBUILD_PATH
503 KBUILD_PATH := $(PATH_KBUILD)
[70]504endif
[1504]505ifeq ($(strip $(KBUILD_PATH)),)
506 $(error kBuild: KBUILD_PATH is missing or empty! kmk is supposed to set it.)
[978]507endif
[1504]508# KBUILD_BIN_PATH / PATH_KBUILD_BIN is determined by kmk.
509ifndef KBUILD_BIN_PATH
510 KBUILD_BIN_PATH := $(PATH_KBUILD_BIN)
511endif
512ifeq ($(strip $(KBUILD_BIN_PATH)),)
513 $(error kBuild: KBUILD_BIN_PATH is missing or empty! kmk is supposed to set it.)
514endif
[978]515
[69]516# kBuild files which might be of interest.
[1664]517FILE_KBUILD_HEADER := $(KBUILD_PATH)/header.kmk
518#FILE_KBUILD_CONFIG := $(KBUILD_PATH)/config.kmk
519FILE_KBUILD_FOOTER := $(KBUILD_PATH)/footer.kmk
520FILE_KBUILD_SUB_HEADER := $(KBUILD_PATH)/subheader.kmk
521FILE_KBUILD_SUB_FOOTER := $(KBUILD_PATH)/subfooter.kmk
[69]522
[725]523## MAKEFILE is the name of the main makefile.
[204]524MAKEFILE := $(firstword $(MAKEFILE_LIST))
[748]525## MAKEFILE_CURRENT is the name of the current makefile.
[725]526# This is updated everything a sub-makefile is included.
527MAKEFILE_CURRENT := $(MAKEFILE)
[69]528
[72]529
[1602]530## @todo this should be done via SUFF_XYZ.target/host...
531
[69]532#
[72]533# Build platform setup.
[984]534# (PORTME)
[69]535#
[1602]536if1of ($(KBUILD_HOST), win nt)
537# Win, Win32, Win64, NT.
538EXEC_X86_WIN32 :=
539HOSTSUFF_EXE := .exe
[984]540
[1602]541# OS/2.
542else ifeq ($(KBUILD_HOST),os2)
[83]543EXEC_X86_WIN32 := innopec.exe
[69]544HOSTSUFF_EXE := .exe
545
[1602]546else if1of ($(KBUILD_HOST), freebsd dragonfly linux openbsd netbsd)
547# Unix (like) systems with wine.
[135]548EXEC_X86_WIN32 := wine
[69]549HOSTSUFF_EXE :=
[70]550
[1602]551else
552# Unix (like) systems without wine.
[557]553EXEC_X86_WIN32 := false
554HOSTSUFF_EXE :=
555endif
556
[811]557
[73]558#
559# Build target setup.
[984]560# (PORTME)
[73]561#
[1388]562SUFF_DEP := .dep
[2088]563SUFF_BIN :=
[1504]564if1of ($(KBUILD_TARGET), win nt os2)
[1388]565SUFF_OBJ := .obj
566SUFF_LIB := .lib
567SUFF_DLL := .dll
568SUFF_EXE := .exe
569SUFF_SYS := .sys
570SUFF_RES := .res
[1504]571else ifeq ($(KBUILD_TARGET),l4)
[1388]572SUFF_OBJ := .o
573SUFF_LIB := .a
574SUFF_DLL := .s.so
575SUFF_EXE :=
576SUFF_SYS := .a
577SUFF_RES :=
[1504]578else ifeq ($(KBUILD_TARGET),darwin)
[1388]579SUFF_OBJ := .o
580SUFF_LIB := .a
581SUFF_DLL := .dylib
582SUFF_EXE :=
583SUFF_SYS :=
584SUFF_RES :=
585else
586SUFF_OBJ := .o
587SUFF_LIB := .a
588SUFF_DLL := .so
589SUFF_EXE :=
[1602]590 if1of ($(KBUILD_TARGET), dragonfly freebsd linux netbsd openbsd) ## @todo check netbsd and openbsd.
[1389]591SUFF_SYS := .ko
[1388]592 else
[1389]593SUFF_SYS :=
594 endif
[1388]595SUFF_RES :=
[73]596endif
[69]597
598#
599# Standard kBuild tools.
600#
[978]601ifeq ($(KMK),kmk)
[1504]602KMK := $(KBUILD_BIN_PATH)/kmk$(HOSTSUFF_EXE)
[233]603endif
[978]604MAKE := $(KMK)
[233]605
[1504]606GMAKE := $(KBUILD_BIN_PATH)/kmk_gmake$(HOSTSUFF_EXE)
[1378]607
[2148]608#DEP_EXT := $(KBUILD_BIN_PATH)/kDep$(HOSTSUFF_EXE)
609#DEP_INT := $(KBUILD_BIN_PATH)/kDep$(HOSTSUFF_EXE)
610#DEP := $(DEP_INT)
[69]611
[1504]612DEP_IDB_EXT := $(KBUILD_BIN_PATH)/kDepIDB$(HOSTSUFF_EXE)
[2148]613DEP_IDB_INT := kmk_builtin_kDepIDB
614DEP_IDB := $(DEP_IDB_INT)
[397]615
[2148]616DEP_PRE := $(KBUILD_BIN_PATH)/kDepPre$(HOSTSUFF_EXE)
[380]617
[1504]618KOBJCACHE_EXT := $(KBUILD_BIN_PATH)/kObjCache$(HOSTSUFF_EXE)
[1004]619KOBJCACHE := $(KOBJCACHE_EXT)
620
[1504]621APPEND_EXT := $(KBUILD_BIN_PATH)/kmk_append$(HOSTSUFF_EXE)
[2148]622APPEND_INT := kmk_builtin_append
623APPEND := $(APPEND_INT)
[69]624
[1504]625CAT_EXT := $(KBUILD_BIN_PATH)/kmk_cat$(HOSTSUFF_EXE)
[2148]626CAT_INT := kmk_builtin_cat
627CAT := $(CAT_INT)
[353]628
[1753]629CHMOD_EXT := $(KBUILD_BIN_PATH)/kmk_chmod$(HOSTSUFF_EXE)
[2148]630CHMOD_INT := kmk_builtin_chmod
631CHMOD := $(CHMOD_INT)
[1753]632
[1504]633CMP_EXT := $(KBUILD_BIN_PATH)/kmk_cmp$(HOSTSUFF_EXE)
[2148]634CMP_INT := kmk_builtin_cmp
635CMP := $(CMP_INT)
[1118]636
[1504]637CP_EXT := $(KBUILD_BIN_PATH)/kmk_cp$(HOSTSUFF_EXE)
[2148]638CP_INT := kmk_builtin_cp
639CP := $(CP_INT)
[1119]640
[1504]641ECHO_EXT := $(KBUILD_BIN_PATH)/kmk_echo$(HOSTSUFF_EXE)
[2148]642ECHO_INT := kmk_builtin_echo
643ECHO := $(ECHO_INT)
[380]644
[1753]645EXPR_EXT := $(KBUILD_BIN_PATH)/kmk_expr$(HOSTSUFF_EXE)
[2148]646EXPR_INT := kmk_builtin_expr
647EXPR := $(EXPR_INT)
[1753]648
[1504]649INSTALL_EXT := $(KBUILD_BIN_PATH)/kmk_install$(HOSTSUFF_EXE)
[2148]650INSTALL_INT := kmk_builtin_install
651INSTALL := $(INSTALL_INT)
[380]652
[1504]653LN_EXT := $(KBUILD_BIN_PATH)/kmk_ln$(HOSTSUFF_EXE)
[2148]654LN_INT := kmk_builtin_ln
655LN := $(LN_INT)
[380]656
[1504]657MD5SUM_EXT := $(KBUILD_BIN_PATH)/kmk_md5sum$(HOSTSUFF_EXE)
[2148]658MD5SUM_INT := kmk_builtin_md5sum
659MD5SUM := $(MD5SUM_INT)
[1118]660
[1504]661MKDIR_EXT := $(KBUILD_BIN_PATH)/kmk_mkdir$(HOSTSUFF_EXE)
[2148]662MKDIR_INT := kmk_builtin_mkdir
663MKDIR := $(MKDIR_INT)
[380]664
[1504]665MV_EXT := $(KBUILD_BIN_PATH)/kmk_mv$(HOSTSUFF_EXE)
[2148]666MV_INT := kmk_builtin_mv
667MV := $(MV_INT)
[380]668
[1504]669PRINTF_EXT := $(KBUILD_BIN_PATH)/kmk_printf$(HOSTSUFF_EXE)
[2148]670PRINTF_INT := kmk_builtin_printf
671PRINTF := $(PRINTF_INT)
[776]672
[1504]673REDIRECT_EXT:= $(KBUILD_BIN_PATH)/kmk_redirect$(HOSTSUFF_EXE)
[2148]674REDIRECT_INT:= $(REDIRECT_EXT)
675REDIRECT := $(REDIRECT_INT)
[1272]676
[1504]677RM_EXT := $(KBUILD_BIN_PATH)/kmk_rm$(HOSTSUFF_EXE)
[2148]678RM_INT := kmk_builtin_rm
679RM := $(RM_INT)
[380]680
[1504]681RMDIR_EXT := $(KBUILD_BIN_PATH)/kmk_rmdir$(HOSTSUFF_EXE)
[2148]682RMDIR_INT := kmk_builtin_rmdir
683RMDIR := $(RMDIR_INT)
[601]684
[1504]685SED_EXT := $(KBUILD_BIN_PATH)/kmk_sed$(HOSTSUFF_EXE)
[978]686SED_INT := $(SED_EXT)
[380]687SED := $(SED_EXT)
688
[2148]689SLEEP_INT := kmk_builtin_sleep
690SLEEP_EXT := $(KBUILD_BIN_PATH)/kmk_sleep$(HOSTSUFF_EXE)
691SLEEP := $(SLEEP_EXT)
692
[1504]693TEST_EXT := $(KBUILD_BIN_PATH)/kmk_test$(HOSTSUFF_EXE)
[2148]694TEST_INT := kmk_builtin_test
695TEST := $(TEST_INT)
[1296]696
[2148]697TIME_EXT := $(KBUILD_BIN_PATH)/kmk_time$(HOSTSUFF_EXE)
698TIME_INT := $(TIME_EXT)
699TIME := $(TIME_INT)
700
[380]701# Our default shell is the Almquist shell from *BSD.
[1504]702ASH := $(KBUILD_BIN_PATH)/kmk_ash$(HOSTSUFF_EXE)
[380]703MAKESHELL := $(ASH)
704SHELL := $(ASH)
705export SHELL MAKESHELL
706
[414]707# Symlinking is problematic on some platforms...
[380]708LN_SYMLINK := $(LN) -s
709
[2479]710# When copying to the staging area, use hard links to save time and space.
[2485]711ifndef KBUILD_NO_HARD_LINKING
[2512]712 INSTALL_STAGING := $(INSTALL) --hard-link-files-when-possible
713else
714 INSTALL_STAGING := $(INSTALL)
[2479]715endif
[743]716
[2479]717
[743]718#
719# Some Functions.
[748]720# The lower cased ones are either fallbacks or candidates for functions.c.
[743]721#
722
[130]723## ABSPATH - make paths absolute.
[129]724# This implementation is clumsy and doesn't resolve '..' and '.' components.
[73]725#
[129]726# @param $1 The paths to make absolute.
[696]727# @obsolete Use the GNU make function $(abspath) directly now.
[984]728ABSPATH = $(abspath $(1))$(warning ABSPATH is deprecated, use abspath directly!)
[353]729
[130]730## DIRDEP - make create directory dependencies.
731#
732# @param $1 The paths to the directories which must be created.
[353]733DIRDEP = $(foreach path,$(patsubst %/,%,$(1)),$(path)/)
[129]734
735## Cygwin kludge.
736# This converts /cygdrive/x/% to x:%.
737#
738# @param $1 The paths to make native.
739# @remark This macro is pretty much obsolete since we don't use cygwin base make.
740ifneq ($(patsubst /cygdrive/%,%,$(CURDIR)),$(CURDIR))
[743]741 CYGPATHMIXED = $(foreach path,$(1)\
[129]742 ,$(if $(patsubst /cygdrive/%,,$(path)),$(path),$(patsubst $(strip $(firstword $(subst /, ,$(patsubst /cygdrive/%,%,$(path)))))/%,$(strip $(firstword $(subst /, ,$(patsubst /cygdrive/%,%,$(path))))):/%,$(patsubst /cygdrive/%,%,$(path)))))
743else
[743]744 CYGPATHMIXED = $(1)
[129]745endif
746
[743]747## Removes the drive letter from a path (if it has one)
748# @param $1 the path
749no-drive = $(word $(words $(subst :, ,$(1))),$(subst :, ,$(1)))
[723]750
[743]751## Removes the root slash from a path (if it has one)
752# @param $1 the path
753no-root-slash = $(patsubst /%,%,$(1))
[723]754
[2488]755##
756# Similar to firstword, except it returns the value of first defined variable.
757# @param $1 list of variables to probe.
[2512]758define FIRST-DEFINED-VAR
759local .RETURN := $(strip $(firstdefined $1, value))
760endef
[2488]761
[743]762## Figure out where to put object files.
763# @param $1 real target name.
764# @param $2 normalized main target
[748]765TARGET_BASE = $(PATH_TARGET)/$(2)/$(call no-root-slash,$(call no-drive,$(1)))
[723]766
[743]767## Figure out where to put object files.
768# @param $1 normalized main target
769TARGET_PATH = $(PATH_TARGET)/$(1)
[723]770
[2223]771##
772# Checks if the specified short option ($1) is found in the flags ($2),
773# assuming getopt style options.
774#
775# @returns $3 if present, $4 not.
776#
777# @param $1 The option (single char!).
778# @param $2 The option arguments.
779# @param $3 Eval and return if present.
780# @param $4 Eval and return if not present.
781#
782# @todo May confuse option values starting with '-' for options.
783# @remarks Invoke like this: $(evalcall KB_FN_OPT_TEST_SHORT,d,$(flags),present,not-present)
784#
785define KB_FN_OPT_TEST_SHORT
786local options := $(translate $(strip $(filter -%,$(filter-out --%,$2))),$(SP)-,)
787local .RETURN := $(if-expr $(pos $1,$(options)) != 0,$3,$4)
788endef
[723]789
[2223]790##
791# Checks if the specified long option ($1) is found in the flags ($2),
792# assuming getopt style options.
[129]793#
[2223]794# @returns $3 if present, $4 not.
795#
796# @param $1 The long option, dashes included. No % chars.
797# @param $2 The option arguments.
798# @param $3 Eval and return if present.
799# @param $4 Eval and return if not present.
800#
801# @todo May confuse option values starting with '--' for options.
802# @remarks Invoke like this: $(evalcall KBFN_OPT_TEST_SHORT,--defined,$(flags),present,not-present)
803#
804define KB_FN_OPT_TEST_LONG
805local options := $(filter-out =delete=%,$(subst :, =delete=,$(subst =, =delete=,$2)))
806local .RETURN := $(if-expr "$(filter $1,$(options))" != "",$3,$4)
807endef
808
809##
810# Checks if the specified short ($1) or long ($2) option is found in the flags ($2),
811# assuming getopt style options.
812#
813# @returns $4 if present, $5 not.
814#
815# @param $1 The short option (single char!).
816# @param $2 The long option, dashes included. No % chars.
817# @param $3 The option arguments.
818# @param $4 Eval and return if present.
819# @param $5 Eval and return if not present.
820#
821# @todo May confuse option values starting with '--' for options.
822# @remarks Invoke like this: $(evalcall KB_FN_OPT_TEST_SHORT_LONG,d,--defined,$(flags),present,not-present)
823#
824define KB_FN_OPT_TEST_SHORT_LONG
825local short_options := $(translate $(strip $(filter -%,$(filter-out --%,$3))),$(SP)-,)
826local long_options := $(filter-out =delete=%,$(subst :, =delete=,$(subst =, =delete=,$3)))
827local .RETURN := $(if-expr $(pos $1,$(short_options)) != 0 || "$(filter $2,$(long_options))" != "",$4,$5)
828endef
829
[2434]830##
831# Make an assignment to a deprecated variable.
832#
833# @param $1 The variable name.
834# @param $2 The value.
835# @param $3 The variable to use instead.
836#
837ifdef KBUILD_WITH_DEPREATED_AS_ERROR
[2441]838 KB_FN_ASSIGN_DEPRECATED = $(eval $(subst :,$$(COLON),$1) = $2$$(error $1 is deprecated, use $3 instead))
[2434]839else
[2441]840 KB_FN_ASSIGN_DEPRECATED = $(eval $(subst :,$$(COLON),$1) = $2$$(warning $1 is deprecated, use $3 instead))
[2434]841endif
[2223]842
843
844#
[353]845# Initialize some of the globals which the Config.kmk and
846# others can add stuff to if they like for processing in the footer.
847#
848
[1416]849## KBUILD_TEMPLATE_PATHS
[353]850# List a paths (separated by space) where templates can be found.
[1416]851KBUILD_TEMPLATE_PATHS :=
[353]852
[1416]853## KBUILD_TOOL_PATHS
[353]854# List of paths (separated by space) where tools can be found.
[1416]855KBUILD_TOOL_PATHS :=
[353]856
[1416]857## KBUILD_SDK_PATHS
[353]858# List of paths (separated by space) where SDKs can be found.
[1416]859KBUILD_SDK_PATHS :=
[353]860
[1621]861## KBUILD_UNIT_PATHS
862# List of paths (separated by space) where units (USES) can be found.
863KBUILD_UNIT_PATHS :=
864
[1416]865## KBUILD_DEFAULT_PATHS
866# List of paths (separated by space) to search for stuff as a last resort.
867KBUILD_DEFAULT_PATHS :=
868
[353]869## Proritized list of the default makefile when walking subdirectories.
870# The user can overload this list.
871DEFAULT_MAKEFILE := Makefile.kmk makefile.kmk Makefile makefile
872
[1424]873## KBUILD_SRC_HANDLERS
874# The list of source handlers, pair of extension and handler.
875# The user can overload this list to provide additional or custom
876# handlers. On a per-target/template see SRC_HANDLERS.
877KBUILD_SRC_HANDLERS := \
878 .c:def_src_handler_c \
879 .C:def_src_handler_c \
880.cxx:def_src_handler_cxx \
881.CXX:def_src_handler_cxx \
882.cpp:def_src_handler_cxx \
883.CPP:def_src_handler_cxx \
884 .cc:def_src_handler_cxx \
885 .CC:def_src_handler_cxx \
886 .m:def_src_handler_objc \
[2356]887 .M:def_src_handler_objcxx \
888 .mm:def_src_handler_objcxx \
[1424]889.asm:def_src_handler_asm \
890.ASM:def_src_handler_asm \
891 .s:def_src_handler_asm \
892 .S:def_src_handler_asm \
893 .rc:def_src_handler_rc \
894.obj:def_src_handler_obj \
895 .o:def_src_handler_obj \
[1435]896.res:def_src_handler_obj
[980]897
[640]898## PROPS_TOOLS
[985]899# This is a subset of PROPS_SINGLE.
[2356]900PROPS_TOOLS := TOOL CTOOL CXXTOOL OBJCTOOL OBJCXXTOOL ASTOOL RCTOOL ARTOOL LDTOOL FETCHTOOL UNPACKTOOL PATCHTOOL
[640]901
[353]902## PROPS_SINGLE
903# The list of non-accumulative target properties.
904# A Config.kmk file can add it's own properties to this list and kBuild
[1400]905# will do the necessary inheritance for templates, sdks, tools and targets.
[2475]906PROPS_SINGLE := $(PROPS_TOOLS) TEMPLATE INSTTYPE INST STAGE NOINST BLD_TYPE BLD_TRG BLD_TRG_ARCH BLD_TRG_CPU FETCHDIR \
[2356]907 OBJSUFF COBJSUFF CXXOBJSUFF OBJCOBJSUFF OBJCXXOBJSUFF ASOBJSUFF RCOBJSUFF SYSSUFF BINSUFF EXESUFF DLLSUFF LIBSUFF ARLIBSUFF \
[2225]908 MODE UID GID
[985]909## PROPS_SINGLE_LNK
910# Subset of PROPS_SINGLE which applies to all linkable targets.
[2356]911PROPS_SINGLE_LNK := TOOL TEMPLATE CTOOL CXXTOOL OBJCTOOL OBJCXXTOOL ASTOOL RCTOOL \
[1621]912 INST NOINST BLD_TYPE BLD_TRG BLD_TRG_ARCH BLD_TRG_CPU \
[2356]913 OBJSUFF COBJSUFF CXXOBJSUFF OBJCOBJSUFF OBJCXXOBJSUFF ASOBJSUFF RCOBJSUFF \
[2225]914 MODE UID GID
[353]915
916## PROPS_DEFERRED
[889]917# This list of non-accumulative target properties which are or may be
918# functions, and thus should not be expanded until the very last moment.
[2475]919PROPS_DEFERRED := INSTFUN INSTALLER PRE_CMDS POST_CMDS PRE_INST_CMDS POST_INST_CMDS NAME SONAME
[353]920
[660]921## PROPS_ACCUMULATE_R
[748]922# The list of accumulative target properties where the right most value/flag
[660]923# is the 'most significant'.
[353]924# A Config.kmk file can add it's own properties to this list and kBuild
925# will do the necessary inheritance from templates to targets.
[660]926PROPS_ACCUMULATE_R := \
[1702]927 DEPS LNK_DEPS ORDERDEPS LNK_ORDERDEPS DEFS \
[985]928 ARFLAGS \
[660]929 CFLAGS CDEFS \
930 CXXFLAGS CXXDEFS \
[1256]931 OBJCFLAGS OBJCDEFS \
[2356]932 OBJCXXFLAGS OBJCXXDEFS \
[660]933 ASFLAGS ASDEFS \
934 RCFLAGS RCDEFS \
935 LDFLAGS \
[2483]936 IDFLAGS IFFLAGS EXEC_IFFLAGS ISFLAGS \
[640]937 FETCHFLAGS UNPACKFLAGS PATCHFLAGS
[985]938## PROPS_ACCUMULATE_R_LNK
939# Subset of PROPS_ACCUMULATE_R which applies to all linkable targets.
940PROPS_ACCUMULATE_R_LNK := \
[1702]941 DEPS LNK_DEPS ORDERDEPS LNK_ORDERDEPS DEFS \
[985]942 CFLAGS CDEFS \
943 CXXFLAGS CXXDEFS \
[1256]944 OBJCFLAGS OBJCDEFS \
[2356]945 OBJCXXFLAGS OBJCXXDEFS \
[985]946 ASFLAGS ASDEFS \
947 RCFLAGS RCDEFS \
[2483]948 IDFLAGS IFFLAGS ISFLAGS
[353]949
[660]950## PROPS_ACCUMULATE
[748]951# The list of accumulative target properties where the left most value/flag
[660]952# is the 'most significant'.
953# A Config.kmk file can add it's own properties to this list and kBuild
954# will do the necessary inheritance from templates to targets.
955PROPS_ACCUMULATE_L := \
[2483]956 SDKS USES SOURCES EXEC_SOURCES SRC_HANDLERS INTERMEDIATES \
[2356]957 INCS CINCS CXXINCS OBJCINCS OBJCXXINCS ASINCS RCINCS \
[897]958 LIBS LIBPATH \
[985]959 DIRS BLDDIRS CLEAN
960## PROPS_ACCUMULATE_L_LNK
961# Subset of PROPS_ACCUMULATE_L which applies to all linkable targets.
962PROPS_ACCUMULATE_L_LNK := \
[2344]963 SDKS USES SOURCES SRC_HANDLERS INTERMEDIATES \
[2356]964 INCS CINCS CXXINCS OBJCINCS OBJCXXINCS ASINCS RCINCS \
[985]965 BLDDIRS CLEAN
[353]966
[662]967## PROPS_ALL
968# List of all the properties.
969PROPS_ALL = $(PROPS_SINGLE) $(PROPS_DEFERRED) $(PROPS_ACCUMULATE_L) $(PROPS_ACCUMULATE_R)
[660]970
[985]971## @name Properties valid on programs (BLDPROGS and PROGRAMS)
972## @{
973PROPS_PROGRAMS_SINGLE := $(PROPS_SINGLE_LNK) LDTOOL EXESUFF
974PROPS_PROGRAMS_DEFERRED := $(PROPS_DEFERRED)
975PROPS_PROGRAMS_ACCUMULATE_R := $(PROPS_ACCUMULATE_R_LNK) LDFLAGS
976PROPS_PROGRAMS_ACCUMULATE_L := $(PROPS_ACCUMULATE_L_LNK) LIBS LIBPATH
977## @}
978
979## @name Properties valid on libraries (LIBRARIES and IMPORT_LIBS)
980## @{
[989]981PROPS_LIBRARIES_SINGLE := $(PROPS_SINGLE_LNK) ARTOOL LIBSUFF ARLIBSUFF LIBSUFF
[985]982PROPS_LIBRARIES_DEFERRED := $(filter-out SONAME,$(PROPS_DEFERRED))
983PROPS_LIBRARIES_ACCUMULATE_R := $(PROPS_ACCUMULATE_R_LNK) ARFLAGS
984PROPS_LIBRARIES_ACCUMULATE_L := $(PROPS_ACCUMULATE_L_LNK)
985## @}
986
987## @name Properties valid on dlls (DLLS)
988## @{
989PROPS_DLLS_SINGLE := $(PROPS_SINGLE_LNK) LDTOOL DLLSUFF LIBSUFF
990PROPS_DLLS_DEFERRED := $(PROPS_DEFERRED)
991PROPS_DLLS_ACCUMULATE_R := $(PROPS_ACCUMULATE_R_LNK) LDFLAGS
992PROPS_DLLS_ACCUMULATE_L := $(PROPS_ACCUMULATE_L_LNK) LIBS LIBPATH
993## @}
994
[989]995## @name Properties valid on system modules (SYSMODS)
996## @{
997PROPS_SYSMODS_SINGLE := $(PROPS_SINGLE_LNK) LDTOOL SYSSUFF
998PROPS_SYSMODS_DEFERRED := $(PROPS_DEFERRED)
999PROPS_SYSMODS_ACCUMULATE_R := $(PROPS_ACCUMULATE_R_LNK) LDFLAGS
1000PROPS_SYSMODS_ACCUMULATE_L := $(PROPS_ACCUMULATE_L_LNK) LIBS LIBPATH
1001## @}
1002
[2084]1003## @name Properties valid on misc binaries (MISCBINS)
1004## @{
1005PROPS_MISCBINS_SINGLE := $(PROPS_SINGLE_LNK) LDTOOL BINSUFF
1006PROPS_MISCBINS_DEFERRED := $(PROPS_DEFERRED)
1007PROPS_MISCBINS_ACCUMULATE_R := $(PROPS_ACCUMULATE_R_LNK) LDFLAGS
1008PROPS_MISCBINS_ACCUMULATE_L := $(PROPS_ACCUMULATE_L_LNK) LIBS LIBPATH
1009## @}
1010
[985]1011## @name Properties valid on installs (INSTALLS)
1012## @{
[2483]1013PROPS_INSTALLS_SINGLE := TOOL TEMPLATE INST NOINST BLD_TYPE BLD_TRG BLD_TRG_ARCH BLD_TRG_CPU MODE UID GID
[985]1014PROPS_INSTALLS_DEFERRED := INSTFUN INSTALLER
[2483]1015PROPS_INSTALLS_ACCUMULATE_R := DEPS ORDERDEPS GOALS INST_ONLY_GOALS STAGE_ONLY_GOALS IFFLAGS EXEC_IFFLAGS
1016PROPS_INSTALLS_ACCUMULATE_L := SOURCES EXEC_SOURCES DIRS CLEAN
[985]1017## @}
1018
[2475]1019## @name Properties valid on fetches (FETCHES)
[985]1020## @{
[1400]1021PROPS_FETCHES_SINGLE := TOOL TEMPLATE FETCHTOOL UNPACKTOOL PATCHTOOL INST FETCHDIR
[985]1022PROPS_FETCHES_DEFERRED :=
1023PROPS_FETCHES_ACCUMULATE_R := FETCHFLAGS UNPACKFLAGS PATCHFLAGS
[1613]1024PROPS_FETCHES_ACCUMULATE_L := SOURCES CLEAN
[985]1025## @}
1026
[2274]1027## KBUILD_COMPILE_CATEGTORIES
1028# Tools categories for compiling.
1029KBUILD_COMPILE_CATEGTORIES := AS C CXX OBJC OBJCXX RC
[985]1030
[2274]1031## KBUILD_GENERIC_CATEGORIES
1032# Generic tool categories.
1033KBUILD_GENERIC_CATEGORIES := FETCH UNPACK PATCH $(addprefix LINK_,LIBRARY PROGRAM DLL SYSMOD MISCBIN)
1034
1035## PROPS_TOOLS_ONLY
1036# Properties found only on tools.
1037# This is expanded in a deferred manner, so it will pick up changes made to
1038# KBUILD_COMPILE_CATEGTORIES and KBUILD_GENERIC_CATEGORIES made by units.
1039PROPS_TOOLS_ONLY = \
1040 $(foreach cat, $(KBUILD_COMPILE_CATEGTORIES), \
1041 COMPILE_$(cat)_CMDS \
1042 COMPILE_$(cat)_OUTPUT \
1043 COMPILE_$(cat)_OUTPUT_MAYBE \
1044 COMPILE_$(cat)_DEPEND \
1045 COMPILE_$(cat)_DEPORD \
1046 COMPILE_$(cat)_USES_KOBJCACHE ) \
1047 $(foreach cat, $(KBUILD_GENERIC_CATEGORIES), \
1048 $(cat)_CMDS \
1049 $(cat)_OUTPUT \
1050 $(cat)_OUTPUT_MAYBE \
1051 $(cat)_DEPEND \
1052 $(cat)_DEPORD ))
1053
1054
[353]1055#
[748]1056# Here is a special 'hack' to prevent innocent environment variables being
1057# picked up and treated as properties. (The most annoying example of why
[662]1058# this is necessary is the Visual C++ commandline with it's LIBPATH.)
1059#
[748]1060# Define KBUILD_DONT_KILL_ENV_PROPS in the env. or on the commandline to
[662]1061# disable this 'hack'.
1062#
1063ifndef KBUILD_DONT_KILL_ENV_PROPS
1064
1065define def_nuke_environment_prop
1066ifeq ($(origin $(prop)),environment)
1067$(prop) =
1068endif
1069endef
[762]1070$(foreach prop, $(PROPS_ALL) \
[2084]1071 FETCHES PATCHES BLDPROGS LIBRARIES IMPORT_LIBS DLLS PROGRAMS SYSMODS MISCBINS INSTALLS OTHERS \
[897]1072 SUBDIRS MAKEFILES BLDDIRS \
[762]1073 ,$(eval $(value def_nuke_environment_prop)))
[662]1074
[897]1075endif # KBUILD_DONT_KILL_ENV_PROPS
[662]1076
1077
1078#
[353]1079# Pass configuration.
1080#
1081# The PASS_<passname>_trgs variable is listing the targets.
1082# The PASS_<passname>_vars variable is listing the target variables.
1083# The PASS_<passname>_pass variable is the lowercased passname.
1084#
1085
[640]1086## PASS: fetches
1087# This pass fetches and unpacks things needed to complete the build.
1088PASS_FETCHES := Fetches
1089PASS_FETCHES_trgs :=
1090PASS_FETCHES_vars := _FETCHES
1091PASS_FETCHES_pass := fetches
1092
1093## PASS: patches
1094# This pass applies patches.
1095PASS_PATCHES := Patches
1096PASS_PATCHES_trgs :=
1097PASS_PATCHES_vars := _PATCHES
1098PASS_PATCHES_pass := patches
1099
[353]1100## PASS: bldprogs
1101# This pass builds targets which are required for building the rest.
1102PASS_BLDPROGS := Build Programs
1103PASS_BLDPROGS_trgs :=
1104PASS_BLDPROGS_vars := _BLDPROGS
1105PASS_BLDPROGS_pass := bldprogs
1106
1107## PASS: libraries
1108# This pass builds library targets.
1109PASS_LIBRARIES := Libraries
1110PASS_LIBRARIES_trgs :=
1111PASS_LIBRARIES_vars := _LIBS _IMPORT_LIBS _OTHER_LIBRARIES
1112PASS_LIBRARIES_pass := libraries
1113
1114## PASS: binaries
1115# This pass builds dll targets.
1116PASS_DLLS := DLLs
1117PASS_DLLS_trgs :=
1118PASS_DLLS_vars := _DLLS _OTHER_DLLS
1119PASS_DLLS_pass := dlls
1120
1121## PASS: binaries
1122# This pass builds binary targets, i.e. programs, system modules and stuff.
1123PASS_BINARIES := Programs
1124PASS_BINARIES_trgs :=
[2084]1125PASS_BINARIES_vars := _PROGRAMS _SYSMODS _MISC_BINS _OTHER_BINARIES
[353]1126PASS_BINARIES_pass := binaries
1127
1128## PASS: others
1129# This pass builds other targets.
1130PASS_OTHERS := Other Stuff
1131PASS_OTHERS_trgs :=
1132PASS_OTHERS_vars := _OTHERS
1133PASS_OTHERS_pass := others
1134
[2475]1135## PASS: staging
[353]1136# This pass installs the built entities to a sandbox area.
[1646]1137## @todo split this up into build install (to sandbox) and real installation.
[2475]1138PASS_STAGING := Staging
1139PASS_STAGING_trgs :=
1140PASS_STAGING_vars := _STAGING_DIRS _INSTALLS _STAGING_FILES
1141PASS_STAGING_pass := staging
1142
1143## PASS: install
1144# This pass installs the built entities to where they will be used (using
1145# DESTROOT or PATH_INS to indicate where this is).
[353]1146PASS_INSTALLS := Install
1147PASS_INSTALLS_trgs :=
[2475]1148PASS_INSTALLS_vars := _INSTALLS_DIRS _INSTALLS_FILES
[353]1149PASS_INSTALLS_pass := installs
1150
[1646]1151## PASS: testing
1152# This pass processes custom rules for executing tests.
1153PASS_TESTING := Tests
1154PASS_TESTING_trgs :=
1155PASS_TESTING_vars := _TESTING
1156PASS_TESTING_pass := testing
1157
[353]1158## PASS: packing
1159# This pass processes custom packing rules.
1160PASS_PACKING := Packing
[414]1161PASS_PACKING_trgs :=
[417]1162PASS_PACKING_vars := _PACKING
[353]1163PASS_PACKING_pass := packing
1164
1165## PASS: clean
1166# This pass removes all generated files.
1167PASS_CLEAN := Clean
1168PASS_CLEAN_trgs := do-clean
1169PASS_CLEAN_vars :=
1170PASS_CLEAN_pass := clean
1171
1172## PASS: nothing
1173# This pass just walks the tree.
1174PASS_NOTHING := Nothing
1175PASS_NOTHING_trgs := do-nothing
1176PASS_NOTHING_vars :=
1177PASS_NOTHING_pass := nothing
1178
1179## DEFAULT_PASSES
1180# The default passes and their order.
[2475]1181DEFAULT_PASSES := BLDPROGS LIBRARIES DLLS BINARIES OTHERS STAGING
[353]1182
1183## PASSES
1184# The passes that should be defined. This must include
1185# all passes mentioned by DEFAULT_PASSES.
[2475]1186PASSES := FETCHES PATCHES $(DEFAULT_PASSES) INSTALLS TESTING PACKING CLEAN NOTHING
[353]1187
1188
1189#
[984]1190# Check for --pretty-command-printing before including the Config.kmk
1191# so that anyone overriding the message macros can take the implied
1192# verbosity level change into account.
1193#
1194ifndef KBUILD_VERBOSE
1195 ifndef KBUILD_QUIET
[1562]1196 ifeq ($(KMK_OPTS_PRETTY_COMMAND_PRINTING),1)
[984]1197 export KBUILD_VERBOSE := 2
1198 endif
1199 endif
1200endif
1201
1202
1203#
[1418]1204# Legacy variable translation.
1205# These will be eliminated when switching to the next version.
1206#
1207ifdef USE_KOBJCACHE
1208 ifndef KBUILD_USE_KOBJCACHE
1209 export KBUILD_USE_KOBJCACHE := $(USE_KOBJCACHE)
1210 endif
1211endif
1212
1213
1214#
[69]1215# This is how we find the closest config.kmk.
1216# It's a little hacky but I think it works fine.
[70]1217#
1218_CFGDIR := .
[78]1219_CFGFILES := ./Config.kmk ./config.kmk
[69]1220define def_include_config
[78]1221$(eval _CFGDIR := $(_CFGDIR)/$(dir))
1222_CFGFILES += $(_CFGDIR)/Config.kmk $(_CFGDIR)/config.kmk
[69]1223endef
1224# walk down the _RELATIVE_ path specified by DEPTH.
[78]1225$(foreach dir,$(subst /, ,$(DEPTH)), $(eval $(def_include_config)) )
[69]1226# add the default config file.
[78]1227_CFGFILE := $(firstword $(wildcard $(_CFGFILES) $(FILE_KBUILD_CONFIG)))
[69]1228_CFGFILES :=
1229_CFGDIR :=
[416]1230ifeq ($(_CFGFILE),)
1231$(error kBuild: no Config.kmk file found! Check the DEPTH: DEPTH='$(DEPTH)' PATH_CURRENT='$(PATH_CURRENT)')
1232endif
[69]1233
1234# Include the config.kmk we found file (or the default one).
[988]1235ifdef KBUILD_PROFILE_SELF
[2008]1236 $(evalcall def_profile_self, including $(_CFGFILE))
[988]1237 include $(_CFGFILE)
[2008]1238 $(evalcall def_profile_self, included $(_CFGFILE))
[988]1239else
1240 include $(_CFGFILE)
1241endif
1242
1243
1244
[696]1245#
[874]1246# Finalize a the central path variables now that we've included the Config.kmk file.
1247#
1248# This prevents some trouble when users override the defaults for these
1249# variables and uses relative paths or paths with incorrect case.
1250#
[1692]1251PATH_OUT_BASE := $(abspath $(PATH_OUT_BASE))
[2475]1252PATH_OUT := $(abspath $(PATH_OUT))
1253PATH_OBJ := $(abspath $(PATH_OBJ))
1254PATH_TARGET := $(abspath $(PATH_TARGET))
1255PATH_INS := $(abspath $(PATH_INS))
1256PATH_STAGE := $(abspath $(PATH_STAGE))
[874]1257
[2475]1258# Finalize the install and staging directory layouts.
1259define def_kbuild_finalize_inst
1260local val := $(strip $($(y)_$(x)))
1261ifeq ($(val),)
1262 $(error kBuild: '$(y)_$(x)' is set to an empty value.)
1263endif
1264ifneq ($(words $(val)),1)
1265 $(error kBuild: The '$(y)_$(x)' value '$(val)' should not contain spaces.)
1266endif
1267ifneq ($(pos \,$(val)), 0)
1268 $(error kBuild: The '$(y)_$(x)' value '$(val)' contains DOS slashes: not allowed.)
1269endif
1270ifneq ($(pos $(COLON),$(val)), 0)
1271 $(error kBuild: The '$(y)_$(x)' value '$(val)' contains colon: not allowed.)
1272endif
1273ifneq ($(substr $(val),-1), /)
1274 $(error kBuild: The '$(y)_$(x)' value '$(val)' has no trailing slash.)
1275endif
1276if $(pos /../,$(val)) != 0 || "$(substr $(val), 3)" == "../"
1277 $(error kBuild: The '$(y)_$(x)' value '$(val)' contains dot-dot escape.)
1278endif
1279$($(y)_$(x) := $(val)
[2479]1280
1281local val := $(strip $(PATH_$(y)_$(x)))
1282ifeq ($(val),)
1283 $(error kBuild: 'PATH_$(y)_$(x)' is set to an empty value.)
1284endif
1285PATH_$(y)_$(x) := $(val)
[2475]1286endef
[2479]1287$(foreach y, INST STAGE, $(foreach x, $(KBUILD_INST_PATHS), $(evalcall def_kbuild_finalize_inst)))
[874]1288
[2475]1289
[874]1290#
[788]1291# Setup the message style. The default one is inlined.
[776]1292#
[788]1293# See kBuild/msgstyles for more styles or use KBUILD_MSG_STYLE_PATHS
1294# to create your own message style.
1295#
[776]1296KBUILD_MSG_STYLE ?= default
1297ifeq ($(KBUILD_MSG_STYLE),default)
1298 #
1299 # The 'default' style.
1300 #
1301
1302 ## Fetch starting.
1303 # @param 1 Target name.
1304 MSG_FETCH ?= $(call MSG_L1,Fetching $1...)
1305 ## Re-fetch starting.
1306 # @param 1 Target name.
1307 MSG_REFETCH ?= $(call MSG_L1,Re-fetching $1...)
1308 ## Downloading a fetch component.
1309 # @param 1 Target name.
1310 # @param 2 The source URL.
1311 # @param 3 The destination file name.
1312 MSG_FETCH_DL ?= $(call MSG_L1,Downloading $1 - $2,=> $3)
1313 ## Checking a fetch component.
1314 # @param 1 Target name.
1315 # @param 2 The source URL.
1316 # @param 3 The destination file name.
1317 MSG_FETCH_CHK?= $(call MSG_L1,Checking $1 - $3, ($2))
1318 ## Unpacking a fetch component.
1319 # @param 1 Target name.
1320 # @param 2 The archive file name.
1321 # @param 3 The target directory.
1322 MSG_FETCH_UP ?= $(call MSG_L1,Unpacking $1 - $2 => $3)
1323 ## Fetch completed.
1324 # @param 1 Target name.
1325 MSG_FETCH_OK ?= $(call MSG_L1,Successfully fetched $1)
1326 ## Unfetch a fetch target.
1327 # @param 1 Target name.
1328 MSG_UNFETCH ?= $(call MSG_L1,Unfetching $1...)
1329 ## Compiling a source file.
1330 # @param 1 Target name.
1331 # @param 2 The source filename.
1332 # @param 3 The primary link output file name.
[1256]1333 # @param 4 The source type (C,CXX,OBJC,AS,RC,++).
[776]1334 MSG_COMPILE ?= $(call MSG_L1,Compiling $1 - $2,=> $3)
[890]1335 ## Tool
1336 # @param 1 The tool name (bin2c,...)
1337 # @param 2 Target name.
1338 # @param 3 The source filename.
1339 # @param 4 The primary output file name.
1340 MSG_TOOL ?= $(call MSG_L1,$1 $2 - $3,=> $4)
1341 ## Generate a file, typically a source file.
1342 # @param 1 Target name if applicable.
1343 # @param 2 Output file name.
1344 # @param 3 What it's generated from
1345 MSG_GENERATE ?= $(call MSG_L1,Generating $(if $1,$1 - )$2,$(if $3,from $3))
[776]1346 ## Linking a bldprog/dll/program/sysmod target.
1347 # @param 1 Target name.
1348 # @param 2 The primary link output file name.
1349 # @param 3 The link tool operation (LINK_LIBRARY,LINK_PROGRAM,LINK_DLL,LINK_SYSMOD,++).
1350 MSG_LINK ?= $(call MSG_L1,Linking $1,=> $2)
[844]1351 ## Merging a library into the target (during library linking).
1352 # @param 1 Target name.
1353 # @param 2 The output library name.
1354 # @param 3 The input library name.
[845]1355 MSG_AR_MERGE ?= $(call MSG_L1,Merging $3 into $1, ($2))
[776]1356 ## Creating a directory (build).
1357 # @param 1 Directory name.
1358 MSG_MKDIR ?= $(call MSG_L2,Creating directory $1)
1359 ## Cleaning.
1360 MSG_CLEAN ?= $(call MSG_L1,Cleaning...)
1361 ## Nothing.
1362 MSG_NOTHING ?= $(call MSG_L1,Did nothing in $(CURDIR))
1363 ## Pass
1364 # @param 1 The pass name.
1365 MSG_PASS ?= $(call MSG_L1,Pass - $1)
1366 ## Installing a bldprog/lib/dll/program/sysmod target.
1367 # @param 1 Target name.
1368 # @param 2 The source filename.
1369 # @param 3 The destination file name.
1370 MSG_INST_TRG ?= $(call MSG_L1,Installing $1 => $3)
1371 ## Installing a file (install target).
1372 # @param 1 The source filename.
1373 # @param 2 The destination filename.
1374 MSG_INST_FILE?= $(call MSG_L1,Installing $2,(<= $1))
1375 ## Installing a symlink.
1376 # @param 1 Symlink
1377 # @param 2 Link target
1378 MSG_INST_SYM ?= $(call MSG_L1,Installing symlink $1,=> $2)
1379 ## Installing a directory.
1380 # @param 1 Directory name.
1381 MSG_INST_DIR ?= $(call MSG_L1,Installing directory $1)
1382
[788]1383else
[1504]1384 _KBUILD_MSG_STYLE_FILE := $(firstword $(foreach path, $(KBUILD_MSG_STYLE_PATHS) $(KBUILD_PATH)/msgstyles, $(wildcard $(path)/$(KBUILD_MSG_STYLE).kmk)))
[788]1385 ifneq ($(_KBUILD_MSG_STYLE_FILE),)
1386 include $(_KBUILD_MSG_STYLE_FILE)
[776]1387 else
[788]1388 $(error kBuild: Can't find the style setup file for KBUILD_MSG_STYLE '$(KBUILD_MSG_STYLE)')
[776]1389 endif
1390endif
1391
1392
1393#
[696]1394# Message macros.
1395#
[748]1396# This is done after including Config.kmk as to allow for
[696]1397# KBUILD_QUIET and KBUILD_VERBOSE to be configurable.
1398#
1399ifdef KBUILD_QUIET
[776]1400 # No output
[696]1401 QUIET := @
1402 QUIET2:= @
1403 MSG_L1 =
1404 MSG_L2 =
1405else
1406 ifndef KBUILD_VERBOSE
[776]1407 # Default output level.
1408 QUIET := @
1409 QUIET2 := @
[1496]1410 MSG_L1 ?= %@$(ECHO) "kBuild: $1"
[776]1411 MSG_L2 =
1412 else ifeq ($(KBUILD_VERBOSE),1)
1413 # A bit more output
1414 QUIET := @
1415 QUIET2 := @
[1496]1416 MSG_L1 ?= %@$(ECHO) "kBuild: $1 $2"
[776]1417 MSG_L2 =
1418 else ifeq ($(KBUILD_VERBOSE),2)
1419 # Lot more output
1420 QUIET :=
1421 QUIET2 := @
[1496]1422 MSG_L1 ?= %@$(ECHO) "kBuild: $1 $2"
1423 MSG_L2 ?= %@$(ECHO) "kBuild: $1"
[696]1424 else
1425 # maximal output.
[776]1426 QUIET :=
1427 QUIET2 :=
[1496]1428 MSG_L1 ?= %@$(ECHO) "kBuild: $1 $2"
1429 MSG_L2 ?= %@$(ECHO) "kBuild: $1"
[696]1430 endif
1431endif
1432
[776]1433
[1403]1434#
[1504]1435# Validate any KBUILD_BLD_TYPES additions and finally the KBUILD_TYPE.
[1403]1436#
1437if1of ($(KBUILD_BLD_TYPES), $(KBUILD_OSES))
1438 $(error kBuild: found KBUILD_BLD_TYPES in KBUILD_OSES!)
1439endif
1440if1of ($(KBUILD_BLD_TYPES), $(KBUILD_ARCHES))
1441 $(error kBuild: found KBUILD_BLD_TYPES in KBUILD_ARCHES!)
1442endif
1443if1of ($(KBUILD_OSES), $(KBUILD_ARCHES))
1444 $(error kBuild: found KBUILD_OSES in KBUILD_ARCHES!)
1445endif
[1504]1446ifn1of ($(KBUILD_TYPE), $(KBUILD_BLD_TYPES))
1447 $(error kBuild: KBUILD_TYPE(=$(KBUILD_TYPE)) is not found in KBUILD_BLD_TYPES(=$(KBUILD_BLD_TYPES))!)
[1403]1448endif
1449
1450
1451
[988]1452ifdef KBUILD_PROFILE_SELF
[2008]1453 $(evalcall def_profile_self, end of header.kmk)
1454 _KBUILD_TS_HEADER_END := $(_KBUILD_TS_PREV)
[988]1455endif
1456
[69]1457# end-of-file-content
[72]1458__header_kmk__ := 1
[69]1459endif # __header_kmk__
[479]1460
Note: See TracBrowser for help on using the repository browser.