| <?xml version="1.0" ?> |
| |
| <!-- |
| |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| |
| --> |
| |
| <project name="node" default="main" basedir="."> |
| |
| <target name="main" depends="preprocess, externc, postprocess, compc" /> |
| |
| <target name="preprocess"> |
| <mkdir dir="${basedir}/target/downloads/closure-compiler-master/contrib/nodejs" /> |
| <get src="https://raw.githubusercontent.com/google/closure-compiler/master/contrib/nodejs/assert.js" dest="${basedir}/target/downloads/closure-compiler-master/contrib/nodejs/assert.js" skipexisting="true"/> |
| <get src="https://raw.githubusercontent.com/google/closure-compiler/master/contrib/nodejs/buffer.js" dest="${basedir}/target/downloads/closure-compiler-master/contrib/nodejs/buffer.js" skipexisting="true"/> |
| <get src="https://raw.githubusercontent.com/google/closure-compiler/master/contrib/nodejs/child_process.js" dest="${basedir}/target/downloads/closure-compiler-master/contrib/nodejs/child_process.js" skipexisting="true"/> |
| <get src="https://raw.githubusercontent.com/google/closure-compiler/master/contrib/nodejs/cluster.js" dest="${basedir}/target/downloads/closure-compiler-master/contrib/nodejs/cluster.js" skipexisting="true"/> |
| <get src="https://raw.githubusercontent.com/google/closure-compiler/master/contrib/nodejs/crypto.js" dest="${basedir}/target/downloads/closure-compiler-master/contrib/nodejs/crypto.js" skipexisting="true"/> |
| <get src="https://raw.githubusercontent.com/google/closure-compiler/master/contrib/nodejs/dgram.js" dest="${basedir}/target/downloads/closure-compiler-master/contrib/nodejs/dgram.js" skipexisting="true"/> |
| <get src="https://raw.githubusercontent.com/google/closure-compiler/master/contrib/nodejs/dns.js" dest="${basedir}/target/downloads/closure-compiler-master/contrib/nodejs/dns.js" skipexisting="true"/> |
| <get src="https://raw.githubusercontent.com/google/closure-compiler/master/contrib/nodejs/domain.js" dest="${basedir}/target/downloads/closure-compiler-master/contrib/nodejs/domain.js" skipexisting="true"/> |
| <get src="https://raw.githubusercontent.com/google/closure-compiler/master/contrib/nodejs/events.js" dest="${basedir}/target/downloads/closure-compiler-master/contrib/nodejs/events.js" skipexisting="true"/> |
| <get src="https://raw.githubusercontent.com/google/closure-compiler/master/contrib/nodejs/fs.js" dest="${basedir}/target/downloads/closure-compiler-master/contrib/nodejs/fs.js" skipexisting="true"/> |
| <get src="https://raw.githubusercontent.com/google/closure-compiler/master/contrib/nodejs/globals.js" dest="${basedir}/target/downloads/closure-compiler-master/contrib/nodejs/globals.js" skipexisting="true"/> |
| <get src="https://raw.githubusercontent.com/google/closure-compiler/master/contrib/nodejs/http.js" dest="${basedir}/target/downloads/closure-compiler-master/contrib/nodejs/http.js" skipexisting="true"/> |
| <get src="https://raw.githubusercontent.com/google/closure-compiler/master/contrib/nodejs/https.js" dest="${basedir}/target/downloads/closure-compiler-master/contrib/nodejs/https.js" skipexisting="true"/> |
| <get src="https://raw.githubusercontent.com/google/closure-compiler/master/contrib/nodejs/net.js" dest="${basedir}/target/downloads/closure-compiler-master/contrib/nodejs/net.js" skipexisting="true"/> |
| <get src="https://raw.githubusercontent.com/google/closure-compiler/master/contrib/nodejs/os.js" dest="${basedir}/target/downloads/closure-compiler-master/contrib/nodejs/os.js" skipexisting="true"/> |
| <get src="https://raw.githubusercontent.com/google/closure-compiler/master/contrib/nodejs/path.js" dest="${basedir}/target/downloads/closure-compiler-master/contrib/nodejs/path.js" skipexisting="true"/> |
| <get src="https://raw.githubusercontent.com/google/closure-compiler/master/contrib/nodejs/punycode.js" dest="${basedir}/target/downloads/closure-compiler-master/contrib/nodejs/punycode.js" skipexisting="true"/> |
| <get src="https://raw.githubusercontent.com/google/closure-compiler/master/contrib/nodejs/querystring.js" dest="${basedir}/target/downloads/closure-compiler-master/contrib/nodejs/querystring.js" skipexisting="true"/> |
| <get src="https://raw.githubusercontent.com/google/closure-compiler/master/contrib/nodejs/readline.js" dest="${basedir}/target/downloads/closure-compiler-master/contrib/nodejs/readline.js" skipexisting="true"/> |
| <get src="https://raw.githubusercontent.com/google/closure-compiler/master/contrib/nodejs/repl.js" dest="${basedir}/target/downloads/closure-compiler-master/contrib/nodejs/repl.js" skipexisting="true"/> |
| <get src="https://raw.githubusercontent.com/google/closure-compiler/master/contrib/nodejs/stream.js" dest="${basedir}/target/downloads/closure-compiler-master/contrib/nodejs/stream.js" skipexisting="true"/> |
| <get src="https://raw.githubusercontent.com/google/closure-compiler/master/contrib/nodejs/string_decoder.js" dest="${basedir}/target/downloads/closure-compiler-master/contrib/nodejs/string_decoder.js" skipexisting="true"/> |
| <get src="https://raw.githubusercontent.com/google/closure-compiler/master/contrib/nodejs/tls.js" dest="${basedir}/target/downloads/closure-compiler-master/contrib/nodejs/tls.js" skipexisting="true"/> |
| <get src="https://raw.githubusercontent.com/google/closure-compiler/master/contrib/nodejs/tty.js" dest="${basedir}/target/downloads/closure-compiler-master/contrib/nodejs/tty.js" skipexisting="true"/> |
| <get src="https://raw.githubusercontent.com/google/closure-compiler/master/contrib/nodejs/url.js" dest="${basedir}/target/downloads/closure-compiler-master/contrib/nodejs/url.js" skipexisting="true"/> |
| <get src="https://raw.githubusercontent.com/google/closure-compiler/master/contrib/nodejs/util.js" dest="${basedir}/target/downloads/closure-compiler-master/contrib/nodejs/util.js" skipexisting="true"/> |
| <get src="https://raw.githubusercontent.com/google/closure-compiler/master/contrib/nodejs/vm.js" dest="${basedir}/target/downloads/closure-compiler-master/contrib/nodejs/vm.js" skipexisting="true"/> |
| <get src="https://raw.githubusercontent.com/google/closure-compiler/master/contrib/nodejs/zlib.js" dest="${basedir}/target/downloads/closure-compiler-master/contrib/nodejs/zlib.js" skipexisting="true"/> |
| </target> |
| |
| <target name="externc" > |
| <java jar="${basedir}/../../compiler-jx/lib/externc.jar" fork="true" |
| failonerror="false"> |
| <arg value="+flexlib=externs" /> |
| <arg value="-debug" /> |
| <arg value="-load-config=${basedir}/src/main/config/externc-config.xml" /> |
| </java> |
| </target> |
| |
| <target name="postprocess" > |
| </target> |
| |
| <target name="compc" > |
| <copy file="${basedir}/src/main/config/compile-as-config.xml" |
| todir="${basedir}/target" /> |
| <java jar="${basedir}/../../compiler/lib/falcon-compc.jar" fork="true" |
| failonerror="true"> |
| <arg value="+flexlib=externs/frameworks" /> |
| <arg value="-debug" /> |
| <arg value="-external-library-path+=${basedir}/../js/target/js.swc" /> |
| <arg value="-load-config=${basedir}/target/compile-as-config.xml" /> |
| <arg value="-output=${basedir}/target/node.swc" /> |
| </java> |
| </target> |
| |
| <target name="clean"> |
| <delete failonerror="false" includeEmptyDirs="true" > |
| <fileset dir="${basedir}/target"> |
| <include name="**/**"/> |
| <exclude name="downloads/**"/> |
| </fileset> |
| </delete> |
| </target> |
| |
| <target name="wipe"> |
| <delete failonerror="false" includeEmptyDirs="true" > |
| <fileset dir="${basedir}/target"> |
| <include name="**/**"/> |
| </fileset> |
| </delete> |
| </target> |
| </project> |