aboutsummaryrefslogtreecommitdiffstats
path: root/core/erlc.mk
AgeCommit message (Collapse)Author
2019-06-30Make a "git describe" fall back for older git versionsLoïc Hoguin
--first-parent is not available on CentOS 7.
2019-01-02Fix rebuild on Makefile change when new deps are addedLoïc Hoguin
The issue was that when a new dep is added the last-makefile-change update was done in the dependency and not in the top-level Makefile, preventing the rebuild of the top-level project. A test was also added to do the same when editing dependencies and things seem to work properly in that case. Thanks to robinchew on IRC for the great help debugging this.
2018-12-10Optimization: reduce the number of shell commands on noopsLoïc Hoguin
2018-11-30Validate the .app file after generating itLoïc Hoguin
2018-11-28Fix asn1 compilation with the +maps optionLoïc Hoguin
When this option is used no include file is generated. Therefore don't error out if no include file can be found.
2018-11-28Modernize the protobuffs pluginLoïc Hoguin
2018-11-25Build $(PROJECT).d in a separate $(MAKE) callLoïc Hoguin
This avoids the issue where clean will remove a file that was otherwise generated and won't be regenerated. This might also help with parallel building.
2018-11-24Add a warning to not edit env.mkLoïc Hoguin
2018-05-14Small tweaks to previous PRLoïc Hoguin
2018-05-14Update to support WindowsStanislav Ovchar
2018-05-14Update makedep.erl to ignore hrl loopsStanislav Ovchar
2018-05-14Fix #757: recompile erl if hrl from another app was updatedStanislav Ovchar
2017-11-15Use dep rather than package names in .app filesThomas Nixon
2017-04-25core/erlc.mk: added src subfolders support in makedep.erlOleksiy Kebkal
2017-04-10Only makedep and build asn1/xrl/mib files when necessaryLoïc Hoguin
Because we were unconditionally including the makedep file, it would be built even if the target was unrelated (like "make help"), and it would also trigger building of xrl and other files that produce Erlang code. Instead the makedep file is now included as a wildcard: if it exists it gets included, if it doesn't it's not, and if it's created in the middle of execution it gets included only then. More details on the technique can be found at http://make.mad-scientist.net/papers/advanced-auto-dependency-generation/ A test has been added to make sure the behavior does not come back at a later time.
2017-01-12Set ASN.1 compilation options using ERLC_ASN1_OPTS2017.01.12Klas Johansson
`ERLC_ASN1_OPTS` can be used to pass compiler options when compiling ASN.1 files. By default, Erlang.mk will leave this empty, but it can be redefined in a Makefile.
2016-12-19core/erlc.mk: Quote application name in .appJean-Sébastien Pédron
2016-10-30Use := instead of = for list of filesLoïc Hoguin
This will make sure we don't look twice. Also make a single call to find the common file formats rather than many calls.
2016-10-28Use an intermediate timestamp file to know when to touch source filesJean-Sébastien Pédron
The previous approach spawned a shell for every single source files. As we disable parallel make jobs, this is very time consuming. The new approach uses an intermediate timestamp file in $(ERLANG_MK_TMP) to record the last modification of any of $(MAKEFILE_LIST) and touch all source files in one command. Then, the .app file depends on this timestamp file. We test the existence of this timestamp file: if if doesn't exist, don't touch source files, they will be built anyway. $(PROJECT).d now depends directly on $(MAKEFILE_LIST); before, this dependency was indirect through $(ERL_FILES). Also, once $(ERL_FILES) were touched, we do the same with $(PROJECT).d because there is no need to regen it because of this.
2016-10-23Support PROJECT_APP_EXTRA_KEYS to add keys to the .app fileJean-Sébastien Pédron
This allows to add standard keys which do not have a corresponding `PROJECT_` Makefile variable, as well as non-standard keys.
2016-10-21Update Copyright notices2016.10.21Loïc Hoguin
2016-10-19Escape % in app_file templatenevar
2016-10-19Add PROJECT_ENVnevar
Fix #587
2016-10-19Added implementation to resolve test.Micah Warren
2016-06-07Add PROJECT_MOD var to make the app callback module configurableJared Flatow
2016-03-19Merge branch 'tag_with_slash' of https://github.com/jeanparpaillon/erlang.mkLoïc Hoguin
2016-03-17Do not use grep Extended Modederwinlu
Extended Mode uses { and } as special characters. Making grep implementations other then GNU grep fail (see http://www.gnu.org/software/grep/manual/grep.html#Basic-vs-Extended).
2016-02-01Fix .app compilation when a git tag contains a '/'Jean Parpaillon
2015-12-17More improvements to file dependency detectionLoïc Hoguin
This makes i18n work. It worked before, but I didn't know, and broke it. Next commit will add i18n to the index to ensure this doesn't happen again.
2015-12-16Improve file dependency detectionLoïc Hoguin
One case was added, where a -compile attribute specified a list that included a parse_transform. This affected alog, for example. The COMPILE_FIRST variable is now filled from a digraph. This allows us to keep track of the dependency tree properly, rather than rely on luck. This affected erlando. With both of these changes in, a large chunk of the rebar autopatch code can be removed, the part that concerned the auto detection of file dependencies. On the other hand, we still need to honor the erl_first_files configuration value, otherwise the parse_trans project fails to build. While it would be possible to detect these dependencies automatically too, it's probably too complex to bother, at least for now.
2015-11-20Merge branch 'set-x-on-verbose-2' of https://github.com/rabbitmq/erlang.mkLoïc Hoguin
2015-11-18Fix target dependencies and enable parallel again2.0.0-pre.2Loïc Hoguin
We can now use 'make -j 32' again. All tests pass. There might be some issues left with the areas that are not fully tested yet (some plugins). A few changes in behavior: * 'make app' will also do 'make deps' unless SKIP_DEPS is set. You can use 'make app-build' instead to just build the application. * 'make rel' will also do 'make app' (and therefore deps). There are no alternative target to keep the old behavior at this time.
2015-11-17Use `:` as a noop instead of `echo -n`Jean-Sébastien Pédron
The `-n` flag is not standard and not portable. It is supported by many Bourne shell to suppress the trailing newline character. But some old shells do not support this and "-n" is printed. This is the case for instance on some old versions of Mac OS X where `/bin/sh` is Bash 3.2.
2015-11-17V=2 causes `set -x` to be set on forked shellsJean-Sébastien Pédron
2015-10-19Force rebuilds on Makefile/.app.src changesLoïc Hoguin
Everything will be rebuilt when the Makefile or any included Makefile (like Erlang.mk or plugins) change. Only the .app will be rebuilt when the .app.src file changes.
2015-10-12ErlyDTL files generate to beam directlyLoïc Hoguin
2015-09-29Merge branch 'app_file_newlines' of https://github.com/ingwinlu/erlang.mkLoïc Hoguin
2015-09-29Add support for APPS_DIRLoïc Hoguin
This changes adds Rebar-like "apps/" functionality. From this commit onward, Erlang.mk supports 4 types of repositories: - Repo with an Erlang app at root level + deps/ - Repo with an Erlang app at root level + apps/ deps/ - Repo with no app at root level + deps/ - Repo with no app at root level + apps/ deps/ Example usage: - make new-app in=webchat - make new t=gen_server n=my_chat in=webchat - make Replace new-app with new-lib to create an OTP library instead of an OTP application.
2015-09-26retain newlines in generated .app filederwinlu
Replacing $(newline) occurances with \n before passing it to printf instead of echo ensures valid output accross different platforms.
2015-09-26only newline for id if neededderwinlu
2015-09-18Test "no .app.src" by default, test legacy with LEGACY=1Loïc Hoguin
Also fixes two bugs with the new "no .app.src" method. All tests now pass with both methods. We can now test specific cases with make check c=$CASE.
2015-09-17Only set id to git --describe when we are a dependencyLoïc Hoguin
This way we can commit the .app file once and it won't change until we actually change something. Much better for "no .app.src" file method. We are getting close to making this method the default!
2015-09-11Fix bug where ERLC_EXCLUDE'd modules were in .app fileLoïc Hoguin
2015-09-10Replace a @ with a $(verbose)Loïc Hoguin
We have nothing to hide.
2015-09-09erlc.mk: Fix "no Erlang application" supportJean-Sébastien Pédron
2015-09-06Add NO_MAKEDEP: don't rebuild .d file if it already existsLoïc Hoguin
This is useful only for projects that are stable and rarely need to rebuild it. Check the guide additions for more info.
2015-09-06Use epp:parse_file/3 for compat with older OTP versionsLoïc Hoguin
R16B03 in particular is missing epp:parse_file/2.
2015-09-04Don't recompile everything when one mib file changesLoïc Hoguin
Fixes a bug detected with the test introduced in the previous commit.
2015-09-03Fix bug where intermediate files from .asn1 wouldn't get cleanedLoïc Hoguin
Dirty, dirty files!
2015-09-03Generate `$(PROJECT).d` before calling `make app-build`Jean-Sébastien Pédron
This ensures all generated dependencies are prepared and the .d file is ready before the actual build is started.