[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
trans-coord/gnun/server/gnun ChangeLog Makefile...
From: |
Pavel Kharitonov |
Subject: |
trans-coord/gnun/server/gnun ChangeLog Makefile... |
Date: |
Sun, 21 Aug 2011 13:04:13 +0000 |
CVSROOT: /sources/trans-coord
Module name: trans-coord
Changes by: Pavel Kharitonov <ineiev> 11/08/21 13:04:12
Modified files:
gnun/server/gnun: ChangeLog Makefile.am NEWS
gnun-validate-html.in validate-html-notify.in
Log message:
* Makefile.am (edit): add @bindir@, @AWK@, @GREP@, @SED@
to the list of expanded variables.
(stamp-config.mk): fix VPATH builds.
* gnun-validate-html.in: use an awk script to expand SSIs (the old
method using m4 (a) doesn't work with ASCII arts like
/graphics/alternative-ascii.html, (b) doesn't expand
"<!--#include file=..."); use configuration time variables
for awk and sed.
(TMP3): eliminate variable
* validate-html-notify.in: use gnun-validate-html from @address@hidden
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/ChangeLog?cvsroot=trans-coord&r1=1.191&r2=1.192
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/Makefile.am?cvsroot=trans-coord&r1=1.17&r2=1.18
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/NEWS?cvsroot=trans-coord&r1=1.29&r2=1.30
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/gnun-validate-html.in?cvsroot=trans-coord&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/validate-html-notify.in?cvsroot=trans-coord&r1=1.6&r2=1.7
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/ChangeLog,v
retrieving revision 1.191
retrieving revision 1.192
diff -u -b -r1.191 -r1.192
--- ChangeLog 10 Jul 2011 16:02:16 -0000 1.191
+++ ChangeLog 21 Aug 2011 13:04:12 -0000 1.192
@@ -1,3 +1,16 @@
+2011-08-21 Pavel Kharitonov <address@hidden>
+
+ * Makefile.am (edit): add @bindir@, @AWK@, @GREP@, @SED@
+ to the list of expanded variables.
+ (stamp-config.mk): fix VPATH builds.
+ * gnun-validate-html.in: use an awk script to expand SSIs (the old
+ method using m4 (a) doesn't work with ASCII arts like
+ /graphics/alternative-ascii.html, (b) doesn't expand
+ "<!--#include file=..."); use configuration time variables
+ for awk and sed.
+ (TMP3): eliminate variable
+ * validate-html-notify.in: use gnun-validate-html from @address@hidden
+
2011-07-10 Brett Smith <address@hidden>
* doc/web-trans.texi (Distribution Terms): new subsection ---
Index: Makefile.am
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/Makefile.am,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- Makefile.am 2 Aug 2010 13:54:11 -0000 1.17
+++ Makefile.am 21 Aug 2011 13:04:12 -0000 1.18
@@ -1,4 +1,4 @@
-# Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
# This file is part of GNUnited Nations.
@@ -48,10 +48,14 @@
-e 's|@address@hidden|$(PACKAGE_VERSION)|g' \
-e 's|@address@hidden|$(PACKAGE_BUGREPORT)|g' \
-e 's|@address@hidden|$(PACKAGE_URL)|g' \
+ -e 's|@address@hidden|$(bindir)|g' \
-e 's|@address@hidden|$(pkgdatadir)|g' \
-e 's|@address@hidden|$(prefix)|g' \
-e 's|@address@hidden|$(pkglibexecdir)|g' \
- -e 's|@address@hidden|$(M4)|g'
+ -e 's|@address@hidden|$(AWK)|g' \
+ -e 's|@address@hidden|$(GREP)|g' \
+ -e 's|@address@hidden|$(M4)|g' \
+ -e 's|@address@hidden|$(SED)|g'
gnun-validate-html validate-html-notify: Makefile
$(AM_V_at)rm -f $@ address@hidden
@@ -59,7 +63,7 @@
$(AM_V_at)chmod +x address@hidden
$(AM_V_at)mv address@hidden $@
-stamp-config.mk: $(srcdir)/config.mk
+stamp-config.mk: config.mk
$(AM_V_GEN)$(edit) $< >$<.tmp
$(AM_V_at)mv $<.tmp $<
$(AM_V_at)touch $@
Index: NEWS
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/NEWS,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- NEWS 21 Jan 2011 19:14:07 -0000 1.29
+++ NEWS 21 Aug 2011 13:04:12 -0000 1.30
@@ -25,6 +25,16 @@
For more details, see the manuals ('(gnun)Runtime Variables' and
'(web-trans)Mailing Lists') and/or the homepage.
+** Bugs fixed in 0.5.
+
+*** `gnun-validate-html' once again properly supports nested
+ SSI directives, including `virtual' and `file' type, absolute
+ and relative paths, with different quotes (CGI includes are
+ still unsupported).
+
+*** `validate-html-notify' uses gnun-validate-html from $(bindir)
+ rather than first found in $(PATH).
+
* Changes in GNUnited Nations 0.4 (2009-11-11)
** New script `gnun-clear-previous'.
Index: gnun-validate-html.in
===================================================================
RCS file:
/sources/trans-coord/trans-coord/gnun/server/gnun/gnun-validate-html.in,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- gnun-validate-html.in 7 Jan 2010 14:43:04 -0000 1.9
+++ gnun-validate-html.in 21 Aug 2011 13:04:12 -0000 1.10
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
# This file is part of GNUnited Nations.
@@ -20,7 +20,7 @@
function version () {
cat <<EOF
gnun-validate-html (@PACKAGE_NAME@) @PACKAGE_VERSION@
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2011 Free Software Foundation, Inc.
You may redistribute copies of @PACKAGE_NAME@
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
@@ -68,20 +68,61 @@
# Create two tempfiles and mark them for deletion on exit.
TMP1=`mktemp -t gnun.1.XXXXXX`
TMP2=`mktemp -t gnun.2.XXXXXX`
-TMP3=`mktemp -t gnun.3.XXXXXX`
-trap "rm -f $TMP1 $TMP2 $TMP3" EXIT
+trap "rm -f $TMP1 $TMP2" EXIT
# Expand input file's #include directives and save the result in
# $TMP1.
-cat $1 > $TMP1
+cat > $TMP2 <<"EOF"
+# Limitations: CGI includes would be expanded in a wrong way
+BEGIN {
+ relative_dir_name = ARGV[1];
+ sub (/[^\/]*$/, "", relative_dir_name);
+ sub (/\/*$/, "/", relative_dir_name);
+}
+
+/<!--#include +(virtual)|(file)=["`']/ {
+ n = split ($0, names, "<!--#include ");
+ printf ("%s", names[1]);
+ for (i = 2; i <= n; i++)
+ {
+ # Extract the next included file name
+ if (names[i] !~ /^ *(virtual)|(file)=["'`]/)
+ {
+ # Pass it unchanged: this is not an Apache include directive
+ printf ("<!--#include %s", names[i]);
+ continue;
+ }
+ m = index (names[i], "-->");
+ if (m == 0) # This shouldn't happen: the "-->" must be on the same line
+ m = length (names[i]) + 1;
+ name = substr (names[i], 1, m-1);
+ # Absolute paths are not allowed with "file=" type of includes,
+ # but we process them in the same way for simplicity
+ sub (/^ *((virtual)|(file))=/, "", name);
+ quote_symbol = substr (name, 1, 1);
+ name = substr (name, 2);
+ sub (quote_symbol "[^" quote_symbol "]*$", "", name);
+
+ # Construct the real path to the file
+ if (name ~ /^\//)
+ name = root name;
+ else
+ name = relative_dir_name name;
+
+ # Invoke the script recursively
+ system ("@AWK@ -v script_name='" script_name "' -v root='" \
+ root "' -f '" script_name "' " name);
+
+ # Output the part remaining after the include directive
+ print (substr (names[i], m + 3));
+ }
+ next;
+}
+
+{ print; }
+EOF
-while true; do
- grep --quiet '<!--#include virtual' $TMP1 || break
- sed --in-place \
- "s/<\!--#include virtual=\"\/\?\(.*\)\" -->/m4_include(\`\1')/g" $TMP1
- @M4@ -P -EE -I $ROOT $TMP1 > $TMP3
- cp $TMP3 $TMP1
-done
address@hidden@ -v script_name=$TMP2 -v root="$ROOT" -f $TMP2 $1 > $TMP1
# Execute xmllint on $TMP1 and save its output to $TMP2.
set +o pipefail
@@ -97,7 +138,7 @@
# mentioned lines, since xmllint runs on intermediate input file (with
# expanded #include directives) and the translator can not easily look
# up for references in it.
-cat $TMP2 | sed '
+cat $TMP2 | @SED@ '
/line [[:digit:]]\+/ {
p
s=^.*line \([[:digit:]]\+\).*$=head -n \1 '"$TMP1"' | tail -n 1=
Index: validate-html-notify.in
===================================================================
RCS file:
/sources/trans-coord/trans-coord/gnun/server/gnun/validate-html-notify.in,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- validate-html-notify.in 7 Jan 2010 14:43:04 -0000 1.6
+++ validate-html-notify.in 21 Aug 2011 13:04:12 -0000 1.7
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
# This file is part of GNUnited Nations.
@@ -49,4 +49,5 @@
SUBJ="[GNUN Error] ${FILE#../../} is not valid XHTML"
address@hidden@/mailfail $DRY_RUN "$RCPT" "$SUBJ" gnun-validate-html "$FILE"
address@hidden@/mailfail $DRY_RUN "$RCPT" "$SUBJ" \
+ @bindir@/gnun-validate-html "$FILE"
- trans-coord/gnun/server/gnun ChangeLog Makefile...,
Pavel Kharitonov <=