[interchange-cvs] interchange - jon modified Makefile.PL

interchange-core@interchange.redhat.com interchange-core@interchange.redhat.com
Thu Jun 20 11:27:00 2002


User:      jon
Date:      2002-06-20 15:26:22 GMT
Modified:  .        Makefile.PL
Log:
Dynamically look for available UI locales instead of using hardcoded list
for 'localefiles' make target.

Revision  Changes    Path
2.20      +8 -7      interchange/Makefile.PL


rev 2.20, prev_rev 2.19
Index: Makefile.PL
===================================================================
RCS file: /var/cvs/interchange/Makefile.PL,v
retrieving revision 2.19
retrieving revision 2.20
diff -u -u -r2.19 -r2.20
--- Makefile.PL	20 Jun 2002 14:41:54 -0000	2.19
+++ Makefile.PL	20 Jun 2002 15:26:22 -0000	2.20
@@ -732,15 +732,16 @@
 sub MY::postamble {
 	return <<'EOF';
 UIDIR=dist/lib/UI
-UILANGS=da_DK de_DE nl_NL sv_SE
+UILCDIR=$(UIDIR)/locales
 
 localefiles:
-	@for lang in $(UILANGS); do \
-        mv $(UIDIR)/locales/$$lang.cfg $(UIDIR)/locales/$$lang.cfg.old; \
-        cat $(UIDIR)/locales/default.cfg >> $(UIDIR)/locales/$$lang.cfg.old; \
-		if ! $(INSTALLBIN)/localize -n -m $(UIDIR)/locales/$$lang.cfg.old -u $(UIDIR) -l $$lang `find $(UIDIR) -type f -not -empty` > $(UIDIR)/locales/$$lang.cfg; then \
-		echo "Failed to generate locale file $(UIDIR)/locales/$$lang.cfg"; \
-		mv $(UIDIR)/locales/$$lang.cfg.old $(UIDIR)/locales/$$lang.cfg; \
+	@for langfile in $(UILCDIR)/*_*.cfg; do \
+		lang=`basename $$langfile .cfg`; \
+		mv $$langfile $$langfile.old; \
+		cat $(UILCDIR)/default.cfg >> $$langfile.old; \
+		if ! $(INSTALLBIN)/localize -n -m $$langfile.old -u $(UIDIR) -l $$lang `find $(UIDIR) -type f -not -empty` > $$langfile; then \
+		echo "Failed to generate locale file $$langfile"; \
+		mv $$langfile.old $$langfile; \
 		fi; \
 	done
 EOF