mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-16 13:49:23 +00:00
feat(core): constant generator between core and developer
- change to manual regen of the .h file
This commit is contained in:
parent
ea4c2c07c2
commit
d414be8313
7 changed files with 33 additions and 14 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -172,6 +172,3 @@ Thumbs.db
|
|||
# Temporary file for logging scripts in xcode runs, see build-utils.sh for
|
||||
# details
|
||||
/xcodebuild-scripts.log
|
||||
|
||||
# Generated .h file, see /core/include/ldml/build.sh
|
||||
/core/include/ldml/keyboardprocessor_ldml.h
|
||||
|
|
|
|||
18
core/include/ldml/keyboardprocessor_ldml.h
Normal file
18
core/include/ldml/keyboardprocessor_ldml.h
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
//
|
||||
// Generated File - do not edit
|
||||
//
|
||||
// This file is generated by core/tools/ldml-const-builder/build.sh
|
||||
// based on core/include/ldml/keyboardprocessor_ldml.ts
|
||||
//
|
||||
|
||||
#pragma once
|
||||
#define LDML_META_SETTINGS_FALLBACK_OMIT 1
|
||||
#define LDML_META_SETTINGS_TRANSFORMFAILURE_OMIT 2
|
||||
#define LDML_META_SETTINGS_TRANSFORMPARTIAL_HIDE 4
|
||||
#define LDML_SECTION_KEYS ((uint32_t)'keys')
|
||||
#define LDML_SECTION_LOCA ((uint32_t)'loca')
|
||||
#define LDML_SECTION_META ((uint32_t)'meta')
|
||||
#define LDML_SECTION_SECT ((uint32_t)'sect')
|
||||
#define LDML_SECTION_STRS ((uint32_t)'strs')
|
||||
#define LDML_STRS_FLAGS_EXTEND 1
|
||||
#define LDML_VERSION 1.0
|
||||
|
|
@ -1,3 +1,14 @@
|
|||
|
||||
// Notice!
|
||||
//
|
||||
// If you update this file, you *must* be sure to re-run
|
||||
//
|
||||
// core/tools/ldml-const-builder/build.sh clean build run
|
||||
//
|
||||
// To update keyboardprocessor_ldml.h, and commit the result.
|
||||
//
|
||||
// It is not updated automatically.
|
||||
|
||||
// namespace com.keyman.core.ldml {
|
||||
/**
|
||||
* Constants shared between the data access layer and the compiler
|
||||
|
|
|
|||
|
|
@ -4,8 +4,10 @@ const keys = Object.keys(constants);
|
|||
keys.sort();
|
||||
console.log(`//
|
||||
// Generated File - do not edit
|
||||
//
|
||||
// This file is generated by core/tools/ldml-const-builder/build.sh
|
||||
// based on core/include/ldml/keyboardprocessor_ldml.ts
|
||||
//
|
||||
|
||||
#pragma once`);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
bash = find_program('bash')
|
||||
|
||||
kbp_ldml_h = custom_target('keyboardprocessor_ldml.h',
|
||||
output : 'keyboardprocessor_ldml.h',
|
||||
input : ['keyboardprocessor_ldml.ts', 'ldml-const-builder.ts'],
|
||||
command : [ bash, join_paths(meson.current_source_dir(), '../../tools/ldml-const-builder/build.sh'), 'clean', 'build', 'run' ],
|
||||
depend_files : files('keyboardprocessor_ldml.ts', 'ldml-const-builder.ts')
|
||||
)
|
||||
|
|
@ -8,4 +8,3 @@
|
|||
|
||||
inc = include_directories('.', is_system: true)
|
||||
subdir('keyman')
|
||||
subdir('ldml')
|
||||
|
|
|
|||
4
core/tools/ldml-const-builder/build.sh
Normal file → Executable file
4
core/tools/ldml-const-builder/build.sh
Normal file → Executable file
|
|
@ -34,8 +34,8 @@ fi
|
|||
|
||||
if builder_has_action clean; then
|
||||
# npm run clean
|
||||
rm -rf ../../include/ldml/build/ ${KBP_LDML_H_FILE}
|
||||
# TODO: clean .h?
|
||||
rm -rf ../../include/ldml/build/
|
||||
# Not removing ${KBP_LDML_H_FILE} as it is checked in
|
||||
builder_report success clean
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue