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
Remove dependency on make #1
Comments
I was thinking about just starting with something like:
Constructing a DAG of recipes and detecting loops doesn't seem that hard. @aoeu, thoughts? |
Also, some kind of variable assignment is likely to be necessary. Makefiles allow setting the shell using |
Would it be too crazy to use a full scripting language outside of the recipes? Imagine if everything that wasn't a recipe was parsed and run as python, with a special syntax for exporting variables as environment variables to recipes? If there were a good python implementation in rust, I think I would seriously consider it. |
Okay, I just thought of a killer feature that we can provide if we move away from makefiles... If you add a shebang as the first line of a recipe, we run that recipe as a script instead:
j will then extract the contents of the recipe, less the leading whitespace, and execute it as a script. You could also use a shell shebang, if you use a lot of variables or want to continue in the case of command failure:
|
Make is gone! Support for #! recipes is also in |
Currently,
j
relies on amake
orgmake
command being available. This causes some problems:j
on windows is difficultj
"feature" that flags are passed to make, it can't have flags of its ownIt may be desirable to stop depending on make and move to a
j
-specific custom file format. This would mean that make's features would no longer be available, but a workaround to this would be to write aMakefile
and callmake
fromj
.Possible improvements this would allow:
--list
flag that lists the available recipesThe exact syntax is up in the air, but I personally very much like the current syntax, and would like to do something similar.
The text was updated successfully, but these errors were encountered: