make/common/Execute.gmk
author ihse
Fri, 01 Mar 2019 11:32:38 +0100
branchihse-setupexecute-branch
changeset 57228 f802ad9cf3bc
parent 57159 0258a6f7d03f
child 58833 ed9ef56bc7d5
permissions -rw-r--r--
Use same logic as in MakeTargetDir.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
57139
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
     1
#
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
     2
# Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
     4
#
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
    10
#
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
    15
# accompanied this code).
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
    16
#
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
    20
#
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
    23
# questions.
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
    24
#
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
    25
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
    26
ifeq (,$(_MAKEBASE_GMK))
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
    27
  $(error You must include MakeBase.gmk prior to including Execute.gmk)
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
    28
endif
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
    29
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
    30
################################################################################
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
    31
#
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
    32
# Code for handling the SetupExecute macro.
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
    33
#
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
    34
################################################################################
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
    35
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
    36
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
    37
################################################################################
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
    38
# Setup make rules for executing an arbitrary command.
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
    39
#
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
    40
# Parameter 1 is the name of the rule. This name is used as variable prefix,
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
    41
# and the targets generated are listed in a variable by that name.
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
    42
#
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
    43
# Remaining parameters are named arguments. These include:
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
    44
#   COMMAND     : The command to execute
57159
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
    45
#   PRE_COMMAND :
57155
ba61956ea598 Convert some more to SetupExecute.
ihse
parents: 57139
diff changeset
    46
#   POST_COMMAND:
57139
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
    47
#   OUTPUT_DIR  : The directory that will contain the result from the command
57159
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
    48
#   SUPPORT_DIR :
57155
ba61956ea598 Convert some more to SetupExecute.
ihse
parents: 57139
diff changeset
    49
#   OUTPUT_FILE : Use this if the command results in a single output file.
57139
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
    50
#   INFO        : Message to display at LOG=info level when running command (optional).
57159
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
    51
#   WARN        : Message to display at LOG=warn level when running command (optional).
57139
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
    52
#   DEPS        : Dependencies for the execution to take place
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
    53
#
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
    54
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
    55
# Setup make rules for copying files, with an option to do more complex
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
    56
SetupExecute = $(NamedParamsMacroTemplate)
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
    57
define SetupExecuteBody
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
    58
  ifeq ($$($1_COMMAND), )
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
    59
    $$(error COMMAND is missing in SetupExecute $1)
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
    60
  endif
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
    61
57158
003703d03633 Bug fixes. Now hotspot works.
ihse
parents: 57155
diff changeset
    62
  ifneq ($$($1_OUTPUT_FILE), )
003703d03633 Bug fixes. Now hotspot works.
ihse
parents: 57155
diff changeset
    63
    ifneq ($$($1_OUTPUT_DIR), )
003703d03633 Bug fixes. Now hotspot works.
ihse
parents: 57155
diff changeset
    64
      $$(error Cannot specify both OUTPUT_DIR and OUTPUT_FILE in SetupExecute $1)
003703d03633 Bug fixes. Now hotspot works.
ihse
parents: 57155
diff changeset
    65
    endif
57159
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
    66
    # We need to know output dir since we will make sure it is created.
57158
003703d03633 Bug fixes. Now hotspot works.
ihse
parents: 57155
diff changeset
    67
    $1_OUTPUT_DIR := $$(patsubst %/,%, $$(dir $$($1_OUTPUT_FILE)))
57159
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
    68
    ifeq ($$($1_SUPPORT_DIR), )
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
    69
      # If support dir is not given, use base dir of output file.
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
    70
      $1_SUPPORT_DIR := $$($1_OUTPUT_DIR)
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
    71
    endif
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
    72
  else ifneq ($$($1_OUTPUT_DIR), )
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
    73
    ifeq ($$($1_SUPPORT_DIR), )
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
    74
      # If support dir is not given, use output dir.
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
    75
      $1_SUPPORT_DIR := $$($1_OUTPUT_DIR)
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
    76
    endif
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
    77
  else
57158
003703d03633 Bug fixes. Now hotspot works.
ihse
parents: 57155
diff changeset
    78
    $$(error OUTPUT_DIR or OUTPUT_FILE is required in SetupExecute $1)
003703d03633 Bug fixes. Now hotspot works.
ihse
parents: 57155
diff changeset
    79
  endif
003703d03633 Bug fixes. Now hotspot works.
ihse
parents: 57155
diff changeset
    80
57159
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
    81
  $1_BASE := $$($1_SUPPORT_DIR)/_$1
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
    82
  $1_PRE_MARKER := $$($1_BASE)_pre.marker
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
    83
  $1_EXEC_MARKER := $$($1_BASE)_exec.marker
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
    84
  $1_POST_MARKER := $$($1_BASE)_post.marker
57139
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
    85
57158
003703d03633 Bug fixes. Now hotspot works.
ihse
parents: 57155
diff changeset
    86
  ifeq ($$($1_OUTPUT_FILE), )
57159
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
    87
    # No specified output file, use markers everywhere
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
    88
    $1_EXEC_RESULT := $$($1_EXEC_MARKER)
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
    89
    ifeq ($$($1_POST_COMMAND), )
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
    90
      $1_FINAL_RESULT := $$($1_EXEC_MARKER)
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
    91
    else
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
    92
      $1_FINAL_RESULT := $$($1_POST_MARKER)
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
    93
    endif
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
    94
57155
ba61956ea598 Convert some more to SetupExecute.
ihse
parents: 57139
diff changeset
    95
  else
