protobuf source files are generated during release

Protobuf files are removed from the repository and are only
auto-generated during dist.

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
This commit is contained in:
Nikos Mavrogiannopoulos
2026-04-23 19:21:27 +02:00
parent 58a67f14f3
commit a65f2c22a2
4 changed files with 34 additions and 23 deletions
+2
View File
@@ -44,6 +44,8 @@ src/ipc.pb-c.c
src/ipc.pb-c.h
src/ctl.pb-c.c
src/ctl.pb-c.h
src/cfg.pb-c.c
src/cfg.pb-c.h
src/libipc.a
src/occtl/occtl
.dirstamp
+3
View File
@@ -29,6 +29,9 @@ fi
"$PROTOC" --c_out="$DISTROOT/src" \
--proto_path="$DISTROOT/src" \
"$DISTROOT/src/ctl.proto"
"$PROTOC" --c_out="$DISTROOT/src" \
--proto_path="$DISTROOT/src" \
"$DISTROOT/src/cfg.proto"
# --------------------------------------------------------------------------
# ASN.1 (GSSAPI / KKDCP)
+1 -1
View File
@@ -39,7 +39,7 @@ endif
# --------------------------------------------------------------------------
gperf = find_program('gperf', required: false)
protoc_c = find_program('protoc-c')
protoc_c = find_program('protoc-c', required: false)
ipcalc = find_program(['ipcalc', 'ipcalc-ng'], required: true)
nft_prog = find_program('nft', required: false)
+28 -22
View File
@@ -55,28 +55,34 @@ version_inc = configure_file(
)
# Protocol buffers
ipc_proto = custom_target('ipc-proto',
input: 'ipc.proto',
output: ['ipc.pb-c.c', 'ipc.pb-c.h'],
command: [protoc_c, '--c_out=@OUTDIR@',
'--proto_path=@CURRENT_SOURCE_DIR@', '@INPUT@'],
)
ctl_proto = custom_target('ctl-proto',
input: 'ctl.proto',
output: ['ctl.pb-c.c', 'ctl.pb-c.h'],
depends: ipc_proto,
command: [protoc_c, '--c_out=@OUTDIR@',
'--proto_path=@CURRENT_SOURCE_DIR@', '@INPUT@'],
)
cfg_proto = custom_target('cfg-proto',
input: 'cfg.proto',
output: ['cfg.pb-c.c', 'cfg.pb-c.h'],
depends: ipc_proto,
command: [protoc_c, '--c_out=@OUTDIR@',
'--proto_path=@CURRENT_SOURCE_DIR@', '@INPUT@'],
)
if protoc_c.found()
ipc_proto = custom_target('ipc-proto',
input: 'ipc.proto',
output: ['ipc.pb-c.c', 'ipc.pb-c.h'],
command: [protoc_c, '--c_out=@OUTDIR@',
'--proto_path=@CURRENT_SOURCE_DIR@', '@INPUT@'],
)
ctl_proto = custom_target('ctl-proto',
input: 'ctl.proto',
output: ['ctl.pb-c.c', 'ctl.pb-c.h'],
depends: ipc_proto,
command: [protoc_c, '--c_out=@OUTDIR@',
'--proto_path=@CURRENT_SOURCE_DIR@', '@INPUT@'],
)
cfg_proto = custom_target('cfg-proto',
input: 'cfg.proto',
output: ['cfg.pb-c.c', 'cfg.pb-c.h'],
depends: ipc_proto,
command: [protoc_c, '--c_out=@OUTDIR@',
'--proto_path=@CURRENT_SOURCE_DIR@', '@INPUT@'],
)
elif fs.exists('ipc.pb-c.c') and fs.exists('ctl.pb-c.c') and fs.exists('cfg.pb-c.c')
ipc_proto = files('ipc.pb-c.c', 'ipc.pb-c.h')
ctl_proto = files('ctl.pb-c.c', 'ctl.pb-c.h')
cfg_proto = files('cfg.pb-c.c', 'cfg.pb-c.h')
else
error('protoc-c not found and no pre-generated pb-c files present')
endif
# gperf HTTP header table
if gperf.found()