Bump version to 6.4.7.2.M8
[LibreOffice.git] / solenv / gbuild / Pagein.mk
blobec504d0a4609be6a4188251e393f0a4d736639a5
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_Pagein__is_library = $(filter $(1),$(gb_Library_KNOWNLIBS))
12 gb_Pagein__make_library_path = $(call gb_Library_get_runtime_filename,$(1))
14 gb_Pagein__make_path = \
15 $(if $(call gb_Pagein__is_library,$(1)),$(call gb_Pagein__make_library_path,$(1)),$(1))
17 gb_Pagein__get_install_target = $(INSTROOT)/$(LIBO_BIN_FOLDER)/pagein-$(1)
19 define gb_Pagein__command
20 $(call gb_Output_announce,$(2),$(true),PAG,5)
21 $(call gb_Helper_abbreviate_dirs,\
22 mkdir -p $(dir $(1)) && rm -f $(1) \
23 && touch $(1) \
24 $(foreach object,$(OBJECTS),&& echo $(call gb_Pagein__make_path,$(object)) >> $(1)))
26 endef
28 .PHONY : $(call gb_Pagein_get_clean_target,%)
29 $(call gb_Pagein_get_clean_target,%) :
30 $(call gb_Output_announce,$*,$(false),PAG,5)
31 $(call gb_Helper_abbreviate_dirs,\
32 rm -f $(call gb_Pagein__get_install_target,$*) $(call gb_Pagein_get_target,$*))
34 $(call gb_Pagein_get_target,%) :
35 $(call gb_Pagein__command,$@,$*,$^)
37 define gb_Pagein_Pagein
38 $(call gb_Pagein_get_target,$(1)) : OBJECTS :=
39 $(call gb_Pagein_get_target,$(1)) : $(gb_Module_CURRENTMAKEFILE)
40 $$(eval $$(call gb_Module_register_target,Pagein_$(1),$(call gb_Pagein__get_install_target,$(1)),$(call gb_Pagein_get_clean_target,$(1))))
41 $(call gb_Helper_make_userfriendly_targets,$(1),Pagein,$(call gb_Pagein_get_target,$(1)))
43 $(call gb_Helper_install_final, \
44 $(call gb_Pagein__get_install_target,$(1)), \
45 $(call gb_Pagein_get_target,$(1)))
47 endef
49 define gb_Pagein_add_object
50 $(call gb_Pagein_get_target,$(1)) : OBJECTS += $(filter-out $(gb_MERGEDLIBS),$(2))
52 endef
54 define gb_Pagein_add_objects
55 $(foreach object,$(2),$(call gb_Pagein_add_object,$(1),$(object)))
57 endef
59 # vim: set ts=4 sw=4 noet: