minor Makefile reorder and fix small typos in buildlog messages
authorjenda
Fri, 24 Sep 2010 17:44:44 +0200
changeset 116 54bc75ad88c9
parent 115 e6a10d95ac6f
child 117 fbb3551be55e
minor Makefile reorder and fix small typos in buildlog messages
Makefile
--- a/Makefile	Fri Sep 24 17:44:43 2010 +0200
+++ b/Makefile	Fri Sep 24 17:44:44 2010 +0200
@@ -165,7 +165,7 @@
 
 # little woo-doo: %pkg is hash of arrays, key is pkg_name, values are locales; 
 # ... look to the generated 'build/pkgs.d'
-build/pkgs.d: $(LOCALES:%=build/%/pkg_name)
+build/pkgs.d: $(LOCALES:%=build/%/pkg_name) build/.dir
 	$(M)GENERATE $@
 	$(Q)$(PERL) -e 'push @{$$pkg{substr(`cat $$_`,0,-1)}},m!build/(.*)/pkg_name! foreach (glob "build/*/pkg_name"); \
 		 print "PKGS ?= " . join(" ", keys %pkg) . "\n"; \
@@ -174,7 +174,7 @@
 		 print "build/$$_/manifest: " . join(" ", map { "build/$$_/manifest" } @{$$pkg{$$_}}) ."\n" foreach (keys %pkg); ' > $@
 
 
-build/cldr.d: $(LOCALES:%=build/%/cldr_variant)
+build/cldr.d: $(LOCALES:%=build/%/cldr_variant) build/.dir
 	$(M)GENERATE $@
 	$(Q)$(PERL) -e 'my %loc = map { m!build/(.*)/cldr_variant! => `cat $$_` =~ m!.*copy_ctype=([^,\n]*).*! } qw($^); \
 		print "build/$$k/posix.src: $$v\n" while(($$k,$$v) = each %loc); %loc = map { $$_ => m!\.([^@]*)! } keys %loc; \
@@ -231,16 +231,6 @@
 # ==== Other package files ====
 # *****************************
 
-# locale_description
-$(LOCALES:%=build/%/locale_description): build/%/locale_description: locale/%.spec $(CLDR_TOOLS_DEPS) build/%/cldr_variant build/.dtd_cache/.src
-	$(M)GENERATE $@
-	$(Q)(if [ -z "$(shell $(GNU_GREP) '^locale_desc' $< | cut -f2-)" ] ; then \
-			$(GEN_DESCRIPTION) build/cldr_core $(shell cat build/$*/cldr_variant); \
-			echo " ($(call charmap,$*))"; \
-		else \
-			echo "$(shell $(GNU_GREP) '^locale_desc' $<| cut -f2-)"; \
-		fi) > $@
-
 # prototype
 $(PKGS:%=build/%/prototype): build/%/prototype: build/%/.dir
 	$(M)GENERATE $@
@@ -278,14 +268,6 @@
 comma := ,
 
 
-$(LOCALES:%=build/%/pkg_name): build/%/pkg_name: locale/%.spec build/%/.dir
-	$(M)GENERATE $*/pkg_name
-	$(Q)echo "$(call spec_key,pkg_name,SUNWlang-$(firstword $(subst _, ,$*)))" >$@
-
-$(LOCALES:%=build/%/cldr_variant): build/%/cldr_variant: locale/%.spec build/%/.dir
-	$(M)GENERATE $*/cldr_variant
-	$(Q)echo "$(call cldr_variant,$(call spec_key,cldr_variant,$(call locale_xxYY,$*)))" > $@
-
 EXPAND_ENV = LOC=$* \
 	     MACH=$(MACH) \
 	     MACH64=$(MACH64) \
@@ -294,22 +276,38 @@
 	     LCTIME='$(call spec_key,lc_time,default)' \
 	     IS_SET_LC_MESSAGES='$(call spec_key_is_set,lc_messages)' \
 	     IS_SET_LC_TIME='$(call spec_key_is_set,lc_time)' 
-		
+	
+$(LOCALES:%=build/%/pkg_name): build/%/pkg_name: locale/%.spec build/%/.dir
+	$(M)GENERATE $@
+	$(Q)echo "$(call spec_key,pkg_name,SUNWlang-$(firstword $(subst _, ,$*)))" >$@
+
+$(LOCALES:%=build/%/cldr_variant): build/%/cldr_variant: locale/%.spec build/%/.dir
+	$(M)GENERATE $@
+	$(Q)echo "$(call cldr_variant,$(call spec_key,cldr_variant,$(call locale_xxYY,$*)))" > $@
 
 $(LOCALES:%=build/%/locale_map): build/%/locale_map: locale/%.spec build/%/.dir
-	$(M)GENERATE $*/locale_map
+	$(M)GENERATE $@
 	$(Q)for src in $(call spec_fkey,locale_map,default); do \
 		$(EXPAND_ENV) bash -c 'while read l; do eval "echo \"$$l\""; done' < $$src; \
 	done > $@
 
