X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2FMakefile.am;h=6c267d0f4ef17e22e1299a6756386ea479ed22e7;hb=cc5354be857aa0feda0c2db94f1376cc1fecc449;hp=b1df010747a3802879ac1e936de85eac7e137957;hpb=04501ee02bf1b06e9cefc79937f1b5586dc4ef6a;p=inkscape.git diff --git a/src/Makefile.am b/src/Makefile.am index b1df01074..6c267d0f4 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,10 +1,7 @@ ## Process this file with automake to produce Makefile.in - # ################################################ -# # G L O B A L -# # ################################################ # Should work in either automake1.7 or 1.8, but 1.6 doesn't @@ -13,6 +10,50 @@ # so perhaps 1.6 will work. AUTOMAKE_OPTIONS = 1.7 subdir-objects +# Executables compiled by "make" and installed by "make install" +bin_PROGRAMS = inkscape inkview + +# Libraries which should be compiled by "make" but not installed. +# Use this only for libraries that are really standalone, rather than for +# source tree subdirectories. +if WITH_INKBOARD +libpedro = pedro/libpedro.a +endif +noinst_LIBRARIES = \ + libinkscape.a \ + dom/libdom.a \ + libcroco/libcroco.a \ + libavoid/libavoid.a \ + libgdl/libgdl.a \ + libcola/libcola.a \ + libvpsc/libvpsc.a \ + livarot/libvarot.a \ + 2geom/lib2geom.a \ + $(libpedro) \ + libinkversion.a + +all_libs = \ + $(noinst_LIBRARIES) \ + $(INKSCAPE_LIBS) \ + $(GNOME_VFS_LIBS) \ + $(XFT_LIBS) \ + $(FREETYPE_LIBS) \ + $(kdeldadd) \ + $(win32ldflags) \ + $(CARBON_LDFLAGS) \ + $(PERL_LIBS) \ + $(PYTHON_LIBS) \ + $(INKBOARD_LIBS) \ + $(LIBWPG_LIBS) \ + $(IMAGEMAGICK_LIBS) + +# Add sources common for Inkscape and Inkview to this variable. +ink_common_sources = +# Add Inkscape-only sources here. +inkscape_SOURCES = +# Add Inkview-only sources here. +inkview_SOURCES = + INCLUDES = \ $(PERL_CFLAGS) $(PYTHON_CFLAGS) \ $(FREETYPE_CFLAGS) \ @@ -28,8 +69,34 @@ INCLUDES = \ -DPOTRACE=\"potrace\" \ $(INKSCAPE_CFLAGS) \ -I$(top_srcdir)/cxxtest \ - $(WIN32_CFLAGS) + $(WIN32_CFLAGS) \ + -I$(srcdir)/bind/javainc \ + -I$(srcdir)/bind/javainc/linux \ + $(AM_CPPFLAGS) + +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 + +# Include all partial makefiles from subdirectories include Makefile_insert include application/Makefile_insert include bind/Makefile_insert @@ -59,7 +126,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 @@ -74,73 +140,15 @@ include util/Makefile_insert include trace/Makefile_insert include 2geom/Makefile_insert -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/libextension.a \ - extension/script/libscript.a \ - filters/libfilters.a \ - bind/libbind.a \ - helper/libspchelp.a \ - io/libio.a \ - libcroco/libcroco.a \ - libgdl/libgdl.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 = \ - display/libtest-display.a \ - helper/libtest-helper.a \ - libnr/libtest-nr.a \ - svg/libtest-svg.a \ - util/libtest-util.a \ - xml/libtest-xml.a - -DISTCLEANFILES = \ - helper/sp-marshal.cpp \ - helper/sp-marshal.h \ - inkscape_version.h - +# 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 \ @@ -167,7 +175,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 \ @@ -184,97 +191,89 @@ 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 \ traits/reference.h \ $(jabber_whiteboard_SOURCES) -EXTRA_PROGRAMS = \ - inkview \ - libnr/testnr +# Extra files to remove when doing "make distclean" +DISTCLEANFILES = \ + helper/sp-marshal.cpp \ + helper/sp-marshal.h \ + inkscape-version.cpp + +# ################################################ +# B I N A R I E S +# ################################################ -TESTS = \ - test-src$(EXEEXT) \ - style-test$(EXEEXT) \ - display/bezier-utils-test$(EXEEXT) \ - display/test-display$(EXEEXT) \ - helper/units-test$(EXEEXT) \ - helper/test-helper$(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) \ - util/test-util$(EXEEXT) \ - xml/test-xml$(EXEEXT) \ - xml/quote-test$(EXEEXT) \ - xml/repr-action-test$(EXEEXT) +# this should speed up the build +libinkscape_a_SOURCES = $(ink_common_sources) -# As of 2007-01-13, these are failing... -#XFAIL_TESTS = \ -# test-src$(EXEEXT) \ -# style-test$(EXEEXT) +inkscape_SOURCES += main.cpp $(win32_sources) +inkscape_LDADD = $(all_libs) +inkscape_LDFLAGS = --export-dynamic $(kdeldflags) -# streamtest is unfinished and can't handle the relocations done during -# "make distcheck". Not needed for the 0.41 release. -# io/streamtest$(EXEEXT) +inkview_SOURCES += inkview.cpp $(win32_sources) +inkview_LDADD = $(all_libs) -# automake adds $(EXEEXT) to check_PROGRAMS items but not to TESTS items: -# TESTS items can be scripts etc. +# ################################################ +# VERSION REPORTING +# ################################################ -check_PROGRAMS = \ - test-src \ - style-test \ - display/bezier-utils-test \ - display/test-display \ - helper/units-test \ - helper/test-helper \ - 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 \ - util/test-util \ - xml/test-xml \ - xml/quote-test \ - xml/repr-action-test +libinkversion_a_SOURCES = inkscape-version.cpp inkscape-version.h -# io/streamtest +if USE_SVN_VERSION +inkscape_version_deps = $(top_srcdir)/.svn/entries +endif +# If this is an SVN snapshot build, regenerate this file every time +# someone updates the SVN working directory. +inkscape-version.cpp: $(inkscape_version_deps) + VER_PREFIX="$(VERSION)"; \ + if test -x "$(srcdir)/.svn" -a ! -z `which svn`; then \ + VER_SVNREV=" r`LANG=en svn info $(srcdir) | sed -n -e '/^Revision:/s/Revision: \(.*\)/\1/p'`"; \ + if test ! -z "`svn status -q $(srcdir)`"; then \ + VER_CUSTOM=" custom"; \ + fi; \ + fi; \ + VERSION="$$VER_PREFIX$$VER_SVNREV$$VER_CUSTOM"; \ + echo "namespace Inkscape { " \ + "char const *version_string = \"$$VERSION\"; " \ + "}" > inkscape-version.new.cpp; \ + if cmp -s inkscape-version.new.cpp inkscape-version.cpp; then \ + rm inkscape-version.new.cpp; \ + else \ + mv inkscape-version.new.cpp inkscape-version.cpp; \ + fi; \ + echo $$VERSION -test-src.cpp: \ - $(test_src_includes) - $(top_srcdir)/cxxtest/cxxtestgen.pl --have-eh --template=$(srcdir)/selfname.tpl -root -o test-src.cpp \ - $(test_src_includes) +# ################################# +# ## TESTING STUFF (make check) ### +# ################################# -test_src_SOURCES = \ - test-src.cpp $(test_src_includes) +# 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 +# streamtest is unfinished and can't handle the relocations done during +# "make distcheck". -test_src_LDADD = \ - $(all_libs) \ - io/libio.a +# List of all tests to be run. +TESTS = $(check_PROGRAMS) +# 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: @@ -282,4 +281,4 @@ dist-hook: cp $(srcdir)/pixmaps/*xpm $(distdir)/pixmaps distclean-local: - rm -f display/test-display.xml display/test-display.log helper/test-helper.xml helper/test-helper.log libnr/test-nr.xml libnr/test-nr.log svg/test-svg.xml svg/test-svg.log util/test-util.xml util/test-util.log xml/test-xml.xml xml/test-xml.log test-src.xml test-src.log + rm -f cxxtests.xml cxxtests.log