make/common/ZipArchive.gmk
author coleenp
Tue, 28 Aug 2018 18:31:14 -0400
changeset 51555 7e1f4a215b45
parent 50590 5fa19bad622d
child 52065 dea8a62cdfc3
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     1
#
27592
af7df0dd5ff7 8065911: Introduce EvalDebugWrapper for all Setup* macros
ihse
parents: 27591
diff changeset
     2
# Copyright (c) 2011, 2014, 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
27592
af7df0dd5ff7 8065911: Introduce EvalDebugWrapper for all Setup* macros
ihse
parents: 27591
diff changeset
    26
ifndef _ZIP_ARCHIVE_GMK
af7df0dd5ff7 8065911: Introduce EvalDebugWrapper for all Setup* macros
ihse
parents: 27591
diff changeset
    27
_ZIP_ARCHIVE_GMK := 1
25854
98ce0879ab4c 8054834: Modular Source Code
chegar
parents: 24080
diff changeset
    28
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
    29
ifeq (,$(_MAKEBASE_GMK))
27592
af7df0dd5ff7 8065911: Introduce EvalDebugWrapper for all Setup* macros
ihse
parents: 27591
diff changeset
    30
  $(error You must include MakeBase.gmk prior to including ZipArchive.gmk)
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    31
endif
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    32
27592
af7df0dd5ff7 8065911: Introduce EvalDebugWrapper for all Setup* macros
ihse
parents: 27591
diff changeset
    33
# Setup make rules for creating a zip archive.
af7df0dd5ff7 8065911: Introduce EvalDebugWrapper for all Setup* macros
ihse
parents: 27591
diff changeset
    34
#
af7df0dd5ff7 8065911: Introduce EvalDebugWrapper for all Setup* macros
ihse
parents: 27591
diff changeset
    35
# Parameter 1 is the name of the rule. This name is used as variable prefix,
af7df0dd5ff7 8065911: Introduce EvalDebugWrapper for all Setup* macros
ihse
parents: 27591
diff changeset
    36
# and the targets generated are listed in a variable by that name.
af7df0dd5ff7 8065911: Introduce EvalDebugWrapper for all Setup* macros
ihse
parents: 27591
diff changeset
    37
#
af7df0dd5ff7 8065911: Introduce EvalDebugWrapper for all Setup* macros
ihse
parents: 27591
diff changeset
    38
# Remaining parameters are named arguments. These include:
af7df0dd5ff7 8065911: Introduce EvalDebugWrapper for all Setup* macros
ihse
parents: 27591
diff changeset
    39
#   SRC
af7df0dd5ff7 8065911: Introduce EvalDebugWrapper for all Setup* macros
ihse
parents: 27591
diff changeset
    40
#   ZIP
af7df0dd5ff7 8065911: Introduce EvalDebugWrapper for all Setup* macros
ihse
parents: 27591
diff changeset
    41
#   INCLUDES
af7df0dd5ff7 8065911: Introduce EvalDebugWrapper for all Setup* macros
ihse
parents: 27591
diff changeset
    42
#   INCLUDE_FILES
af7df0dd5ff7 8065911: Introduce EvalDebugWrapper for all Setup* macros
ihse
parents: 27591
diff changeset
    43
#   EXCLUDES
af7df0dd5ff7 8065911: Introduce EvalDebugWrapper for all Setup* macros
ihse
parents: 27591
diff changeset
    44
#   EXCLUDE_FILES
50590
5fa19bad622d 8204973: Add build support for filtering translations
erikj
parents: 47253
diff changeset
    45
#   EXCLUDE_PATTERNS - Patterns with at most one % wildcard matching filenames
5fa19bad622d 8204973: Add build support for filtering translations
erikj
parents: 47253
diff changeset
    46
#                      and not directories.
5fa19bad622d 8204973: Add build support for filtering translations
erikj
parents: 47253
diff changeset
    47
#   EXCLUDE_PATTERNS_$dir - Exclude patterns just like above but specific to one
5fa19bad622d 8204973: Add build support for filtering translations
erikj
parents: 47253
diff changeset
    48
