Merged entire cnd module into the trunk. Until this merge, all cnd cnd-trunk-merge2
authorgordonp@netbeans.org
Wed, 23 Aug 2006 16:48:28 +0000
changeset 1798380e420d2693
parent 1797 4e5ebeff03b0
child 1799 07ed7da20617
Merged entire cnd module into the trunk. Until this merge, all cnd
development has been done on the cnd-nb50-dev branch. This branch
is now closing and future work should be done on the trunk or release55
branch (in the short term, the release55 branch is probably better).
My next move will be to merge these changes into release55.
cnd/build.xml
cnd/checkcddl
cnd/headless.xml
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/cnd/build.xml	Wed Aug 23 16:48:28 2006 +0000
     1.3 @@ -0,0 +1,38 @@
     1.4 +<?xml version="1.0" encoding="UTF-8"?>
     1.5 +<!--
     1.6 +The contents of this file are subject to the terms of the Common Development
     1.7 +and Distribution License (the License). You may not use this file except in
     1.8 +compliance with the License.
     1.9 +
    1.10 +You can obtain a copy of the License at http://www.netbeans.org/cddl.html
    1.11 +or http://www.netbeans.org/cddl.txt.
    1.12 +
    1.13 +When distributing Covered Code, include this CDDL Header Notice in each file
    1.14 +and include the License file at http://www.netbeans.org/cddl.txt.
    1.15 +If applicable, add the following below the CDDL Header, with the fields
    1.16 +enclosed by brackets [] replaced by your own identifying information:
    1.17 +"Portions Copyrighted [year] [name of copyright owner]"
    1.18 +
    1.19 +The Original Software is NetBeans. The Initial Developer of the Original
    1.20 +Software is Sun Microsystems, Inc. Portions Copyright 2001-2006 Sun
    1.21 +Microsystems, Inc. All Rights Reserved.
    1.22 +-->
    1.23 +
    1.24 +<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
    1.25 +<!-- for some information on what you could do (e.g. targets to override). -->
    1.26 +<!-- If you delete this file and reopen the project it will be recreated. -->
    1.27 +<project name="org.netbeans.modules.cnd" default="netbeans" basedir=".">
    1.28 +    <description>Builds, tests, and runs the project org.netbeans.modules.cnd.</description>
    1.29 +    <property name="javahelp.base" value="org/netbeans/modules/cnd/help"/>
    1.30 +    <import file="nbproject/build-impl.xml"/>
    1.31 +
    1.32 +    <target name="netbeans" depends="projectized-common.netbeans">
    1.33 +	<chmod file="${cluster}/bin/stdouterr.sh" perm="ugo+rx"/>
    1.34 +    </target>
    1.35 +
    1.36 +    <target name="checkcddl">
    1.37 +	<exec os="Linux SunOS Solaris" dir="." executable="sh">
    1.38 +	    <arg value="checkcddl"/>
    1.39 +	</exec>
    1.40 +    </target>
    1.41 +</project>
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/cnd/checkcddl	Wed Aug 23 16:48:28 2006 +0000
     2.3 @@ -0,0 +1,65 @@
     2.4 +#! /bin/sh
     2.5 +
     2.6 +#NO_CDDL_LIST=/tmp/no-cddl-list
     2.7 +#CDDL_LIST=/tmp/cddl-list
     2.8 +#rm -f $NO_CDDL_LIST $CDDL_LIST
     2.9 +
    2.10 +#
    2.11 +# checkcddl should be run from the top-level module directory (its mostly
    2.12 +# for cnd but probably works well for other modules). The grep list has
    2.13 +# various files, directories, and suffixes which should be ignored while
    2.14 +# searching for missing CDDL licenses.
    2.15 +#
    2.16 +for f in \
    2.17 +    `find . -type f | \
    2.18 +	grep -v META-INF | \
    2.19 +	grep -v /CVS/ | \
    2.20 +	grep -v '/.cvsignore$' | \
    2.21 +	grep -v '/nbproject/' | \
    2.22 +	grep -v '/manifest.mf$' | \
    2.23 +	grep -v '/tags$' | \
    2.24 +	grep -v '/Bundle.properties$' | \
    2.25 +	grep -v '\.gif$' | \
    2.26 +	grep -v '\.png$' | \
    2.27 +	grep -v '\.xml$' | \
    2.28 +	grep -v '\.settings$' | \
    2.29 +	grep -v '\.wstcref$' | \
    2.30 +	grep -v '\.form$' | \
    2.31 +	grep -v '\.template$' | \
    2.32 +	grep -v '\.group$' | \
    2.33 +	grep -v '\.jar$' | \
    2.34 +	grep -v '/mobility/' | \
    2.35 +	grep -v '/symbian/' | \
    2.36 +	grep -v '/javahelp/' | \
    2.37 +	grep -v '/build/' | \
    2.38 +	grep -v '/www/' | \
    2.39 +	grep -v '/modelimpl/antlr2/generated/' | \
    2.40 +	grep -v '/modelimpl/apt/impl/support/generated/' | \
    2.41 +	grep -v '/modelimpl/antlr/CPPFoldingTokenTypes.java' | \
    2.42 +	grep -v '/modelimpl/antlr/CPPFoldingLexer.java' | \
    2.43 +	grep -v '/modelimpl/antlr/CPPFoldingParser.java' | \
    2.44 +	grep -v '/modelimpl/antlr/CPPFoldingTokenTypes.txt' | \
    2.45 +	cat - \
    2.46 +    `
    2.47 +do
    2.48 +    if grep -s \
    2.49 +	'The contents of this file are subject to the terms of the Common Development' \
    2.50 +	$f >&1 > /dev/null
    2.51 +    then
    2.52 +	#echo $f >> $CDDL_LIST
    2.53 +	#echo "$f: "
    2.54 +	true
    2.55 +    else
    2.56 +	if ggrep -s -q "NOCDDL" $f
    2.57 +	then
    2.58 +	    #echo $f >> $CDDL_LIST
    2.59 +	    ##echo "$f: "
    2.60 +	    true
    2.61 +	else
    2.62 +	    #echo $f >> $NO_CDDL_LIST
    2.63 +	    echo "$f: Missing CDDL"
    2.64 +	    true
    2.65 +	fi
    2.66 +    fi
    2.67 +done
    2.68 +
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/cnd/headless.xml	Wed Aug 23 16:48:28 2006 +0000
     3.3 @@ -0,0 +1,150 @@
     3.4 +<?xml version="1.0" encoding="UTF-8"?> <!-- -*- sgml-indent-step: 2 -*- -->
     3.5 +<!--
     3.6 +The contents of this file are subject to the terms of the Common Development
     3.7 +and Distribution License (the License). You may not use this file except in
     3.8 +compliance with the License.
     3.9 +
    3.10 +You can obtain a copy of the License at http://www.netbeans.org/cddl.html
    3.11 +or http://www.netbeans.org/cddl.txt.
    3.12 +
    3.13 +When distributing Covered Code, include this CDDL Header Notice in each file
    3.14 +and include the License file at http://www.netbeans.org/cddl.txt.
    3.15 +If applicable, add the following below the CDDL Header, with the fields
    3.16 +enclosed by brackets [] replaced by your own identifying information:
    3.17 +"Portions Copyrighted [year] [name of copyright owner]"
    3.18 +
    3.19 +The Original Software is NetBeans. The Initial Developer of the Original
    3.20 +Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
    3.21 +Microsystems, Inc. All Rights Reserved.
    3.22 +-->
    3.23 +
    3.24 +<project name="headless" default="all" basedir=".">
    3.25 +
    3.26 +  <target name="all" depends="init,get-netbeans,unpack-netbeans,build-cnd"/>
    3.27 +
    3.28 +  <target name="build-cnd" depends="init,unpack-netbeans">
    3.29 +    <ant antfile="suite/build.xml" target="dist" inheritall="false">
    3.30 +      <property name="nbplatform.NB50.harness.dir" location="build/netbeans/harness"/>
    3.31 +      <property name="harness.dir" location="build/netbeans/harness"/>
    3.32 +      <property name="nbplatform.NB50.netbeans.dest.dir" location="build/netbeans"/>
    3.33 +      <property name="nbplatform.NB50.netbeans.dest.dir" location="build/netbeans"/>
    3.34 +      <property name="suite.dir" location="suite"/>
    3.35 +
    3.36 +      <property name="buildnumber" value="${buildnumber}"/>
    3.37 +    </ant>
    3.38 +  </target>
    3.39 +  
    3.40 +  <target name="unpack-netbeans" depends="get-netbeans">
    3.41 +    <delete dir="build/netbeans"/>
    3.42 +    <mkdir dir="build"/>
    3.43 +    <unzip src="netbeans-5_0.zip" dest="build"/>
    3.44 +  </target>
    3.45 +  
    3.46 +  <target name="clean">
    3.47 +    <delete dir="build"/>
    3.48 +  </target>
    3.49 +  
    3.50 +  <target name="clean-cache">
    3.51 +    <delete dir=".">
    3.52 +      <include name="netbeans-5_0.zip*"/>
    3.53 +    </delete>
    3.54 +  </target>
    3.55 +  <target name="real-clean" depends="clean,clean-cache"/>
    3.56 +  <target name="get-netbeans">
    3.57 +    <echo>If the next step fails with &quot;java.net.UnknownHostException: www.netbeans.org&quot;, run ant with options &quot;-Dhttp.proxyHost=your.proxy.com -Dhttp.proxyPort=portnumber&quot;
    3.58 +    </echo>
    3.59 +    <get src="http://www.netbeans.org/download/5_0/fcs/200601251500/netbeans-5_0.zip"
    3.60 +         dest="netbeans-5_0.zip"
    3.61 +         usetimestamp="true"/>
    3.62 +    <get src="http://www.netbeans.org/download/5_0/fcs/200601251500/netbeans-5_0.zip.MD5"
    3.63 +         dest="netbeans-5_0.zip.MD5"
    3.64 +         usetimestamp="true"/>
    3.65 +  </target>
    3.66 +  
    3.67 +<!--
    3.68 +  ##                                         ##
    3.69 +  ##                                         ##
    3.70 +  ##  Below you can find only helper targets ##
    3.71 +  ##                                         ##
    3.72 +  ##                                         ##
    3.73 +  -->
    3.74 +
    3.75 +  <target name="init" depends="setup-jdkhome,set-http-proxy">
    3.76 +    <echo message="init"/>
    3.77 +    <tstamp>
    3.78 +    	<format property="buildnumber" pattern="yyMMdd"/>
    3.79 +    </tstamp>
    3.80 +  </target>
    3.81 +
    3.82 +  <target name="check-http-proxy-props">
    3.83 +    <condition property="is-http-proxy-set">
    3.84 +      <and>
    3.85 +        <isset property="http.proxyHost"/>
    3.86 +        <isset property="http.proxyPort"/>
    3.87 +      </and>
    3.88 +    </condition>
    3.89 +  </target>
    3.90 +  
    3.91 +  <target name="set-http-proxy" depends="check-http-proxy-props" if="is-http-proxy-set">
    3.92 +    <setproxy proxyhost="${http.proxyHost}" proxyport="${http.proxyPort}"/>
    3.93 +  </target>
    3.94 +  
    3.95 +  <target name="setup-jdkhome-1">
    3.96 +    <!-- Note: user-configured -Djavahome=... will always override this: -->
    3.97 +    <property name="javahome" location="${java.home}"/>
    3.98 +    <condition property="jdkhome" value="${javahome}">
    3.99 +        <or>
   3.100 +            <available file="${javahome}/lib/tools.jar"/>
   3.101 +            <!-- on Mac -->
   3.102 +            <available file="${javahome}/../Classes/classes.jar"/>
   3.103 +        </or>
   3.104 +    </condition>
   3.105 +  </target>
   3.106 +  
   3.107 +  <target name="setup-jdkhome-2" unless="jdkhome">
   3.108 +    <property name="javahomeParent" location="${java.home}/.."/>
   3.109 +    <condition property="jdkhome" value="${javahomeParent}">
   3.110 +        <or>
   3.111 +            <available file="${javahomeParent}/lib/tools.jar"/>
   3.112 +            <!-- on Mac -->
   3.113 +            <available file="${javahomeParent}/../Classes/classes.jar"/>
   3.114 +        </or>
   3.115 +    </condition>
   3.116 +  </target>
   3.117 +
   3.118 +  <target name="setup-jdkhome" depends="setup-jdkhome-1,setup-jdkhome-2" unless="jdkhome">
   3.119 +    <fail message="No tools.jar or classes.jar found in ${javahome}! Set -Djavahome=... as needed."/>
   3.120 +  </target>
   3.121 +    
   3.122 +  <target name="try-me" depends="all">
   3.123 +    <property name="tryme.debug.args" value="" />
   3.124 +  
   3.125 +    <exec os="Windows NT Windows 95 Windows 98 Windows 2000 Windows 2003 Windows XP" executable="${netbeans.dest.abs}/bin/nb.exe" failonerror="yes">
   3.126 +      <arg value="--jdkhome"/>
   3.127 +      <arg file="${jdkhome}"/>
   3.128 +      <arg value="--userdir"/>
   3.129 +      <arg file="${test.user.dir}"/>
   3.130 +      <arg line="${tryme.args}"/>
   3.131 +      <arg line="${tryme.debug.args}" />
   3.132 +    </exec>
   3.133 +    <exec os="Linux SunOS Solaris" dir="." executable="sh" failonerror="yes">
   3.134 +      <arg value="${netbeans.dest}/bin/netbeans"/>
   3.135 +      <arg value="--jdkhome"/>
   3.136 +      <arg file="${jdkhome}"/>
   3.137 +      <arg value="--userdir"/>
   3.138 +      <arg file="${test.user.dir}"/>
   3.139 +      <arg line="${tryme.args}"/>
   3.140 +      <arg line="${tryme.debug.args}" />
   3.141 +    </exec>
   3.142 +    <exec os="Mac OS X" dir="." executable="sh" failonerror="yes">
   3.143 +      <arg value="${netbeans.dest}/bin/netbeans"/>
   3.144 +      <arg value="--jdkhome"/>
   3.145 +      <arg file="/Library/Java/Home"/>
   3.146 +      <arg value="--userdir"/>
   3.147 +      <arg file="${test.user.dir}"/>
   3.148 +      <arg line="${tryme.args}"/>
   3.149 +      <arg line="${tryme.debug.args}" />
   3.150 +    </exec>
   3.151 +  </target>
   3.152 +
   3.153 +</project>