-
Notifications
You must be signed in to change notification settings - Fork 3k
Make make.erl support most file types supported by erlc #10360
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
base: master
Are you sure you want to change the base?
Conversation
This extension makes it possible to use `make` to compile almost
all source file types supported by `erlc`. The exception is `idl`
files, which have somewhat complex output.
The change is backwards-compatible, such that any time extensions
are omitted, `.erl` is assumed, and the same logic as before is used.
If the extension is given (and other than `.erl`), the work is passed
to `erl_compile:compile(Args, CWD)`, where `Args` is given by the new
`make` option `{erlc, Args}`, and is a string, such as would have been
given to the `erlc` command. Modification timestamps are compared as
for `.erl`/`.beam` pairs, but using the list of supported file types
in `erl_compile:extensions()`.
Furthermore, a new load option, `autoload` is introduced. This is the
default when running `erl -make`, and allows each `Emakefile` line
to specify a load option (`load` or `netload`). This allows for
parse-transform modules to be compiled and loaded selectively for use
by later steps in the `Emakefile`.
CT Test Results 3 files 108 suites 1h 10m 17s ⏱️ Results for commit 6a02e81. ♻️ This comment has been updated with latest results. To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass. See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally. Artifacts
// Erlang/OTP Github Action Bot |
|
BTW, the suggested license headers in the FILE-HEADERS.md contain some trailing whitespace that |
|
I am awaiting comments/review now. |
This extension makes it possible to use
maketo compile almost all source file types supported byerlc. The exception isidlfiles, which have somewhat complex output.The change is backwards-compatible, such that any time extensions are omitted,
.erlis assumed, and the same logic as before is used. If the extension is given (and other than.erl), the work is passed toerl_compile:compile(Args, CWD), whereArgsis given by the newmakeoption{erlc, Args}, and is a string, such as would have been given to theerlccommand. Modification timestamps are compared as for.erl/.beampairs, but using the list of supported file types inerl_compile:extensions().Furthermore, a new load option,
autoloadis introduced. This is the default when runningerl -make, and allows eachEmakefileline to specify a load option (loadornetload). This allows for parse-transform modules to be compiled and loaded selectively for use by later steps in theEmakefile.