Error on rebuild in Windows "cp: missing destination file operand after"

David Tardon dtardon at redhat.com
Tue Oct 16 04:16:12 PDT 2012


Hi,

On Tue, Oct 16, 2012 at 12:35:06PM +0200, Stephan Bergmann wrote:
> On 10/16/2012 11:59 AM, David Tardon wrote:
> >On Tue, Oct 16, 2012 at 11:38:28AM +0200, Stephan Bergmann wrote:
> >>On 10/16/2012 11:14 AM, d.ostrovsky at idaia.de wrote:
> >>>Quoting David Tardon <dtardon at redhat.com>:
> >>>>>Basically it seems that in the command:
> >>>>>"cp  $W/Extension/report-builder/root"
> >>>>>it's missing the first operand....
> >>>>>
> >>>>It is a use case that nobody has ever tried before, because en-US is the
> >>>>default language. The line comes from solenv/gbuild/ExtensionTarget.mk
> >>>>and the missing argument(s) is a list of files based on $(gb_WITH_LANG),
> >>>>but _without_ en-US. Since $(gb_WITH_LANG) contains _nothing but_ en-US
> >>>>in your case, there are no files to copy...
> >>>>
> >>>the easiest way to sort this out would be to add a check in configure.in
> >>>for that:
> >>>if --with-lang="en-US" then fail or unset WITH_LANG, right?
> >>
> >>No, the easiest thing should be to fix
> >>solenv/gbuild/ExtensionTarget.mk.  I understand that the other David
> >>is doing that.
> >
> >Maybe not the easiest, but the most correct :-)
> 
> Oh, I had assumed that
> 
> >diff --git a/solenv/gbuild/ExtensionTarget.mk b/solenv/gbuild/ExtensionTarget.mk
> >index 91f1be3..eb45785 100644
> >--- a/solenv/gbuild/ExtensionTarget.mk
> >+++ b/solenv/gbuild/ExtensionTarget.mk
> >@@ -112,7 +112,7 @@ $(call gb_ExtensionTarget_get_target,%) : \
> >                $(call gb_ExtensionTarget__subst_platform,$(call gb_ExtensionTarget_get_workdir,$*)/description.xml,$(call gb_ExtensionTar
> >                $(call gb_ExtensionTarget__subst_platform,$(LOCATION)/manifest.xml,$(call gb_ExtensionTarget_get_rootdir,$*)/META-INF/mani
> >                $(if $(LICENSE),cp -f $(LICENSE) $(call gb_ExtensionTarget_get_rootdir,$*)/registration &&) \
> >-               $(if $(and $(gb_WITH_LANG),$(DESCRIPTION)),cp $(foreach lang,$(gb_ExtensionTarget_TRANS_LANGS),$(call gb_ExtensionTarget_g
> >+               $(if $(and $(gb_ExtensionTarget_TRANS_LANGS),$(DESCRIPTION)),cp $(foreach lang,$(gb_ExtensionTarget_TRANS_LANGS),$(call gb
> >                cd $(call gb_ExtensionTarget_get_rootdir,$*) && \
> >                $(gb_ExtensionTarget_ZIPCOMMAND) -rX --filesync \
> >                        $(call gb_ExtensionTarget_get_target,$*) \
> 
> would be all that's needed?  But I'm likely missing something.

Yes, that is all what is needed for this particular problem. I just
assumed that there might be further problems :-) And I was right,
because we handle such situation differently in different places. gbuild
classes generally expect that WITH_LANG is empty in en-US-only build and
add deps on localize.sdf's if it is not. But translations are not built
if WITH_LANG=en-US, so the build fails anyway. So there are two
possibilities:

1. let --with-lang=en-US behave in the same way as if --with-lang
   was not used at all
2. let it behave as if any other single language was used--build
   translations, even if they are not needed, etc.

I could probably invent arguments for both ways, if I cared enough.
Because I do not, I am going to push option 1 (i.e., unset WITH_LANG, as
David suggested). If anyone disagrees, feel free to revert and change
configure.in and translations/Module_translations.mk the other way.

D.


More information about the LibreOffice mailing list