workspace.h (1488B)
1 #ifndef KIT_BUILD_WORKSPACE_H 2 #define KIT_BUILD_WORKSPACE_H 3 4 #include <kit/build_coord.h> 5 #include <kit/core.h> 6 #include <stddef.h> 7 #include <stdint.h> 8 9 #include "build.h" 10 #include "cfg.h" 11 12 /* The workspace value types are part of the public build model 13 * (<kit/build_coord.h>); keep the internal short names as aliases so src/build 14 * code is unchanged and there is one definition site. */ 15 typedef KitBuildWorkspaceExternalFormat BuildWorkspaceExternalFormat; 16 typedef KitBuildWorkspaceExternal BuildWorkspaceExternal; 17 typedef KitBuildWorkspaceConfigProfile BuildWorkspaceConfigProfile; 18 typedef KitBuildWorkspace BuildWorkspace; 19 #define BUILD_WS_EXT_NONE KIT_BUILD_WS_EXT_NONE 20 #define BUILD_WS_EXT_TREE KIT_BUILD_WS_EXT_TREE 21 #define BUILD_WS_EXT_KPKG KIT_BUILD_WS_EXT_KPKG 22 #define BUILD_WS_EXT_TARGZ KIT_BUILD_WS_EXT_TARGZ 23 24 void build_workspace_init(BuildWorkspace*); 25 int build_workspace_parse(const uint8_t* data, size_t len, BuildWorkspace* out, 26 char* err, size_t errcap); 27 const BuildWorkspaceConfigProfile* build_workspace_profile_find( 28 const BuildWorkspace*, KitSlice name); 29 const BuildWorkspaceExternal* build_workspace_external_find( 30 const BuildWorkspace*, KitSlice name); 31 int build_workspace_config_apply(const BuildWorkspace*, KitSlice profile, 32 const KitBuildKV* overrides, 33 size_t noverrides, BuildConfig* out, 34 char* err, size_t errcap); 35 36 #endif