Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some fixes and new features for complex mkfiles #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

DiablosOffens
Copy link

@DiablosOffens DiablosOffens commented Aug 30, 2016

  • Fixes an endless loop case in expandDoubleQuoted that is encountered if the position of an escape char found in the current substring is less than the position of any other escape char before the current position. The j variable was used as the absolute start for the substring and then replaced with the first relative position of the search char in this substring, so in every turn j actually is the relative position but it was used as the absolute start for the new substring. As already mentioned, this leads to an endless loop.
  • Added a feature for escaped newlines, which removes the escape and newline chars out of the expansion. It could possibly be done by only removing the escape char and keep the newline in the expansion, but I don't have a test case where the newline really needs to be kept. But in all my tests the escaped newline really needs a translation and not totally left untranslated with the escape char in the expansion. Probably, the escape char should be removed in all escape sequences and never kept in the expansion?
    I don't know the spec to answer such questions.
  • Added a feature for the expansion of back quotes, which adds the currently set mkfile variables to the environment variables of the new process. The environment variables of the current process are not touched in any way.
  • Added a command line option -l to configure the limit of the recursive rule application. Obviously, the constant 1 was not enough.

To test all theses things I tried to build the sml-toolkit. The version 0.5a can be downloaded here.

Fix an issue with expansion of escaped newlines.
Use the currently set mkfile vars as environment vars for the shell command invoked by "expandBackQuoted".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant