components/python/pycountry/Makefile
branchs11-update
changeset 3070 cee982b2aa7b
parent 2881 8cae3c148a42
child 1948 2d1537e7942d
--- a/components/python/pycountry/Makefile	Wed Apr 09 16:25:45 2014 -0700
+++ b/components/python/pycountry/Makefile	Thu Apr 10 14:04:25 2014 -0700
@@ -18,7 +18,7 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
 #
 include ../../../make-rules/shared-macros.mk
 
@@ -39,13 +39,13 @@
 ASLR_MODE = $(ASLR_NOT_APPLICABLE)
 
 # Regenerate the message object (mo) files for the patched 
-# iso3166 (country) translations.
+# iso3166 (country) and iso3166-2 (country subdivisions) translations.
 COMPONENT_PRE_BUILD_ACTION = \
 	cd $(SOURCE_DIR)/src/$(COMPONENT_NAME)/locales; \
-	for pofile in */LC_MESSAGES/iso3166.po; \
+	for pofile in */LC_MESSAGES/iso3166.po \
+	              */LC_MESSAGES/iso3166_2.po ; \
 	do \
-		dir=`dirname $$pofile`; \
-		mofile=$$dir/iso3166.mo; \
+		mofile=`echo $$pofile | $(GSED) -e 's/\.po$$/\.mo/'` ; \
 		/bin/rm -f $$mofile; \
 		gmsgfmt $$pofile -o $$mofile; \
 	done