diff options
author | Thiago de Arruda <tpadilha84@gmail.com> | 2014-06-02 16:00:00 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-06-02 16:00:00 -0300 |
commit | 8d92494c7c9f2037c72dc170312324fe8690845c (patch) | |
tree | a04dcefa793159a08aa4ceea4c7b3eb73391091f | |
parent | cab8cf970c09ea465d30e11eb356e2e5d37dc544 (diff) | |
parent | 4b787fb7d1af5a0f764e9a75f36eaa34c64fe237 (diff) | |
download | rneovim-8d92494c7c9f2037c72dc170312324fe8690845c.tar.gz rneovim-8d92494c7c9f2037c72dc170312324fe8690845c.tar.bz2 rneovim-8d92494c7c9f2037c72dc170312324fe8690845c.zip |
Merge branch 'make-gendeclarations-friendly-to-incremental-builds'
-rwxr-xr-x | scripts/gendeclarations.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/gendeclarations.lua b/scripts/gendeclarations.lua index 311ed8b527..76711cc214 100755 --- a/scripts/gendeclarations.lua +++ b/scripts/gendeclarations.lua @@ -227,6 +227,18 @@ F = io.open(static_fname, 'w') F:write(static) F:close() +-- 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 +F = io.open(non_static_fname, 'r') +if F ~= nil then + if F:read('*a') == non_static then + os.exit(0) + end + io.close(F) +end + F = io.open(non_static_fname, 'w') F:write(non_static) F:close() |