Browse Source

Relocate Date provider snippet in genconfig output

The new Date provider snippet location is after duk_custom.h and other
overrides, so that e.g. user custom header can define
DUK_USE_DATE_NOW_GETTIMEOFDAY even if the platform detection does not.
pull/297/head
Sami Vaarala 9 years ago
parent
commit
ef494a4462
  1. 19
      config/genconfig.py

19
config/genconfig.py

@ -953,8 +953,6 @@ def generate_autodetect_duk_config_header(opts, meta_dir):
ret.file_relative('unsorted_flags.h.in')
ret.empty()
ret.file_relative('date_provider.h.in')
ret.empty()
ret.file_relative('user_declare.h.in')
ret.empty()
@ -1042,6 +1040,12 @@ def generate_autodetect_duk_config_header(opts, meta_dir):
add_override_defines_section(opts, ret)
# Date provider snippet is after custom header and overrides, so that
# the user may define e.g. DUK_USE_DATE_NOW_GETTIMEOFDAY in their
# custom header.
ret.file_relative('date_provider.h.in')
ret.empty()
# FIXME: use autogenerated sanity instead of sanity.h.in
ret.file_relative('sanity.h.in')
@ -1216,10 +1220,6 @@ def generate_barebones_duk_config_header(opts, meta_dir):
ret.line(' */')
ret.empty()
# FIXME: this should probably happen inside Duktape? It's very much
# boilerplate here.
ret.snippet_relative('date_provider.h.in')
if len(opts.fixup_header_lines) > 0:
ret.empty()
ret.line('/*')
@ -1231,6 +1231,13 @@ def generate_barebones_duk_config_header(opts, meta_dir):
add_override_defines_section(opts, ret)
# Date provider snippet is after custom header and overrides, so that
# the user may define e.g. DUK_USE_DATE_NOW_GETTIMEOFDAY in their
# custom header.
ret.empty()
ret.snippet_relative('date_provider.h.in')
ret.empty()
ret.upgrade_to_snippets()
ret.fill_dependencies_for_snippets(idx_deps)

Loading…
Cancel
Save