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_mo
58 @echo
"$(patsubst $(INSTDIR)/%,%,$(call gb_MoTarget_get_install_target,$(shell $(SRCDIR)/solenv/bin/localestr $(2))/LC_MESSAGES/$(1)))" >> $(gb_PackageInfo_get_target
)/l10n-
$(2).files
62 define gb_PackageInfo_emit_l10n_for_one_configfile
63 echo
"$(LIBO_SHARE_FOLDER)/registry/$(2)$(1).xcd" >> $(gb_PackageInfo_get_target
)/l10n-
$(1).files
67 define gb_PackageInfo_emit_l10n_for_one_lang
68 @touch
$(foreach suf
,executables libraries files
,$(gb_PackageInfo_get_target
)/l10n-
$(1).
$(suf
))
69 $(if
$(filter-out qtz en-US
,$(1)),$(foreach packagedir
,$(patsubst %/,%,$(gb_AllLangPackage_ALLDIRS
)),$(call gb_PackageInfo_emit_l10n_for_one_alllangpackage
,$(packagedir
),$(1))))
70 $(if
$(filter $(gb_AllLangMoTarget_LANGS
),$(1)),$(foreach target
,$(gb_AllLangMoTarget_REGISTERED
),$(call gb_PackageInfo_emit_l10n_for_one_mo
,$(target
),$(1))))
71 $(if
$(filter $(gb_Configuration_LANGS
),$(1)),$(foreach configfile
,Langpack- res
/fcfg_langpack_ res
/registry_
,$(call gb_PackageInfo_emit_l10n_for_one_configfile
,$(1),$(configfile
))))
72 $(if
$(filter $(gb_CJK_LANGS
),$(1)),$(foreach configfile
,cjk_
,$(call gb_PackageInfo_emit_l10n_for_one_configfile
,$(1),$(configfile
))))
73 $(if
$(filter $(gb_CTL_LANGS
),$(1)),$(foreach configfile
,ctl_
,$(call gb_PackageInfo_emit_l10n_for_one_configfile
,$(1),$(configfile
))))
74 $(if
$(filter $(gb_CTLSEQCHECK_LANGS
),$(1)),$(foreach configfile
,ctlseqcheck_
,$(call gb_PackageInfo_emit_l10n_for_one_configfile
,$(1),$(configfile
))))
75 @echo
"$(foreach suf,executables libraries files,$(gb_PackageInfo_get_target)/l10n-$(1).$(suf)) \\" >> $(WORKDIR
)/Dep
/packageinfo.d
79 -include $(WORKDIR
)/Dep
/packageinfo.d
80 $(foreach filelist
,files executables libraries
,$(gb_PackageInfo_get_target
)/%.
$(filelist
)):
81 @
rm -rf
$(gb_PackageInfo_get_target
) $(WORKDIR
)/Dep
/packageinfo.d
&& mkdir
$(gb_PackageInfo_get_target
)
82 $(foreach installmodule
,$(gb_PackageInfo_InstallModules
),$(call gb_PackageInfo_emit_binaries_command
,$(installmodule
)))
83 $(foreach helplang
,$(gb_HELP_LANGS
),$(call gb_PackageInfo_emit_help_for_one_lang
,$(helplang
)))
84 $(foreach l10nlang
,$(if
$(strip $(gb_WITH_LANG
)),$(gb_WITH_LANG
),en-US
),$(call gb_PackageInfo_emit_l10n_for_one_lang
,$(l10nlang
)))
85 @echo
"$(gb_PackageInfo_get_target)/packageinfo_all : $(filter-out $(WORKDIR)/Dep/%,$(MAKEFILE_LIST))" >> $(WORKDIR
)/Dep
/packageinfo.d
86 @touch
$(gb_PackageInfo_get_target
)/packageinfo_all
88 $(gb_PackageInfo_get_target
)/packageinfo_all
:
89 $(MAKE
) -f
$(firstword $(MAKEFILE_LIST
)) $(gb_PackageInfo_get_target
)/$(firstword $(gb_PackageInfo_InstallModules
)).files
92 packageinfo
: $(gb_PackageInfo_get_target
)/packageinfo_all
94 install-package-
%: $(gb_PackageInfo_get_target
)/packageinfo_all
95 for executable in
`cat $(gb_PackageInfo_get_target)/$*.executables`; \
97 install -D
$(INSTDIR
)/$${executable} $(INSTALLDIR
)/$${executable} ;\
99 for library in
`cat $(gb_PackageInfo_get_target)/$*.sdklinklibraries`; \
101 install -D
-m644
$(INSTDIR
)/$${library} $(INSTALLDIR
)/$${library}; \
103 for library in
`cat $(gb_PackageInfo_get_target)/$*.libraries`; \
105 install -D
-m644
$(INSTDIR
)/$${library} $(INSTALLDIR
)/$${library}; \
107 for jar in
`cat $(gb_PackageInfo_get_target)/$*.jars`; \
109 install -D
-m644
$(INSTDIR
)/$${jar} $(INSTALLDIR
)/$${jar}; \
111 for file in
`cat $(gb_PackageInfo_get_target)/$*.files`; \
113 install -D
-m644
$(INSTDIR
)/$${file} $(INSTALLDIR
)/$${file}; \
116 # vim: set noet sw=4 ts=4: