Code

allow 0-length properties
[inkscape.git] / build.xml
index c890c1a7de22ba04c7fed929136d18317cb090bb..c8ea0c17f07cdf64d0af41bc88a799de1640b803 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -1,10 +1,15 @@
-<project name="Sands" default="dist" basedir=".">
+<project name="Inkscape" default="dist" basedir=".">
     <description>
-        Build file for Sands office data tool
+        Build file for the Inkscape SVG editor.  This file
+        was written for GTK-2.10 on Win32, but it should work
+        well for other types of builds with only minor adjustments.
     </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_
@@ -78,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="i18n" depends="compile">
-    <msgfmt todir="${build}/po">
+    <msgfmt todir="${build}/locale" owndir="true">
           <fileset dir="po">
           </fileset>
        </msgfmt>
   </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}">
            -lgc -mwindows -lws2_32 -lintl -lm
           </libs>
        </link>
-       <!--<strip file="${build}/inkscape.exe"/>-->
   </target>
 
   <target name="dist" depends="link,i18n"
         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}"/>
 
     <!-- MSGFMT files -->
     <copy todir="${dist}">
-           <fileset dir="${build}/po">
+           <fileset dir="${build}/locale">
                  <exclude name=".*\.am"/>
                </fileset>
        </copy>
     <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"/>