Added Makefile rule to build tz_index.hrl.
This commit is contained in:
parent
fd54c471a7
commit
4ad81b03fd
2 changed files with 13 additions and 2 deletions
6
src/ibuild.erl
Normal file → Executable file
6
src/ibuild.erl
Normal file → Executable file
|
@ -1,6 +1,6 @@
|
|||
-module(ibuild).
|
||||
|
||||
-export([build_index/0]).
|
||||
-export([build_index/0, main/1]).
|
||||
|
||||
-include("tz_database.hrl").
|
||||
|
||||
|
@ -22,3 +22,7 @@ build_index() ->
|
|||
I = lists:foldl(F, dict:new(), ?tz_database),
|
||||
{ok, File} = file:open("tz_index.hrl", [write]),
|
||||
io:fwrite(File, "-define(tz_index, ~p).", [I]).
|
||||
|
||||
%% So this can be run from escript:
|
||||
main(_Args) ->
|
||||
build_index().
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue