Code

allow 0-length properties
[inkscape.git] / build.xml
index f28a8f24f692920852c20c5cabe8815facbe9664..c8ea0c17f07cdf64d0af41bc88a799de1640b803 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -6,7 +6,10 @@
     </description>
 
   <!-- set global properties for this build -->
-  <property name="version"     location="0.45"/>
+  <property name="version"     value="0.45"/>
+  <property name="arch"        value="i686-pc-mingw32-"/>
+  <!--<property name="archutil"    value="${arch}"/>-->
+  <property name="archutil"    value=""/>
   <property name="src"         location="src"/>
   <property name="gtk"         location="c:/gtk210"/>
   <property name="lib"         location="lib"/>
     <!-- Create the build directory structure used by compile -->
     <mkdir dir="${build}"/>
     <mkdir dir="${dist}"/>
+    <copy file="${src}/helper/sp-marshal.h.mingw"
+          tofile="${src}/helper/sp-marshal.h"/>
+    <copy file="${src}/helper/sp-marshal.cpp.mingw"
+          tofile="${src}/helper/sp-marshal.cpp"/>
+    <makefile file="inkscape_version.h">
+    #define INKSCAPE_VERSION "${version}+devel"
+    </makefile>
     <makefile file="config.h">
         #ifndef _CONFIG_H_
         #define _CONFIG_H_
@@ -80,7 +90,8 @@
   <target name="compile" depends="init"
         description="compile the source " >
     <!-- Compile from source to build -->
-    <cc cc="gcc" cxx="g++" destdir="${build}/obj">
+    <cc cc="${arch}gcc" cxx="${arch}g++"
+             destdir="${build}/obj">
            <fileset dir="${src}">
             <!-- THINGS TO EXCLUDE -->
                <exclude name="ast/.*"/>
                <exclude name="removeoverlap/remove_rectangle_overlap-test.h"/>
            </fileset>
         <flags>
-            -Wall -g -O3
-                       -mms-bitfields
+            -Wall -O3
+            -mms-bitfields
         </flags>
         <defines>
             -DVERSION=\"${version}\"
   </target>
   
   <target name="lib" depends="compile">
-    <staticlib file="${build}/libinkscape.a">
+    <staticlib command="${archutil}ar crsv"
+           file="${build}/libinkscape.a">
           <fileset dir="${build}/obj">
               <exclude name="main,o"/>
               <exclude name="winmain,o"/>
   </target>
 
   <target name="link" depends="lib">
-    <rc command="windres -o
+    <rc command="${archutil}windres
            file="${src}/inkscape.rc"
            out="${build}/inkres.o">
                <flags>
                --include-dir=${src}
                </flags>
        </rc>
-    <link command="g++" out="${build}/inkscape.exe">
+    <link command="${arch}g++" out="${build}/inkscape.exe"
+              strip="true" symfile="${build}/inkscape.dbg"
+              stripcommand="${archutil}strip"
+              objcopycommand="${archutil}objcopy"
+              >
        <flags>
        </flags>
           <fileset dir="${build}">
         description="generate the distribution" >
     <!-- Create the distribution directory -->
     <copy file="${build}/inkscape.exe" todir="${dist}"/>
+    <copy file="${build}/inkscape.dbg" todir="${dist}"/>
     <copy file="AUTHORS" todir="${dist}"/>
     <copy file="COPYING" todir="${dist}"/>
     <copy file="COPYING.LIB" todir="${dist}"/>
     <copy todir="${dist}/lib"> <fileset dir="${gtk}/lib/gtk-2.0"/> </copy>
     <copy todir="${dist}/lib"> <fileset dir="${gtk}/lib/glib-2.0"/> </copy>
     <copy todir="${dist}/lib"> <fileset dir="${gtk}/lib/locale"/> </copy>
-    <copy todir="${dist}/lib"> <fileset dir="${gtk}/lib/pango"/> </copy>
     <copy todir="${dist}">
            <fileset dir="share">
                  <exclude name=".*\.am"/>