root_setup_paths_to_install – create real copies instead of links in build context directory for package files, configured for that.

Description

Method finds configured set of files in ROOT and replaces symbolic links from D to ROOT with real files. Then it edits their content, so that they will function properly in their new ROOT location.

Files are searched in directories, printed by get_installed_tracked_dirs(3). The set is chosen by file name templates, given in any_root_textbuild_files option and according root_TEXTBUILD_FILES engine variable. By default only .pc files are chosen to edit. Template for them is:

    \.pc$
Mind the escaped dot and $ as a symbol of string end in regular expression for grep(1). If there are more types to add, for example, .txt and .html, according string would be:
    \.pc$ \.txt$ \.html$

After files are found and real copies of them are created in ROOT, they are edited by rules, hardcoded in root_create_rules_to_install method. That rules remove ROOT part from paths.

Writing

The method writes to ROOT and T.

Variables

The method uses any-api(7) variables:
ROOT
T
D
PREFIX_LIST

The method uses engine variables:

root_TEXTBUILD_FILES
edit_RULES_FILE
root_TRACKED_DIRS

Interfaces

The method calls map interfaces:
-
get_plain_tracked_dirs(3)
-
get_installed_tracked_dirs(3)

Options

The following options affect the method:
any_root_textbuild_files
any_root_exec_editable
any_root_tracked_dirs

See also