[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Error handling
From: |
Yavor Doganov |
Subject: |
Re: Error handling |
Date: |
Tue, 04 Mar 2008 16:14:30 +0200 |
On чт, 2008-02-28 at 14:22 +0200, Yavor Doganov wrote:
> On ср, 2008-02-20 at 17:07 +0200, Yavor Doganov wrote:
> > On вт, 2008-02-12 at 23:35 +0200, Yavor Doganov wrote:
> > > a) Error handling.
>
> Next step: errors from make-prototype.
Here is a patch combining this and step 3 (errors from PO files). There
will be some "complaints" for the bogus PO files we have, but I'll "fix"
them afterwards.
As a side note -- I think there's a certain flaw in the way the check-po
command is run. It shouldn't be in the rules that update the PO files,
but in the rules that generate .LANG.html.
--- GNUmakefile 27 Feb 2008 10:49:30 -0000 1.3
+++ GNUmakefile 4 Mar 2008 14:06:20 -0000
@@ -129,7 +129,15 @@
# The command to check the validity of a PO file.
define check-po
-$(VALIDATESKIP) $(MSGFMT) --check --verbose --output-file=/dev/null $$@
+./mailfail $(NOTIFYSKIP) $(transl_addr) \
+ "[GNUN Error] $$(subst $$(rootdir),,$$@) is not a valid PO file" \
+ $(VALIDATESKIP) $(MSGFMT) --check --verbose --output-file=/dev/null $$@
+endef
+
+# The command to mail errors from make-prototype.
+define prototype-error
+./mailfail $(NOTIFYSKIP) $(web_addr),$(devel_addr) \
+ "[GNUN Error] Incompatible change in $(subst $(rootdir),,$<)"
endef
# Ensure that generic.LANG.html is always present for the homepage and
@@ -185,12 +193,13 @@
### Specific rules for the homepages ###
$(rootdir)/po/home.proto: $(rootdir)/home.shtml
-# Delete the target if the script exits with a non-zero status
-# in order to prevent further messing up in the chain. For
-# extra safety, exit with an error so that make does not
-# proceed to the next command.
+# Delete the target if the script exits with a non-zero status in
+# order to prevent further messing up in the chain. For extra safety,
+# exit with an error so that make does not proceed to the next
+# command.
$(VALIDATESKIP) $(VALIDATE-HTML-NOTIFY) $(NOTIFYSKIP) $(web_addr) $<
- $(MAKE-PROTOTYPE) --home --input=$< --generic=generic.html --output=$@
|| ($(RM) $@ ; exit 1)
+ $(prototype-error) $(MAKE-PROTOTYPE) --home --input=$< \
+ --generic=generic.html --output=$@ || ($(RM) $@ ; exit 1)
$(SED) --in-place "s/\$$Date.*\$$/<gnun>\0<\/gnun>/g" $@
$(rootdir)/po/home.pot: $(rootdir)/po/home.proto
@@ -239,8 +248,10 @@
define article_pot_rules
$(1).proto $(1).translinks: $(subst /po/,/,$(1).html)
$(VALIDATESKIP) $(VALIDATE-HTML-NOTIFY) $(NOTIFYSKIP) $(transl_addr) $$<
- $(MAKE-PROTOTYPE) --input=$$< --generic=generic.html
--output=$(1).proto --translinks=$(1).translinks || \
- ($(RM) $(1).proto $(1).translinks ; exit 1)
+ $$(prototype-error) $(MAKE-PROTOTYPE) --input=$$< \
+ --generic=generic.html --output=$(1).proto \
+ --translinks=$(1).translinks \
+ || ($(RM) $(1).proto $(1).translinks ; exit 1)
$(SED) --in-place "s/\$$$$Date.*\$$$$/<gnun>\0<\/gnun>/g" $(1).proto
$(1).pot: $(1).proto
- Re: Error handling,
Yavor Doganov <=