summaryrefslogtreecommitdiff
path: root/tests/scripts/features/export
Commit message (Collapse)AuthorAgeFilesLines
* Convert references from "GNU make" to "GNU Make"Paul Smith2023-01-011-1/+1
|
* Support "unexport" in target-specific variables.Paul Smith2020-11-291-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rewrite the environment variable algorithm to correctly inherit export settings from parent variable sets. The new algorithm for computing the table of environment variables is: - Start with the most local variable set and proceed to global. - If the variable already exists in the table and we don't know its export status, update it with the current variable's status. - If the variable is not in the table and it's not global, add it regardless of its status so if it's unexported we remember that. - If the variable is not in the table and is global, check its export status and don't add it if we won't export it. Then when generating the environment variables, check the export status of each variable in case it was a target-specific variable and we have determined it should not be exported. Rework SHELL handling to check at the end whether we added it or not and if we didn't, add the value from the environment. * NEWS: Announce support for target-specific "unexport"." * doc/make.texi (Target-specific): Document the support. * src/variable.h (enum variable_export): Make into a global type. * src/read.c (struct vmodifiers): Use enum variable_export rather than individual booleans. (parse_var_assignment): Parse the "unexport" keyword. (eval): Remember the vmodifier value in the variable. (record_target_var): Ditto. * src/variable.c (should_export): Check if the variable should be exported. (target_environment): Implement the above algorithm. * tests/scripts/features/export: Test export/unexport with variable assignments on the same line. * tests/scripts/features/targetvars: Add a comprehensive suite of tests for different types of target-specific export / unexport. * tests/scripts/variables/SHELL: Update the comment.
* tests: Simplify customization of %ENVPaul Smith2020-04-011-8/+12
| | | | | | | | | | | | | | | | | | | | | | Rather than having an %extraENV that is added to the default %ENV and resetting %ENV _before_ each test, allow the test setup to modify %ENV directly as needed then reset %ENV _after_ each test. * tests/test_driver.pl: Remove unused %extraENV. (resetENV): Don't add in %extraENV. (_run_command): Reset after we run the command rather than before. * tests/scripts/features/export: Convert %extraENV to %ENV * tests/scripts/features/jobserver: Ditto * tests/scripts/features/parallelism: Ditto * tests/scripts/features/targetvars: Ditto * tests/scripts/functions/eval: Ditto * tests/scripts/functions/foreach: Ditto * tests/scripts/functions/origin: Ditto * tests/scripts/misc/general4: Ditto * tests/scripts/options/dash-e: Ditto * tests/scripts/targets/POSIX: Ditto * tests/scripts/variables/GNUMAKEFLAGS: Ditto * tests/scripts/variables/SHELL: Ditto
* Add 'private' variable modifier, feature submitted by Ramon Garcia.Paul Smith2009-05-261-109/+49
| | | | | | Rework the parser for variables to allow multiple modifiers and also allow for variables and targets with modifier names, like "export" and "private".
* Various minor updates and code cleanups.Paul Smith2005-07-121-6/+2
|
* Fix a bug exporting/unexporting multiple variables in one command.Paul Smith2002-09-181-1/+74
| | | | Update the text about reporting bugs.
* A few test bug fixes:Paul Smith2002-09-101-0/+4
| | | | | | | | * Never use "touch" in make rules; it breaks on most sub-second supporting systems. Use echo "" > $@ instead. * Forgot to close test makefiles before using them! All the above worked fine on Linux but failed miserably on Solaris.
* Add support for broken SA_RESTART on PTX.Paul Smith2002-09-101-0/+173
Fix bug #103: allow ifdef, export, and unexport to expand their arguments.