From e786c06a6676c46dff74c2fcdd81948226625a42 Mon Sep 17 00:00:00 2001 From: fujiwarat Date: Mon, 5 Mar 2012 10:19:05 +0900 Subject: [PATCH] Enhance make dist TEST=Linux desktop Review URL: https://codereview.appspot.com/5730046 --- Makefile.am | 2 +- autogen.sh | 5 ++- bus/Makefile.am | 2 ++ configure.ac | 13 ++++++++ po/POTFILES.in | 87 ++++++++++++++++++++++++++++------------------------- po/POTFILES.skip | 14 +++++++++ src/Makefile.am | 8 +++-- ui/gtk3/Makefile.am | 8 ++++- 8 files changed, 93 insertions(+), 46 deletions(-) create mode 100644 po/POTFILES.skip diff --git a/Makefile.am b/Makefile.am index e648e44..2b5aae2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -40,6 +40,7 @@ endif SUBDIRS = \ src \ + bindings \ util \ conf \ client \ @@ -49,7 +50,6 @@ SUBDIRS = \ m4 \ po \ docs \ - bindings \ $(UI_DIR) \ $(DAEMON_DIR) \ $(PYTHON_LIB_DIRS) \ diff --git a/autogen.sh b/autogen.sh index c4cea1a..4069cc9 100755 --- a/autogen.sh +++ b/autogen.sh @@ -22,4 +22,7 @@ which gnome-autogen.sh || { touch $srcdir/ChangeLog } -ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I m4" REQUIRED_AUTOMAKE_VERSION=1.10 CFLAGS="-Wall $CFLAGS" . gnome-autogen.sh +CFLAGS=${CFLAGS-"-Wall -Werror"} + +# need --enable-gtk-doc for gnome-autogen.sh to make dist +ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I m4" REQUIRED_AUTOMAKE_VERSION=1.10 CFLAGS="$CFLAGS" . gnome-autogen.sh $@ diff --git a/bus/Makefile.am b/bus/Makefile.am index 2b619ed..7024b8f 100644 --- a/bus/Makefile.am +++ b/bus/Makefile.am @@ -109,11 +109,13 @@ marshalers.c: marshalers.h marshalers.list mv $@.tmp $@ +if ENABLE_TESTS TESTS = \ test-matchrule \ test-registry \ test-stress \ $(NULL) +endif noinst_PROGRAMS = $(TESTS) diff --git a/configure.ac b/configure.ac index aeb22b4..1c4b283 100644 --- a/configure.ac +++ b/configure.ac @@ -150,6 +150,18 @@ PKG_CHECK_MODULES(GTHREAD2, [ gthread-2.0 >= glib_required_version ]) +# --disable-tests option. +AC_ARG_ENABLE(tests, + AS_HELP_STRING([--disable-tests], + [Do not run tests]), + [enable_tests=$enableval], + [enable_tests=yes] +) +AM_CONDITIONAL([ENABLE_TESTS], [test x"$enable_tests" = x"yes"]) +if test x"$enable_tests" != x"yes"; then + enable_tests="no (disabled, use --enable-tests to enable)" +fi + # --disable-gtk2 option. AC_ARG_ENABLE(gtk2, AS_HELP_STRING([--disable-gtk2], @@ -532,5 +544,6 @@ Build options: No snooper regexes "$NO_SNOOPER_APPS" Panel icon "$IBUS_ICON_KEYBOARD" Enable surrounding-text $enable_surrounding_text + Run test cases $enable_tests ]) diff --git a/po/POTFILES.in b/po/POTFILES.in index 6121f10..135f537 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,60 +1,65 @@ -src/ibusbus.c -src/ibusconfig.c -src/ibusengine.c -src/ibusfactory.c -src/ibushotkey.c -src/ibusinputcontext.c -src/ibusobject.c -src/ibuspanelservice.c -src/ibusproxy.c -src/ibusservice.c -src/keyname-table.h -bus/ibus.desktop.in +# Files with translatable strings. +# Please keep this file in alphabetical order. +[type: gettext/glade]setup/setup.ui bus/dbusimpl.c bus/engineproxy.c +bus/ibus.desktop.in bus/inputcontext.c bus/panelproxy.c bus/registry.c -ibus/bus.py +data/ibus.schemas.in ibus/__init__.py ibus/_config.py.in -ibus/common.py -ibus/utility.py -ibus/keysyms.py -ibus/modifier.py +ibus/_gtk.py +ibus/application.py +ibus/ascii.py ibus/attribute.py +ibus/bus.py +ibus/common.py ibus/engine.py -ibus/panel.py +ibus/exception.py +ibus/factory.py ibus/interface/__init__.py -ibus/interface/ipanel.py ibus/interface/iconfig.py -ibus/interface/iibus.py ibus/interface/iengine.py ibus/interface/ienginefactory.py -ibus/exception.py -ibus/application.py -ibus/object.py +ibus/interface/iibus.py +ibus/interface/ipanel.py +ibus/keysyms.py ibus/lang.py ibus/lookuptable.py +ibus/modifier.py +ibus/object.py +ibus/panel.py ibus/property.py -ibus/_gtk.py -ibus/ascii.py -ibus/factory.py -ui/gtk/menu.py -ui/gtk/handle.py -ui/gtk/icon.py -ui/gtk/candidatepanel.py -ui/gtk/toolitem.py -ui/gtk/main.py -ui/gtk/panel.py -ui/gtk/propitem.py -ui/gtk/languagebar.py -ui/gtk/engineabout.py -setup/main.py -setup/keyboardshortcut.py -setup/enginecombobox.py +ibus/utility.py setup/engineabout.py +setup/enginecombobox.py setup/enginetreeview.py setup/ibus-setup.desktop.in -data/ibus.schemas.in -[type: gettext/glade]setup/setup.ui +setup/keyboardshortcut.py +setup/main.py +src/ibusbus.c +src/ibusconfig.c +src/ibusengine.c +src/ibusfactory.c +src/ibushotkey.c +src/ibusinputcontext.c +src/ibusobject.c +src/ibuspanelservice.c +src/ibusproxy.c +src/ibusservice.c +src/ibusutil.c +src/keyname-table.h +tools/main.vala +ui/gtk3/application.vala +ui/gtk3/candidatearea.vala +ui/gtk3/candidatepanel.vala +ui/gtk3/handle.vala +ui/gtk3/iconwidget.vala +ui/gtk3/keybindingmanager.vala +ui/gtk3/panel.vala +ui/gtk3/pango.vala +ui/gtk3/property.vala +ui/gtk3/separator.vala +ui/gtk3/switcher.vala diff --git a/po/POTFILES.skip b/po/POTFILES.skip new file mode 100644 index 0000000..4d9d655 --- /dev/null +++ b/po/POTFILES.skip @@ -0,0 +1,14 @@ +# Files with translatable strings. +# Please keep this file in alphabetical order. +ibus/_config.py +ui/gtk3/application.c +ui/gtk3/candidatearea.c +ui/gtk3/candidatepanel.c +ui/gtk3/handle.c +ui/gtk3/iconwidget.c +ui/gtk3/keybindingmanager.c +ui/gtk3/panel.c +ui/gtk3/pango.c +ui/gtk3/property.c +ui/gtk3/separator.c +ui/gtk3/switcher.c diff --git a/src/Makefile.am b/src/Makefile.am index b4d0dcf..b1d1766 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -22,7 +22,11 @@ NULL = -SUBDIRS = . tests +if ENABLE_TESTS +TESTS = tests +endif + +SUBDIRS = . $(TESTS) # libibus = libibus-@IBUS_API_VERSION@.la libibus = libibus-1.0.la @@ -94,9 +98,9 @@ ibus_sources = \ ibusenginesimple.c \ $(NULL) libibus_1_0_la_SOURCES = \ - $(ibus_sources) \ ibusmarshalers.c \ ibusenumtypes.c \ + $(ibus_sources) \ $(NULL) ibus_marshalers_sources = \ ibusmarshalers.h \ diff --git a/ui/gtk3/Makefile.am b/ui/gtk3/Makefile.am index 0fb9d3c..5b75e73 100644 --- a/ui/gtk3/Makefile.am +++ b/ui/gtk3/Makefile.am @@ -82,7 +82,7 @@ AM_VALAFLAGS = \ libexec_PROGRAMS = ibus-ui-gtk3 -ibus_ui_gtk3_SOURCES = \ +ibus_ui_gtk3_valas = \ application.vala \ candidatearea.vala \ candidatepanel.vala \ @@ -94,6 +94,11 @@ ibus_ui_gtk3_SOURCES = \ property.vala \ separator.vala \ switcher.vala \ + $(NULL) +ibus_ui_gtk3_vala_cfiles = $(ibus_ui_gtk3_valas:.vala=.c) + +ibus_ui_gtk3_SOURCES = \ + $(ibus_ui_gtk3_valas) \ grabkeycode.c \ $(NULL) @@ -103,6 +108,7 @@ ibus_ui_gtk3_LDADD = \ CLEANFILES = \ gtkpanel.xml \ + $(ibus_ui_gtk3_vala_cfiles) \ $(NULL) EXTRA_DIST = \ -- 2.7.4