File: build.xml

package info (click to toggle)
electric 9.05+dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 39,004 kB
  • ctags: 53,528
  • sloc: java: 445,582; xml: 680; makefile: 6; sh: 5
file content (103 lines) | stat: -rw-r--r-- 4,155 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<?xml version="1.0" encoding="UTF-8"?>

<!-- -*- tab-width: 4 -*-  -->

<!-- Electric(tm) VLSI Design System -->

<!-- File: build.xml -->

<!-- Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. -->

<!-- Electric(tm) is free software; you can redistribute it and/or modify -->
<!-- it under the terms of the GNU General Public License as published by -->
<!-- the Free Software Foundation; either version 3 of the License, or -->
<!-- (at your option) any later version. -->

<!-- Electric(tm) is distributed in the hope that it will be useful, -->
<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->
<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -->
<!-- GNU General Public License for more details. -->

<!-- You should have received a copy of the GNU General Public License -->
<!-- along with this program.  If not, see http://www.gnu.org/licenses/ -->

<project basedir="." default="jar" name="electric">

	<!-- *********************************** MAIN TARGET *********************************** -->

	<target name="jar" depends="initialize" description="Make Jar file incrementally">
		<property name="jarname" value="electric.jar" />
		<echo message="Building ${jarname}" />
		<mkdir dir="${antBuild}"/>
		<antcall target="compile" />
		<antcall target="copyOrg" />
		<antcall target="createJARFile" />
	</target>

	<!-- *********************************** SUPPORT TARGETS *********************************** -->

	<target name="initialize" description="Initiaize file locations, JAR locations, and the Electric version">
		<property name="packaging"          value="${user.dir}" />
		<property name="antBuild"           value="${packaging}/antBuild" />
		<property name="ElectricJavaLoc"    value="${user.dir}" />

		<!-- the location of various JAR files -->
		<property name="org"                value="${packaging}/org" />

		<!-- does the build directory already exist? -->
		<condition property="buildDirExists">
			<available file="${antBuild}" type="dir"/>
		</condition>

		<!-- get the Electric version -->
		<loadfile srcFile="${ElectricJavaLoc}/com/sun/electric/database/text/Version.java" property="version">
			<filterchain>
				<linecontains> <contains value="ELECTRIC_VERSION = "/> </linecontains>
				<tokenfilter>
					<replacestring from="public static final String ELECTRIC_VERSION = &quot;" to=""/>
					<replacestring from="&quot;;" to=""/>
					<deletecharacters chars="\t "/>
				</tokenfilter>
				<striplinebreaks/>
			</filterchain>
		</loadfile>
	</target>

	<target name="compile" description="Compile Electric">
		<javac encoding="UTF-8" debug="true" includeantruntime="false" destdir="${antBuild}" srcdir="${ElectricJavaLoc}"
			   fork="true" memoryMaximumSize="1024m" source="1.6" target="1.6">
			<classpath>
                <pathelement location="/usr/share/java/bsh.jar" />
                <pathelement location="/usr/share/java/vecmath.jar" />
                <pathelement location="/usr/share/java/j3dcore.jar" />
                <pathelement location="/usr/share/java/j3dutils.jar" />
                <pathelement location="/usr/share/java/slf4j-api.jar" />
                <pathelement location="/usr/share/java/scala-library.jar" />
                <pathelement location="/usr/share/java/jython.jar" />
			</classpath>
		</javac>
		<copy todir="${antBuild}/com">
			<fileset dir="${ElectricJavaLoc}/com" includes="**/*.jelib,**/*.prm,**/*.xml,**/*.dtd,**/*.xsd,**/*.gif,**/*.html,**/*.png,**/toc.txt,**/*.wav" />
		</copy>
	</target>

	<target name="copyOrg" description="Copy Jar files for logging">
		<copy todir="${antBuild}/org">
			<fileset dir="${packaging}/org" />
		</copy>
	</target>

	<target name="createJARFile" description="Make the JAR file">
		<jar basedir="${antBuild}" compress="true" jarfile="${packaging}/${jarname}" manifest="${packaging}/META-INF/MANIFEST.MF" />
	</target>

	<target name="clean" depends="initialize" description="Clean all build products">
		<delete dir="${antBuild}" />
		<delete quiet="false">
			<fileset dir=".">
				<include name="electric*.jar" />
			</fileset>
		</delete>
	</target>

</project>