+$(LOCALES:%=build/%/locale_description): build/%/locale_description: locale/%.spec $(CLDR_TOOLS_DEPS) build/%/cldr_variant build/.dtd_cache/.src
+	$(M)GENERATE $@
+	$(Q)(if [ -z "$(shell $(GNU_GREP) '^locale_desc' $< | cut -f2-)" ] ; then \
+			$(GEN_DESCRIPTION) build/cldr_core $(shell cat build/$*/cldr_variant); \
+			echo " ($(call charmap,$*))"; \
+		else \
+			echo "$(shell $(GNU_GREP) '^locale_desc' $<| cut -f2-)"; \
+		fi) > $@
+
 $(LOCALES:%=build/%/prototype): build/%/prototype: locale/%.spec build/%/.dir
-	$(M)GENERATE $*/prototype
+	$(M)GENERATE $@
 	$(Q)for src in $(call spec_fkey,prototype,utf8); do \
 		$(EXPAND_ENV) bash -c 'while read l; do eval "echo \"$$l\""; done' < $$src; \
 	done > $@
 
 $(LOCALES:%=build/%/manifest): build/%/manifest: locale/%.spec build/%/.dir
-	$(M)GENERATE $*/manifest
+	$(M)GENERATE $@
 	$(Q)for src in $(call spec_fkey,manifest,header_lang utf8); do \
 		$(EXPAND_ENV) bash -c 'while read l; do eval "echo \"$$l\""; done' < $$src; \
 	done > $@
@@ -365,8 +363,6 @@
 
 
 
-
-
 # *********************************
 # ==== Compile the build tools ====
 # *********************************
@@ -375,7 +371,7 @@
 
 # xalan
 build/xalan/.src: downloads/$(XALAN_SOURCE)
-	$(M)UNPACK xalan
+	$(M)UNPACK $(@D)
 	$(Q)$(UNZIP) -u $(if $(Q),-q) -d $(@D) $<
 	$(Q)touch $@
 
@@ -390,7 +386,7 @@
 
 # icu4j
 build/icu4j/.unpack: downloads/$(ICU4J_SOURCE) 
-	$(M)UNPACK icu4j
+	$(M)UNPACK $(@D)
 	$(Q)$(UNZIP) -u $(if $(Q),-q) -d $(@D) $<
 	$(Q)touch $@
 
@@ -402,7 +398,7 @@
 	$(Q)touch $@
 
 build/icu4j/.compiled: build/icu4j/.src
-	$(M)COMPILE icu4j
+	$(M)COMPILE $(@D)
 	$(Q)cd $(@D); $(ANT) $(if $(Q),-q) jar cldrUtil
 	$(Q)touch $@
 
@@ -419,12 +415,12 @@
 
 # cldr_tools
 build/cldr_tools/.unpack: downloads/$(CLDR_TOOLS_SOURCE)
-	$(M)UNPACK cldr_tools
+	$(M)UNPACK $(@D)
 	$(Q)$(UNZIP) -u $(if $(Q),-q) -d $(@D) $<
 	$(Q)touch $@
 
 build/cldr_tools/.src: build/cldr_tools/.unpack misc/patches/cldr_tools/$(CLDR_VERSION)/*.patch
-	$(M)PATCH cldr_tools
+	$(M)PATCH $(@D)
 	$(Q)find $(@D) -type f -exec perl -pi -e 's,\r$$,,' {} \;
 	$(Q)for a in $(filter %.patch, $(sort $^)); do  \
 		(cd $(@D); $(GNU_PATCH) -p1 $(if $(Q),-s)) < $$a; \
@@ -432,7 +428,7 @@
 	$(Q)touch $@
 
 build/cldr_tools/.compiled: build/icu4j.jar build/utilities.jar build/xalan.jar build/xml-apis.jar build/cldr_tools/.src
-	$(M)COMPILE cldr_tools
+	$(M)COMPILE $(@D)
 	$(Q)cd $(@D)/tools/java; ICU4J_JAR=../../../icu4j.jar UTILITIES_JAR=../../../utilities.jar CLDR_JAR=../../../xalan.jar XML_APIS_JAR=../../../xml-apis.jar $(ANT) $(if $(Q),-q) jar
 	$(Q)touch $@
 
@@ -444,12 +440,12 @@
 
 # cldr_core
 build/cldr_core/.unpack: downloads/$(CLDR_CORE_SOURCE)
-	$(M)UNPACK cldr_core
+	$(M)UNPACK $(@D)
 	$(Q)$(UNZIP) -u $(if $(Q),-q) -d $(@D) $<
 	$(Q)touch $@
 
 build/cldr_core/.src: build/cldr_core/.unpack misc/patches/cldr_core/$(CLDR_VERSION)/*.patch
-	$(M)PATCH cldr_core
+	$(M)PATCH $(@D)
 	$(Q)find $(@D) -type f -exec perl -pi -e 's,\r$$,,' {} \;
 	$(Q)mv build/cldr_core/common/* build/cldr_core/
 	$(Q)for a in $(filter %.patch, $(sort $^)); do  \