mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-05 00:15:32 +00:00
refactor(common): move keymanversion_build.in to /common/include
This commit is contained in:
parent
7a833c8c91
commit
978b93aa64
11 changed files with 51 additions and 9 deletions
2
common/include/.gitignore
vendored
Normal file
2
common/include/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
keymanversion_build.h
|
||||
.keymanversion_build.configured
|
||||
41
common/include/build.sh
Executable file
41
common/include/build.sh
Executable file
|
|
@ -0,0 +1,41 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Creates keymanversion_build.h
|
||||
#
|
||||
|
||||
# Exit on command failure and when using unset variables:
|
||||
set -eu
|
||||
|
||||
## START STANDARD BUILD SCRIPT INCLUDE
|
||||
# adjust relative paths as necessary
|
||||
THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
|
||||
. "${THIS_SCRIPT%/*}/../../resources/build/build-utils.sh"
|
||||
## END STANDARD BUILD SCRIPT INCLUDE
|
||||
|
||||
cd "$THIS_SCRIPT_PATH"
|
||||
|
||||
builder_describe "Build keymanversion_build.h" configure build clean
|
||||
|
||||
builder_describe_outputs \
|
||||
configure /common/include/.keymanversion_build.configured \
|
||||
build /common/include/keymanversion_build.h
|
||||
|
||||
builder_parse "$@"
|
||||
|
||||
#-------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
if builder_start_action clean; then
|
||||
rm -f keymanversion_build.h .keymanversion_build.configured
|
||||
builder_finish_action success clean
|
||||
fi
|
||||
|
||||
if builder_start_action configure; then
|
||||
# no-op, keeping 'configure' for deps
|
||||
touch .keymanversion_build.configured
|
||||
builder_finish_action success configure
|
||||
fi
|
||||
|
||||
if builder_start_action build; then
|
||||
replaceVersionStrings_Mkver keymanversion_build.in keymanversion_build.h
|
||||
builder_finish_action success build
|
||||
fi
|
||||
1
common/windows/cpp/include/.gitignore
vendored
1
common/windows/cpp/include/.gitignore
vendored
|
|
@ -1 +0,0 @@
|
|||
keymanversion_build.h
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _KEYMANVERSION_H
|
||||
#define _KEYMANVERSION_H
|
||||
|
||||
#include "keymanversion_build.h"
|
||||
#include "../../../include/keymanversion_build.h"
|
||||
|
||||
// We should not need to add to these hard-coded version numbers for future versions, unless
|
||||
// we have a back-compat need to refer to a specific version.
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
!include Defines.mak
|
||||
|
||||
global-versions:
|
||||
# Build our root version.txt
|
||||
# Build our root version.txt; TODO: replace with build.sh deps
|
||||
cd $(KEYMAN_ROOT)\common\windows
|
||||
|
||||
$(MKVER_U) $(KEYMAN_ROOT)\common\windows\cpp\include\keymanversion_build.in $(KEYMAN_ROOT)\common\windows\cpp\include\keymanversion_build.h
|
||||
$(MKVER_U) $(KEYMAN_ROOT)\common\windows\delphi\general\keymanversion_build.in $(KEYMAN_ROOT)\common\windows\delphi\general\keymanversion_build.inc
|
||||
$(GIT_BASH_FOR_KEYMAN) $(KEYMAN_ROOT)/common/include/build.sh clean configure build
|
||||
|
||||
!include Target.mak
|
||||
|
|
@ -257,7 +257,7 @@ build-tools:
|
|||
|
||||
global-versions:
|
||||
cd $(COMMON_ROOT)
|
||||
@if not exist $(KEYMAN_ROOT)\common\windows\cpp\include\keymanversion_build.h $(MAKE) global-versions
|
||||
@if not exist $(KEYMAN_ROOT)\include\keymanversion_build.h $(MAKE) global-versions
|
||||
cd $(DEVELOPER_ROOT)\src
|
||||
|
||||
build-tools-internal:
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ cd "$THIS_SCRIPT_PATH"
|
|||
. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh"
|
||||
|
||||
builder_describe "Build Keyman Keyboard Compiler kmc" \
|
||||
"@/common/include" \
|
||||
"@/common/web/keyman-version" \
|
||||
"@/common/web/types" \
|
||||
"@/developer/src/kmc-keyboard" \
|
||||
|
|
|
|||
|
|
@ -276,7 +276,7 @@ build-tools:
|
|||
|
||||
global-versions:
|
||||
cd $(COMMON_ROOT)
|
||||
@if not exist $(KEYMAN_ROOT)\common\windows\cpp\include\keymanversion_build.h $(MAKE) global-versions
|
||||
@if not exist $(KEYMAN_ROOT)\include\keymanversion_build.h $(MAKE) global-versions
|
||||
cd $(ROOT)\src
|
||||
|
||||
message-constants: build-tools
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ versionhistory-app2:
|
|||
|
||||
devtools-app: dirs
|
||||
cd $(COMMON_ROOT)
|
||||
@if not exist $(KEYMAN_ROOT)\common\windows\cpp\include\keymanversion_build.h $(MAKE) global-versions
|
||||
@if not exist $(KEYMAN_ROOT)\include\keymanversion_build.h $(MAKE) global-versions
|
||||
cd $(COMMON_ROOT)\tools\devtools
|
||||
$(MAKE)
|
||||
cd $(ROOT)\src
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ build-release:
|
|||
|
||||
clean:
|
||||
-del $(ROOT)\src\global\delphi\general\keymanversion_build.inc
|
||||
-del $(KEYMAN_ROOT)\common\windows\cpp\include\keymanversion_build.h
|
||||
$(GIT_BASH_FOR_KEYMAN) $(KEYMAN_ROOT)/common/include/build.sh clean
|
||||
|
||||
cd $(ROOT)\src\global\delphi
|
||||
$(MAKE) clean
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue