diff options
author | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2014-05-22 15:51:54 +0200 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2014-05-22 15:51:54 +0200 |
commit | faa9a681e730e5028c5fefa90938726ff9abe31d (patch) | |
tree | 236cae90ffced9592e8e65a0e919ffbcd3ffc8db /postprocess | |
parent | ed3fd76b65b2a281effea55b8a55101a8b740aec (diff) |
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
Diffstat (limited to 'postprocess')
-rw-r--r-- | postprocess/CustomTarget_registry.mk | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/postprocess/CustomTarget_registry.mk b/postprocess/CustomTarget_registry.mk index 1eb591ba3929..0bc71a98b730 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) |