bump product version to 4.1.6.2
[LibreOffice.git] / solenv / gbuild / Pagein.mk
blobc5200b002264b54c7c03f0f3fb574e91fba19188
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_UREPATH := ../ure-link/lib/
12 gb_Pagein__is_library = $(filter $(1),$(gb_Library_KNOWNLIBS))
14 gb_Pagein__get_libdir = $(if $(filter URELIB,$(call gb_Library_get_layer,$(1))),$(call gb_Pagein_UREPATH))
16 gb_Pagein__make_library_path = $(call gb_Pagein__get_libdir,$(1))$(call gb_Library_get_runtime_filename,$(1))
18 gb_Pagein__make_path = \
19 $(if $(call gb_Pagein__is_library,$(1)),$(call gb_Pagein__make_library_path,$(1)),$(1))
21 define gb_Pagein__command
22 $(call gb_Output_announce,$(2),$(true),PAG,5)
23 $(call gb_Helper_abbreviate_dirs,\
24 mkdir -p $(dir $(1)) && rm -f $(1) \
25 && touch $(1) \
26 $(foreach object,$(OBJECTS),&& echo $(call gb_Pagein__make_path,$(object)) >> $(1)))
28 endef
30 .PHONY : $(call gb_Pagein_get_clean_target,%)
31 $(call gb_Pagein_get_clean_target,%) :
32 $(call gb_Output_announce,$*,$(false),PAG,5)
33 $(call gb_Helper_abbreviate_dirs,\
34 rm -f $(call gb_Pagein_get_target,$*) $(call gb_Pagein_get_outdir_target,$*))
36 $(call gb_Pagein_get_target,%) :
37 $(call gb_Pagein__command,$@,$*,$^)
39 define gb_Pagein_Pagein
40 $(call gb_Pagein_get_target,$(1)) : OBJECTS :=
41 $(call gb_Pagein_get_target,$(1)) : $(gb_Module_CURRENTMAKEFILE)
42 $$(eval $$(call gb_Module_register_target,$(call gb_Pagein_get_outdir_target,$(1)),$(call gb_Pagein_get_clean_target,$(1))))
43 $(call gb_Helper_make_userfriendly_targets,$(1),Pagein,$(call gb_Pagein_get_outdir_target,$(1)))
44 $(call gb_Deliver_add_deliverable,$(call gb_Pagein_get_outdir_target,$(1)),$(call gb_Pagein_get_target,$(1)),$(1))
45 $(call gb_Pagein_get_outdir_target,$(1)) : $(call gb_Pagein_get_target,$(1))
46 $(call gb_Pagein_get_outdir_target,$(1)) :| $(dir $(call gb_Pagein_get_outdir_target,$(1))).dir
48 endef
50 define gb_Pagein_add_object
51 $(call gb_Pagein_get_target,$(1)) : OBJECTS += $(filter-out $(gb_URELIBS) $(gb_MERGEDLIBS),$(2))
53 endef
55 define gb_Pagein_add_objects
56 $(foreach object,$(2),$(call gb_Pagein_add_object,$(1),$(object)))
58 endef
60 # vim: set ts=4 sw=4 noet: