[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[patch] utilities/dbootstrap/po/Makefile gawk bug



Let's play a boot-floopies developer game:

1) remove gawk from your machine
  (try something like:
	 apt-get remove gawk
  )

2) forget what you have done in step 1). Please do.

3) cd into a cleaned boot-floppies directory

4) type:
	make uni-docs

5) ...and finally lose a few hours like me trying to understand the SGML
  errors (?) you will get. Argh.

With the attached patch below, I would have spent only 2 seconds.

Note: I have also replaced "gawk" by "awk" in the same patch, since I did
not find anything needing the full gawk in the very short genc.awk code used
(some awk expert please check this). Moreover, this seems to be the only
place in this boot-floopies package where gawk is (was?) used.

Note: shouldn't some debian dependancy mechanism automagically install gawk
when doing " apt-get source boot-floopies " ?

Cheers,

Marc.

PS: and now I finally can work on this "initrd" debian install
documentation I want to write.

-- 
Never believe anything until it has been officially denied.
-- Claud Cockburn (1904-1981)
*** utilities/dbootstrap/po/Makefile	2002/06/29 09:18:30	1.1
--- utilities/dbootstrap/po/Makefile	2002/06/30 19:45:34
***************
*** 60,66 ****
  	./finduntranslated.pl $$lang.po
  
  C.po: $(PACKAGE).pot genc.awk
! 	gawk -f genc.awk < $(PACKAGE).pot | \
          sed \
              -e "s/PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE/PO-Revision-Date: `date -R`/" \
              -e "s/Last-Translator: FULL NAME <EMAIL@ADDRESS>/Last-Translator: Automagic/" \
--- 60,66 ----
  	./finduntranslated.pl $$lang.po
  
  C.po: $(PACKAGE).pot genc.awk
! 	{ awk -f genc.awk < $(PACKAGE).pot || printf "E" >$@.awkerror; } | \
          sed \
              -e "s/PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE/PO-Revision-Date: `date -R`/" \
              -e "s/Last-Translator: FULL NAME <EMAIL@ADDRESS>/Last-Translator: Automagic/" \
***************
*** 68,73 ****
--- 68,76 ----
              -e "s/Content-Type: text\/plain; charset=CHARSET/Content-Type: text\/plain; charset=us-ascii/" \
              -e "s/Content-Transfer-Encoding: ENCODING/Content-Transfer-Encoding: 7bit/" \
          > $@
+ # using pipelines in makefile is really not convenient; catching
+ # errors in commands except the last one is clumsy like this:
+ 	if [ -e $@.awkerror ]; then rm -f $@.awkerror; exit 13; fi
  
  utf/en.po: C.po
  	cp $< $@

Reply to: