1 | <?xml version="1.0" encoding="utf-8" ?>
|
---|
2 | <project name="lirk3-compile" default="compile">
|
---|
3 |
|
---|
4 | <target name="compile">
|
---|
5 |
|
---|
6 | <!-- checkout -->
|
---|
7 | <antcall target="checkout-greenstone3" />
|
---|
8 |
|
---|
9 | <!-- preparation -->
|
---|
10 | <antcall target="set-version-number-property" />
|
---|
11 | <ant dir="greenstone3" antfile="${lirk3.home}/ant-scripts/operations-on-gs3home.xml" target="prepare-unix" inheritAll="false"/>
|
---|
12 |
|
---|
13 | <antcall target="tweak-configure-scripts" />
|
---|
14 |
|
---|
15 | <!-- update -->
|
---|
16 | <ant dir="greenstone3" antfile="${lirk3.home}/ant-scripts/operations-on-gs3home.xml" target="update-unix" inheritAll="false"/>
|
---|
17 |
|
---|
18 | <!-- configure -->
|
---|
19 | <antcall target="regenerate-configure"/>
|
---|
20 | <ant dir="greenstone3" antfile="${lirk3.home}/ant-scripts/operations-on-gs3home.xml" target="configure-unix" inheritAll="false"/>
|
---|
21 | <antcall target="tweak-makefiles" />
|
---|
22 |
|
---|
23 | <!-- build -->
|
---|
24 | <ant dir="greenstone3" antfile="${lirk3.home}/ant-scripts/operations-on-gs3home.xml" target="build-unix" inheritAll="false"/>
|
---|
25 | <antcall target="linux-strip-execs" />
|
---|
26 |
|
---|
27 | <!-- search4j -->
|
---|
28 | <antcall target="compile-search4j" /> <!-- from rk3-targets -->
|
---|
29 |
|
---|
30 | <!-- uninstaller -->
|
---|
31 | <antcall target="compile-uninstaller" /> <!-- from rk3-targets -->
|
---|
32 |
|
---|
33 | <!-- documentation -->
|
---|
34 | <antcall target="prepare-documentation" />
|
---|
35 |
|
---|
36 | </target>
|
---|
37 |
|
---|
38 | <target name="checkout-greenstone3">
|
---|
39 | <svn>
|
---|
40 | <checkout url="${svn.root}/greenstone3/${branch.path}" destPath="greenstone3"/>
|
---|
41 | </svn>
|
---|
42 | </target>
|
---|
43 |
|
---|
44 | <target name="set-version-number-property">
|
---|
45 | <rsr file="greenstone3/resources/java/global.properties.in" pattern="(.*)@gsdl3version@(.*)" replacement="$1${version}$2" />
|
---|
46 | </target>
|
---|
47 |
|
---|
48 | <target name="tweak-configure-scripts">
|
---|
49 | <antcall target="mgpp-add-static" />
|
---|
50 | <antcall target="mg-add-static" />
|
---|
51 | <antcall target="gs2build-add-static" />
|
---|
52 | </target>
|
---|
53 |
|
---|
54 | <target name="regenerate-configure">
|
---|
55 | <exec dir="greenstone3/gs2build" executable="autoconf" output="greenstone3/gs2build/configure">
|
---|
56 | <arg line="configure.in"/>
|
---|
57 | </exec>
|
---|
58 | <chmod file="greenstone3/gs2build/configure" perm="+x"/>
|
---|
59 | </target>
|
---|
60 |
|
---|
61 | <target name="tweak-makefiles">
|
---|
62 | <antcall target="wv-add-static" />
|
---|
63 | <antcall target="xlhtml-add-static" />
|
---|
64 | <antcall target="ppthtml-add-static" />
|
---|
65 | <antcall target="rtftohtml-add-static" />
|
---|
66 | <antcall target="gdbm-add-static" />
|
---|
67 | </target>
|
---|
68 |
|
---|
69 | <target name="linux-strip-execs">
|
---|
70 | <exec dir="greenstone3/gs2build/bin/linux" executable="find">
|
---|
71 | <arg line="! -name . -exec strip {} ;"/>
|
---|
72 | </exec>
|
---|
73 | </target>
|
---|
74 |
|
---|
75 | <target name="prepare-documentation">
|
---|
76 | <mkdir dir="greenstone3/gsdl-manuals"/>
|
---|
77 | <svn>
|
---|
78 | <checkout url="${svn.root}/documentation/${branch.path}/manuals" destPath="greenstone3/gsdl-manuals/manuals"/>
|
---|
79 | <checkout url="${svn.root}/documentation/${branch.path}/shared" destPath="greenstone3/gsdl-manuals/shared"/>
|
---|
80 | </svn>
|
---|
81 | <javac srcdir="greenstone3/gsdl-manuals/shared"
|
---|
82 | destdir="greenstone3/gsdl-manuals/shared"
|
---|
83 | debug="on">
|
---|
84 | <include name="*.java"/>
|
---|
85 | </javac>
|
---|
86 | <unzip src="greenstone3/gsdl-manuals/shared/fop.zip" dest="greenstone3/gsdl-manuals/shared"/>
|
---|
87 |
|
---|
88 | <path id="documentation.compile.classpath">
|
---|
89 | <fileset dir="greenstone3/gsdl-manuals">
|
---|
90 | <include name="**/*.jar"/>
|
---|
91 | </fileset>
|
---|
92 | <pathelement path="greenstone3/gsdl-manuals/shared"/>
|
---|
93 | <pathelement path="greenstone3/gsdl-manuals/manuals"/>
|
---|
94 | </path>
|
---|
95 |
|
---|
96 | <java classname="ApplyXSLT" classpathref="documentation.compile.classpath" output="greenstone3/gsdl-manuals/manuals/xml-source/en/help-en.xml">
|
---|
97 | <arg value="greenstone3/gsdl-manuals/manuals/processing/gen-gli-help-to-manual-chapter.xsl" />
|
---|
98 | <arg value="greenstone3/gli/help/en/help.xml" />
|
---|
99 | <arg value="greenstone3" />
|
---|
100 | </java>
|
---|
101 |
|
---|
102 | <chmod perm="a+x" file="greenstone3/gsdl-manuals/shared/fop/fop.sh"/>
|
---|
103 | <echo>Run generate-pdf.sh</echo>
|
---|
104 | <exec dir="greenstone3/gsdl-manuals/manuals" executable="/bin/sh">
|
---|
105 | <arg line="generate-pdf.sh u en" />
|
---|
106 | </exec>
|
---|
107 | </target>
|
---|
108 |
|
---|
109 | <!--
|
---|
110 |
|
---|
111 | third level targets
|
---|
112 |
|
---|
113 | -->
|
---|
114 |
|
---|
115 | <target name="mgpp-add-static">
|
---|
116 | <rsr file="greenstone3/gs2build/common-src/indexers/mgpp/configure.in" pattern="^LDFLAGS=$" replacement="LDFLAGS=-static" />
|
---|
117 | <exec dir="greenstone3/gs2build/common-src/indexers/mgpp" executable="autoconf" output="greenstone3/gs2build/common-src/indexers/mgpp/configure">
|
---|
118 | <arg line="configure.in"/>
|
---|
119 | </exec>
|
---|
120 | </target>
|
---|
121 |
|
---|
122 | <target name="mg-add-static">
|
---|
123 | <rsr file="greenstone3/gs2build/common-src/indexers/mg/configure.in" pattern="^LDFLAGS=$" replacement="LDFLAGS=-static" />
|
---|
124 | <exec dir="greenstone3/gs2build/common-src/indexers/mg" executable="autoconf" output="greenstone3/gs2build/common-src/indexers/mg/configure">
|
---|
125 | <arg line="configure.in"/>
|
---|
126 | </exec>
|
---|
127 | </target>
|
---|
128 |
|
---|
129 | <target name="gs2build-add-static">
|
---|
130 | <rsr file="greenstone3/gs2build/common-src/packages/configure" pattern="^ENVIRONMENT=""$" replacement="ENVIRONMENT="LDFLAGS=-static"" />
|
---|
131 | <rsr file="greenstone3/gs2build/build-src/packages/configure" pattern="^ENVIRONMENT=""$" replacement="ENVIRONMENT="LDFLAGS=-static"" />
|
---|
132 | <rsr file="greenstone3/gs2build/configure.in" pattern="^LDFLAGS=.*" replacement="LDFLAGS=-static" />
|
---|
133 | </target>
|
---|
134 |
|
---|
135 | <target name="wv-add-static">
|
---|
136 | <rsr file="greenstone3/gs2build/build-src/packages/wv/wv-gs/Makefile" pattern="^LDFLAGS =\s*$" replacement="LDFLAGS = -static" />
|
---|
137 | </target>
|
---|
138 |
|
---|
139 | <target name="xlhtml-add-static">
|
---|
140 | <rsr file="greenstone3/gs2build/build-src/packages/xlhtml/xlhtml-0.4.9.0/xlhtml/Makefile" pattern="^LDFLAGS =\s*$" replacement="LDFLAGS = -static" />
|
---|
141 | </target>
|
---|
142 |
|
---|
143 | <target name="ppthtml-add-static">
|
---|
144 | <rsr file="greenstone3/gs2build/build-src/packages/xlhtml/xlhtml-0.4.9.0/ppthtml/Makefile" pattern="^LDFLAGS =\s*$" replacement="LDFLAGS = -static" />
|
---|
145 | </target>
|
---|
146 |
|
---|
147 | <target name="rtftohtml-add-static">
|
---|
148 | <rsr file="greenstone3/gs2build/build-src/packages/rtftohtml/rtftohtml_src/Makefile" pattern="-o rtftohtml(.{2})EXEEXT(.{1})" replacement="-o rtftohtml$1EXEEXT$2 -static" />
|
---|
149 | </target>
|
---|
150 |
|
---|
151 | <target name="gdbm-add-static">
|
---|
152 | <rsr file="greenstone3/src/packages/javagdbm/jni/Makefile" pattern="^(GDBM_LIBS)\s*=\s*(.*)-lgdbm(.*)$" replacement="$1=$2/usr/lib/libgdbm.a$3" />
|
---|
153 | </target>
|
---|
154 |
|
---|
155 |
|
---|
156 | </project>
|
---|