-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow setting directory locations in a native file
This allows the person running configure (either a developer, user, or distro maintainer) to keep a configuration of where various kinds of files should end up.
- Loading branch information
Showing
13 changed files
with
148 additions
and
11 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
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,4 @@ | ||
### Native File Paths and Directories | ||
|
||
A new `[paths]` section has been added to the native file. This can be used to | ||
set paths such a prefix and libdir in a persistent way. |
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/211 native file path override/installed_files.txt
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 @@ | ||
usr/custom_bindir/main |
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,5 @@ | ||
#include <iostream> | ||
|
||
int main() { | ||
std::cout << "Hello world!" << std::endl; | ||
} |
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,3 @@ | ||
project('native file install dir override', 'cpp') | ||
|
||
executable('main', 'main.cpp', install : true) |
2 changes: 2 additions & 0 deletions
2
test cases/common/211 native file path override/nativefile.ini
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,2 @@ | ||
[paths] | ||
bindir = 'custom_bindir' |
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,10 @@ | ||
project('native file overrides') | ||
|
||
foreach o : ['bindir', 'datadir', 'includedir', 'infodir', 'libdir', | ||
'libexecdir', 'localedir', 'localstatedir', 'mandir', 'prefix', | ||
'sbindir', 'sharedstatedir', 'sysconfdir'] | ||
expected = get_option('def_' + o) | ||
actual = get_option(o) | ||
assert(expected == actual, | ||
'@0@ should have been @1@, but was @2@!'.format(o, expected, actual)) | ||
endforeach |
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,13 @@ | ||
option('def_bindir', type: 'string', value : 'binfoo',) | ||
option('def_datadir', type: 'string', value : 'datafoo',) | ||
option('def_includedir', type: 'string', value : 'includefoo',) | ||
option('def_infodir', type: 'string', value : 'infofoo',) | ||
option('def_libdir', type: 'string', value : 'libfoo',) | ||
option('def_libexecdir', type: 'string', value : 'libexecfoo',) | ||
option('def_localedir', type: 'string', value : 'localefoo',) | ||
option('def_localstatedir', type: 'string', value : 'localstatefoo',) | ||
option('def_mandir', type: 'string', value : 'manfoo',) | ||
option('def_prefix', type: 'string', value : '/prefix',) | ||
option('def_sbindir', type: 'string', value : 'sbinfoo',) | ||
option('def_sharedstatedir', type: 'string', value : 'sharedstatefoo',) | ||
option('def_sysconfdir', type: 'string', value : 'sysconffoo',) |
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,16 @@ | ||
[paths] | ||
bindir = 'binfoo' | ||
datadir = 'datafoo' | ||
includedir = 'includefoo' | ||
infodir = 'infofoo' | ||
libdir = 'libfoo' | ||
libexecdir = 'libexecfoo' | ||
localedir = 'localefoo' | ||
localstatedir = 'localstatefoo' | ||
mandir = 'manfoo' | ||
prefix = '/prefix' | ||
sbindir = 'sbinfoo' | ||
sharedstatedir = 'sharedstatefoo' | ||
sysconfdir = 'sysconffoo' | ||
|
||
; vim: ft=dosini |