diff options
| author | Bob Jamison <ishmalius@gmail.com> | 2006-11-17 20:22:51 +0000 |
|---|---|---|
| committer | ishmal <ishmal@users.sourceforge.net> | 2006-11-17 20:22:51 +0000 |
| commit | a6b55ae8bf2b22dc11e1b98a190600d16fc7dcca (patch) | |
| tree | 65c04a573799d497882610de3293aca1b334eef4 | |
| parent | added new color effects to the list of translatable files (diff) | |
| download | inkscape-a6b55ae8bf2b22dc11e1b98a190600d16fc7dcca.tar.gz inkscape-a6b55ae8bf2b22dc11e1b98a190600d16fc7dcca.zip | |
add <makefile>
(bzr r1972)
| -rw-r--r-- | build.xml | 599 | ||||
| -rw-r--r-- | buildtool.cpp | 195 |
2 files changed, 489 insertions, 305 deletions
@@ -1,271 +1,328 @@ -<project name="Sands" default="dist" basedir=".">
- <description>
- Build file for Sands office data tool
- </description>
-
- <!-- set global properties for this build -->
- <property name="version" location="0.45"/>
- <property name="src" location="src"/>
- <property name="gtk" location="c:/gtk210"/>
- <property name="lib" location="lib"/>
- <property name="build" location="build"/>
- <property name="dist" location="inkscape"/>
-
- <target name="init">
- <!-- Create the build directory structure used by compile -->
- <mkdir dir="${build}"/>
- <copy file="config.h.mingw" tofile="config.h"/>
- </target>
-
- <target name="compile" depends="init"
- description="compile the source " >
- <!-- Compile from source to build -->
- <cc cc="gcc" cxx="g++" destdir="${build}/obj">
- <fileset dir="${src}">
- <!-- THINGS TO EXCLUDE -->
- <exclude name="ast"/>
- <exclude name="bonobo"/>
- <exclude name="deptool.cpp"/>
- <exclude name="dialogs/filedialog-win32.cpp"/>
- <exclude name="display/testnr.cpp"/>
- <exclude name="display/bezier-utils-test.cpp"/>
- <exclude name="dom/jsdombind.cpp"/>
- <exclude name="dom/work"/>
- <exclude name="dom/odf/SvgOdg.cpp"/>
- <exclude name="extension/api.cpp"/>
- <exclude name="extension/dxf2svg"/>
- <exclude name="extension/internal/gnome.cpp"/>
- <exclude name="extension/script/bindtest.cpp"/>
- <exclude name="extension/script/cpptest.cpp"/>
- <exclude name="extension/plugin"/>
- <exclude name="extract-uri-test.cpp"/>
- <exclude name="helper/units-test.cpp"/>
- <exclude name="inkview.cpp"/>
- <exclude name="libnr/in-svg-plane-test.cpp"/>
- <exclude name="libnr/nr-compose-reference.cpp"/>
- <exclude name="libnr/nr-compose-test.cpp"/>
- <exclude name="libnr/nr-matrix-test.cpp"/>
- <exclude name="libnr/nr-point-fns-test.cpp"/>
- <exclude name="libnr/nr-rotate-fns-test.cpp"/>
- <exclude name="libnr/nr-rotate-test.cpp"/>
- <exclude name="libnr/nr-scale-test.cpp"/>
- <exclude name="libnr/nr-translate-test.cpp"/>
- <exclude name="libnr/nr-types-test.cpp"/>
- <exclude name="livarot/Path-test.cpp"/>
- <exclude name="mod360-test.cpp"/>
- <exclude name="trace/potrace/potest.cpp"/>
- <exclude name="round-test.cpp"/>
- <exclude name="sp-gradient-test.cpp"/>
- <exclude name="svg/ftos.cpp"/>
- <exclude name="utest"/>
- <exclude name="widgets/test-widgets.cpp"/>
- <exclude name="xml/quote-test.cpp"/>
- <exclude name="xml/repr-action-test.cpp"/>
- <exclude name="io/streamtest.cpp"/>
- <!--JABBER-->
- <exclude name="pedro/pedrogui.cpp"/>
- <exclude name="pedro/pedrogui.h"/>
- <exclude name="pedro/work"/>
- <!--WHITEBOARD-->
- <exclude name="ui/dialog/session-player.cpp"/>
- <exclude name="ui/dialog/whiteboard-connect.cpp"/>
- <exclude name="ui/dialog/whiteboard-sharewithchat.cpp"/>
- <exclude name="ui/dialog/whiteboard-sharewithuser.cpp"/>
- <exclude name="dialogs/whiteboard-connect-dialog.cpp"/>
- <exclude name="dialogs/whiteboard-common-dialog.cpp"/>
- <exclude name="dialogs/whiteboard-sharewithchat-dialog.cpp"/>
- <exclude name="dialogs/whiteboard-sharewithuser-dialog.cpp"/>
- <exclude name="jabber_whiteboard/node-tracker.cpp"/>
- <exclude name="jabber_whiteboard/node-utilities.cpp"/>
- <!--WHITEBOARD-->
- <exclude name="removeoverlap/placement_SolveVPSC.cpp"/>
- <exclude name="removeoverlap/placement_SolveVPSC.h"/>
- <exclude name="removeoverlap/test.cpp"/>
- <exclude name="removeoverlap/remove_rectangle_overlap-test.cpp"/>
- <exclude name="removeoverlap/remove_rectangle_overlap-test.h"/>
- </fileset>
- <flags>
- -Wall -g -O3
- -mms-bitfields
- </flags>
- <defines>
- -DVERSION=\"${version}\"
- -DHAVE_CONFIG_H
- -DXP_WIN <!-- for JS -->
- -D_INTL_REDIRECT_INLINE
- -DWITH_INKBOARD -DHAVE_SSL <!-- inkboard -->
- </defines>
- <includes>
- -I${gtk}/include
- <!-- GTK / GTKMM -->
- -I${gtk}/include/glibmm-2.4
- -I${gtk}/lib/glibmm-2.4/include
- -I${gtk}/include/gtkmm-2.4
- -I${gtk}/lib/gtkmm-2.4/include
- -I${gtk}/include/gdkmm-2.4
- -I${gtk}/lib/gdkmm-2.4/include
- -I${gtk}/include/pangomm-1.4
- -I${gtk}/include/atkmm-1.6
- -I${gtk}/include/cairomm-1.0
- -I${gtk}/include/sigc++-2.0
- -I${gtk}/lib/sigc++-2.0/include
- -I${gtk}/include/gtk-2.0
- -I${gtk}/lib/gtk-2.0/include
- -I${gtk}/include/atk-1.0
- -I${gtk}/include/pango-1.0
- -I${gtk}/include/glib-2.0
- -I${gtk}/lib/glib-2.0/include
- <!-- OTHER -->
- -I${gtk}/include/libxml2
- -I${gtk}/include/freetype2
- -I${gtk}/include/cairo
- <!-- PERL -->
- -Wno-comment -I${gtk}/perl/lib/CORE
- <!-- PYTHON -->
- -I${gtk}/python/include
- </includes>
- </cc>
- </target>
-
- <target name="lib" depends="compile">
- <ar file="${build}/libinkscape.a">
- <fileset dir="${build}/obj">
- <exclude name="main,o"/>
- <exclude name="winmain,o"/>
- </fileset>
- </ar>
- </target>
-
- <target name="i18n" depends="compile">
- <msgfmt todir="${build}/po">
- <fileset dir="po">
- </fileset>
- </msgfmt>
- </target>
-
- <target name="link" depends="lib">
- <rc command="windres -o"
- file="${src}/inkscape.rc"
- out="${build}/inkres.o">
- <flags>
- --include-dir=${src}
- </flags>
- </rc>
- <link command="g++" out="${build}/inkscape.exe">
- <flags>
- </flags>
- <fileset>
- <include name="${build}/inkres.o"/>
- <include name="${build}/obj/main.o"/>
- <include name="${build}/obj/winmain.o"/>
- <include name="${build}/libinkscape.a"/>
- </fileset>
- <libs>
- -L${gtk}/lib
- -lgtkmm-2.4 -lgdkmm-2.4 -lglibmm-2.4
- -latkmm-1.6 -lpangomm-1.4 -lsigc-2.0
- -lgtk-win32-2.0 -lgdk-win32-2.0 -latk-1.0
- -lgdk_pixbuf-2.0
- -lpangocairo-1.0 -lpangoft2-1.0 -lpangowin32-1.0 -lpango-1.0
- -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lglib-2.0 -lcairo
- <!-- PERL -->
- -L${gtk}/perl/lib/CORE -lperl58
- <!-- PYTHON -->
- -L${gtk}/python/libs -lpython24
- ${gtk}/bin/libxml2.dll
- ${gtk}/lib/iconv.lib
- -lfreetype.dll -lfontconfig.dll
- -llcms.dll
- -lssl -lcrypto
- -lpng -lpopt ${gtk}/lib/zdll.lib
- -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="AUTHORS" todir="${dist}"/>
- <copy file="COPYING" todir="${dist}"/>
- <copy file="COPYING.LIB" todir="${dist}"/>
- <copy file="NEWS" todir="${dist}"/>
- <copy file="README" todir="${dist}"/>
- <copy file="TRANSLATORS" todir="${dist}"/>
- <copy file="${gtk}/bin/libatkmm-1.6-1.dll" todir="${dist}"/>
- <copy file="${gtk}/bin/libglibmm-2.4-1.dll" todir="${dist}"/>
- <copy file="${gtk}/bin/libgtkmm-2.4-1.dll" todir="${dist}"/>
- <copy file="${gtk}/bin/libgdkmm-2.4-1.dll" todir="${dist}"/>
- <copy file="${gtk}/bin/libpangomm-1.4-1.dll" todir="${dist}"/>
- <copy file="${gtk}/bin/libcairomm-1.0-1.dll" todir="${dist}"/>
- <copy file="${gtk}/bin/libsigc-2.0-0.dll" todir="${dist}"/>
- <copy file="${gtk}/bin/freetype6.dll" todir="${dist}"/>
- <copy file="${gtk}/bin/libatk-1.0-0.dll" todir="${dist}"/>
- <copy file="${gtk}/bin/libgdk-win32-2.0-0.dll" todir="${dist}"/>
- <copy file="${gtk}/bin/libgdk_pixbuf-2.0-0.dll" todir="${dist}"/>
- <copy file="${gtk}/bin/libglib-2.0-0.dll" todir="${dist}"/>
- <copy file="${gtk}/bin/libgmodule-2.0-0.dll" todir="${dist}"/>
- <copy file="${gtk}/bin/libgobject-2.0-0.dll" todir="${dist}"/>
- <copy file="${gtk}/bin/libgtk-win32-2.0-0.dll" todir="${dist}"/>
- <copy file="${gtk}/bin/libgthread-2.0-0.dll" todir="${dist}"/>
- <copy file="${gtk}/bin/libcairo-2.dll" todir="${dist}"/>
- <copy file="${gtk}/bin/libpangocairo-1.0-0.dll" todir="${dist}"/>
- <copy file="${gtk}/bin/libpango-1.0-0.dll" todir="${dist}"/>
- <copy file="${gtk}/bin/libpangoft2-1.0-0.dll" todir="${dist}"/>
- <copy file="${gtk}/bin/libpangowin32-1.0-0.dll" todir="${dist}"/>
- <copy file="${gtk}/bin/freetype6.dll" todir="${dist}"/>
- <copy file="${gtk}/bin/libfontconfig-1.dll" todir="${dist}"/>
- <copy file="${gtk}/bin/libxml2.dll" todir="${dist}"/>
- <copy file="${gtk}/bin/xmlparse.dll" todir="${dist}"/>
- <copy file="${gtk}/bin/jpeg62.dll" todir="${dist}"/>
- <copy file="${gtk}/bin/libpng13.dll" todir="${dist}"/>
- <copy file="${gtk}/bin/msvcr70.dll" todir="${dist}"/>
- <copy file="${gtk}/bin/msvcr71.dll" todir="${dist}"/>
- <copy file="${gtk}/bin/zlib1.dll" todir="${dist}"/>
- <copy file="${gtk}/bin/iconv.dll" todir="${dist}"/>
- <copy file="${gtk}/bin/popt1.dll" todir="${dist}"/>
- <copy file="${gtk}/bin/liblcms-1.dll" todir="${dist}"/>
- <copy file="${gtk}/bin/intl.dll" todir="${dist}"/>
- <copy file="${gtk}/bin/intl.dll" tofile="${dist}/libintl-2.dll"/>
-
- <!-- MSGFMT files -->
- <copy todir="${dist}"> <fileset dir="${build}/po"/> </copy>
-
- <!-- GTK -->
- <copy todir="${dist}"> <fileset dir="${gtk}/etc"/> </copy>
- <copy file="${gtk}/share/themes/MS-Windows/gtk-2.0/gtkrc" todir="${dist}/etc/gtk-2.0"/>
- <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"/> </copy>
- <copy todir="${dist}/share"> <fileset dir="${gtk}/share/themes"/> </copy>
- <mkdir dir="${dist}/data"/>
- <mkdir dir="${dist}/locale"/>
- <mkdir dir="${dist}/modules"/>
- <mkdir dir="${dist}/plugins"/>
- <copy file="${gtk}/bin/gdb.exe" todir="${dist}"/>
-
- <!-- PERL -->
- <copy file="${gtk}/perl/bin/perl58.dll" todir="${dist}"/>
-
- <!-- PYTHON -->
- <copy file="${gtk}/python/python24.dll" todir="${dist}"/>
- <copy file="${gtk}/python/python.exe" todir="${dist}/python"/>
- <copy todir="${dist}/python"> <fileset dir="${gtk}/python/Lib"/> </copy>
- <copy todir="${dist}/python"> <fileset dir="${gtk}/python/DLLs"/> </copy>
- <copy todir="${dist}/python"> <fileset dir="${gtk}/python/Scripts"/> </copy>
-
-
- </target>
-
- <target name="clean"
- description="clean up" >
- <!-- Delete the ${build} and ${dist} directory trees -->
- <delete dir="${build}"/>
- <delete dir="${dist}"/>
- </target>
-</project>
-
+<project name="Sands" default="dist" basedir="."> + <description> + Build file for Sands office data tool + </description> + + <!-- set global properties for this build --> + <property name="version" location="0.45"/> + <property name="src" location="src"/> + <property name="gtk" location="c:/gtk210"/> + <property name="lib" location="lib"/> + <property name="build" location="build"/> + <property name="dist" location="inkscape"/> + + <target name="init"> + <!-- Create the build directory structure used by compile --> + <mkdir dir="${build}"/> + <makefile file="config.h"> + #ifndef _CONFIG_H_ + #define _CONFIG_H_ + + #ifndef WIN32 + #define WIN32 + #endif + + /*###################################### + ## This is for require-config.h, whose + ## purpose I cannot fathom. + ######################################*/ + + #define PACKAGE_TARNAME + + /*###################################### + #### RESOURCE DIRECTORIES + ######################################*/ + + #define INKSCAPE_DATADIR "." + #define PACKAGE_LOCALE_DIR "locale" + + + /*###################################### + #### OTHER DEFINITIONS + ######################################*/ + + #define GETTEXT_PACKAGE "inkscape" + + #define PACKAGE_STRING VERSION + + #define HAVE_GETOPT_H 1 + #define HAVE_STRING_H 1 + #define HAVE_LIBINTL_H 1 + #define HAVE_MALLOC_H 1 + #define HAVE_STDLIB_H 1 + #define HAVE_SYS_STAT_H 1 + + #define ENABLE_LCMS 1 + + #define ENABLE_NLS 1 + #define HAVE_BIND_TEXTDOMAIN_CODESET 1 + + /* keep binreloc off */ + #define BR_PTHREADS 0 + #undef ENABLE_BINRELOC + + /* CairoPDF options */ + #define HAVE_CAIRO_PDF 1 + #define PANGO_ENABLE_ENGINE 1 + #define RENDER_WITH_PANGO_CAIRO 1 + + #define HAVE_GTK_WINDOW_FULLSCREEN 1 + + #define g_ascii_strtod fixed_g_ascii_strtod + + #endif /* _CONFIG_H_ */ + </makefile> + </target> + + <target name="compile" depends="init" + description="compile the source " > + <!-- Compile from source to build --> + <cc cc="gcc" cxx="g++" destdir="${build}/obj"> + <fileset dir="${src}"> + <!-- THINGS TO EXCLUDE --> + <exclude name="ast"/> + <exclude name="bonobo"/> + <exclude name="deptool.cpp"/> + <exclude name="dialogs/filedialog-win32.cpp"/> + <exclude name="display/testnr.cpp"/> + <exclude name="display/bezier-utils-test.cpp"/> + <exclude name="dom/jsdombind.cpp"/> + <exclude name="dom/work"/> + <exclude name="dom/odf/SvgOdg.cpp"/> + <exclude name="extension/api.cpp"/> + <exclude name="extension/dxf2svg"/> + <exclude name="extension/internal/gnome.cpp"/> + <exclude name="extension/script/bindtest.cpp"/> + <exclude name="extension/script/cpptest.cpp"/> + <exclude name="extension/plugin"/> + <exclude name="extract-uri-test.cpp"/> + <exclude name="helper/units-test.cpp"/> + <exclude name="inkview.cpp"/> + <exclude name="libnr/in-svg-plane-test.cpp"/> + <exclude name="libnr/nr-compose-reference.cpp"/> + <exclude name="libnr/nr-compose-test.cpp"/> + <exclude name="libnr/nr-matrix-test.cpp"/> + <exclude name="libnr/nr-point-fns-test.cpp"/> + <exclude name="libnr/nr-rotate-fns-test.cpp"/> + <exclude name="libnr/nr-rotate-test.cpp"/> + <exclude name="libnr/nr-scale-test.cpp"/> + <exclude name="libnr/nr-translate-test.cpp"/> + <exclude name="libnr/nr-types-test.cpp"/> + <exclude name="livarot/Path-test.cpp"/> + <exclude name="mod360-test.cpp"/> + <exclude name="trace/potrace/potest.cpp"/> + <exclude name="round-test.cpp"/> + <exclude name="sp-gradient-test.cpp"/> + <exclude name="svg/ftos.cpp"/> + <exclude name="utest"/> + <exclude name="widgets/test-widgets.cpp"/> + <exclude name="xml/quote-test.cpp"/> + <exclude name="xml/repr-action-test.cpp"/> + <exclude name="io/streamtest.cpp"/> + <!--JABBER--> + <exclude name="pedro/pedrogui.cpp"/> + <exclude name="pedro/pedrogui.h"/> + <exclude name="pedro/work"/> + <!--WHITEBOARD--> + <exclude name="ui/dialog/session-player.cpp"/> + <exclude name="ui/dialog/whiteboard-connect.cpp"/> + <exclude name="ui/dialog/whiteboard-sharewithchat.cpp"/> + <exclude name="ui/dialog/whiteboard-sharewithuser.cpp"/> + <exclude name="dialogs/whiteboard-connect-dialog.cpp"/> + <exclude name="dialogs/whiteboard-common-dialog.cpp"/> + <exclude name="dialogs/whiteboard-sharewithchat-dialog.cpp"/> + <exclude name="dialogs/whiteboard-sharewithuser-dialog.cpp"/> + <exclude name="jabber_whiteboard/node-tracker.cpp"/> + <exclude name="jabber_whiteboard/node-utilities.cpp"/> + <!--WHITEBOARD--> + <exclude name="removeoverlap/placement_SolveVPSC.cpp"/> + <exclude name="removeoverlap/placement_SolveVPSC.h"/> + <exclude name="removeoverlap/test.cpp"/> + <exclude name="removeoverlap/remove_rectangle_overlap-test.cpp"/> + <exclude name="removeoverlap/remove_rectangle_overlap-test.h"/> + </fileset> + <flags> + -Wall -O3 + -mms-bitfields + </flags> + <defines> + -DVERSION=\"${version}\" + -DHAVE_CONFIG_H + -DXP_WIN <!-- for JS --> + -D_INTL_REDIRECT_INLINE + -DWITH_INKBOARD -DHAVE_SSL <!-- inkboard --> + </defines> + <includes> + -I${gtk}/include + <!-- GTK / GTKMM --> + -I${gtk}/include/glibmm-2.4 + -I${gtk}/lib/glibmm-2.4/include + -I${gtk}/include/gtkmm-2.4 + -I${gtk}/lib/gtkmm-2.4/include + -I${gtk}/include/gdkmm-2.4 + -I${gtk}/lib/gdkmm-2.4/include + -I${gtk}/include/pangomm-1.4 + -I${gtk}/include/atkmm-1.6 + -I${gtk}/include/cairomm-1.0 + -I${gtk}/include/sigc++-2.0 + -I${gtk}/lib/sigc++-2.0/include + -I${gtk}/include/gtk-2.0 + -I${gtk}/lib/gtk-2.0/include + -I${gtk}/include/atk-1.0 + -I${gtk}/include/pango-1.0 + -I${gtk}/include/glib-2.0 + -I${gtk}/lib/glib-2.0/include + <!-- OTHER --> + -I${gtk}/include/libxml2 + -I${gtk}/include/freetype2 + -I${gtk}/include/cairo + <!-- PERL --> + -Wno-comment -I${gtk}/perl/lib/CORE + <!-- PYTHON --> + -I${gtk}/python/include + </includes> + </cc> + </target> + + <target name="lib" depends="compile"> + <ar file="${build}/libinkscape.a"> + <fileset dir="${build}/obj"> + <exclude name="main,o"/> + <exclude name="winmain,o"/> + </fileset> + </ar> + </target> + + <target name="i18n" depends="compile"> + <msgfmt todir="${build}/po"> + <fileset dir="po"> + </fileset> + </msgfmt> + </target> + + <target name="link" depends="lib"> + <rc command="windres -o" + file="${src}/inkscape.rc" + out="${build}/inkres.o"> + <flags> + --include-dir=${src} + </flags> + </rc> + <link command="g++" out="${build}/inkscape.exe"> + <flags> + </flags> + <fileset> + <include name="${build}/inkres.o"/> + <include name="${build}/obj/main.o"/> + <include name="${build}/obj/winmain.o"/> + <include name="${build}/libinkscape.a"/> + </fileset> + <libs> + -L${gtk}/lib + -lgtkmm-2.4 -lgdkmm-2.4 -lglibmm-2.4 + -latkmm-1.6 -lpangomm-1.4 -lsigc-2.0 + -lgtk-win32-2.0 -lgdk-win32-2.0 -latk-1.0 + -lgdk_pixbuf-2.0 + -lpangocairo-1.0 -lpangoft2-1.0 -lpangowin32-1.0 -lpango-1.0 + -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lglib-2.0 -lcairo + <!-- PERL --> + -L${gtk}/perl/lib/CORE -lperl58 + <!-- PYTHON --> + -L${gtk}/python/libs -lpython24 + ${gtk}/bin/libxml2.dll + ${gtk}/lib/iconv.lib + -lfreetype.dll -lfontconfig.dll + -llcms.dll + -lssl -lcrypto + -lpng -lpopt ${gtk}/lib/zdll.lib + -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="AUTHORS" todir="${dist}"/> + <copy file="COPYING" todir="${dist}"/> + <copy file="COPYING.LIB" todir="${dist}"/> + <copy file="NEWS" todir="${dist}"/> + <copy file="README" todir="${dist}"/> + <copy file="TRANSLATORS" todir="${dist}"/> + <copy file="${gtk}/bin/libatkmm-1.6-1.dll" todir="${dist}"/> + <copy file="${gtk}/bin/libglibmm-2.4-1.dll" todir="${dist}"/> + <copy file="${gtk}/bin/libgtkmm-2.4-1.dll" todir="${dist}"/> + <copy file="${gtk}/bin/libgdkmm-2.4-1.dll" todir="${dist}"/> + <copy file="${gtk}/bin/libpangomm-1.4-1.dll" todir="${dist}"/> + <copy file="${gtk}/bin/libcairomm-1.0-1.dll" todir="${dist}"/> + <copy file="${gtk}/bin/libsigc-2.0-0.dll" todir="${dist}"/> + <copy file="${gtk}/bin/freetype6.dll" todir="${dist}"/> + <copy file="${gtk}/bin/libatk-1.0-0.dll" todir="${dist}"/> + <copy file="${gtk}/bin/libgdk-win32-2.0-0.dll" todir="${dist}"/> + <copy file="${gtk}/bin/libgdk_pixbuf-2.0-0.dll" todir="${dist}"/> + <copy file="${gtk}/bin/libglib-2.0-0.dll" todir="${dist}"/> + <copy file="${gtk}/bin/libgmodule-2.0-0.dll" todir="${dist}"/> + <copy file="${gtk}/bin/libgobject-2.0-0.dll" todir="${dist}"/> + <copy file="${gtk}/bin/libgtk-win32-2.0-0.dll" todir="${dist}"/> + <copy file="${gtk}/bin/libgthread-2.0-0.dll" todir="${dist}"/> + <copy file="${gtk}/bin/libcairo-2.dll" todir="${dist}"/> + <copy file="${gtk}/bin/libpangocairo-1.0-0.dll" todir="${dist}"/> + <copy file="${gtk}/bin/libpango-1.0-0.dll" todir="${dist}"/> + <copy file="${gtk}/bin/libpangoft2-1.0-0.dll" todir="${dist}"/> + <copy file="${gtk}/bin/libpangowin32-1.0-0.dll" todir="${dist}"/> + <copy file="${gtk}/bin/freetype6.dll" todir="${dist}"/> + <copy file="${gtk}/bin/libfontconfig-1.dll" todir="${dist}"/> + <copy file="${gtk}/bin/libxml2.dll" todir="${dist}"/> + <copy file="${gtk}/bin/xmlparse.dll" todir="${dist}"/> + <copy file="${gtk}/bin/jpeg62.dll" todir="${dist}"/> + <copy file="${gtk}/bin/libpng13.dll" todir="${dist}"/> + <copy file="${gtk}/bin/msvcr70.dll" todir="${dist}"/> + <copy file="${gtk}/bin/msvcr71.dll" todir="${dist}"/> + <copy file="${gtk}/bin/zlib1.dll" todir="${dist}"/> + <copy file="${gtk}/bin/iconv.dll" todir="${dist}"/> + <copy file="${gtk}/bin/popt1.dll" todir="${dist}"/> + <copy file="${gtk}/bin/liblcms-1.dll" todir="${dist}"/> + <copy file="${gtk}/bin/intl.dll" todir="${dist}"/> + <copy file="${gtk}/bin/intl.dll" tofile="${dist}/libintl-2.dll"/> + + <!-- MSGFMT files --> + <copy todir="${dist}"> <fileset dir="${build}/po"/> </copy> + + <!-- GTK --> + <copy todir="${dist}"> <fileset dir="${gtk}/etc"/> </copy> + <copy file="${gtk}/share/themes/MS-Windows/gtk-2.0/gtkrc" todir="${dist}/etc/gtk-2.0"/> + <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"/> </copy> + <copy todir="${dist}/share"> <fileset dir="${gtk}/share/themes"/> </copy> + <mkdir dir="${dist}/data"/> + <mkdir dir="${dist}/locale"/> + <mkdir dir="${dist}/modules"/> + <mkdir dir="${dist}/plugins"/> + <copy file="${gtk}/bin/gdb.exe" todir="${dist}"/> + + <!-- PERL --> + <copy file="${gtk}/perl/bin/perl58.dll" todir="${dist}"/> + + <!-- PYTHON --> + <copy file="${gtk}/python/python24.dll" todir="${dist}"/> + <copy file="${gtk}/python/python.exe" todir="${dist}/python"/> + <copy todir="${dist}/python"> <fileset dir="${gtk}/python/Lib"/> </copy> + <copy todir="${dist}/python"> <fileset dir="${gtk}/python/DLLs"/> </copy> + <copy todir="${dist}/python"> <fileset dir="${gtk}/python/Scripts"/> </copy> + + + </target> + + <target name="clean" + description="clean up" > + <!-- Delete the ${build} and ${dist} directory trees --> + <delete dir="${build}"/> + <delete dir="${dist}"/> + </target> +</project> + diff --git a/buildtool.cpp b/buildtool.cpp index d738e03a2..e3efeff5e 100644 --- a/buildtool.cpp +++ b/buildtool.cpp @@ -21,18 +21,18 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -/* - - - - - - - - +/** + * To use this file, compile with: + * <pre> + * g++ -O3 buildtool.cpp -o build.exe + * (or whatever your compiler might be) + * Then + * build + * or + * build {target} + */ -*/ #include <stdio.h> #include <unistd.h> @@ -1991,6 +1991,16 @@ protected: const String &delimiters); /** + * replace runs of whitespace with a space + */ + String strip(const String &s); + + /** + * remove leading whitespace from each line + */ + String leftJustify(const String &s); + + /** * remove leading and trailing whitespace from string */ String trim(const String &s); @@ -2234,6 +2244,78 @@ std::vector<String> MakeBase::tokenize(const String &str, /** + * replace runs of whitespace with a single space + */ +String MakeBase::strip(const String &s) +{ + int len = s.size(); + String stripped; + for (int i = 0 ; i<len ; i++) + { + char ch = s[i]; + if (isspace(ch)) + { + stripped.push_back(' '); + for ( ; i<len ; i++) + { + ch = s[i]; + if (!isspace(ch)) + { + stripped.push_back(ch); + break; + } + } + } + else + { + stripped.push_back(ch); + } + } + return stripped; +} + +/** + * remove leading whitespace from each line + */ +String MakeBase::leftJustify(const String &s) +{ + String out; + int len = s.size(); + for (int i = 0 ; i<len ; ) + { + char ch; + //Skip to first visible character + while (i<len) + { + ch = s[i]; + if (ch == '\n' || ch == '\r' + || !isspace(ch)) + break; + i++; + } + //Copy the rest of the line + while (i<len) + { + ch = s[i]; + if (ch == '\n' || ch == '\r') + { + if (ch != '\r') + out.push_back('\n'); + i++; + break; + } + else + { + out.push_back(ch); + } + i++; + } + } + return out; +} + + +/** * Removes whitespace from beginning and end of a string */ String MakeBase::trim(const String &s) @@ -2718,31 +2800,8 @@ bool MakeBase::getAttribute(Element *elem, const String &name, bool MakeBase::getValue(Element *elem, String &result) { String s = elem->getValue(); - int len = s.size(); //Replace all runs of whitespace with a single space - String stripped; - for (int i = 0 ; i<len ; i++) - { - char ch = s[i]; - if (isspace(ch)) - { - stripped.push_back(' '); - for ( ; i<len ; i++) - { - ch = s[i]; - if (!isspace(ch)) - { - stripped.push_back(ch); - break; - } - } - } - else - { - stripped.push_back(ch); - } - } - return getSubstitutions(stripped, result); + return getSubstitutions(s, result); } @@ -4546,6 +4605,7 @@ public: TASK_JAR, TASK_JAVAC, TASK_LINK, + TASK_MAKEFILE, TASK_MKDIR, TASK_MSGFMT, TASK_RANLIB, @@ -4915,16 +4975,19 @@ public: { if (!parent.getValue(child, flags)) return false; + flags = strip(flags); } else if (tagName == "includes") { if (!parent.getValue(child, includes)) return false; + includes = strip(includes); } else if (tagName == "defines") { if (!parent.getValue(child, defines)) return false; + defines = strip(defines); } else if (tagName == "fileset") { @@ -5416,11 +5479,13 @@ public: { if (!parent.getValue(child, flags)) return false; + flags = strip(flags); } else if (tagName == "libs") { if (!parent.getValue(child, libs)) return false; + libs = strip(libs); } } return true; @@ -5442,6 +5507,66 @@ private: /** * Create a named directory */ +class TaskMakeFile : public Task +{ +public: + + TaskMakeFile(MakeBase &par) : Task(par) + { type = TASK_MAKEFILE; name = "makefile"; } + + virtual ~TaskMakeFile() + {} + + virtual bool execute() + { + status(" : %s", fileName.c_str()); + String fullName = parent.resolve(fileName); + if (!isNewerThan(parent.getURI().getPath(), fullName)) + { + //trace("skipped <makefile>"); + return true; + } + //trace("fullName:%s", fullName.c_str()); + FILE *f = fopen(fullName.c_str(), "w"); + if (!f) + { + error("<makefile> could not open %s for writing : %s", + fullName.c_str(), strerror(errno)); + return false; + } + for (unsigned int i=0 ; i<text.size() ; i++) + fputc(text[i], f); + fclose(f); + return true; + } + + virtual bool parse(Element *elem) + { + if (!parent.getAttribute(elem, "file", fileName)) + return false; + if (fileName.size() == 0) + { + error("<makefile> requires 'file=\"filename\"' attribute"); + return false; + } + if (!parent.getValue(elem, text)) + return false; + text = leftJustify(text); + //trace("dirname:%s", dirName.c_str()); + return true; + } + +private: + + String fileName; + String text; +}; + + + +/** + * Create a named directory + */ class TaskMkDir : public Task { public: @@ -5800,6 +5925,8 @@ Task *Task::createTask(Element *elem) task = new TaskJavac(parent); else if (tagName == "link") task = new TaskLink(parent); + else if (tagName == "makefile") + task = new TaskMakeFile(parent); else if (tagName == "mkdir") task = new TaskMkDir(parent); else if (tagName == "msgfmt") |
