forked from timpokorny/cpptask
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
124 lines (101 loc) · 5.46 KB
/
build.xml
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<?xml version="1.0"?>
<!--
This project is using the Portico Build System
The Portico Build System is designed to support projects that
must build multiple artefacts or distributions from a single,
shared codebase. It is designed to be extended and allows all
logic for a particular artefact or distribution to be located
together to help make navigation of a large structure as easy
as possible. For full details, see the online documentation:
https://github.com/timpokorny/build-skeleton
File: build.xml
Purpose: The master build file. This file imports all system
support files, declares common targets and extension
points and imports all the child build files.
Do not edit this file except to add new profiles.
-->
<project name="cpptask" default="sandbox">
<!-- =========================================================== -->
<!-- General Settings -->
<!-- =========================================================== -->
<description>
CppTask is a collection of simple Ant tasks for building C++
code and introspecting the local operating environment.
</description>
<!-- bring in the ant-contrib tasks -->
<taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
<!-- bring in our customer ant build tasks - for the build that builds them :O How meta. -->
<taskdef resource="cpptaskdef.properties"/>
<typedef resource="cpptypedef.properties"/>
<!-- =========================================================== -->
<!-- System Properties and Utilities -->
<!-- =========================================================== -->
<import file="profiles/system.properties.xml"/> <!-- standard set of common properties -->
<import file="profiles/system.macros.xml"/> <!-- standard set of common macros -->
<!-- =========================================================== -->
<!-- Master Targets -->
<!-- =========================================================== -->
<target name="clean"
description="Removes all generated build artefacts"
depends="master.clean,common.clean"/>
<target name="compile"
description="Compile all the production code"
depends="master.compile"/>
<target name="test"
description="Compile and run the automated test suite"
depends="master.test"/>
<target name="sandbox"
description="Create a sandbox environment to test and validate in"
depends="master.sandbox"/>
<target name="installer"
description="Create an installer package from the sandbox"
depends="master.installer"/>
<target name="release"
description="Clean, run all test sand generate a standard release package"
depends="clean,build.release,master.release,installer"/>
<target name="release.thin"
description="Generate a standard release package, but skip the tests"
depends="clean,build.release,sandbox,installer"/>
<!-- =========================================================== -->
<!-- Extension Points -->
<!-- =========================================================== -->
<!-- These extension points are defined for the various profile targets
to hook onto, thus allowing them to identify themselves as targets
that should be run as part of a particular global action.
This means that when we run "compile", any imported targets that
are declared as an extensionOf "master.compile" will be executed.
An extension point for each major build action is defined.
-->
<extension-point name="master.clean"/>
<extension-point name="master.compile"/>
<extension-point name="master.test"/>
<extension-point name="master.sandbox"/>
<extension-point name="master.installer"/>
<extension-point name="master.release"/>
<!-- =========================================================== -->
<!-- Build Profiles -->
<!-- =========================================================== -->
<!-- Platform neutral java build -->
<include file="profiles/java.xml" as="java"/>
<!-- Mac OS X C++ and Installer profiles -->
<include file="profiles/macosx/installer.xml" as="installer" if="platform.macosx"/>
<!-- Linux C++ and Installer profiles -->
<include file="profiles/linux/installer.xml" as="installer" if="platform.linux"/>
<!-- Windows C++ and Installer profiles -->
<include file="profiles/windows/installer.xml" as="installer" if="platform.windows"/>
<!-- =========================================================== -->
<!-- Convenience targets for specifying debug or release builds. -->
<!-- =========================================================== -->
<target name="build.release" description="Set the release build flag for this run">
<echo>Build flagged as a release build. Setting build.release property to true</echo>
<property name="build.release" value="true"/>
</target>
<!-- =========================================================== -->
<!-- Private Internal Targets. Do not modify or extend. -->
<!-- =========================================================== -->
<target name="common.clean">
<!-- Remove any top-level directories that might need to go -->
<delete dir="${build.dir}"/>
<delete dir="${dist.dir}"/>
</target>
</project>