rebranding 'code' targets as 'meta'

This commit is contained in:
Eric Froemling 2021-06-09 13:43:05 -05:00
parent 2b6d627b6a
commit 634ae77b7e
No known key found for this signature in database
GPG Key ID: 89C93F0F8D6D5A98
10 changed files with 33 additions and 32 deletions

View File

@ -186,6 +186,7 @@
<w>basn</w>
<w>bastd</w>
<w>batools</w>
<w>batoolsinternal</w>
<w>bbbb</w>
<w>bblk</w>
<w>bblu</w>

View File

@ -1,3 +1,3 @@
<component name="DependencyValidationManager">
<scope name="UncheckedPython" pattern="file:assets/src/ba_data/python/_ba.py||file:src/generated_src/ballistica/binding.py||file:src/generated_src/ballistica/vis_cleanup.py" />
<scope name="UncheckedPython" pattern="file:assets/src/ba_data/python/_ba.py||file:src/meta/ballistica/binding.py" />
</component>

View File

@ -50,35 +50,35 @@ prereqs-clean:
@rm -rf ${PREREQS}
# Build all assets for all platforms.
assets: prereqs
assets: prereqs meta
cd assets && $(MAKE) -j$(CPUS)
# Build assets required for cmake builds (linux, mac)
assets-cmake: prereqs
assets-cmake: prereqs meta
cd assets && $(MAKE) -j$(CPUS) cmake
# Build assets required for WINDOWS_PLATFORM windows builds.
assets-windows: prereqs
assets-windows: prereqs meta
cd assets && $(MAKE) -j$(CPUS) win-${WINDOWS_PLATFORM}
# Build assets required for Win32 windows builds.
assets-windows-Win32: prereqs
assets-windows-Win32: prereqs meta
cd assets && $(MAKE) -j$(CPUS) win-Win32
# Build assets required for x64 windows builds.
assets-windows-x64: prereqs
assets-windows-x64: prereqs meta
cd assets && $(MAKE) -j$(CPUS) win-x64
# Build assets required for mac xcode builds
assets-mac: prereqs
assets-mac: prereqs meta
cd assets && $(MAKE) -j$(CPUS) mac
# Build assets required for ios.
assets-ios: prereqs
assets-ios: prereqs meta
cd assets && $(MAKE) -j$(CPUS) ios
# Build assets required for android.
assets-android: prereqs
assets-android: prereqs meta
cd assets && $(MAKE) -j$(CPUS) android
# Clean all assets.
@ -86,7 +86,7 @@ assets-clean:
cd assets && $(MAKE) clean
# Build resources.
resources: prereqs
resources: prereqs meta
tools/pcommand lazybuild resources_src ${LAZYBUILDDIR}/resources \
cd resources \&\& $(MAKE) -j$(CPUS) resources
@ -96,17 +96,16 @@ resources-clean:
rm -f ${LAZYBUILDDIR}/resources
# Build our generated sources.
# TODO: should perhaps make this a more standard component, including it
# in other standard targets such as checks and tests (at least once we're
# generating things that can affect the outcome of said checks/tests).
code: prereqs
tools/pcommand lazybuild code_gen_src ${LAZYBUILDDIR}/code \
cd src/generated_src \&\& $(MAKE) -j$(CPUS) generated_code
# Meta builds can affect sources used by asset builds, resource builds, and
# compiles, so it should be listed as a dependency of any of those.
meta: prereqs
tools/pcommand lazybuild meta_src ${LAZYBUILDDIR}/meta \
cd src/meta \&\& $(MAKE) -j$(CPUS)
# Clean our generated sources.
code-clean:
cd src/generated_src && $(MAKE) clean
rm -f ${LAZYBUILDDIR}/code
meta-clean:
cd src/meta && $(MAKE) clean
rm -f ${LAZYBUILDDIR}/meta
# Remove ALL files and directories that aren't managed by git
# (except for a few things such as localconfig.json).
@ -123,7 +122,7 @@ clean-list:
.PHONY: help prereqs prereqs-clean assets assets-cmake assets-windows \
assets-windows-Win32 assets-windows-x64 \
assets-mac assets-ios assets-android assets-clean \
resources resources-clean code code-clean \
resources resources-clean meta meta-clean \
clean clean-list
@ -767,7 +766,7 @@ WINDOWS_PLATFORM ?= Win32
WINDOWS_CONFIGURATION ?= Debug
# Stage assets and other files so a built binary will run.
windows-staging: assets-windows resources code
windows-staging: assets-windows resources meta
${STAGE_ASSETS} -win-${WINPLT}-${WINCFG} \
build/windows/$(WINCFG)_$(WINPLT)
@ -857,7 +856,7 @@ cmake: cmake-build
@cd build/cmake/$(CM_BT_LC) && ./ballisticacore
# Build but don't run it.
cmake-build: assets-cmake resources code
cmake-build: assets-cmake resources meta
@tools/pcommand cmake_prep_dir build/cmake/$(CM_BT_LC)
@tools/pcommand update_cmake_prefab_lib standard ${CM_BT_LC} build/cmake/${CM_BT_LC}
@${STAGE_ASSETS} -cmake build/cmake/$(CM_BT_LC)
@ -872,7 +871,7 @@ cmake-clean:
cmake-server: cmake-server-build
@cd build/cmake/server-$(CM_BT_LC) && ./ballisticacore_server
cmake-server-build: assets-cmake resources code
cmake-server-build: assets-cmake resources meta
@tools/pcommand cmake_prep_dir build/cmake/server-$(CM_BT_LC)/dist
@tools/pcommand update_cmake_prefab_lib server ${CM_BT_LC} build/cmake/server-${CM_BT_LC}/dist
@${STAGE_ASSETS} -cmakeserver -${CM_BT_LC} build/cmake/server-$(CM_BT_LC)
@ -975,7 +974,7 @@ ballisticacore-cmake/.clang-format: .clang-format
# Simple target for CI to build a binary but not download/assemble assets/etc.
_cmake-simple-ci-server-build:
SKIP_ENV_CHECKS=1 $(MAKE) code
SKIP_ENV_CHECKS=1 $(MAKE) meta
rm -rf build/cmake_simple_ci_server_build
mkdir -p build/cmake_simple_ci_server_build
tools/pcommand update_cmake_prefab_lib \

View File

@ -79,6 +79,7 @@
<w>basicsize</w>
<w>basn</w>
<w>bastd</w>
<w>batoolsinternal</w>
<w>bbbb</w>
<w>bbbbb</w>
<w>bbbbbb</w>

View File

@ -41,7 +41,7 @@
"python_source_dirs": [
"assets/src/ba_data/python",
"assets/src/server",
"src/generated_src",
"src/meta",
"tools",
"tests"
]

View File

@ -74,7 +74,7 @@ DO_SPARSE_TEST_BUILDS = 'ballistica' + 'core' == 'ballisticacore'
class SourceCategory(Enum):
"""Types of sources."""
RESOURCES = 'resources_src'
CODE_GEN = 'code_gen_src'
META = 'meta_src'
ASSETS = 'assets_src'
CMAKE = 'cmake_src'
WIN = 'win_src'
@ -117,9 +117,9 @@ def _lazybuild_check_paths(inpaths: List[str], category: SourceCategory,
continue
for root, _dnames, fnames in os.walk(inpath):
# Only gen category uses gen src.
if (root.startswith('src/generated_src')
and category is not SourceCategory.CODE_GEN):
# Only gen category uses generated src.
if (root.startswith('src/meta')
and category is not SourceCategory.META):
continue
# None of our targets use tools-src.
@ -172,11 +172,11 @@ def lazybuild(target: str, category: SourceCategory, command: str) -> None:
"""
paths: List[str]
# Everything possibly affecting generated code.
if category is SourceCategory.CODE_GEN:
# Everything possibly affecting generated sources.
if category is SourceCategory.META:
paths = [
'Makefile', 'tools/generate_code', 'tools/batools/codegen.py',
'src/generated_src'
'src/meta'
]
# Everything possibly affecting asset builds.