| 1 | =head1 Name | ||
| 2 | |||
| 3 | SPVM::Document::EnvironmentVariables - SPVM Environment Variables | ||
| 4 | |||
| 5 | =head1 Description | ||
| 6 | |||
| 7 | This document explains SPVM environment variables. | ||
| 8 | |||
| 9 | =head1 Environment Variables | ||
| 10 | |||
| 11 | =head2 SPVM_BUILD_DIR | ||
| 12 | |||
| 13 | A directory for files generated by the compiler and linker. | ||
| 14 | |||
| 15 | C source codes for precompilation, dynamic link libraries and object files are stored into this directory. | ||
| 16 | |||
| 17 | These files are output when attempting to build a module containing methods with the C<native> attribute or the C<precompile> attribute. | ||
| 18 | |||
| 19 | If the C<SPVM_BUILD_DIR> environment variable is a non-empty string, these files are output to the directory. If the directory does not exist, an exception is thrown. | ||
| 20 | |||
| 21 | If the C<SPVM_BUILD_DIR> environment variable is not spacified, a temporary directory is created at the beginning of the program, and the path is set to the environment variable. | ||
| 22 | |||
| 23 | Examples: | ||
| 24 | |||
| 25 | # bash | ||
| 26 | export SPVM_BUILD_DIR=~/.spvm_build | ||
| 27 | |||
| 28 | # csh | ||
| 29 | setenv SPVM_BUILD_DIR ~/.spvm_build | ||
| 30 | |||
| 31 | =head2 SPVM_FORCE_BUILD | ||
| 32 | |||
| 33 | If it is a true value, compilations and links are forced. | ||
| 34 | |||
| 35 | =head2 SPVM_FORCE_QUIET | ||
| 36 | |||
| 37 | If it is a non-empty string and a true value, no diagnostic messages from compilers and linkers are printed. | ||
| 38 | |||
| 39 | If it is a non-empty string and a false value of Perl, diagnostic messages from compilers and linkers are printed. | ||
| 40 | |||
| 41 | This setting has a higher priority than L<SPVM::Builder::Config#quiet|SPVM::Builder::Config/"quiet"> field. | ||
| 42 | |||
| 43 | =head2 SPVM_FORCE_BUILD_TYPE | ||
| 44 | |||
| 45 | If it is a non-empty string, the value is used as the build type for compilation. | ||
| 46 | |||
| 47 | This setting has a higher priority than L<SPVM::Builder::Config::Global#build_type|SPVM::Builder::Config::Global/"build_type"> field. | ||
| 48 | |||
| 49 | =head2 SPVM_DEPENDENT_FILE_EXCLUDE_EXTS | ||
| 50 | |||
| 51 | A list of file extensions to be excluded from dependent file scanning, separated by commas. | ||
| 52 | |||
| 53 | Each element should be only an extension (e.g., C<so>), not including a dot (C<.>). Leading and trailing whitespace in each element is ignored. | ||
| 54 | |||
| 55 | These extensions are used to filter out files during the build process, such as large binary files that should not be tracked for changes. | ||
| 56 | |||
| 57 | Examples: | ||
| 58 | |||
| 59 | # bash | ||
| 60 | export SPVM_DEPENDENT_FILE_EXCLUDE_EXTS=so,obj,exe | ||
| 61 | |||
| 62 | # csh | ||
| 63 | setenv SPVM_DEPENDENT_FILE_EXCLUDE_EXTS "so, obj, exe" | ||
| 64 | |||
| 65 | =head1 See Also | ||
| 66 | |||
| 67 | =over 2 | ||
| 68 | |||
| 69 | =item * L<SPVM::Document> | ||
| 70 | |||
| 71 | =back | ||
| 72 | |||
| 73 | =head1 Copyright & License | ||
| 74 | |||
| 75 | Copyright (c) 2023 Yuki Kimoto | ||
| 76 | |||
| 77 | MIT License |