make/common/MakeIO.gmk
author michaelm
Thu, 14 Nov 2019 10:40:08 +0000
branchunixdomainchannels
changeset 59077 85df93a18fe0
parent 53484 8c296eedfb04
permissions -rw-r--r--
unixdomainchannels: apidoc updates
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     1
#
53484
8c296eedfb04 8217730: Split up MakeBase.gmk
ihse
parents: 52186
diff changeset
     2
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     4
#
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    10
#
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    15
# accompanied this code).
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    16
#
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    20
#
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    23
# questions.
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    24
#
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    25
53484
8c296eedfb04 8217730: Split up MakeBase.gmk
ihse
parents: 52186
diff changeset
    26
ifeq (,$(_MAKEBASE_GMK))
8c296eedfb04 8217730: Split up MakeBase.gmk
ihse
parents: 52186
diff changeset
    27
  $(error You must include MakeBase.gmk prior to including MakeIO.gmk)
32807
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
    28
endif
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
    29
53484
8c296eedfb04 8217730: Split up MakeBase.gmk
ihse
parents: 52186
diff changeset
    30
################################################################################
8c296eedfb04 8217730: Split up MakeBase.gmk
ihse
parents: 52186
diff changeset
    31
#
8c296eedfb04 8217730: Split up MakeBase.gmk
ihse
parents: 52186
diff changeset
    32
# Functions for dealing with reading and writing from makefiles. Prior to GNU
8c296eedfb04 8217730: Split up MakeBase.gmk
ihse
parents: 52186
diff changeset
    33
# Make 4.0, this was tricky business.
8c296eedfb04 8217730: Split up MakeBase.gmk
ihse
parents: 52186
diff changeset
    34
#
8c296eedfb04 8217730: Split up MakeBase.gmk
ihse
parents: 52186
diff changeset
    35
################################################################################
29662
78c47f0002c3 8076060: Improve make bootstrap process
ihse
parents: 29312
diff changeset
    36
25854
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 23984
diff changeset
    37
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 23984
diff changeset
    38
################################################################################
32807
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
    39
# ListPathsSafely can be used to print command parameters to a file. This is
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
    40
# typically done if the command line lenght risk being too long for the
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
    41
# OS/shell. In later make versions, the file function can be used for this
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
    42
# purpose. For earlier versions, a more complex implementation is provided.
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
    43
#
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
    44
# The function ListPathsSafely can be called either directly or, more commonly
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
    45
# from a recipe line. If called from a recipe, it will be executed in the
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
    46
# evaluation phase of that recipe, which means that it will write to the file
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
    47
# before any other line in the recipe has been run.
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
    48
ifeq ($(HAS_FILE_FUNCTION), true)
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
    49
  # Param 1 - Name of variable containing paths/arguments to output
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
    50
  # Param 2 - File to print to
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
    51
  # Param 3 - Set to true to append to file instead of overwriting
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
    52
  define ListPathsSafely
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
    53
    $$(call MakeDir, $$(dir $$(strip $2)))
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
    54
    $$(file $$(if $$(filter true, $$(strip $3)),>>,>) \
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
    55
        $$(strip $2),$$(subst $$(SPACE),$$(NEWLINE),$$(strip $$($$(strip $1)))))
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
    56
  endef
25854
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 23984
diff changeset
    57
37972
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
    58
else # HAS_FILE_FUNCTION = false
32807
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
    59
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
    60
  $(eval compress_paths = \
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 45369
diff changeset
    61
      $(strip $(shell $(CAT) $(TOPDIR)/make/common/support/ListPathsSafely-pre-compress.incl)))
32807
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
    62
  compress_paths += \
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 45369
diff changeset
    63
      $(subst $(TOPDIR),X97, \
47253
92fd0e04e0e1 8187544: Replace BUILD_OUTPUT and OUTPUT_ROOT with OUTPUTDIR
ihse
parents: 47217
diff changeset
    64
      $(subst $(OUTPUTDIR),X98, \
34596
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 33394
diff changeset
    65
      $(subst X,X00, \
32807
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
    66
      $(subst $(SPACE),\n,$(strip $1)))))
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
    67
  $(eval compress_paths += \
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 45369
diff changeset
    68
      $(strip $(shell $(CAT) $(TOPDIR)/make/common/support/ListPathsSafely-post-compress.incl)))
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    69
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 45369
diff changeset
    70
  decompress_paths=$(SED) -f $(TOPDIR)/make/common/support/ListPathsSafely-uncompress.sed \
