Code

Improved version reporting. Add SVN revision and custom status to
[inkscape.git] / src / Makefile.am
index 260280a409a55e1d08e2857f0a04307b95c11418..44b885ab0e428bd2ba4d45819c462cbcfc637a4e 100644 (file)
@@ -18,31 +18,124 @@ INCLUDES = \
        $(FREETYPE_CFLAGS)      \
        $(GNOME_PRINT_CFLAGS)   \
        $(GNOME_VFS_CFLAGS)     \
+       $(IMAGEMAGICK_CFLAGS) \
        $(INKBOARD_CFLAGS) \
+       $(LIBWPG_CFLAGS) \
        $(XFT_CFLAGS)   \
-       $(GTK_UNIX_PRINT_CFLAGS)        \
+       $(LCMS_CFLAGS)  \
        $(POPPLER_CFLAGS)       \
        $(POPPLER_GLIB_CFLAGS)  \
        -DPOTRACE=\"potrace\"   \
        $(INKSCAPE_CFLAGS) \
-       -I$(top_srcdir)/cxxtest
+       -I$(top_srcdir)/cxxtest \
+       $(WIN32_CFLAGS)
 
+CXXTEST_TEMPLATE = $(srcdir)/cxxtest-template.tpl
+CXXTESTGENFLAGS = --root --have-eh --template=$(CXXTEST_TEMPLATE)
+CXXTESTGEN = $(top_srcdir)/cxxtest/cxxtestgen.pl $(CXXTESTGENFLAGS)
+# Add test cases to this variable
+CXXTEST_TESTSUITES =
+
+# ################################################
+#
+#  E X T R A 
+#
+# ################################################
+
+if PLATFORM_WIN32
+win32_sources = winmain.cpp registrytool.cpp registrytool.h
+win32ldflags = -lcomdlg32
+endif 
+
+if INKJAR
+inkjar_dir = inkjar
+inkjar_libs = inkjar/libinkjar.a
+endif
+
+# Extra files to remove when doing "make distclean"
+DISTCLEANFILES =       \
+       helper/sp-marshal.cpp   \
+       helper/sp-marshal.h     \
+       inkscape-version.cpp
+
+inkscape_private_libs =        \
+       libinkpre.a             \
+       application/libinkapp.a \
+       ui/dialog/libuidialog.a \
+       dialogs/libspdialogs.a  \
+       ui/cache/libuicache.a   \
+       jabber_whiteboard/libjabber_whiteboard.a \
+       pedro/libpedro.a        \
+       trace/libtrace.a        \
+       svg/libspsvg.a          \
+       filters/libfilters.a    \
+       widgets/libspwidgets.a  \
+       display/libspdisplay.a  \
+       helper/libspchelp.a     \
+       libcroco/libcroco.a     \
+       libnrtype/libnrtype.a   \
+       libavoid/libavoid.a     \
+       livarot/libvarot.a      \
+       live_effects/liblive_effects.a  \
+       live_effects/parameter/liblpeparam.a    \
+       ui/view/libuiview.a     \
+       ui/libui.a              \
+       ui/widget/libuiwidget.a \
+       libgdl/libgdl.a         \
+       graphlayout/libgraphlayout.a    \
+       removeoverlap/libremoveoverlap.a                \
+       libcola/libcola.a       \
+       libvpsc/libvpsc.a       \
+       extension/libextension.a        \
+       extension/implementation/libimplementation.a    \
+       extension/internal/libinternal.a        \
+       libnr/libnr.a           \
+       extension/script/libscript.a    \
+       bind/libbind.a  \
+       dom/libdom.a            \
+       xml/libspxml.a          \
+       2geom/lib2geom.a        \
+       util/libinkutil.a       \
+       io/libio.a              \
+       $(inkjar_libs)          \
+       libinkpost.a            \
+       debug/libinkdebug.a     \
+       libinkversion.a
+
+all_libs =                     \
+       $(inkscape_private_libs)        \
+       $(INKSCAPE_LIBS)        \
+       $(GNOME_VFS_LIBS)       \
+       $(XFT_LIBS)             \
+       $(FREETYPE_LIBS)        \
+       $(kdeldadd)             \
+       $(win32ldflags)         \
+       $(CARBON_LDFLAGS)       \
+       $(PERL_LIBS)            \
+       $(PYTHON_LIBS)          \
+       $(INKBOARD_LIBS)        \
+       $(LIBWPG_LIBS)          \
+       $(IMAGEMAGICK_LIBS)
+
+# Include all partial makefiles from subdirectories
 include Makefile_insert
 include application/Makefile_insert
+include bind/Makefile_insert
 include dialogs/Makefile_insert
 include display/Makefile_insert
 include dom/Makefile_insert
 include extension/Makefile_insert
 include extension/implementation/Makefile_insert
 include extension/internal/Makefile_insert
-include extension/internal/libwpg/Makefile_insert
 include extension/script/Makefile_insert
+include filters/Makefile_insert
 include helper/Makefile_insert
 include inkjar/Makefile_insert
 include io/Makefile_insert
 include pedro/Makefile_insert
 include jabber_whiteboard/Makefile_insert
 include libcroco/Makefile_insert
+include libgdl/Makefile_insert
 include libnr/Makefile_insert
 include libnrtype/Makefile_insert
 include libavoid/Makefile_insert
@@ -54,7 +147,6 @@ include libcola/Makefile_insert
 include removeoverlap/Makefile_insert
 include graphlayout/Makefile_insert
 include svg/Makefile_insert
-include utest/Makefile_insert
 include widgets/Makefile_insert
 include debug/Makefile_insert
 include xml/Makefile_insert
@@ -69,74 +161,29 @@ include util/Makefile_insert
 include trace/Makefile_insert
 include 2geom/Makefile_insert
 
+# Executables compiled by "make" and installed by "make install"
 bin_PROGRAMS = inkscape inkview
 
-noinst_LIBRARIES =     \
-       libinkpre.a     \
-       application/libinkapp.a \
-       dialogs/libspdialogs.a  \
-       pedro/libpedro.a \
-       jabber_whiteboard/libjabber_whiteboard.a \
-       display/libspdisplay.a  \
-       dom/libdom.a    \
-       extension/implementation/libimplementation.a    \
-       extension/internal/libinternal.a        \
-       extension/internal/libwpg/libwpg.a      \
-       extension/libextension.a        \
-       extension/script/libscript.a    \
-       helper/libspchelp.a     \
-       io/libio.a      \
-       libcroco/libcroco.a     \
-       live_effects/liblive_effects.a \
-       live_effects/parameter/liblpeparam.a \
-       ui/libui.a      \
-       ui/cache/libuicache.a   \
-       ui/dialog/libuidialog.a \
-       ui/view/libuiview.a     \
-       ui/widget/libuiwidget.a \
-       util/libinkutil.a \
-       debug/libinkdebug.a \
-       $(inkjar_libs)  \
-       libnr/libnr.a   \
-       libnrtype/libnrtype.a   \
-       libavoid/libavoid.a     \
-       libvpsc/libvpsc.a       \
-       libcola/libcola.a       \
-       livarot/libvarot.a      \
-       removeoverlap/libremoveoverlap.a        \
-       graphlayout/libgraphlayout.a    \
-       svg/libspsvg.a  \
-       widgets/libspwidgets.a  \
-       trace/libtrace.a  \
-       xml/libspxml.a  \
-       2geom/lib2geom.a        \
-       libinkpost.a
-
-check_LIBRARIES =      \
-       libnr/libtest-nr.a      \
-       svg/libtest-svg.a       \
-       svg/libtest-stubs.a     \
-       xml/libtest-xml.a
-
-DISTCLEANFILES =       \
-       helper/sp-marshal.cpp   \
-       helper/sp-marshal.h     \
-       inkscape_version.h
+# Libraries which should be compiled by "make" but not installed
+# Currently we use one library per source directory.
+noinst_LIBRARIES = $(inkscape_private_libs)
 
+# Extra files not mentioned as sources to include in the source tarball
 EXTRA_DIST =   \
-       Doxyfile        \
+       $(top_srcdir)/Doxyfile  \
        sp-skeleton.cpp sp-skeleton.h   \
        algorithms/makefile.in  \
        application/makefile.in \
+       bind/makefile.in        \
        debug/makefile.in       \
        dialogs/makefile.in     \
-       dialogs/filedialog-win32.cpp    \
        display/makefile.in     \
        dom/makefile.in         \
        extension/implementation/makefile.in    \
        extension/internal/makefile.in  \
        extension/makefile.in   \
        extension/script/makefile.in    \
+       filters/makefile.in \
        helper/makefile.in      \
        inkjar/makefile.in      \
        io/makefile.in  \
@@ -144,6 +191,7 @@ EXTRA_DIST =        \
        io/doc2html.xsl         \
        pedro/makefile.in       \
        jabber_whiteboard/makefile.in   \
+       libgdl/makefile.in      \
        libcroco/makefile.in    \
        libnr/makefile.in       \
        libnrtype/makefile.in   \
@@ -155,7 +203,6 @@ EXTRA_DIST =        \
        svg/makefile.in         \
        trace/makefile.in       \
        traits/makefile.in      \
-       utest/makefile.in       \
        ui/makefile.in          \
        ui/cache/makefile.in    \
        ui/dialog/makefile.in   \
@@ -165,8 +212,6 @@ EXTRA_DIST =        \
        widgets/makefile.in     \
        xml/makefile.in         \
        2geom/makefile.in       \
-       extension/internal/gnome.cpp    \
-       extension/internal/gnome.h      \
        extension/internal/win32.cpp    \
        extension/internal/win32.h      \
        extension/internal/emf-win32-inout.cpp  \
@@ -174,8 +219,6 @@ EXTRA_DIST =        \
        extension/internal/emf-win32-print.cpp  \
        extension/internal/emf-win32-print.h    \
        helper/sp-marshal.list  \
-       utest/utest.h   \
-       utest/test-1ary-cases.h \
        traits/copy.h   \
        traits/function.h       \
        traits/list-copy.h      \
@@ -186,91 +229,33 @@ EXTRA_PROGRAMS =  \
        inkview         \
        libnr/testnr
 
-TESTS =        \
-       test-all$(EXEEXT)       \
-       style-test$(EXEEXT)     \
-       display/bezier-utils-test$(EXEEXT)      \
-       helper/units-test$(EXEEXT)      \
-       libnr/in-svg-plane-test$(EXEEXT)        \
-       libnr/nr-matrix-test$(EXEEXT)   \
-       libnr/nr-point-fns-test$(EXEEXT)        \
-       libnr/nr-rotate-test$(EXEEXT)   \
-       libnr/nr-rotate-fns-test$(EXEEXT)       \
-       libnr/nr-scale-test$(EXEEXT)    \
-       libnr/nr-translate-test$(EXEEXT)        \
-       libnr/nr-types-test$(EXEEXT)    \
-       libnr/test-nr$(EXEEXT)  \
-       svg/test-svg$(EXEEXT)   \
-       util/list-container-test$(EXEEXT)       \
-       xml/test-xml$(EXEEXT)   \
-       xml/quote-test$(EXEEXT) \
-       xml/repr-action-test$(EXEEXT)
 
-# As of 2007-01-13, these are failing...
-XFAIL_TESTS = \
-       test-all$(EXEEXT)       \
-       style-test$(EXEEXT)
-
-# streamtest is unfinished and can't handle the relocations done during
-# "make distcheck".  Not needed for the 0.41 release.
-#      io/streamtest$(EXEEXT)
+# #################################
+# ## TESTING STUFF (make check) ###
+# #################################
 
+# List of all programs that should be built before testing. Note that this is
+# different from TESTS, because some tests can be scripts that don't
+# need to be built. There should be one test program per directory.
 # automake adds $(EXEEXT) to check_PROGRAMS items but not to TESTS items:
 # TESTS items can be scripts etc.
+check_PROGRAMS = cxxtests
 
-check_PROGRAMS =       \
-       test-all        \
-       style-test      \
-       display/bezier-utils-test       \
-       helper/units-test       \
-       libnr/in-svg-plane-test \
-       libnr/nr-matrix-test    \
-       libnr/nr-point-fns-test \
-       libnr/nr-rotate-test    \
-       libnr/nr-rotate-fns-test        \
-       libnr/nr-scale-test     \
-       libnr/nr-translate-test \
-       libnr/nr-types-test     \
-       libnr/test-nr   \
-       svg/test-svg    \
-       util/list-container-test        \
-       xml/test-xml    \
-       xml/quote-test  \
-       xml/repr-action-test
-
-#      io/streamtest
-
-
-test-all.cpp: \
-               $(libnr_test_nr_a_SOURCES)      \
-               $(svg_test_svg_a_SOURCES)       \
-               $(xml_test_xml_a_SOURCES)       \
-               $(libnr_test_nr_includes)       \
-               $(svg_test_svg_includes)        \
-               $(xml_test_xml_includes)        \
-               $(test_all_includes)
-       $(top_srcdir)/cxxtest/cxxtestgen.pl --template=$(srcdir)/selfname.tpl -root -o test-all.cpp     \
-               $(libnr_test_nr_includes)       \
-               $(svg_test_svg_includes)        \
-               $(xml_test_xml_includes)        \
-               $(test_all_includes)
-
-test_all_SOURCES = \
-       test-all.cpp $(test_all_includes)
+# streamtest is unfinished and can't handle the relocations done during
+# "make distcheck".
 
+# List of all tests to be run.
+TESTS = $(check_PROGRAMS)
 
-test_all_LDADD =       \
-       $(all_libs)     \
-       $(svg_test_svg_LDADD)   \
-       $(libnr_test_nr_LDADD)  \
-       $(xml_test_xml_LDADD) \
-       io/libio.a      
+# including the the testsuites here ensures that they get distributed
+cxxtests_SOURCES = cxxtests.cpp $(CXXTEST_TESTSUITES)
+cxxtests_LDADD = libnr/nr-compose-reference.o $(all_libs)
 
+cxxtests.cpp: $(CXXTEST_TESTSUITES) $(CXXTEST_TEMPLATE)
+       $(CXXTESTGEN) -o cxxtests.cpp $(CXXTEST_TESTSUITES)
 
 # ################################################
-#
 #  D I S T
-#
 # ################################################
 
 dist-hook:
@@ -278,4 +263,4 @@ dist-hook:
        cp $(srcdir)/pixmaps/*xpm $(distdir)/pixmaps
 
 distclean-local:
-       rm -f libnr/test-nr.xml libnr/test-nr.log svg/test-svg.xml svg/test-svg.log xml/test-xml.xml xml/test-xml.log test-all.xml test-all.log
+       rm -f cxxtests.xml cxxtests.log