ba61956ea598 Convert some more to SetupExecute.
ihse
parents: 57139
diff changeset
    96
    # If we have a single output file, we don't need a separate marker
57159
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
    97
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
    98
    ifeq ($$($1_POST_COMMAND), )
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
    99
      $1_EXEC_RESULT := $$($1_OUTPUT_FILE)
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
   100
      $1_FINAL_RESULT := $$($1_EXEC_RESULT)
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
   101
    else
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
   102
      $1_EXEC_RESULT := $$($1_EXEC_MARKER)
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
   103
      $1_FINAL_RESULT := $$($1_OUTPUT_FILE)
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
   104
    endif
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
   105
57155
ba61956ea598 Convert some more to SetupExecute.
ihse
parents: 57139
diff changeset
   106
  endif
ba61956ea598 Convert some more to SetupExecute.
ihse
parents: 57139
diff changeset
   107
57159
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
   108
  ifeq ($$($1_INFO)$$($1_WARN), )
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
   109
    # If neither info nor warn is provided, add basic info text.
57158
003703d03633 Bug fixes. Now hotspot works.
ihse
parents: 57155
diff changeset
   110
    $1_INFO := Running commands for $1
003703d03633 Bug fixes. Now hotspot works.
ihse
parents: 57155
diff changeset
   111
  endif
003703d03633 Bug fixes. Now hotspot works.
ihse
parents: 57155
diff changeset
   112
57159
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
   113
  ifneq ($$($1_PRE_COMMAND), )
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
   114
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
   115
    $$($1_PRE_MARKER): $$($1_DEPS)
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
   116
        ifneq ($$($1_WARN), )
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
   117
	  $$(call LogWarn, $$($1_WARN))
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
   118
        endif
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
   119
        ifneq ($$($1_INFO), )
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
   120
	  $$(call LogInfo, $$($1_INFO))
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
   121
        endif
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
   122
	$$(call MakeDir, $$($1_SUPPORT_DIR) $$($1_OUTPUT_DIR))
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
   123
	$$(call ExecuteWithLog, $$($1_BASE)_pre, \
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
   124
	    $$($1_PRE_COMMAND))
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
   125
	$$(TOUCH) $$@
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
   126
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
   127
    $$($1_EXEC_RESULT): $$($1_PRE_MARKER)
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
   128
	$$(call ExecuteWithLog, $$($1_BASE)_exec, \
57139
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
   129
	    $$($1_COMMAND))
57159
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
   130
        ifeq ($$($1_EXEC_RESULT), $$($1_EXEC_MARKER))
57155
ba61956ea598 Convert some more to SetupExecute.
ihse
parents: 57139
diff changeset
   131
	  $$(TOUCH) $$@
ba61956ea598 Convert some more to SetupExecute.
ihse
parents: 57139
diff changeset
   132
        endif
ba61956ea598 Convert some more to SetupExecute.
ihse
parents: 57139
diff changeset
   133
57159
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
   134
    $1 := $$($1_PRE_MARKER) $$($1_EXEC_RESULT)
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
   135
  else
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
   136
    $$($1_EXEC_RESULT): $$($1_DEPS)
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
   137
        ifneq ($$($1_WARN), )
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
   138
	  $$(call LogWarn, $$($1_WARN))
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
   139
        endif
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
   140
        ifneq ($$($1_INFO), )
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
   141
	  $$(call LogInfo, $$($1_INFO))
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
   142
        endif
57228
f802ad9cf3bc Use same logic as in MakeTargetDir.
ihse
parents: 57159
diff changeset
   143
	$$(call MakeDir, $$(call EncodeSpace, $$($1_SUPPORT_DIR)) $$(call EncodeSpace, $$($1_OUTPUT_DIR)))
57159
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
   144
	$$(call ExecuteWithLog, $$($1_BASE)_exec, \
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
   145
	    $$($1_COMMAND))
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
   146
        ifeq ($$($1_EXEC_RESULT), $$($1_EXEC_MARKER))
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
   147
	  $$(TOUCH) $$@
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
   148
        endif
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
   149
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
   150
    $1 := $$($1_EXEC_RESULT)
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
   151
  endif
57155
ba61956ea598 Convert some more to SetupExecute.
ihse
parents: 57139
diff changeset
   152
ba61956ea598 Convert some more to SetupExecute.
ihse
parents: 57139
diff changeset
   153
  ifneq ($$($1_POST_COMMAND), )
ba61956ea598 Convert some more to SetupExecute.
ihse
parents: 57139
diff changeset
   154
57159
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
   155
    $$($1_FINAL_RESULT): $$($1_EXEC_RESULT)
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
   156
	$$(call ExecuteWithLog, $$($1_BASE)_post, \
57155
ba61956ea598 Convert some more to SetupExecute.
ihse
parents: 57139
diff changeset
   157
	    $$($1_POST_COMMAND))
57139
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
   158
	$$(TOUCH) $$@
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
   159
57159
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
   160
    $1 += $$($1_FINAL_RESULT)
57155
ba61956ea598 Convert some more to SetupExecute.
ihse
parents: 57139
diff changeset
   161
  endif
ba61956ea598 Convert some more to SetupExecute.
ihse
parents: 57139
diff changeset
   162
57159
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
   163
  # Export all our generated targets in $1, and the final target in $1_TARGET.
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
   164
  $1_TARGET := $$($1_FINAL_RESULT)
0258a6f7d03f Adding SetupExecute to more places, and adding functionality.
ihse
parents: 57158
diff changeset
   165
57139
94ff48d6eee4 Initial implementation and test case of SetupExecute.
ihse
parents:
diff changeset
   166
endef