[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - postprocess/CustomTarget_registry.mk

Christian Lohmaier lohmaier+LibreOffice at googlemail.com
Thu May 22 06:56:08 PDT 2014


 postprocess/CustomTarget_registry.mk |   35 ++++++++++++++++++-----------------
 1 file changed, 18 insertions(+), 17 deletions(-)

New commits:
commit 754160755adb071f432898978c487aec9c87177d
Author: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Date:   Thu May 22 15:51:54 2014 +0200

    using xargs for string manipulation is somewhat of an abuse
    
    (and breaks the build on windows/cygwin for some reason, although
    running the find/xargs command by itself works just fine)
    So just use awk instead and have a nicer solution without breaking the
    build
    
    Change-Id: I24b9f52c0b84c2e8019f3f6719a307fe508fb755
    (cherry picked from commit faa9a681e730e5028c5fefa90938726ff9abe31d)

diff --git a/postprocess/CustomTarget_registry.mk b/postprocess/CustomTarget_registry.mk
index 1eb591b..0bc71a9 100644
--- a/postprocess/CustomTarget_registry.mk
+++ b/postprocess/CustomTarget_registry.mk
@@ -595,27 +595,28 @@ $(call gb_CustomTarget_get_workdir,postprocess/registry)/Langpack-%.list :
 # find shell command below (see issue 110041):
 $(call gb_CustomTarget_get_workdir,postprocess/registry)/fcfg_langpack_%.list :
 	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,2)
-	$(call gb_Helper_abbreviate_dirs, \
-		echo '<list>' > $@ \
-		&& ( find $(call gb_XcuResTarget_get_target,fcfg_langpack/$*/) -name *.xcu -size +0c -print0 | xargs -n1 -0 -I '{}' echo '<filename>{}</filename>') >> $@ \
-		&& echo '</list>' >> $@ \
+	$(call gb_Helper_abbreviate_dirs,\
+	    find $(call gb_XcuResTarget_get_target,fcfg_langpack/$*/)\
+	         -name *.xcu -size +0c \
+	        | awk 'BEGIN{print "<list>"} \
+	                    {print "<filename>"$$0"</filename>"} \
+	               END  {print "</list>"}' > $@ \
 	)
 
 $(call gb_CustomTarget_get_workdir,postprocess/registry)/registry_%.list :
 	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,2)
-	echo '<list>' > $@ \
-	&& $(call gb_Helper_abbreviate_dirs, \
-		(find $(call gb_XcuResTarget_get_target,registry/$*/) -name *.xcu -print0 | xargs -n1 -0 -I '{}' echo '<filename>{}</filename>') >> $@ \
-		$(if $(filter DBCONNECTIVITY,$(BUILD_TYPE)),\
-			$(foreach driver,$(postprocess_DRIVERS), \
-				&& (find $(call gb_XcuResTarget_get_target,$(driver)/$*/) -name *.xcu -print0 | xargs -n1 -0 -I '{}' echo '<filename>{}</filename>') >> $@ \
-			) \
-		) \
-		$(if $(filter TRUE,$(ENABLE_ONLINE_UPDATE)),\
-			&& (find $(call gb_XcuResTarget_get_target,updchk/$*/) -name *.xcu -print0 | xargs -n1 -0 -I '{}' echo '<filename>{}</filename>') >> $@ \
-		) \
-	) \
-	&& echo '</list>' >> $@
+	$(call gb_Helper_abbreviate_dirs,\
+	    find $(call gb_XcuResTarget_get_target,registry/$*/)\
+	         $(if $(filter DBCONNECTIVITY,$(BUILD_TYPE)),\
+	             $(foreach driver,$(postprocess_DRIVERS),\
+	                 $(call gb_XcuResTarget_get_target,$(driver)/$*/)))\
+	         $(if $(filter TRUE,$(ENABLE_ONLINE_UPDATE)),\
+	             $(call gb_XcuResTarget_get_target,updchk/$*/))\
+	         -name *.xcu \
+	        | awk 'BEGIN{print "<list>"} \
+	                    {print "<filename>"$$0"</filename>"} \
+	               END  {print "</list>"}' > $@ \
+	)
 
 $(call gb_CustomTarget_get_workdir,postprocess/registry)/%.list :
 	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,2)


More information about the Libreoffice-commits mailing list