#                           src dir
27592
af7df0dd5ff7 8065911: Introduce EvalDebugWrapper for all Setup* macros
ihse
parents: 27591
diff changeset
    49
#   SUFFIXES
af7df0dd5ff7 8065911: Introduce EvalDebugWrapper for all Setup* macros
ihse
parents: 27591
diff changeset
    50
#   EXTRA_DEPS
af7df0dd5ff7 8065911: Introduce EvalDebugWrapper for all Setup* macros
ihse
parents: 27591
diff changeset
    51
#   ZIP_OPTIONS extra options to pass to zip
29312
f3f859137ce6 8074988: Reduce boilerplate in Setup* macro definitions
erikj
parents: 27602
diff changeset
    52
SetupZipArchive = $(NamedParamsMacroTemplate)
f3f859137ce6 8074988: Reduce boilerplate in Setup* macro definitions
erikj
parents: 27602
diff changeset
    53
define SetupZipArchiveBody
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    54
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
    55
  # To avoid running find over too large sets of files, which causes make to crash
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
    56
  # on some configurations (cygwin), use INCLUDES and INCLUDE_FILES to build a set
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
    57
  # of directories to run find in, if available.
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
    58
  ifneq ($$($1_INCLUDES)$$($1_INCLUDE_FILES),)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
    59
    $1_FIND_LIST := $$(wildcard $$(foreach i,$$($1_SRC), \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
    60
        $$(addprefix $$i/,$$($1_INCLUDES) $$($1_INCLUDE_FILES))))
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
    61
  else
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
    62
    $1_FIND_LIST := $$($1_SRC)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
    63
  endif
18422
8443ba629f9d 8016605: New files dont apear in src.zip
erikj
parents: 16583
diff changeset
    64
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
    65
  # Find all files in the source tree.
20645
6170a286f879 8025869: make docs doesn't regenerate docs correctly after changing API doc comments in jaxp sources
erikj
parents: 20364
diff changeset
    66
  $1_ALL_SRCS := $$(call not-containing,_the.,$$(call CacheFind,$$($1_FIND_LIST)))
6170a286f879 8025869: make docs doesn't regenerate docs correctly after changing API doc comments in jaxp sources
erikj
parents: 20364
diff changeset
    67
6170a286f879 8025869: make docs doesn't regenerate docs correctly after changing API doc comments in jaxp sources
erikj
parents: 20364
diff changeset
    68
  # Filter on suffixes if set
6170a286f879 8025869: make docs doesn't regenerate docs correctly after changing API doc comments in jaxp sources
erikj
parents: 20364
diff changeset
    69
  ifneq ($$($1_SUFFIXES),)
6170a286f879 8025869: make docs doesn't regenerate docs correctly after changing API doc comments in jaxp sources
erikj
parents: 20364
diff changeset
    70
    $1_ALL_SRCS := $$(filter $$(addprefix %, $$($1_SUFFIXES)), $$($1_ALL_SRCS))
6170a286f879 8025869: make docs doesn't regenerate docs correctly after changing API doc comments in jaxp sources
erikj
parents: 20364
diff changeset
    71
  endif
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    72
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
    73
  ifneq ($$($1_INCLUDES),)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
    74
    ifneq ($$($1_SUFFIXES),)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
    75
      $1_ZIP_INCLUDES := $$(foreach s,$$($1_SUFFIXES), \
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
    76
          $$(addprefix -i$(SPACE)$(DQUOTE),$$(addsuffix /*$$s$(DQUOTE),$$($1_INCLUDES))))
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
    77
    else
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
    78
      $1_ZIP_INCLUDES := $$(addprefix -i$(SPACE)$(DQUOTE),$$(addsuffix /*$(DQUOTE),$$($1_INCLUDES)))
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    79
    endif
41658
14de1ab85d25 8062810: Examine src.zip in JDK image and decide if source classes should be organized by module
erikj
parents: 29312
diff changeset
    80
  else
14de1ab85d25 8062810: Examine src.zip in JDK image and decide if source classes should be organized by module
erikj
parents: 29312
diff changeset
    81
    ifneq ($$($1_SUFFIXES),)
14de1ab85d25 8062810: Examine src.zip in JDK image and decide if source classes should be organized by module
erikj
parents: 29312
diff changeset
    82
      $1_ZIP_INCLUDES := $$(foreach s,$$($1_SUFFIXES), \
14de1ab85d25 8062810: Examine src.zip in JDK image and decide if source classes should be organized by module
erikj
parents: 29312
diff changeset
    83
          $$(addprefix -i$(SPACE)$(DQUOTE),*$$s$(DQUOTE)))
14de1ab85d25 8062810: Examine src.zip in JDK image and decide if source classes should be organized by module
erikj
parents: 29312
diff changeset
    84
    endif
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
    85
  endif
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
    86
  ifneq ($$($1_INCLUDE_FILES),)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
    87
    $1_ZIP_INCLUDES += $$(addprefix -i$(SPACE),$$($1_INCLUDE_FILES))
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
    88
  endif
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
    89
  ifneq ($$($1_EXCLUDES),)
27560
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents: 26671
diff changeset
    90
    $1_ZIP_EXCLUDES := $$(addprefix -x$(SPACE)$(DQUOTE),$$(addsuffix /*$(DQUOTE),$$($1_EXCLUDES)))
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
    91
    $1_SRC_EXCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_EXCLUDES))))
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
    92
    $1_ALL_SRCS := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_ALL_SRCS))
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
    93
  endif
27560
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents: 26671
diff changeset
    94
  ifneq ($$($1_EXCLUDE_FILES),)
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents: 26671
diff changeset
    95
    $1_SRC_EXCLUDE_FILES := $$(addprefix %, $$($1_EXCLUDE_FILES)) $$($1_EXCLUDE_FILES)
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents: 26671
diff changeset
    96
    $1_ALL_SRCS := $$(filter-out $$($1_SRC_EXCLUDE_FILES), $$($1_ALL_SRCS))
50590
5fa19bad622d 8204973: Add build support for filtering translations
erikj
parents: 47253
diff changeset
    97
    $$(foreach s, $$($1_SRC), \
5fa19bad622d 8204973: Add build support for filtering translations
erikj
parents: 47253
diff changeset
    98
      $$(eval $1_ZIP_EXCLUDES_$$s += \
5fa19bad622d 8204973: Add build support for filtering translations
erikj
parents: 47253
diff changeset
    99
          $$(addprefix -x$$(SPACE), $$(patsubst $$s/%,%, $$($1_EXCLUDE_FILES))) \
5fa19bad622d 8204973: Add build support for filtering translations
erikj
parents: 47253
diff changeset
   100
      ) \
5fa19bad622d 8204973: Add build support for filtering translations
erikj
parents: 47253
diff changeset
   101
    )
27560
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents: 26671
diff changeset
   102
  endif
50590
5fa19bad622d 8204973: Add build support for filtering translations
erikj
parents: 47253
diff changeset
   103
  ifneq ($$($1_EXCLUDE_PATTERNS), )
5fa19bad622d 8204973: Add build support for filtering translations
erikj
parents: 47253
diff changeset
   104
    $1_ALL_SRCS := $$(filter-out $$($1_EXCLUDE_PATTERNS), $$($1_ALL_SRCS))
5fa19bad622d 8204973: Add build support for filtering translations
erikj
parents: 47253
diff changeset
   105
    $1_ZIP_EXCLUDES += $$(addprefix -x$(SPACE), $$(subst %,\*,$$($1_EXCLUDE_PATTERNS)))
5fa19bad622d 8204973: Add build support for filtering translations
erikj
parents: 47253
diff changeset
   106
  endif
5fa19bad622d 8204973: Add build support for filtering translations
erikj
parents: 47253
diff changeset
   107
  # Rewrite src dir specific exclude patterns to zip excludes
5fa19bad622d 8204973: Add build support for filtering translations
erikj
parents: 47253
diff changeset
   108
  $$(foreach s, $$($1_SRC), \
5fa19bad622d 8204973: Add build support for filtering translations
erikj
parents: 47253
diff changeset
   109
    $$(if $$($1_EXCLUDE_PATTERNS_$$s), \
5fa19bad622d 8204973: Add build support for filtering translations
erikj
parents: 47253
diff changeset
   110
      $$(eval $1_ZIP_EXCLUDES_$$s += \
5fa19bad622d 8204973: Add build support for filtering translations
erikj
parents: 47253
diff changeset
   111
          $$(addprefix -x$$(SPACE), $$(subst %,\*,$$($1_EXCLUDE_PATTERNS_$$s))) \
5fa19bad622d 8204973: Add build support for filtering translations
erikj
parents: 47253
diff changeset
   112
      ) \
5fa19bad622d 8204973: Add build support for filtering translations
erikj
parents: 47253
diff changeset
   113
    ) \
5fa19bad622d 8204973: Add build support for filtering translations
erikj
parents: 47253
diff changeset
   114
  )
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   115
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   116
  # Use a slightly shorter name for logging, but with enough path to identify this zip.
47253
92fd0e04e0e1 8187544: Replace BUILD_OUTPUT and OUTPUT_ROOT with OUTPUTDIR
ihse
parents: 42136
diff changeset
   117
  $1_NAME:=$$(subst $$(OUTPUTDIR)/,,$$($1_ZIP))
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   118
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   119
  # Now $1_ALL_SRCS should contain all sources that are going to be put into the zip.
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   120
  # I.e. the zip -i and -x options should match the filtering done in the makefile.
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   121
  # Explicitly excluded files can be given with absolute path. The patsubst solution
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   122
  # isn't perfect but the likelyhood of an absolute path to match something in a src
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   123
  # dir is very small.
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   124
  # If zip has nothing to do, it returns 12 and would fail the build. Check for 12
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   125
  # and only fail if it's not.
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   126
  $$($1_ZIP) : $$($1_ALL_SRCS) $$($1_EXTRA_DEPS)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   127
	$(MKDIR) -p $$(@D)
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   128
	$(ECHO) Updating $$($1_NAME)
50590
5fa19bad622d 8204973: Add build support for filtering translations
erikj
parents: 47253
diff changeset
   129
	$$(foreach s,$$($1_SRC),(cd $$s && $(ZIPEXE) -qru $$($1_ZIP_OPTIONS) $$@ . \
5fa19bad622d 8204973: Add build support for filtering translations
erikj
parents: 47253
diff changeset
   130
	    $$($1_ZIP_INCLUDES) $$($1_ZIP_EXCLUDES) -x \*_the.\* \
5fa19bad622d 8204973: Add build support for filtering translations
erikj
parents: 47253
diff changeset
   131
	    $$($1_ZIP_EXCLUDES_$$s) \
27560
adc258b13e2c 8049367: Modular Run-Time Images
chegar
parents: 26671
diff changeset
   132
	    || test "$$$$?" = "12" )$$(NEWLINE)) true
20363
fa7663fc5d50 8001931: The new build system whitespace cleanup
ihse
parents: 20273
diff changeset
   133
	$(TOUCH) $$@
22480
d1be923b168a 8026773: Failing compilation in Corba does not fail the build
erikj
parents: 22469
diff changeset
   134
d1be923b168a 8026773: Failing compilation in Corba does not fail the build
erikj
parents: 22469
diff changeset
   135
  # Add zip to target list
d1be923b168a 8026773: Failing compilation in Corba does not fail the build
erikj
parents: 22469
diff changeset
   136
  $1 += $$($1_ZIP)
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   137
endef
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   138
27592
af7df0dd5ff7 8065911: Introduce EvalDebugWrapper for all Setup* macros
ihse
parents: 27591
diff changeset
   139
endif # _ZIP_ARCHIVE_GMK