[prev in list] [next in list] [prev in thread] [next in thread] 

List:       squid-cvs
Subject:    /bzr/squid3/trunk/ r9545: TestBed: Alter translation to work in more make
From:       Amos Jeffries <squid3 () treenet ! co ! nz>
Date:       2009-02-28 13:38:11
Message-ID: 20090228134505.86288.qmail () squid-cache ! org
[Download RAW message or body]

--===============0300078664==
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------
revno: 9545
committer: Amos Jeffries <squid3@treenet.co.nz>
branch nick: trunk
timestamp: Sun 2009-03-01 02:38:11 +1300
message:
  TestBed: Alter translation to work in more make targets
  
  This makes translation work in distcheck, uninstallcheck, and installcheck
  out-of-tree testing. Not just dist, all, and check.
  
  Also adds some clean failure for out-of-tree 'make all' translations.
  Automake seems to not have enough correct path info to perform translation
  when its run inside distcheck target.
  
  Re-add distcheck to Testbed requirements.
  
  TODO: verify through build slaves that its portable.
modified:
  errors/Makefile.am
  test-suite/buildtest.sh

--===============0300078664==
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; name="r9545.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

=== modified file 'errors/Makefile.am'
--- a/errors/Makefile.am	2009-02-27 15:25:31 +0000
+++ b/errors/Makefile.am	2009-02-28 13:38:11 +0000
@@ -82,15 +82,17 @@
 
 
 uninstall-local:
-	@ for l in $(LANGUAGES); do \
-		for f in $(srcdir)/$$l/ERR_*; do \
-	        	rm -f $(DESTDIR)$(DEFAULT_ERROR_DIR)/$$l/`basename $$f`; \
+	@ for l in $(LANGUAGES) templates; do \
+		for f in $(top_srcdir)/errors/$$l/ERR_*; do \
+	        	$(RM) $(DESTDIR)$(DEFAULT_ERROR_DIR)/$$l/`basename $$f`; \
 		done; \
 	done; \
-	for l in $(TRANSLATIONS) templates; do \
-	  if test -d $(srcdir)/$$l; then \
-		for f in $(srcdir)/$$l/ERR_*; do \
-	        	rm -f $(DESTDIR)$(DEFAULT_ERROR_DIR)/$$l/`basename $$f`; \
+	for l in $(TRANSLATIONS); do \
+	  if test -d $(srcdir)/errors/$$l; then \
+		for f in $(srcdir)/errors/$$l/ERR_*; do \
+			if test -f $(DESTDIR)$(DEFAULT_ERROR_DIR)/$$l/`basename $$f`; then \
+		        	$(RM) $(DESTDIR)$(DEFAULT_ERROR_DIR)/$$l/`basename $$f`; \
+			fi; \
 		done; \
 	  fi \
 	done;
@@ -122,7 +124,7 @@
 	fi \
 	fi
 
-dist-hook:
+dist-hook: translate
 	for lang in $(LANGUAGES) templates; do \
 	  if test -d $(srcdir)/$$lang ; then \
 		test -d $(distdir)/$$lang \
@@ -132,7 +134,6 @@
 		  || exit 1; \
 	  fi; \
 	done; \
-	$(MAKE) translate; \
 	for lang in $(TRANSLATIONS); do \
 	  if test -d $$lang ; then \
 		test -d $(distdir)/$$lang \
@@ -145,13 +146,17 @@
 	cp -p $(srcdir)/errorpage.css  $(distdir)/errorpage.css
 
 translate:
-	@ if test "$(PO2HTML)" != "" && test "$(PO2HTML)" != "no" && test "$(PO2HTML)" != \
"off"; then \ +	@if test -f $(top_srcdir)/errors/en.po; then \
+	  echo "Translation is not currently possible."; \
+	  exit 0; \
+	fi; \
+	if test "$(PO2HTML)" != "" && test "$(PO2HTML)" != "no" && test "$(PO2HTML)" != \
"off" && test -f $(top_srcdir)/errors/en.po; then \  for lang in $(TRANSLATIONS); do \
                \
-		test -d $$lang && rm -r $$lang; \
-		mkdir $$lang; \
+		test -d $(distdir)/$$lang && $(RM) -r $(distdir)/$$lang; \
+		mkdir $(distdir)/$$lang; \
 		echo -n "Translate '$$lang' ..."; \
-		for f in `ls -1 $(srcdir)/templates`; do \
-			$(PO2HTML) --progress=none -i $(srcdir)/$$lang.po -t $(srcdir)/templates/$$f \
>$$lang/$$f || exit 1; \ +		for f in `ls -1 $(top_srcdir)/errors/templates`; do \
+			$(PO2HTML) --progress=none -i $(top_srcdir)/errors/$$lang.po -t \
$(top_srcdir)/errors/templates/$$f >$(distdir)/$$lang/$$f || exit 1; \  done; \
 		echo "done."; \
 	  done; \
@@ -165,5 +170,4 @@
 	  echo "http://www.squid-cache.org/Versions/langpack/"; \
 	fi
 
-all:
-	$(MAKE) translate
+all: translate

=== modified file 'test-suite/buildtest.sh'
--- a/test-suite/buildtest.sh	2009-02-25 09:02:18 +0000
+++ b/test-suite/buildtest.sh	2009-02-28 13:38:11 +0000
@@ -39,7 +39,7 @@
 #
 rm -f -r src/fs/aufs/.deps src/fs/diskd/.deps &&
 	$base/../configure --silent ${OPTS} 2>&1 &&
-	make ${pjobs} check 2>&1 &&
+	make ${pjobs} distcheck 2>&1 &&
 	make ${pjobs} 2>&1
 
 # do not build any of the install's ...


--===============0300078664==--


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic