summaryrefslogtreecommitdiffstats
path: root/SCons/Tool
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | Add lex/yacc filegen consvarsMats Wichmann2022-07-194-13/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lex and yacc tools both got two new construction variables for specifying side-effect creation of additional files, this method avoids the user embedding the options in LEXFLAGS and YACCFLAGS - the latter lets the commands generate the files, but the paths would not be properly relocated by SCons, so if the build was initiated in a subdirectory, the generated files would go into the top directory instead. Fixes #4154 Signed-off-by: Mats Wichmann <mats@linux.com>
* | | | Merge branch 'master' into maint/no-load-moduleWilliam Deegan2022-07-195-65/+179
|\ \ \ \
| * | | | Sider fixesMats Wichmann2022-06-301-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Mats Wichmann <mats@linux.com>
| * | | | Improvements to lex and yacc toolsMats Wichmann2022-06-305-65/+179
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mocked tools mylex.py and myyacc.py now understand the file-generation options, and generate a dummy file with predictable contents, for checking. This allows more testing of the path through the SCons support for these two without needing live commands. New tests added which invoke the file-generation options, and make sure the extra files are created, and that SCons detects and tracks the added targets. Work is done in a subdirectory, which exposes some existing known inconsistent behavior (the regular generated file goes in the subdir per the LEXCOM and YACCOM generated line, while the ones generated from commandline options go in the topdir) - but we're going to allow that behavior to continue for backwards compat. Same fix applied to yacc tool that PR #4168 did for lex - do subst_list() instead of subst() to preserve spaces in paths. That fix left the lex tool unable to pass the new test, as it could not see the individual arguments in the FLAGS variable, which was solved by indexing into the subst'd list so we can iterate over the args again. Test and tool cleanup; add DefaultEnvironment calls, etc. Note this mentions, but does not address the problem described in issue 4154. Signed-off-by: Mats Wichmann <mats@linux.com>
* | | | load_module work: back off zipimport changesMats Wichmann2022-07-191-5/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apparently, the zipimport code was not intended to load modules (platform, tool) that were stored in individual zipfiles; instead it was added to support scons itself running inside a zipfile in the form of a py2exe bundle. Undid the changes which tried to find a modulename.zip file and load it, and the test in Platform that actually verfied it works, no need to add a new feature nobody is asking for. Signed-off-by: Mats Wichmann <mats@linux.com>
* | | | zip module loading: fallback for older PythonsMats Wichmann2022-07-171-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | zipimport was updated later, the find_spec and exec_module routines were only added here in 3.10, as opposed to 3.4 for importlib. So we need to fall back to the "old way" using load_module if we don't have those routines available - SCons still supposed back to Python 3.6. Signed-off-by: Mats Wichmann <mats@linux.com>
* | | | Fix sider-discovered problemsMats Wichmann2022-07-171-2/+2
| | | | | | | | | | | | | | | | Signed-off-by: Mats Wichmann <mats@linux.com>
* | | | Stop using deprecated load_moduleMats Wichmann2022-07-171-46/+21
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | importlib.load_module is deprecated since 3.10 and scheduled for removal in the 2023 Python release (3.12) - this makes the tests somewhat noisy. The zip import code was reworked, to use exec_module. A test was added in the Platform code - there's now a dummy platform module inside a zip file that the PlatformTests unittest uses. The tool import code finally dropped the fallback to Python2-style importing, and the zip import section matches the (now tested) Platform version. Not sure this is needed at all: the regular import machinery ought to find a zipfile without extra steps, since here it uses sys.path (the platform code does *not* use sys.path). sconsign now just uses import_module, the "my_import" function is no longer needed but was left in for now. sconsign actually used the "imp" module, which is deprecated since 3.4. A little cleaup in the three scripts/ files. Fixes #4162 Signed-off-by: Mats Wichmann <mats@linux.com>
* | | Merge pull request #4168 from dmoody256/lex_space_argsWilliam Deegan2022-06-251-6/+9
|\ \ \ | | | | | | | | Updated lex emitter to respect escaped spaces when climbing out of the SConscript dir
| * | | updated blurb in CHANGES.txt and RELEASE.txt to indicate more specifically ↵William Deegan2022-06-251-5/+8
| | | | | | | | | | | | | | | | what's fixed. Address a few lint issues in the lex.py file
| * | | Merge branch 'master' into lex_space_argsWilliam Deegan2022-06-168-93/+174
| |\ \ \ | | | |/ | | |/|
| * | | Merge branch 'master' into lex_space_argsWilliam Deegan2022-06-1417-94/+663
| |\ \ \
| * | | | Updated lex emitter to respect escaped spaces when climbing out of a the ↵Daniel Moody2022-06-061-1/+1
| | | | | | | | | | | | | | | | | | | | SCosncript dir
* | | | | Restore convars to gfortran doc, add to g77 [ci skip]Mats Wichmann2022-06-172-1/+37
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Mats Wichmann <mats@linux.com>
* | | | | Fix PR review issuesMats Wichmann2022-06-161-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove leftover debugging debris. Fix sider complaint Signed-off-by: Mats Wichmann <mats@linux.com>
* | | | | Fortran vairants now include FORTRANCOMMONFLAGSMats Wichmann2022-06-1613-153/+143
| |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The documentation suggested $FORTRANFLAGS was included in the build lines for all variants, but it was not. Turns out the test suite quite explicitly checks that FORTRANFLAGS doesn't leak through to other variants, so instead define a new FORTRANCOMMONFLAGS to serve the purpose of a flag that applies to all variants. Assorted cleanup. And f-strings. Fixes #2257 Signed-off-by: Mats Wichmann <mats@linux.com>
* | | | Merge pull request #4178 from bdbaddog/trivial_fortran_cleanupWilliam Deegan2022-06-155-49/+64
|\ \ \ \ | | | | | | | | | | trivial fortran cleanups.
| * | | | [ci skip] docstring cleanup per mwichmannWilliam Deegan2022-06-154-4/+4
| | | | |
| * | | | trivial cleanups. Change internal flag in internal methods from 0/1 to ↵William Deegan2022-06-155-48/+63
| | |/ / | |/| | | | | | | | | | True/False for support_module
* | | | added message to test failure, and removed unneeded import SCons in fixture ↵William Deegan2022-06-151-1/+1
| | | | | | | | | | | | | | | | sconstruct
* | | | Fix typoWilliam Deegan2022-06-141-1/+2
| | | |
* | | | Merge branch 'master' into ninja_determinismWilliam Deegan2022-06-1417-94/+663
|\ \ \ \ | |/ / /
| * | | Merge pull request #4170 from dmoody256/ninja_exit_daemonWilliam Deegan2022-06-144-4/+31
| |\ \ \ | | | | | | | | | | [NINJA] Added new alias 'shutdown-ninja-scons-daemon' to allow ninja to shutdown the daemon
| | * | | Fixed some typos. Added skip_test() if psutil is not present for new test. ↵William Deegan2022-06-142-4/+4
| | | | | | | | | | | | | | | | | | | | Added note to CHANGES.txt/RELEASE.txt that psutil is required for the new test for this function
| | * | | Merge branch 'master' into ninja_exit_daemonWilliam Deegan2022-06-1412-70/+607
| | |\ \ \
| | * | | | install psutil for testing and fix sider complaintsDaniel Moody2022-06-072-2/+2
| | | | | |
| | * | | | Added new alias 'shutdown-ninja-scons-daemon' to allow ninja to shutdown the ↵Daniel Moody2022-06-074-2/+29
| | | |/ / | | |/| | | | | | | | | | | | daemon
| * | | | find_prorgram_path() can now add discovered pathMats Wichmann2022-06-142-20/+25
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many tools contain a stanza like this, usually for the Windows case, where installed programs are rarely added to the "standard" path in SCons' execution environment (i.e. env['ENV']["PATH']): javac = SCons.Tool.find_program_path(env, 'javac', default_paths=paths) if javac: javac_bin_dir = os.path.dirname(javac) env.AppendENVPath('PATH', javac_bin_dir) This change adds a keyword argument add_path to find_program_path() to instruct it to add the path a program was discovered in, if it was in the extra paths passed in. The default is False, retaining the existing behavior. Signed-off-by: Mats Wichmann <mats@linux.com>
| * | | Fix sider complaintsWilliam Deegan2022-06-131-1/+0
| | | |
| * | | Merge branch 'master' into ninja_command_line_argsWilliam Deegan2022-06-139-66/+577
| |\ \ \ | | | |/ | | |/|
| | * | Merge branch 'master' into jbrill-msvc-warnfixJoseph Brill2022-06-109-97/+207
| | |\ \
| | | * | doc: FORTRANCOM doesn't include cpp vars [skip appveyor]Mats Wichmann2022-06-091-17/+26
| | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FORTRANCOM and SHFORTRANCOM don't add the C preprocessor variables by default, the docs suggest they do. The PP variants, which run through the preprocessor, do add these. Adjust docs. Fixes #2128 Signed-off-by: Mats Wichmann <mats@linux.com>
| | * | Refine conditions for intent to use msvc toolsJoseph Brill2022-06-101-4/+26
| | | |
| | * | Update MSVC_NOTFOUND_POLICY documentationJoseph Brill2022-06-081-9/+24
| | | |
| | * | Add preliminary docstrings for set_msvc_notfound_policy and ↵Joseph Brill2022-06-081-0/+14
| | | | | | | | | | | | | | | | get_msvc_notfound_policy
| | * | Update MSVC_NOTFOUND_POLICY documentationJoseph Brill2022-06-081-2/+20
| | | |
| | * | Update MSVC_NOTFOUND_POLICY documentationJoseph Brill2022-06-061-9/+9
| | | |
| | * | Update MSVC_NOTFOUND_POLICY documentationJoseph Brill2022-06-061-5/+16
| | | |
| | * | Update MSVC_NOTFOUND_POLICY documentationJoseph Brill2022-06-061-2/+2
| | | |
| | * | Update MSVC_NOTFOUND_POLICY documentationJoseph Brill2022-06-061-9/+35
| | | |
| | * | Add Blurb for MSVC_NOTFOUND_POLICYWilliam Deegan2022-06-061-0/+24
| | | |
| | * | Merge branch 'master' into jbrill-msvc-warnfixJoseph Brill2022-06-018-58/+68
| | |\ \
| | * | | Treat environment notfound policy set to None the same as if undefined ↵Joseph Brill2022-05-191-6/+13
| | | | | | | | | | | | | | | | | | | | (default global setting)
| | * | | Change notfound policy parallel variables to namedtuple.Joseph Brill2022-05-191-48/+69
| | | | | | | | | | | | | | | | | | | | Rework debug statement contents and formatting for notfound policy. Make comment for internal class a docstring per request.
| | * | | [ci skip] fix sider complaint. Reformat. Update file header to current standardWilliam Deegan2022-05-181-22/+22
| | | | |
| | * | | Merge branch 'master' into jbrill-msvc-warnfixJoseph Brill2022-05-162-7/+38
| | |\ \ \
| | * \ \ \ Merge branch 'master' into jbrill-msvc-warnfixJoseph Brill2022-05-154-10/+114
| | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | Manually resolved conflicts in SCons/Tool/MSCommon/vc.py
| | * | | | | Hard-code tool name instead of deriving from file nameJoseph Brill2022-05-155-5/+5
| | | | | | |
| | * | | | | Merge branch 'master' into jbrill-msvc-warnfixJoseph Brill2022-05-1513-63/+188
| | |\ \ \ \ \
| | * \ \ \ \ \ Merge branch 'master' into jbrill-msvc-warnfixJoseph Brill2022-05-042-274/+516
| | |\ \ \ \ \ \