1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 gb_PackageInfo_InstallModules
:= \
25 winexplorerextbinarytable \
27 define gb_PackageInfo_emit_binaries_command
28 @touch
$(foreach suf
,executables libraries files
,$(gb_PackageInfo_get_target
)/$(1).
$(suf
))
29 @
$(foreach executable
,$(gb_Executable_MODULE_
$(1)),echo
"$(patsubst $(INSTDIR)/%,%,$(call gb_Executable_get_target,$(executable)))" >> $(gb_PackageInfo_get_target
)/$(1).executables
&&) true
30 @
$(foreach library
,$(gb_SdkLinkLibrary_MODULE_
$(1)),echo
"sdk/lib/$(call gb_Library_get_linktarget,$(library))" >> $(gb_PackageInfo_get_target
)/$(1).sdklinklibraries
&&) true
31 @
$(foreach library
,$(gb_Library_MODULE_
$(1)),echo
"$(patsubst $(INSTDIR)/%,%,$(call gb_Library_get_target,$(library)))" >> $(gb_PackageInfo_get_target
)/$(1).libraries
&&) true
32 @
$(foreach jar
,$(gb_Jar_MODULE_
$(1)),echo
"$(patsubst $(INSTDIR)/%,%,$(call gb_Jar_get_target,$(jar)))" >> $(gb_PackageInfo_get_target
)/$(1).jars
&&) true
33 @
$(foreach pkg
,$(gb_Package_MODULE_
$(1)),echo
"$(call gb_Package_get_target,$(pkg))" >> $(gb_PackageInfo_get_target
)/$(1).packages
&&) true
34 @echo
"$(foreach suf,executables libraries files,$(gb_PackageInfo_get_target)/$(1).$(suf)) \\" >> $(WORKDIR
)/Dep
/packageinfo.d
38 define gb_PackageInfo_emit_help_for_one_target
39 $(foreach suf
,cfg db ht idxl
/_0.cfs idxl
/segments_3 idxl
/segments.gen jar key tree
,$(if
$(wildcard $(INSTDIR
)/help
/$(1).
$(suf
)),echo
"help/$(1).$(suf)" >> $(2) && )) true
43 define gb_PackageInfo_emit_help_for_one_lang
44 @touch
$(foreach suf
,executables libraries files
,$(gb_PackageInfo_get_target
)/help-
$(1).
$(suf
))
45 $(foreach target
,$(gb_AllLangHelp_ALLTARGETS
),$(call gb_PackageInfo_emit_help_for_one_target
,$(1)/$(target
),$(gb_PackageInfo_get_target
)/help-
$(1).files
))
46 $(foreach suf
,html css
,$(foreach file
,$(wildcard $(INSTDIR
)/help
/$(1)/*.
$(suf
)),echo
"$(patsubst $(INSTDIR)/%,%,$(file))" >> $(gb_PackageInfo_get_target
)/help-
$(1).files
&& )) true
47 @echo
" $(foreach suf,executables libraries files,$(gb_PackageInfo_get_target)/help-$(1).$(suf)) \\" >> $(WORKDIR
)/Dep
/packageinfo.d
51 #getting the package files post-hoc with wildcard is not good and should be done better
52 define gb_PackageInfo_emit_l10n_for_one_alllangpackage
53 @
$(foreach file
,$(shell ls
$(INSTDIR
)/$(1)/$(2)),echo
"$(1)/$(2)/$(file)" >> $(gb_PackageInfo_get_target
)/l10n-
$(2).files
&&) true
57 define gb_PackageInfo_emit_l10n_for_one_ressource
58 @echo
"$(patsubst $(INSTDIR)/%,%,$(call gb_ResTarget_get_install_target,$(1)$(2)))" >> $(gb_PackageInfo_get_target
)/l10n-
$(2).files
62 define gb_PackageInfo_emit_l10n_for_one_uizip
63 @echo
"$(gb_UIConfig_INSTDIR)/$(2)/ui/res/$(1).zip" >> $(gb_PackageInfo_get_target
)/l10n-
$(1).files
67 define gb_PackageInfo_emit_l10n_for_one_configfile
68 echo
"$(LIBO_SHARE_FOLDER)/registry/$(2)$(1).xcd" >> $(gb_PackageInfo_get_target
)/l10n-
$(1).files
72 define gb_PackageInfo_emit_l10n_for_one_lang
73 @touch
$(foreach suf
,executables libraries files
,$(gb_PackageInfo_get_target
)/l10n-
$(1).
$(suf
))
74 $(if
$(filter-out qtz en-US
,$(1)),$(foreach packagedir
,$(patsubst %/,%,$(gb_AllLangPackage_ALLDIRS
)),$(call gb_PackageInfo_emit_l10n_for_one_alllangpackage
,$(packagedir
),$(1))))
75 $(if
$(filter $(gb_AllLangResTarget_LANGS
),$(1)),$(foreach target
,$(gb_AllLangResTarget_ALLTARGETS
),$(call gb_PackageInfo_emit_l10n_for_one_ressource
,$(target
),$(1))))
77 $(sort $(foreach uifile
,$(gb_UIConfig_ALLFILES
),$(firstword $(subst :,$(WHITESPACE
),$(uifile
))))),\
78 $(call gb_PackageInfo_emit_l10n_for_one_uizip
,$(1),$(uizip
)))
79 $(if
$(filter $(gb_Configuration_LANGS
),$(1)),$(foreach configfile
,Langpack- res
/fcfg_langpack_ res
/registry_
,$(call gb_PackageInfo_emit_l10n_for_one_configfile
,$(1),$(configfile
))))
80 @echo
"$(foreach suf,executables libraries files,$(gb_PackageInfo_get_target)/l10n-$(1).$(suf)) \\" >> $(WORKDIR
)/Dep
/packageinfo.d
84 -include $(WORKDIR
)/Dep
/packageinfo.d
85 $(foreach filelist
,files executables libraries
,$(gb_PackageInfo_get_target
)/%.
$(filelist
)):
86 @
rm -rf
$(gb_PackageInfo_get_target
) $(WORKDIR
)/Dep
/packageinfo.d
&& mkdir
$(gb_PackageInfo_get_target
)
87 $(foreach installmodule
,$(gb_PackageInfo_InstallModules
),$(call gb_PackageInfo_emit_binaries_command
,$(installmodule
)))
88 $(foreach helplang
,$(gb_HELP_LANGS
),$(call gb_PackageInfo_emit_help_for_one_lang
,$(helplang
)))
89 $(foreach l10nlang
,$(if
$(strip $(gb_WITH_LANG
)),$(gb_WITH_LANG
),en-US
),$(call gb_PackageInfo_emit_l10n_for_one_lang
,$(l10nlang
)))
90 @echo
"$(gb_PackageInfo_get_target)/packageinfo_all : $(filter-out $(WORKDIR)/Dep/%,$(MAKEFILE_LIST))" >> $(WORKDIR
)/Dep
/packageinfo.d
91 @touch
$(gb_PackageInfo_get_target
)/packageinfo_all
93 $(gb_PackageInfo_get_target
)/packageinfo_all
:
94 $(MAKE
) -f
$(firstword $(MAKEFILE_LIST
)) $(gb_PackageInfo_get_target
)/$(firstword $(gb_PackageInfo_InstallModules
)).files
97 packageinfo
: $(gb_PackageInfo_get_target
)/packageinfo_all
99 install-package-
%: $(gb_PackageInfo_get_target
)/packageinfo_all
100 for executable in
`cat $(gb_PackageInfo_get_target)/$*.executables`; \
102 install -D
$(INSTDIR
)/$${executable} $(INSTALLDIR
)/$${executable} ;\
104 for library in
`cat $(gb_PackageInfo_get_target)/$*.sdklinklibraries`; \
106 install -D
-m644
$(INSTDIR
)/$${library} $(INSTALLDIR
)/$${library}; \
108 for library in
`cat $(gb_PackageInfo_get_target)/$*.libraries`; \
110 install -D
-m644
$(INSTDIR
)/$${library} $(INSTALLDIR
)/$${library}; \
112 for jar in
`cat $(gb_PackageInfo_get_target)/$*.jars`; \
114 install -D
-m644
$(INSTDIR
)/$${jar} $(INSTALLDIR
)/$${jar}; \
116 for file in
`cat $(gb_PackageInfo_get_target)/$*.files`; \
118 install -D
-m644
$(INSTDIR
)/$${file} $(INSTALLDIR
)/$${file}; \
121 # vim: set noet sw=4 ts=4: