This repository has been archived by the owner on Feb 15, 2025. It is now read-only.
forked from mesonbuild/meson
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
install_{data,headers,subdir}: implement follow_symlinks
This permits users who rely on following symlinks to stay on the old default of following them.
- Loading branch information
1 parent
56ef698
commit 0af126f
Showing
15 changed files
with
139 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
## Added follow_symlinks arg to install_data, install_header, and install_subdir | ||
|
||
The [[install_data]], [[install_headers]], [[install_subdir]] functions now | ||
have an optional argument `follow_symlinks` that, if set to `true`, makes it so | ||
symbolic links in the source are followed, rather than copied into the | ||
destination tree, to match the old behavior. The default, which is currently | ||
to follow links, is subject to change in the future. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
test cases/common/266 install functions and follow_symlinks/foo/file1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
test |
1 change: 1 addition & 0 deletions
1
test cases/common/266 install functions and follow_symlinks/foo/link1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
file1 |
1 change: 1 addition & 0 deletions
1
test cases/common/266 install functions and follow_symlinks/foo/link2.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
file1 |
38 changes: 38 additions & 0 deletions
38
test cases/common/266 install functions and follow_symlinks/meson.build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
project('install_data following symlinks') | ||
|
||
install_data( | ||
'foo/link1', | ||
install_dir: get_option('datadir') / 'followed', | ||
follow_symlinks: true, | ||
) | ||
|
||
install_headers( | ||
'foo/link2.h', | ||
follow_symlinks: true, | ||
subdir: 'followed' | ||
) | ||
|
||
install_data( | ||
'foo/link1', | ||
install_dir: get_option('datadir'), | ||
follow_symlinks: false, | ||
) | ||
|
||
install_headers( | ||
'foo/link2.h', | ||
follow_symlinks: false, | ||
) | ||
|
||
install_subdir( | ||
'foo', | ||
install_dir: get_option('datadir') / 'subdir', | ||
strip_directory: true, | ||
follow_symlinks: false, | ||
) | ||
|
||
install_subdir( | ||
'foo', | ||
install_dir: get_option('datadir') / 'subdir_followed', | ||
strip_directory: true, | ||
follow_symlinks: true, | ||
) |
14 changes: 14 additions & 0 deletions
14
test cases/common/266 install functions and follow_symlinks/test.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"installed": [ | ||
{"type": "link", "file": "usr/share/link1"}, | ||
{"type": "link", "file": "usr/include/link2.h"}, | ||
{"type": "file", "file": "usr/share/followed/link1"}, | ||
{"type": "file", "file": "usr/include/followed/link2.h"}, | ||
{"type": "link", "file": "usr/share/subdir/link1"}, | ||
{"type": "link", "file": "usr/share/subdir/link2.h"}, | ||
{"type": "file", "file": "usr/share/subdir/file1"}, | ||
{"type": "file", "file": "usr/share/subdir_followed/link1"}, | ||
{"type": "file", "file": "usr/share/subdir_followed/link2.h"}, | ||
{"type": "file", "file": "usr/share/subdir_followed/file1"} | ||
] | ||
} |