| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
gb_Pagein__is_library = $(filter $(1),$(gb_Library_KNOWNLIBS)) |
| 11 |
|
| 12 |
gb_Pagein__make_library_path = $(call gb_Library_get_runtime_filename,$(1)) |
| 13 |
|
| 14 |
gb_Pagein__make_path = \ |
| 15 |
$(if $(call gb_Pagein__is_library,$(1)),$(call gb_Pagein__make_library_path,$(1)),$(1)) |
| 16 |
|
| 17 |
gb_Pagein__get_install_target = $(INSTROOT)/$(LIBO_BIN_FOLDER)/pagein-$(1) |
| 18 |
|
| 19 |
define gb_Pagein__command |
| 20 |
$(call gb_Helper_abbreviate_dirs,\ |
| 21 |
mkdir -p $(dir $(1)) && rm -f $(1) \ |
| 22 |
&& touch $(1) \ |
| 23 |
$(foreach object,$(OBJECTS),&& echo $(call gb_Pagein__make_path,$(object)) >> $(1))) |
| 24 |
|
| 25 |
endef |
| 26 |
|
| 27 |
.PHONY : $(call gb_Pagein_get_clean_target,%) |
| 28 |
$(call gb_Pagein_get_clean_target,%) : |
| 29 |
$(call gb_Output_announce,$*,$(false),PAG,5) |
| 30 |
$(call gb_Helper_abbreviate_dirs,\ |
| 31 |
rm -f $(call gb_Pagein__get_install_target,$*) $(call gb_Pagein_get_target,$*)) |
| 32 |
|
| 33 |
$(call gb_Pagein_get_target,%) : |
| 34 |
$(call gb_Output_announce,$*,$(true),PAG,5) |
| 35 |
$(call gb_Trace_StartRange,$*,PAG) |
| 36 |
$(call gb_Pagein__command,$@,$*,$^) |
| 37 |
$(call gb_Trace_EndRange,$*,PAG) |
| 38 |
|
| 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_install_target,$(1)),$(call gb_Pagein_get_clean_target,$(1)))) |
| 43 |
$(call gb_Helper_make_userfriendly_targets,$(1),Pagein,$(call gb_Pagein_get_target,$(1))) |
| 44 |
|
| 45 |
$(call gb_Helper_install_final, \ |
| 46 |
$(call gb_Pagein__get_install_target,$(1)), \ |
| 47 |
$(call gb_Pagein_get_target,$(1))) |
| 48 |
|
| 49 |
endef |
| 50 |
|
| 51 |
define gb_Pagein_add_object |
| 52 |
$(call gb_Pagein_get_target,$(1)) : OBJECTS += $(filter-out $(gb_MERGEDLIBS),$(2)) |
| 53 |
|
| 54 |
endef |
| 55 |
|
| 56 |
define gb_Pagein_add_objects |
| 57 |
$(foreach object,$(2),$(call gb_Pagein_add_object,$(1),$(object))) |
| 58 |
|
| 59 |
endef |
| 60 |
|
| 61 |
|