32807
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
    71
      -e 's|X99|\\n|g' \
47253
92fd0e04e0e1 8187544: Replace BUILD_OUTPUT and OUTPUT_ROOT with OUTPUTDIR
ihse
parents: 47217
diff changeset
    72
      -e 's|X98|$(OUTPUTDIR)|g' -e 's|X97|$(TOPDIR)|g' \
32807
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
    73
      -e 's|X00|X|g'
14279
1c596d0f411c 8002183: Increased max number of paths to list in ListPathsSafely to 16000.
erikj
parents: 14111
diff changeset
    74
32807
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
    75
  ListPathsSafely_IfPrintf = \
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
    76
      $(if $(word $3,$($(strip $1))), \
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
    77
          $(shell $(PRINTF) -- "$(strip $(call EscapeDollar, \
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
    78
              $(call compress_paths, $(wordlist $3,$4,$($(strip $1))))))\n" \
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
    79
              | $(decompress_paths) >> $2))
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    80
32807
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
    81
  # Param 1 - Name of variable containing paths/arguments to output
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
    82
  # Param 2 - File to print to
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
    83
  # Param 3 - Set to true to append to file instead of overwriting
34596
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 33394
diff changeset
    84
  define ListPathsSafely
37972
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
    85
    ifneq (,$$(word 30001,$$($$(strip $1))))
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
    86
      $$(error Cannot list safely more than 30000 paths. $1 has $$(words $$($$(strip $1))) paths!)
34596
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 33394
diff changeset
    87
    endif
32807
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
    88
    $$(call MakeDir, $$(dir $2))
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
    89
    ifneq ($$(strip $3), true)
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
    90
      $$(shell $(RM) $$(strip $2))
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
    91
    endif
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    92
32807
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
    93
    $$(call ListPathsSafely_IfPrintf,$1,$2,1,250)
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
    94
    $$(call ListPathsSafely_IfPrintf,$1,$2,251,500)
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
    95
    $$(call ListPathsSafely_IfPrintf,$1,$2,501,750)
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
    96
    $$(call ListPathsSafely_IfPrintf,$1,$2,751,1000)
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    97
32807
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
    98
    $$(call ListPathsSafely_IfPrintf,$1,$2,1001,1250)
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
    99
    $$(call ListPathsSafely_IfPrintf,$1,$2,1251,1500)
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
   100
    $$(call ListPathsSafely_IfPrintf,$1,$2,1501,1750)
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
   101
    $$(call ListPathsSafely_IfPrintf,$1,$2,1751,2000)
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   102
32807
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
   103
    $$(call ListPathsSafely_IfPrintf,$1,$2,2001,2250)
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
   104
    $$(call ListPathsSafely_IfPrintf,$1,$2,2251,2500)
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
   105
    $$(call ListPathsSafely_IfPrintf,$1,$2,2501,2750)
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
   106
    $$(call ListPathsSafely_IfPrintf,$1,$2,2751,3000)
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   107
32807
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
   108
    $$(call ListPathsSafely_IfPrintf,$1,$2,3001,3250)
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
   109
    $$(call ListPathsSafely_IfPrintf,$1,$2,3251,3500)
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
   110
    $$(call ListPathsSafely_IfPrintf,$1,$2,3501,3750)
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
   111
    $$(call ListPathsSafely_IfPrintf,$1,$2,3751,4000)
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   112
32807
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
   113
    $$(call ListPathsSafely_IfPrintf,$1,$2,4001,4250)
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
   114
    $$(call ListPathsSafely_IfPrintf,$1,$2,4251,4500)
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
   115
    $$(call ListPathsSafely_IfPrintf,$1,$2,4501,4750)
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
   116
    $$(call ListPathsSafely_IfPrintf,$1,$2,4751,5000)
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   117
32807
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
   118
    $$(call ListPathsSafely_IfPrintf,$1,$2,5001,5250)
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
   119
    $$(call ListPathsSafely_IfPrintf,$1,$2,5251,5500)
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
   120
    $$(call ListPathsSafely_IfPrintf,$1,$2,5501,5750)
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
   121
    $$(call ListPathsSafely_IfPrintf,$1,$2,5751,6000)
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
   122
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
   123
    $$(call ListPathsSafely_IfPrintf,$1,$2,6001,6250)
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
   124
    $$(call ListPathsSafely_IfPrintf,$1,$2,6251,6500)
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
   125
    $$(call ListPathsSafely_IfPrintf,$1,$2,6501,6750)
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
   126
    $$(call ListPathsSafely_IfPrintf,$1,$2,6751,7000)
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   127
32807
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
   128
    $$(call ListPathsSafely_IfPrintf,$1,$2,7001,7250)
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
   129
    $$(call ListPathsSafely_IfPrintf,$1,$2,7251,7500)
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
   130
    $$(call ListPathsSafely_IfPrintf,$1,$2,7501,7750)
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
   131
    $$(call ListPathsSafely_IfPrintf,$1,$2,7751,8000)
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   132
32807
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
   133
    $$(call ListPathsSafely_IfPrintf,$1,$2,8001,8250)
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
   134
    $$(call ListPathsSafely_IfPrintf,$1,$2,8251,8500)
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
   135
    $$(call ListPathsSafely_IfPrintf,$1,$2,8501,8750)
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
   136
    $$(call ListPathsSafely_IfPrintf,$1,$2,8751,9000)
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   137
32807
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
   138
    $$(call ListPathsSafely_IfPrintf,$1,$2,9001,9250)
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
   139
    $$(call ListPathsSafely_IfPrintf,$1,$2,9251,9500)
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
   140
    $$(call ListPathsSafely_IfPrintf,$1,$2,9501,9750)
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
   141
    $$(call ListPathsSafely_IfPrintf,$1,$2,9751,10000)
37972
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   142
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   143
    $$(call ListPathsSafely_IfPrintf,$1,$2,10001,10250)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   144
    $$(call ListPathsSafely_IfPrintf,$1,$2,10251,10500)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   145
    $$(call ListPathsSafely_IfPrintf,$1,$2,10501,10750)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   146
    $$(call ListPathsSafely_IfPrintf,$1,$2,10751,11000)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   147
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   148
    $$(call ListPathsSafely_IfPrintf,$1,$2,11001,11250)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   149
    $$(call ListPathsSafely_IfPrintf,$1,$2,11251,11500)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   150
    $$(call ListPathsSafely_IfPrintf,$1,$2,11501,11750)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   151
    $$(call ListPathsSafely_IfPrintf,$1,$2,11751,12000)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   152
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   153
    $$(call ListPathsSafely_IfPrintf,$1,$2,12001,12250)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   154
    $$(call ListPathsSafely_IfPrintf,$1,$2,12251,12500)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   155
    $$(call ListPathsSafely_IfPrintf,$1,$2,12501,12750)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   156
    $$(call ListPathsSafely_IfPrintf,$1,$2,12751,13000)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   157
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   158
    $$(call ListPathsSafely_IfPrintf,$1,$2,13001,13250)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   159
    $$(call ListPathsSafely_IfPrintf,$1,$2,13251,13500)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   160
    $$(call ListPathsSafely_IfPrintf,$1,$2,13501,13750)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   161
    $$(call ListPathsSafely_IfPrintf,$1,$2,13751,14000)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   162
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   163
    $$(call ListPathsSafely_IfPrintf,$1,$2,14001,14250)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   164
    $$(call ListPathsSafely_IfPrintf,$1,$2,14251,14500)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   165
    $$(call ListPathsSafely_IfPrintf,$1,$2,14501,14750)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   166
    $$(call ListPathsSafely_IfPrintf,$1,$2,14751,15000)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   167
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   168
    $$(call ListPathsSafely_IfPrintf,$1,$2,15001,15250)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   169
    $$(call ListPathsSafely_IfPrintf,$1,$2,15251,15500)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   170
    $$(call ListPathsSafely_IfPrintf,$1,$2,15501,15750)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   171
    $$(call ListPathsSafely_IfPrintf,$1,$2,15751,16000)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   172
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   173
    $$(call ListPathsSafely_IfPrintf,$1,$2,16001,16250)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   174
    $$(call ListPathsSafely_IfPrintf,$1,$2,16251,16500)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   175
    $$(call ListPathsSafely_IfPrintf,$1,$2,16501,16750)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   176
    $$(call ListPathsSafely_IfPrintf,$1,$2,16751,17000)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   177
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   178
    $$(call ListPathsSafely_IfPrintf,$1,$2,17001,17250)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   179
    $$(call ListPathsSafely_IfPrintf,$1,$2,17251,17500)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   180
    $$(call ListPathsSafely_IfPrintf,$1,$2,17501,17750)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   181
    $$(call ListPathsSafely_IfPrintf,$1,$2,17751,18000)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   182
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   183
    $$(call ListPathsSafely_IfPrintf,$1,$2,18001,18250)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   184
    $$(call ListPathsSafely_IfPrintf,$1,$2,18251,18500)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   185
    $$(call ListPathsSafely_IfPrintf,$1,$2,18501,18750)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   186
    $$(call ListPathsSafely_IfPrintf,$1,$2,18751,19000)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   187
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   188
    $$(call ListPathsSafely_IfPrintf,$1,$2,19001,19250)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   189
    $$(call ListPathsSafely_IfPrintf,$1,$2,19251,19500)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   190
    $$(call ListPathsSafely_IfPrintf,$1,$2,19501,19750)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   191
    $$(call ListPathsSafely_IfPrintf,$1,$2,19751,20000)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   192
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   193
    $$(call ListPathsSafely_IfPrintf,$1,$2,20001,20250)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   194
    $$(call ListPathsSafely_IfPrintf,$1,$2,20251,20500)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   195
    $$(call ListPathsSafely_IfPrintf,$1,$2,20501,20750)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   196
    $$(call ListPathsSafely_IfPrintf,$1,$2,20751,21000)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   197
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   198
    $$(call ListPathsSafely_IfPrintf,$1,$2,21001,21250)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   199
    $$(call ListPathsSafely_IfPrintf,$1,$2,21251,21500)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   200
    $$(call ListPathsSafely_IfPrintf,$1,$2,21501,21750)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   201
    $$(call ListPathsSafely_IfPrintf,$1,$2,21751,22000)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   202
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   203
    $$(call ListPathsSafely_IfPrintf,$1,$2,22001,22250)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   204
    $$(call ListPathsSafely_IfPrintf,$1,$2,22251,22500)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   205
    $$(call ListPathsSafely_IfPrintf,$1,$2,22501,22750)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   206
    $$(call ListPathsSafely_IfPrintf,$1,$2,22751,23000)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   207
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   208
    $$(call ListPathsSafely_IfPrintf,$1,$2,23001,23250)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   209
    $$(call ListPathsSafely_IfPrintf,$1,$2,23251,23500)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   210
    $$(call ListPathsSafely_IfPrintf,$1,$2,23501,23750)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   211
    $$(call ListPathsSafely_IfPrintf,$1,$2,23751,24000)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   212
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   213
    $$(call ListPathsSafely_IfPrintf,$1,$2,24001,24250)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   214
    $$(call ListPathsSafely_IfPrintf,$1,$2,24251,24500)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   215
    $$(call ListPathsSafely_IfPrintf,$1,$2,24501,24750)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   216
    $$(call ListPathsSafely_IfPrintf,$1,$2,24751,25000)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   217
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   218
    $$(call ListPathsSafely_IfPrintf,$1,$2,25001,25250)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   219
    $$(call ListPathsSafely_IfPrintf,$1,$2,25251,25500)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   220
    $$(call ListPathsSafely_IfPrintf,$1,$2,25501,25750)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   221
    $$(call ListPathsSafely_IfPrintf,$1,$2,25751,26000)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   222
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   223
    $$(call ListPathsSafely_IfPrintf,$1,$2,26001,26250)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   224
    $$(call ListPathsSafely_IfPrintf,$1,$2,26251,26500)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   225
    $$(call ListPathsSafely_IfPrintf,$1,$2,26501,26750)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   226
    $$(call ListPathsSafely_IfPrintf,$1,$2,26751,27000)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   227
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   228
    $$(call ListPathsSafely_IfPrintf,$1,$2,27001,27250)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   229
    $$(call ListPathsSafely_IfPrintf,$1,$2,27251,27500)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   230
    $$(call ListPathsSafely_IfPrintf,$1,$2,27501,27750)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   231
    $$(call ListPathsSafely_IfPrintf,$1,$2,27751,28000)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   232
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   233
    $$(call ListPathsSafely_IfPrintf,$1,$2,28001,28250)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   234
    $$(call ListPathsSafely_IfPrintf,$1,$2,28251,28500)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   235
    $$(call ListPathsSafely_IfPrintf,$1,$2,28501,28750)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   236
    $$(call ListPathsSafely_IfPrintf,$1,$2,28751,29000)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   237
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   238
    $$(call ListPathsSafely_IfPrintf,$1,$2,29001,29250)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   239
    $$(call ListPathsSafely_IfPrintf,$1,$2,29251,29500)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   240
    $$(call ListPathsSafely_IfPrintf,$1,$2,29501,29750)
e1fa5c2e62a0 8136777: Introduce bundle targets
erikj
parents: 37770
diff changeset
   241
    $$(call ListPathsSafely_IfPrintf,$1,$2,29751,30000)
34596
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 33394
diff changeset
   242
  endef
32807
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
   243
endif # HAS_FILE_FUNCTION
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   244
35008
ef0cd710989f 8146403: Windows build can be faster
erikj
parents: 34596
diff changeset
   245
################################################################################
28600
09dd1740f176 8069261: Create make dependencies on make variable values
erikj
parents: 27595
diff changeset
   246
# Write to and read from file
09dd1740f176 8069261: Create make dependencies on make variable values
erikj
parents: 27595
diff changeset
   247
09dd1740f176 8069261: Create make dependencies on make variable values
erikj
parents: 27595
diff changeset
   248
# Param 1 - File to read
09dd1740f176 8069261: Create make dependencies on make variable values
erikj
parents: 27595
diff changeset
   249
ReadFile = \
09dd1740f176 8069261: Create make dependencies on make variable values
erikj
parents: 27595
diff changeset
   250
    $(shell $(CAT) $1)
09dd1740f176 8069261: Create make dependencies on make variable values
erikj
parents: 27595
diff changeset
   251
09dd1740f176 8069261: Create make dependencies on make variable values
erikj
parents: 27595
diff changeset
   252
# Param 1 - Text to write
09dd1740f176 8069261: Create make dependencies on make variable values
erikj
parents: 27595
diff changeset
   253
# Param 2 - File to write to
32807
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
   254
ifeq ($(HAS_FILE_FUNCTION), true)
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
   255
  WriteFile = \
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
   256
      $(file >$2,$(strip $1))
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
   257
else
34596
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 33394
diff changeset
   258
  # Use printf to get consistent behavior on all platforms.
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 33394
diff changeset
   259
  WriteFile = \
e8328ce5b64e 8142907: Integration of minor fixes from the build-infra project
ihse
parents: 33394
diff changeset
   260
      $(shell $(PRINTF) "%s" $(call ShellQuote, $1) > $2)
32807
20386e6d858f 8136385: Various build speed improvements for windows
erikj
parents: 32553
diff changeset
   261
endif
28600
09dd1740f176 8069261: Create make dependencies on make variable values
erikj
parents: 27595
diff changeset
   262
48078
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents: 47751
diff changeset
   263
# Param 1 - Text to write
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents: 47751
diff changeset
   264
# Param 2 - File to write to
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents: 47751
diff changeset
   265
ifeq ($(HAS_FILE_FUNCTION), true)
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents: 47751
diff changeset
   266
  AppendFile = \
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents: 47751
diff changeset
   267
      $(file >>$2,$(strip $1))
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents: 47751
diff changeset
   268
else
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents: 47751
diff changeset
   269
  # Use printf to get consistent behavior on all platforms.
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents: 47751
diff changeset
   270
  AppendFile = \
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents: 47751
diff changeset
   271
      $(shell $(PRINTF) "%s" $(call ShellQuote, $1) >> $2)
94a38ebbc9bb 8193061: Add run-test-prebuilt functionality
ihse
parents: 47751
diff changeset
   272
endif