test/make/TestMakeBase.gmk
author martin
Thu, 18 Sep 2014 16:25:50 -0700
changeset 26715 5e166a2dc3ac
parent 25854 98ce0879ab4c
child 28600 09dd1740f176
permissions -rw-r--r--
8058550: Clarify that TimerTasks are not reusable Reviewed-by: alanb, chegar
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
25854
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
     1
#
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
     2
# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
     4
#
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    10
#
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    15
# accompanied this code).
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    16
#
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    20
#
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    23
# questions.
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    24
#
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    25
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    26
default: all
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    27
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    28
include $(SPEC)
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    29
include MakeBase.gmk
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    30
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    31
THIS_FILE := $(SRC_ROOT)/test/make/TestMakeBase.gmk
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    32
DEPS := $(THIS_FILE) \
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    33
    $(SRC_ROOT)/make/common/MakeBase.gmk \
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    34
    #
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    35
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    36
OUTPUT_DIR := $(TESTMAKE_OUTPUTDIR)/make-base
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    37
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    38
################################################################################
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    39
# Escape $
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    40
ifneq ($(call EscapeDollar, foo$$bar), foo\$$bar)
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    41
  $(error EscapeDollar failed $(call EscapeDollar, foo$$bar) foo\$$bar)
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    42
endif
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    43
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    44
ESCAPE_DOLLAR_DIR := $(OUTPUT_DIR)/escape-dollar
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    45
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    46
$(ESCAPE_DOLLAR_DIR)/_escape_dollar: $(DEPS)
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    47
	$(RM) -r $(@D)
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    48
	$(MKDIR) -p $(@D)
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    49
	$(ECHO) foo\$$bar > $(@D)/file1
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    50
	$(ECHO) $(call EscapeDollar, foo$$bar) > $(@D)/file2
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    51
	$(ECHO) $(call EscapeDollar, foo\$$bar) > $(@D)/file3
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    52
	$(DIFF) $(@D)/file1 $(@D)/file2
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    53
	$(DIFF) $(@D)/file1 $(@D)/file3
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    54
	$(TOUCH) $@
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    55
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    56
TEST_TARGETS += $(ESCAPE_DOLLAR_DIR)/_escape_dollar
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    57
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    58
################################################################################
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    59
98ce0879ab4c 8054834: Modular Source Code
chegar
parents:
diff changeset
    60
all: $(TEST_TARGETS)