From: Philip Chimento Date: Wed, 9 Sep 2009 19:18:51 +0000 (+0000) Subject: Moved to updated gettext and did some tweaking for make distcheck X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=5d8cc54e0272cd4c54b9fd9de1cc76bb6a1ec4c0;hp=e86673447d4d0d3f557dee5aa22f99938e7168df;p=rodin%2Fchimara.git Moved to updated gettext and did some tweaking for make distcheck git-svn-id: http://lassie.dyndns-server.com/svn/gargoyle-gtk@108 ddfedd41-794f-dd11-ae45-00112f111e67 --- diff --git a/.svnignore b/.svnignore index f2c5a21..b9a5d97 100644 --- a/.svnignore +++ b/.svnignore @@ -1,4 +1,5 @@ *.pc +ABOUT-NLS aclocal.m4 autom4te.cache bugreports @@ -14,10 +15,11 @@ libtool ltmain.sh Makefile Makefile.in +m4 missing mkinstalldirs stamp-h1 TODO.tasks -.anjuta +.anjuta* .tm_project2.cache diff --git a/Makefile.am b/Makefile.am index a379a24..ac4be01 100644 --- a/Makefile.am +++ b/Makefile.am @@ -18,6 +18,9 @@ pkgconfig_DATA = chimara.pc chimara-plugin.pc EXTRA_DIST = intltool-extract.in intltool-merge.in intltool-update.in \ chimara.pc.in chimara-plugin.pc.in -DISTCLEANFILES = intltool-extract intltool-merge intltool-update +DISTCLEANFILES = chimara.pc chimara-plugin.pc \ + intltool-extract intltool-merge intltool-update + +ACLOCAL_AMFLAGS = -I m4 DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc diff --git a/autogen.sh b/autogen.sh index 49281e5..58bd374 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,6 +1,10 @@ #!/bin/sh ### autogen.sh with sensible comments ############################### +### CREATE MACRO DIRECTORY ########################################## +# Needed by Gtk-doc +mkdir -p m4 + ### GTK-DOC ######################################################### # Run before autotools echo "Setting up Gtk-Doc" @@ -11,11 +15,7 @@ gtkdocize --flavour no-tmpl || exit 1 echo "Regenerating autotools files" autoreconf --install --symlink || exit 1 -### GLIB-GETTEXT #################################################### -echo "Running glib-gettextize... Ignore non-fatal messages" -glib-gettextize --force --copy || exit 1 - ### INTLTOOL ######################################################## -# Run after autopoint or glib-gettextize +# Run after autopoint echo "Setting up Intltool" intltoolize --copy --force --automake || exit 1 diff --git a/configure.ac b/configure.ac index 0972d75..fa88005 100644 --- a/configure.ac +++ b/configure.ac @@ -8,11 +8,22 @@ AC_INIT([chimara], [0.1]) # Sanity check to make sure we are running Autoconf from the right directory AC_CONFIG_SRCDIR(libchimara/chimara-glk.c) +# Put m4 macros in their own directory +AC_CONFIG_MACRO_DIR(m4) # Initialize Automake AM_INIT_AUTOMAKE([-Wall]) # Configure with --enable-silent-rules to cut down on clutter AM_SILENT_RULES +### LIBRARY VERSIONING ######################################################## +# Only update immediately before a public release + +CHIMARA_CURRENT=0 # Increment if interface changes +CHIMARA_REVISION=0 # Increment if source changes; set 0 if interface changes +CHIMARA_AGE=0 # Increment if interfaces added; set 0 if removed +LT_VERSION_INFO="$CHIMARA_CURRENT:$CHIMARA_REVISION:$CHIMARA_AGE" +AC_SUBST(LT_VERSION_INFO) + ### DECLARE PROGRAMS ########################################################## AC_PROG_CC # C compiler @@ -22,9 +33,9 @@ m4_defun([_LT_AC_LANG_CXX_CONFIG], [:]) # Disable unnecessary Libtool checks m4_defun([_LT_AC_LANG_F77_CONFIG], [:]) # to save time (1.5 only) LT_INIT # Libtool 2.2.6 and up #LT_INIT([dlopen]) # Should call it this way, but -#LT_PREREQ([2.2.6]) # ...goddamn Fedora 10 still has 1.5 +#LT_PREREQ([2.2.6]) # ...goddamn Debian still has 1.5 AC_PROG_LIBTOOL # Old way of declaring Libtool -AM_GLIB_GNU_GETTEXT # Use GLib gettext instead of standard +AM_GNU_GETTEXT([external]) # Gettext, link to system libintl IT_PROG_INTLTOOL([0.35.0]) # Intltool PKG_PROG_PKG_CONFIG # pkg_config GTK_DOC_CHECK(1.9) # Gtk-Doc @@ -36,6 +47,7 @@ AC_TYPE_UINT32_T ### INTERNATIONALIZATION ###################################################### +AM_GNU_GETTEXT_VERSION([0.17]) GETTEXT_PACKAGE=chimara AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name]) @@ -64,12 +76,6 @@ PKG_CHECK_MODULES([TEST], [ gmodule-2.0 ]) -### GTK-DOC ################################################################### - -# Allow gtkdocize to automatically copy the macro definition for -# GTK_DOC_CHECK to the project. -# AC_CONFIG_MACRO_DIR(m4) - ### OUTPUT #################################################################### # Output platform-specific definitions to config.h diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am index b53526f..77789f7 100644 --- a/docs/reference/Makefile.am +++ b/docs/reference/Makefile.am @@ -112,9 +112,10 @@ EXTRA_DIST += version.xml.in # Files not to distribute # for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types # for --rebuild-sections in $(SCAN_OPTIONS), e.g. $(DOC_MODULE)-sections.txt -# DISTCLEANFILES += +DISTCLEANFILES = $(DOC_MODULE)-overrides.txt # Comment this out if you want your docs-status tested during 'make check' -# TESTS_ENVIRONMENT = cd $(srcsrc) -# TESTS = $(GTKDOC_CHECK) - +if ENABLE_GTK_DOC +TESTS_ENVIRONMENT = cd $(srcdir) && +TESTS = $(GTKDOC_CHECK) +endif diff --git a/interpreters/frotz/Makefile.am b/interpreters/frotz/Makefile.am index 9a1008a..ce11445 100644 --- a/interpreters/frotz/Makefile.am +++ b/interpreters/frotz/Makefile.am @@ -4,6 +4,7 @@ pkglib_LTLIBRARIES = frotz.la frotz_la_SOURCES = buffer.c err.c fastmem.c files.c input.c main.c math.c \ object.c process.c quetzal.c random.c redirect.c sound.c stream.c table.c \ text.c variable.c glkscreen.c glkmisc.c frotz.h glkfrotz.h glkio.h setup.h +frotz_la_CPPFLAGS = -I$(top_srcdir) frotz_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS) frotzdocdir = $(datadir)/doc/$(PACKAGE)/frotz diff --git a/interpreters/nitfol/Makefile.am b/interpreters/nitfol/Makefile.am index b5d3099..10ec132 100644 --- a/interpreters/nitfol/Makefile.am +++ b/interpreters/nitfol/Makefile.am @@ -5,22 +5,24 @@ PLUGIN_LIBTOOL_FLAGS=-module -avoid-version -export-symbols-regex "^glk" GRAPHICS = no_graph.c no_graph.h # GRAPHICS = graphics.c graphics.h BLORB = blorb.c -# BLORB = no_blorb.c no_blorb.h +# BLORB = no_blorb.c SOUND = no_snd.c no_snd.h # SOUND = sound.c sound.h pkglib_LTLIBRARIES = nitfol.la -nitfol_la_SOURCES = automap.c automap.h binary.h debug.c debug.h decode.c \ - decode.h errmesg.c errmesg.h globals.c globals.h hash.c hash.h iff.c iff.h \ - infix.c infix.h inform.c inform.h init.c init.h io.c linkevil.h main.c \ - main.h nio.h nitfol.h objects.c objects.h op_call.c op_call.h op_jmp.c \ - op_jmp.h oplist.c oplist.h op_math.c op_math.h op_save.c op_save.h \ - op_table.c op_table.h op_v6.c op_v6.h portfunc.c portfunc.h quetzal.c \ - quetzal.h solve.c solve.h stack.c stack.h startunix.c struct.c struct.h \ - tokenise.c tokenise.h undo.c undo.h z_io.c z_io.h zscii.c zscii.h \ +nitfol_la_SOURCES = automap.c automap.h binary.h copying.h debug.c debug.h \ + decode.c decode.h errmesg.c errmesg.h globals.c globals.h hash.c hash.h \ + iff.c iff.h infix.c infix.h inform.c inform.h init.c init.h io.c \ + linkevil.h main.c main.h nio.h nitfol.h no_blorb.h objects.c objects.h \ + op_call.c op_call.h op_jmp.c op_jmp.h oplist.c oplist.h op_math.c \ + op_math.h op_save.c op_save.h op_table.c op_table.h op_v6.c op_v6.h \ + portfunc.c portfunc.h quetzal.c quetzal.h solve.c solve.h stack.c stack.h \ + startunix.c struct.c struct.h tokenise.c tokenise.h undo.c undo.h z_io.c \ + z_io.h zscii.c zscii.h \ $(GRAPHICS) \ $(BLORB) \ $(SOUND) +nitfol_la_CPPFLAGS = -I$(top_srcdir) nitfol_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS) EXTRA_DIST = crashme.inf test.inf diff --git a/libchimara/Makefile.am b/libchimara/Makefile.am index 44b4274..00d856c 100644 --- a/libchimara/Makefile.am +++ b/libchimara/Makefile.am @@ -27,11 +27,20 @@ libchimara_la_SOURCES = \ timer.c timer.h \ window.c window.h libchimara_la_CPPFLAGS = \ - -DG_LOG_DOMAIN=\"Chimara\" + -DG_LOG_DOMAIN=\"Chimara\" \ + -DLOCALEDIR=\""$(datadir)/locale"\" \ + -I$(top_srcdir) libchimara_la_CFLAGS = @CHIMARA_CFLAGS@ $(AM_CFLAGS) libchimara_la_LIBADD = @CHIMARA_LIBS@ -libchimara_la_LDFLAGS = -no-undefined -export-symbols-regex "^(glk_|chimara_glk_|glkunix_|giblorb_|garglk_)" +libchimara_la_LDFLAGS = -version-info $(LT_VERSION_INFO) \ + -no-undefined \ + -export-symbols-regex "^(glk_|chimara_glk_|glkunix_|giblorb_|garglk_)" libchimara_includedir = $(includedir)/chimara/libchimara -libchimara_include_HEADERS = chimara-glk.h glk.h glkstart.h gi_blorb.h garglk.h +libchimara_include_HEADERS = \ + chimara-glk.h \ + glk.h \ + glkstart.h \ + gi_blorb.h \ + garglk.h EXTRA_DIST = doc.c glkstart.c diff --git a/po/.svnignore b/po/.svnignore index c740b2b..5254eb0 100644 --- a/po/.svnignore +++ b/po/.svnignore @@ -2,4 +2,13 @@ Makefile Makefile.in Makefile.in.in POTFILES +Rules-quot +insert-header.sin +quot.set +en@quot.header +en@boldquot.header +Makevars.template +boldquot.sed +quot.sed +remove-potcdate.sin stamp-it diff --git a/po/Makevars b/po/Makevars new file mode 100644 index 0000000..b5c3926 --- /dev/null +++ b/po/Makevars @@ -0,0 +1,41 @@ +# Makefile variables for PO directory in any package using GNU gettext. + +# Usually the message domain is the same as the package name. +DOMAIN = $(PACKAGE) + +# These two variables depend on the location of this directory. +subdir = po +top_builddir = .. + +# These options get passed to xgettext. +XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ + +# This is the copyright holder that gets inserted into the header of the +# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding +# package. (Note that the msgstr strings, extracted from the package's +# sources, belong to the copyright holder of the package.) Translators are +# expected to transfer the copyright for their translations to this person +# or entity, or to disclaim their copyright. The empty string stands for +# the public domain; in this case the translators are expected to disclaim +# their copyright. +COPYRIGHT_HOLDER = Marijn van Vliet and Philip Chimento + +# This is the email address or URL to which the translators shall report +# bugs in the untranslated strings: +# - Strings which are not entire sentences, see the maintainer guidelines +# in the GNU gettext documentation, section 'Preparing Strings'. +# - Strings which use unclear terms or require additional context to be +# understood. +# - Strings which make invalid assumptions about notation of date, time or +# money. +# - Pluralisation problems. +# - Incorrect English spelling. +# - Incorrect formatting. +# It can be your email address, or a mailing list address where translators +# can write to without being subscribed, or the URL of a web page through +# which the translators can contact you. +MSGID_BUGS_ADDRESS = + +# This is the list of locale categories, beyond LC_MESSAGES, for which the +# message catalogs shall be used. It is usually empty. +EXTRA_LOCALE_CATEGORIES = diff --git a/po/POTFILES.in b/po/POTFILES.in index a0b3c55..e12a0d1 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,3 +1,5 @@ # List of source files containing translatable strings. -src/main.c +libchimara/chimara-glk.c +tests/chimara.glade + diff --git a/tests/Makefile.am b/tests/Makefile.am index a5fffc5..ca4bec5 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,11 +1,12 @@ AM_CFLAGS = -Wall +AM_CPPFLAGS = -I$(top_srcdir) data_DATA = chimara.ui noinst_PROGRAMS = test-chimara test_chimara_SOURCES = main.c callbacks.c callbacks.h error.c error.h -test_chimara_CPPFLAGS = \ +test_chimara_CPPFLAGS = $(AM_CPPFLAGS) \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ -DPACKAGE_SRC_DIR=\""$(srcdir)"\" \ -DPACKAGE_DATA_DIR=\""$(datadir)"\"