sbsv2/raptor/lib/flm/metaflm.mk
author mikek
Sat, 15 May 2010 14:32:45 +0100
changeset 10 b2a53d442fd6
parent 2 39c28ec933dd
child 13 c327db0664bb
permissions -rw-r--r--
1) Introducing support for 32/64-bit variants of the patch files 2) Fix bug in fix_epoc32_linux.pl whereby changes to the gcc -preinclude patch file were not applied if already existed. 3) Extending weed_backups.pl to weed the epoc32 tree as well as the package dir 4) Make build_target.pl return non-0 if build has warnings 5) Make build_all.pl fail a target if it has warnings
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
     1
#
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
     2
# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
     3
# All rights reserved.
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
     4
# This component and the accompanying materials are made available
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
     5
# under the terms of the License "Eclipse Public License v1.0"
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
     6
# which accompanies this distribution, and is available
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
     7
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
     8
#
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
     9
# Initial Contributors:
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    10
# Nokia Corporation - initial contribution.
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    11
#
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    12
# Contributors:
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    13
#
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    14
# Description: 
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    15
#
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    16
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    17
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    18
# Macros for creating Standard targets
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    19
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    20
ifeq ($(_METAFLM_MK_),)
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    21
_METAFLM_MK_:=1
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    22
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    23
# GENERATE STANDARD CLEAN TARGET 
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    24
# example usage:
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    25
# $(eval $(call GenerateStandardCleanTarget,$(FILE_LIST),$(DIRECTORY_LIST)))
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    26
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    27
## CLEAN macros #####################################
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    28
# The clean macro does not generate a target but extension makefiles do have
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    29
# CLEAN targets that need to be attached to something.
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    30
.PHONY:: CLEAN
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    31
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    32
define GenerateStandardCleanTarget
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    33
$(info <clean bldinf='$(COMPONENT_META)' mmp='$(PROJECT_META)' config='$(SBS_CONFIGURATION)'>)
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    34
$(foreach ITEM,$(1),$(info <file>$(ITEM)</file>))
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    35
$(foreach ITEM,$(2),$(info <dir>$(ITEM)</dir>))
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    36
$(info </clean>)
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    37
endef
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    38
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    39
## End CLEAN macros #####################################
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    40
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    41
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    42
## WHAT macros #####################################
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    43
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    44
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    45
## Begin --what Macros #####
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    46
define outputWhat
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    47
ifeq ($(OSTYPE),cygwin)
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    48
$(2)::
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    49
	@for FILE in $(subst %20,$(CHAR_SPACE),$(subst /,\\,$(call dblquote,$(1)))); do \
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    50
		echo $$$$FILE; \
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    51
	done;
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    52
else
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    53
$(2)::
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    54
	@for FILE in $(subst %20,$(CHAR_SPACE),$(1)); do \
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    55
		echo $$$$FILE; \
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    56
	done
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    57
endif
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    58
endef
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    59
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    60
## End --what Macros #####
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    61
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    62
## Begin .whatlog Macros #####
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    63
define whatLogOpen
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    64
<whatlog bldinf='$(COMPONENT_META)' mmp='$(PROJECT_META)' config='$(SBS_CONFIGURATION)'>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    65
endef
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    66
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    67
define whatLogItem
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    68
$(if $(findstring EXPORT,$(1)),<export ,$(if $(findstring RESOURCE,$(1)),<resource>,$(if $(findstring BITMAP,$(1)),<bitmap>,$(if $(findstring STRINGTABLE,$(1)),<stringtable>,$(if $(findstring ARCHIVE,$(1)),<member>,<build>)))))$(subst %20,$(CHAR_SPACE),$(2))$(if $(findstring EXPORT,$(1)),/>,$(if $(findstring RESOURCE,$(1)),</resource>,$(if $(findstring BITMAP,$(1)),</bitmap>,$(if $(findstring STRINGTABLE,$(1)),</stringtable>,$(if $(findstring ARCHIVE,$(1)),</member>,</build>)))))
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    69
endef
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    70
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    71
define whatLogClose
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    72
</whatlog>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    73
endef
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    74
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    75
define outputWhatLog
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    76
$(info $(call whatLogOpen))
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    77
$(foreach ITEM,$(1),$(info $(call whatLogItem,$(2),$(ITEM))))
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    78
$(info $(call whatLogClose))
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    79
endef
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    80
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    81
## End .whatlog Macros #####
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    82
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    83
# General FLM entry points for what-related processing
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    84
define WhatExports
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    85
endef
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    86
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    87
define whatmacro
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    88
$(call outputWhatLog,$(1),$(2))
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    89
endef
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    90
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    91
define whatUnzip
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    92
endef	
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    93
## END WHAT UNZIP MACRO 
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    94
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    95
## End WHAT macros #####################################
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    96
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    97
# Macro for creating the test BATCH files.
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    98
# Arguments: $(1) -> Target Name $(2) -> Output Batch file path
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    99
define MakeTestBatchFiles
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   100
    $(if $(BATCHFILE_CREATED_$(2))
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   101
        ,
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   102
            $(if $(TARGET_CREATED_$(2)_$(TARGET))
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   103
                ,
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   104
                ,
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   105
                    $$(shell echo -e "$(1)\r" >> $(2))
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   106
            )
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   107
       	,
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   108
       	    $$(shell $(GNUMKDIR) -p $(dir $(2)))
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   109
       	    $$(shell echo -e "$(1)\r" > $(2))
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   110
    )
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   111
endef
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   112
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   113
## path creation #########################
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   114
# Make the destination directory if neccessary.  For some
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   115
# make engines we must do this outside the rule or they
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   116
# get confused by the apparent way in which different rules
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   117
# can create a particular directory and they infer some kind
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   118
# of dependency.
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   119
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   120
# Makepath. Copyright (C) 2008 Symbian Software Ltd.
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   121
# buffering with repeat prevention, makes directories after every 30 calls. Any more might overload 
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   122
# the createprocess limit on arguments.
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   123
#
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   124
# makepathLIST is initialised in globals.mk
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   125
define makepath_single
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   126
$(if $(findstring $1,$(makepathLIST)),,$(eval makepathLIST:=$(makepathLIST) $1))
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   127
$(if $(subst 30,,$(words $(makepathLIST))),,$(shell $(GNUMKDIR) -p $(makepathLIST))$(eval makepathLIST:=))
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   128
endef
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   129
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   130
# The following turns out to be extremely slow - something to do with using eval 
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   131
# or to do with creating huge numbers of TARGET_ variables? BTW, this is an attempt
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   132
# to not make things that we have already made.
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   133
# define makepath
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   134
# $(info makepath_start)$(foreach DIR,$1,$(if $(TARGET_$(1)),,$(call makepath_single,$(DIR))$(eval TARGET_$(1):=1)))$(info makepath_end)
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   135
# endef
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   136
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   137
# In general, makepath creates directories during FLM evaluation.
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   138
# However, if the WHAT target is being processed then it should do nothing.
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   139
ifeq ($(filter WHAT,$(call uppercase,$(MAKECMDGOALS))),)
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   140
define makepath
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   141
$(strip $(foreach DIR,$(sort $1),$(call makepath_single,$(DIR))))
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   142
endef
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   143
else
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   144
define makepath
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   145
endef
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   146
endif
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   147
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   148
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   149
define makepathfor
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   150
$(call makepath,$(dir $1))
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   151
endef
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   152
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   153
# Make any remaining paths in the path buffer
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   154
define makepathfinalise
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   155
$(strip $(if $(makepathLIST),$(shell $(GNUMKDIR) -p $(makepathLIST))$(eval makepathLIST:=),))
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   156
endef
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   157
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   158
## ROMFILE macro #####################################
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   159
define DoRomSet
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   160
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   161
ifeq ($(call uppercase,$(TARGETTYPE)),LIB)
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   162
BUILDROMTARGET:=
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   163
endif
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   164
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   165
ifeq ($(call uppercase,$(TARGETTYPE)),KEXT)
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   166
ROMFILETYPE:=extension[MAGIC]
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   167
ABIDIR:=KMAIN
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   168
endif
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   169
ifeq ($(call uppercase,$(TARGETTYPE)),LDD)
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   170
ROMFILETYPE:=device[MAGIC]
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   171
ABIDIR:=KMAIN
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   172
endif
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   173
ifeq ($(call uppercase,$(TARGETTYPE)),PDD)
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   174
ROMFILETYPE:=device[MAGIC]
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   175
ABIDIR:=KMAIN
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   176
endif
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   177
ifeq ($(call uppercase,$(TARGETTYPE)),VAR)
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   178
ROMFILETYPE:=variant[MAGIC]
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   179
ABIDIR:=KMAIN
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   180
endif
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   181
ifeq ($(call uppercase,$(TARGETTYPE)),KDLL)
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   182
ABIDIR:=KMAIN
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   183
endif
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   184
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   185
ifneq ($(CALLDLLENTRYPOINTS),)
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   186
ROMFILETYPE:=dll
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   187
endif
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   188
ifeq ($(ROMFILETYPE),primary)
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   189
ABIDIR:=KMAIN
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   190
endif
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   191
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   192
endef
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   193
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   194
## End of ROMFILE macro ##############################
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   195
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   196
## Macros for writing FLMs without needing to know eval
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   197
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   198
# declaring targets as RELEASABLE, for example,
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   199
#
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   200
# $(call raptor_release,$(TARGET1) $(TARGET2),RESOURCE)
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   201
#
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   202
# the optional type (RESOURCE) can be one of,
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   203
# EXPORT RESOURCE BITMAP STRINGTABLE ARCHIVE
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   204
#
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   205
# no argument means just a default (binary) releasable.
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   206
#
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   207
define raptor_release
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   208
$(eval $(call outputWhatLog,$1,$2))
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   209
endef
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   210
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   211
# declaring things that need to be cleaned.
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   212
#
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   213
# any files which are generated but are not RELEASABLE should be listed
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   214
# using this macro, for example,
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   215
#
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   216
# $(call raptor_clean,$(OBJECT_FILES))
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   217
#
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   218
define raptor_clean
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   219
$(eval $(call GenerateStandardCleanTarget,$1))
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   220
endef
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   221
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   222
endif 
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   223
# end of metaflm
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   224
## END TEST BATCH FILES MACRO