diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2016-02-25 11:36:56 +0100 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2016-02-25 11:36:56 +0100 |
commit | 281a9b2cea08c0e6bffd0eddd054e04c84e4ba6b (patch) | |
tree | b5ea3643e8e1d872431e1a64d98a002726a85803 /scripts/gendeclarations.lua | |
parent | 5c1597cad19b40803b635074d8fecf2e99c124a6 (diff) | |
download | rneovim-281a9b2cea08c0e6bffd0eddd054e04c84e4ba6b.tar.gz rneovim-281a9b2cea08c0e6bffd0eddd054e04c84e4ba6b.tar.bz2 rneovim-281a9b2cea08c0e6bffd0eddd054e04c84e4ba6b.zip |
Revert "build system: avoid more unneccesary recompiles"
This was not the correct way to fix the issue.
Diffstat (limited to 'scripts/gendeclarations.lua')
-rwxr-xr-x | scripts/gendeclarations.lua | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/scripts/gendeclarations.lua b/scripts/gendeclarations.lua index 637f4cdffa..4e74e4e301 100755 --- a/scripts/gendeclarations.lua +++ b/scripts/gendeclarations.lua @@ -239,24 +239,23 @@ end non_static = non_static .. footer static = static .. footer +local F +F = io.open(static_fname, 'w') +F:write(static) +F:close() --- Before generating the headers, check if the current file (if exists) is --- different from the new one. If they are the same, we won't touch the --- current version to avoid triggering an unnecessary rebuilds of modules +-- Before generating the non-static headers, check if the current file(if +-- exists) is different from the new one. If they are the same, we won't touch +-- the current version to avoid triggering an unnecessary rebuilds of modules -- that depend on this one -local update_changed = function (fname, contents) - local F = io.open(fname, 'r') - if F ~= nil then - if F:read('*a') == contents then - return - end - io.close(F) +F = io.open(non_static_fname, 'r') +if F ~= nil then + if F:read('*a') == non_static then + os.exit(0) end - - F = io.open(fname, 'w') - F:write(contents) - F:close() + io.close(F) end -update_changed(static_fname, static) -update_changed(non_static_fname, non_static) +F = io.open(non_static_fname, 'w') +F:write(non_static) +F:close() |