make/idea/template/build.xml
author coleenp
Tue, 31 Oct 2017 11:55:09 -0400
changeset 47765 b7c7428eaab9
parent 47217 72e3ae9a25eb
child 48667 f2344724a475
permissions -rw-r--r--
8189610: Reconcile jvm.h and all jvm_md.h between java.base and hotspot Summary: Removed hotspot version of jvm*h and jni*h files. Reviewed-by: ihse, mchung, dholmes
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
37861
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
     1
<!-- importing.xml -->
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
     2
<project name="jdk" basedir="..">
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
     3
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
     4
    <script language="javascript" classpath=".idea/classes">
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
     5
        var JdkLogger = Java.type("idea.JdkIdeaAntLogger");
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
     6
        new JdkLogger(project)
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
     7
    </script>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
     8
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
     9
     <!-- java.marker is set to a marker file to check for within a Java install dir.
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    10
         The best file to check for across Solaris/Linux/Windows/MacOS is one of the
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    11
         executables; regrettably, that is OS-specific. -->
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    12
    <condition property="java.marker" value="bin/java">
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    13
        <os family="unix"/>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    14
    </condition>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    15
    <condition property="java.marker" value="bin/java.exe">
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    16
        <os family="windows"/>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    17
    </condition>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    18
37976
9cc5debe0f47 8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents: 37861
diff changeset
    19
    <target name="-check-jtreg.home" depends="-def-check">
9cc5debe0f47 8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents: 37861
diff changeset
    20
        <check name="jtreg" property="jtreg.home" marker="lib/jtreg.jar"/>
9cc5debe0f47 8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents: 37861
diff changeset
    21
    </target>
9cc5debe0f47 8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents: 37861
diff changeset
    22
37861
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    23
    <property name="test.dir" value="${basedir}/jdk/test"/>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    24
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    25
    <macrodef name="call-make">
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    26
            <attribute name="dir"/>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    27
            <attribute name="args"/>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    28
            <sequential>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    29
                <exec executable="make" dir="@{dir}" failonerror="true">
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    30
                    <arg line="@{args}"/>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    31
                    <env key="CLASSPATH" value = ""/>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    32
                </exec>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    33
            </sequential>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    34
        </macrodef>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    35
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 37976
diff changeset
    36
    <target name="cond-clean" unless="${intellij.ismake}">
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 37976
diff changeset
    37
        <antcall target="clean"/>
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 37976
diff changeset
    38
    </target>
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 37976
diff changeset
    39
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 37976
diff changeset
    40
    <target name="post-make" depends="cond-clean, build-module"/>
37861
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    41
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    42
    <!--
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    43
        **** Global JDK Build Targets
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    44
    -->
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    45
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    46
    <target name="clean" depends="-do-configure">
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    47
        <echo message="base = ${basedir}"/>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    48
        <call-make dir = "${build.target.dir}" args = "clean"/>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    49
    </target>
37976
9cc5debe0f47 8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents: 37861
diff changeset
    50
37861
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    51
    <target name="-do-configure">
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    52
        <echo message="base = ${basedir}"/>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    53
        <fail message="Not part of a full JDK forest">
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    54
            <condition>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    55
                <not>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    56
                    <available file="${basedir}/configure" />
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    57
                </not>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    58
            </condition>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    59
        </fail>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    60
        <exec executable="sh" dir="${basedir}" failonerror="true">
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    61
            <arg line="configure --with-boot-jdk=${boot.java.home}"/>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    62
        </exec>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    63
    </target>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    64
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    65
    <target name="images">
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    66
        <call-make dir = "${build.target.dir}" args = "images"/>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    67
    </target>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    68
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    69
    <target name="jimages">
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    70
        <call-make dir = "${build.target.dir}" args = "jimages"/>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    71
    </target>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    72
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    73
    <target name="check-env">
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    74
        <exec executable="env" dir="${basedir}"/>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    75
    </target>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    76
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    77
    <target name="build-module">
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    78
        <call-make dir = "${build.target.dir}" args = "${module.name}"/>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    79
    </target>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    80
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    81
    <target name="-check-boot.java.home" depends="-def-check">
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    82
        <check name="bootstrap java" property="boot.java.home" marker="${java.marker}"/>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    83
    </target>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    84
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    85
    <target name="-def-check">
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    86
        <macrodef name="check">
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    87
            <attribute name="name"/>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    88
            <attribute name="property"/>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    89
            <attribute name="marker" default=""/>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    90
            <sequential>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    91
                <fail message="Cannot locate @{name}: please set @{property} to its location">
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    92
                    <condition>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    93
                        <not>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    94
                            <isset property="@{property}"/>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    95
                        </not>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    96
                    </condition>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    97
                </fail>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    98
                <fail message="@{name} is not installed in ${@{property}}">
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
    99
                    <condition>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
   100
                        <and>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
   101
                            <not>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
   102
                                <equals arg1="@{marker}" arg2=""/>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
   103
                            </not>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
   104
                            <not>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
   105
                                <available file="${@{property}}/@{marker}"/>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
   106
                            </not>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
   107
                        </and>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
   108
                    </condition>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
   109
                </fail>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
   110
            </sequential>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
   111
        </macrodef>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
   112
    </target>
53d85619d7fe 8074716: IntelliJ IDEA project support
chegar
parents:
diff changeset
   113
</project>