[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
trans-coord/gnun/server/gnun ChangeLog Makefile...
From: |
Yavor Doganov |
Subject: |
trans-coord/gnun/server/gnun ChangeLog Makefile... |
Date: |
Tue, 28 Apr 2009 15:55:36 +0000 |
CVSROOT: /sources/trans-coord
Module name: trans-coord
Changes by: Yavor Doganov <yavor> 09/04/28 15:55:36
Modified files:
gnun/server/gnun: ChangeLog Makefile.am TODO configure.ac
gnun-validate-html.in
Added files:
gnun/server/gnun/m4: ax_compare_version.m4
Log message:
Improve the build system.
* configure.ac: Skip some tests if their prerequisites are not
found. Use AX_COMPARE_VERSION to detect a recent enough po4a.
Don't bail out if GNU make is missing -- the user might want the
manuals + gnun-validate-html only. Make the final results output
prettier and more meaningful.
(HAVE_GUILE, HAVE_XMLLINT): New Automake conditionals.
* Makefile.am (bin_SCRIPTS): Define conditionally if
HAVE_XMLLINT to avoid installing a non-functional program.
(pkglibexec_SCRIPTS): Build and install make-prototype if
HAVE_GUILE.
(edit): Substite @address@hidden
* gnun-validate-html.in: Use @M4@ instead of the hardcoded m4, as
some non-GNU users have the capable GNU m4 installed under a
different name.
* m4/ax_compare_version.m4: New file, imported from the Autoconf
archive.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/ChangeLog?cvsroot=trans-coord&r1=1.140&r2=1.141
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/Makefile.am?cvsroot=trans-coord&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/TODO?cvsroot=trans-coord&r1=1.28&r2=1.29
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/configure.ac?cvsroot=trans-coord&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/gnun-validate-html.in?cvsroot=trans-coord&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/m4/ax_compare_version.m4?cvsroot=trans-coord&rev=1.1
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/ChangeLog,v
retrieving revision 1.140
retrieving revision 1.141
diff -u -b -r1.140 -r1.141
--- ChangeLog 27 Apr 2009 13:52:13 -0000 1.140
+++ ChangeLog 28 Apr 2009 15:55:35 -0000 1.141
@@ -1,3 +1,23 @@
+2009-04-28 Yavor Doganov <address@hidden>
+
+ Improve the build system.
+ * configure.ac: Skip some tests if their prerequisites are not
+ found. Use AX_COMPARE_VERSION to detect a recent enough po4a.
+ Don't bail out if GNU make is missing -- the user might want the
+ manuals + gnun-validate-html only. Make the final results output
+ prettier and more meaningful.
+ (HAVE_GUILE, HAVE_XMLLINT): New Automake conditionals.
+ * Makefile.am (bin_SCRIPTS): Define conditionally if
+ HAVE_XMLLINT to avoid installing a non-functional program.
+ (pkglibexec_SCRIPTS): Build and install make-prototype if
+ HAVE_GUILE.
+ (edit): Substite @address@hidden
+ * gnun-validate-html.in: Use @M4@ instead of the hardcoded m4, as
+ some non-GNU users have the capable GNU m4 installed under a
+ different name.
+ * m4/ax_compare_version.m4: New file, imported from the Autoconf
+ archive.
+
2009-04-27 Yavor Doganov <address@hidden>
* doc/gnun.texi (New Translation): Clarify that the PO file header
Index: Makefile.am
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/Makefile.am,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- Makefile.am 1 Feb 2009 12:54:10 -0000 1.10
+++ Makefile.am 28 Apr 2009 15:55:35 -0000 1.11
@@ -25,9 +25,17 @@
pkglibexecdir = $(libexecdir)/$(PACKAGE)
+if HAVE_XMLLINT
bin_SCRIPTS = gnun-validate-html
+endif
+
noinst_SCRIPTS = stamp-config.mk
-pkglibexec_SCRIPTS = validate-html-notify make-prototype
+pkglibexec_SCRIPTS = validate-html-notify
+
+if HAVE_GUILE
+pkglibexec_SCRIPTS += make-prototype
+endif
+
dist_pkglibexec_SCRIPTS = mailfail
edit = sed \
@@ -37,7 +45,8 @@
-e 's|@address@hidden|$(PACKAGE_BUGREPORT)|g' \
-e 's|@address@hidden|$(pkgdatadir)|g' \
-e 's|@address@hidden|$(prefix)|g' \
- -e 's|@address@hidden|$(pkglibexecdir)|g'
+ -e 's|@address@hidden|$(pkglibexecdir)|g' \
+ -e 's|@address@hidden|$(M4)|g'
gnun-validate-html validate-html-notify: Makefile
rm -f $@ address@hidden
Index: TODO
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/TODO,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- TODO 8 Feb 2009 15:59:23 -0000 1.28
+++ TODO 28 Apr 2009 15:55:35 -0000 1.29
@@ -43,8 +43,6 @@
* General (when bugs are fixed)
-** Improve the build system.
-
** The documentation is not complete, and should be improved.
** Experiment with msgmerge's `--previous' option and make it the
Index: configure.ac
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/configure.ac,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- configure.ac 24 Feb 2009 20:50:35 -0000 1.12
+++ configure.ac 28 Apr 2009 15:55:35 -0000 1.13
@@ -35,12 +35,10 @@
# override them both via `configure' and `make' when building
# translations.
CHECK_GNU_MAKE
-AS_IF([test "$ifGNUmake" != ""],
- [AC_MSG_ERROR([GNU make is required for basic operations.])])
+AS_IF([test -z "$ifGNUmake"], [decent_make=yes], [decent_make=no])
AC_ARG_VAR([AWK], [the `awk' program])
-AX_CHECK_AWK_GSUB([decent_awk=yes])
-AC_SUBST([decent_awk])
+AX_CHECK_AWK_GSUB([decent_awk=yes], [decent_awk=no])
AC_ARG_VAR([SED], [the `sed' program])
AC_PROG_SED
@@ -68,24 +66,34 @@
&& ac_cv_path_MSGMERGE=$ac_path_MSGMERGE]],
[AC_MSG_WARN([none found -- consider updating gettext])])])
AC_SUBST([MSGMERGE], [$ac_cv_path_MSGMERGE])
+AS_IF([test -n "$MSGMERGE"], [decent_gettext=yes], [decent_gettext=no])
AC_PATH_PROG([GUILE], [guile])
+AS_IF([test -n "$GUILE"], [have_guile=yes], [have_guile=no])
+AM_CONDITIONAL([HAVE_GUILE], [test -n "$GUILE"])
-AC_ARG_VAR([PO4A_GETTEXTIZE], [the `po4a-gettextize' program])
-AC_CHECK_PROGS([PO4A_GETTEXTIZE], [po4a-gettextize])
-AC_ARG_VAR([PO4A_TRANSLATE], [the `po4a-translate' program])
-AC_CHECK_PROGS([PO4A_TRANSLATE], [po4a-translate])
-
-# This is a weak test; should be replaced with a feature check.
-if test "$PO4A_TRANSLATE" != ""; then
-AC_CACHE_CHECK([if po4a is version 0.34], [gnun_cv_recent_po4a],
+# Po4a is useless for our purpose if Guile is missing.
+if test "$have_guile" = yes; then
+ AC_ARG_VAR([PO4A_GETTEXTIZE], [the `po4a-gettextize' program])
+ AC_CHECK_PROGS([PO4A_GETTEXTIZE], [po4a-gettextize])
+ AC_ARG_VAR([PO4A_TRANSLATE], [the `po4a-translate' program])
+ AC_CHECK_PROGS([PO4A_TRANSLATE], [po4a-translate])
+
+ # This is a weak test; should be replaced with a feature check.
+ if test -n "$PO4A_TRANSLATE"; then
+ AC_CACHE_CHECK([if po4a version is at least 0.34], [gnun_cv_recent_po4a],
[gnun_cv_recent_po4a=no
- if (sh -c "$PO4A_TRANSLATE --version" 2> /dev/null | \
- $GREP 0.34 2>&1 > /dev/null) ; then
- gnun_cv_recent_po4a=yes ;
- fi])
+ po4a_version=`$PO4A_TRANSLATE --version 2> /dev/null \
+ | $GREP po4a | $AWK '{print $3}' | $SED 's/.$//'`
+ AX_COMPARE_VERSION([$po4a_version], [ge], [0.34],
+ [gnun_cv_recent_po4a=yes])
+ ])
+ fi
+ else
+ gnun_cv_recent_po4a=no
fi
-AC_CHECK_PROG([have_mail], [mail], [yes])
+
+AC_CHECK_PROG([have_mail], [mail], [yes], [no])
# This test is currently unnecessary, but might be useful if we rely
# on GNU Mailutils features in the future.
@@ -100,8 +108,12 @@
fi
AC_ARG_VAR([CVS], [the CVS client program])
AC_CHECK_PROGS([CVS], [cvs])
+AS_IF([test -n "$CVS"], [have_cvs=yes], [have_cvs=no])
-AC_CHECK_PROG([have_xmllint], [xmllint], [yes])
+# Do not bother checking for xmllint if m4 is not present.
+AS_IF([test -n "$M4"],
+ [AC_CHECK_PROG([have_xmllint], [xmllint], [yes], [no])],
+ [have_xmllint=no])
if test "$have_xmllint" = yes; then
AC_MSG_CHECKING([if XHTML DTDs are installed])
have_dtds=no
@@ -118,33 +130,34 @@
</html>
EOF
if xmllint --valid --nonet --noout conftest.dtd 2> /dev/null ; then
- have_dtds=yes ;
+ have_dtds=yes;
fi
- if test "$have_dtds" = no ; then
+ if test "$have_dtds" = no; then
AC_MSG_RESULT([$have_dtds (will use our copy)])
else
AC_MSG_RESULT([$have_dtds])
fi
fi
+AM_CONDITIONAL([HAVE_XMLLINT], [test "$have_xmllint" = yes])
AM_CONDITIONAL([NO_DTD], [test "$have_dtds" = no])
AC_CONFIG_FILES([Makefile doc/Makefile dtd/Makefile config.mk])
-AC_CONFIG_FILES([make-prototype], [chmod +x make-prototype])
+AS_IF([test -n "$GUILE"],
+ [AC_CONFIG_FILES([make-prototype], [chmod +x make-prototype])])
AC_OUTPUT
-# FIXME: This is ugly, inefficient and not informative.
cat <<EOF
m4_text_box([Results])
EOF
-AS_IF([test "$decent_awk" = yes && test "$M4" != "" \
- && test "$MSGFMT" != "" && test "$MSGMERGE" != "" \
- && test "$GUILE" != "" && test "$gnun_cv_recent_po4a" = yes \
- && test "$have_mail" = yes && test "$CVS" != "" \
- && test "$have_xmllint" = yes],
- [echo This host is fully capable of building translations.],
- [echo "Some programs are missing, or are not recent enough,"
- echo "so using this host to build translations will be unreliable."])
+echo "Basic make operations... $decent_make"
+echo "PO files manipulation, make report... $decent_gettext"
+echo "make-prototype... $have_guile"
+echo "POT/HTML generation... $gnun_cv_recent_po4a"
+echo "HTML validation... $have_xmllint"
+echo "GRACE support... $decent_awk"
+echo "NOTIFY support... $have_mail"
+echo "VCS support... $have_cvs"
echo
echo "Type \"make\" to build the scripts and \"make install\" to install
-them along with the manual."
+them along with the manuals."
Index: gnun-validate-html.in
===================================================================
RCS file:
/sources/trans-coord/trans-coord/gnun/server/gnun/gnun-validate-html.in,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- gnun-validate-html.in 7 Feb 2009 21:04:58 -0000 1.4
+++ gnun-validate-html.in 28 Apr 2009 15:55:36 -0000 1.5
@@ -75,7 +75,7 @@
# Expand input file's #include directives and save the result in
# $TMP1.
cat $1 | sed "s/<\!--#include virtual=\"\/\?\(.*\)\" -->/include(\`\1')/g" \
- | m4 -EE -I $ROOT > $TMP1
+ | @M4@ -EE -I $ROOT > $TMP1
# Execute xmllint on $TMP1 and save it's output to $TMP2.
set +o pipefail
Index: m4/ax_compare_version.m4
===================================================================
RCS file: m4/ax_compare_version.m4
diff -N m4/ax_compare_version.m4
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ m4/ax_compare_version.m4 28 Apr 2009 15:55:36 -0000 1.1
@@ -0,0 +1,174 @@
+# ===========================================================================
+# http://www.nongnu.org/autoconf-archive/ax_compare_version.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_COMPARE_VERSION(VERSION_A, OP, VERSION_B, [ACTION-IF-TRUE],
[ACTION-IF-FALSE])
+#
+# DESCRIPTION
+#
+# This macro compares two version strings. Due to the various number of
+# minor-version numbers that can exist, and the fact that string
+# comparisons are not compatible with numeric comparisons, this is not
+# necessarily trivial to do in a autoconf script. This macro makes doing
+# these comparisons easy.
+#
+# The six basic comparisons are available, as well as checking equality
+# limited to a certain number of minor-version levels.
+#
+# The operator OP determines what type of comparison to do, and can be one
+# of:
+#
+# eq - equal (test A == B)
+# ne - not equal (test A != B)
+# le - less than or equal (test A <= B)
+# ge - greater than or equal (test A >= B)
+# lt - less than (test A < B)
+# gt - greater than (test A > B)
+#
+# Additionally, the eq and ne operator can have a number after it to limit
+# the test to that number of minor versions.
+#
+# eq0 - equal up to the length of the shorter version
+# ne0 - not equal up to the length of the shorter version
+# eqN - equal up to N sub-version levels
+# neN - not equal up to N sub-version levels
+#
+# When the condition is true, shell commands ACTION-IF-TRUE are run,
+# otherwise shell commands ACTION-IF-FALSE are run. The environment
+# variable 'ax_compare_version' is always set to either 'true' or 'false'
+# as well.
+#
+# Examples:
+#
+# AX_COMPARE_VERSION([3.15.7],[lt],[3.15.8])
+# AX_COMPARE_VERSION([3.15],[lt],[3.15.8])
+#
+# would both be true.
+#
+# AX_COMPARE_VERSION([3.15.7],[eq],[3.15.8])
+# AX_COMPARE_VERSION([3.15],[gt],[3.15.8])
+#
+# would both be false.
+#
+# AX_COMPARE_VERSION([3.15.7],[eq2],[3.15.8])
+#
+# would be true because it is only comparing two minor versions.
+#
+# AX_COMPARE_VERSION([3.15.7],[eq0],[3.15])
+#
+# would be true because it is only comparing the lesser number of minor
+# versions of the two values.
+#
+# Note: The characters that separate the version numbers do not matter. An
+# empty string is the same as version 0. OP is evaluated by autoconf, not
+# configure, so must be a string, not a variable.
+#
+# The author would like to acknowledge Guido Draheim whose advice about
+# the m4_case and m4_ifvaln functions make this macro only include the
+# portions necessary to perform the specific comparison specified by the
+# OP argument in the final configure script.
+#
+# LICENSE
+#
+# Copyright (c) 2008 Tim Toolan <address@hidden>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved.
+
+dnl #########################################################################
+AC_DEFUN([AX_COMPARE_VERSION], [
+ AC_PROG_AWK
+
+ # Used to indicate true or false condition
+ ax_compare_version=false
+
+ # Convert the two version strings to be compared into a format that
+ # allows a simple string comparison. The end result is that a version
+ # string of the form 1.12.5-r617 will be converted to the form
+ # 0001001200050617. In other words, each number is zero padded to four
+ # digits, and non digits are removed.
+ AS_VAR_PUSHDEF([A],[ax_compare_version_A])
+ A=`echo "$1" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \
+ -e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \
+ -e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \
+ -e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \
+ -e 's/[[^0-9]]//g'`
+
+ AS_VAR_PUSHDEF([B],[ax_compare_version_B])
+ B=`echo "$3" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \
+ -e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \
+ -e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \
+ -e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \
+ -e 's/[[^0-9]]//g'`
+
+ dnl # In the case of le, ge, lt, and gt, the strings are sorted as necessary
+ dnl # then the first line is used to determine if the condition is true.
+ dnl # The sed right after the echo is to remove any indented white space.
+ m4_case(m4_tolower($2),
+ [lt],[
+ ax_compare_version=`echo "x$A
+x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/false/;s/x${B}/true/;1q"`
+ ],
+ [gt],[
+ ax_compare_version=`echo "x$A
+x$B" | sed 's/^ *//' | sort | sed "s/x${A}/false/;s/x${B}/true/;1q"`
+ ],
+ [le],[
+ ax_compare_version=`echo "x$A
+x$B" | sed 's/^ *//' | sort | sed "s/x${A}/true/;s/x${B}/false/;1q"`
+ ],
+ [ge],[
+ ax_compare_version=`echo "x$A
+x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/true/;s/x${B}/false/;1q"`
+ ],[
+ dnl Split the operator from the subversion count if present.
+ m4_bmatch(m4_substr($2,2),
+ [0],[
+ # A count of zero means use the length of the shorter version.
+ # Determine the number of characters in A and B.
+ ax_compare_version_len_A=`echo "$A" | $AWK '{print(length)}'`
+ ax_compare_version_len_B=`echo "$B" | $AWK '{print(length)}'`
+
+ # Set A to no more than B's length and B to no more than A's length.
+ A=`echo "$A" | sed "s/\(.\{$ax_compare_version_len_B\}\).*/\1/"`
+ B=`echo "$B" | sed "s/\(.\{$ax_compare_version_len_A\}\).*/\1/"`
+ ],
+ [[0-9]+],[
+ # A count greater than zero means use only that many subversions
+ A=`echo "$A" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"`
+ B=`echo "$B" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"`
+ ],
+ [.+],[
+ AC_WARNING(
+ [illegal OP numeric parameter: $2])
+ ],[])
+
+ # Pad zeros at end of numbers to make same length.
+ ax_compare_version_tmp_A="$A`echo $B | sed 's/./0/g'`"
+ B="$B`echo $A | sed 's/./0/g'`"
+ A="$ax_compare_version_tmp_A"
+
+ # Check for equality or inequality as necessary.
+ m4_case(m4_tolower(m4_substr($2,0,2)),
+ [eq],[
+ test "x$A" = "x$B" && ax_compare_version=true
+ ],
+ [ne],[
+ test "x$A" != "x$B" && ax_compare_version=true
+ ],[
+ AC_WARNING([illegal OP parameter: $2])
+ ])
+ ])
+
+ AS_VAR_POPDEF([A])dnl
+ AS_VAR_POPDEF([B])dnl
+
+ dnl # Execute ACTION-IF-TRUE / ACTION-IF-FALSE.
+ if test "$ax_compare_version" = "true" ; then
+ m4_ifvaln([$4],[$4],[:])dnl
+ m4_ifvaln([$5],[else $5])dnl
+ fi
+]) dnl AX_COMPARE_VERSION
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- trans-coord/gnun/server/gnun ChangeLog Makefile...,
Yavor Doganov <=