diff --git a/arch/agat/agat.proto b/arch/agat/agat.proto index 70c4c321..58377b12 100644 --- a/arch/agat/agat.proto +++ b/arch/agat/agat.proto @@ -1,6 +1,6 @@ syntax = "proto2"; -import "lib/common.proto"; +import "lib/config/common.proto"; message AgatDecoderProto {} diff --git a/arch/amiga/amiga.proto b/arch/amiga/amiga.proto index 0e84abc3..ee3474dc 100644 --- a/arch/amiga/amiga.proto +++ b/arch/amiga/amiga.proto @@ -1,6 +1,6 @@ syntax = "proto2"; -import "lib/common.proto"; +import "lib/config/common.proto"; message AmigaDecoderProto {} diff --git a/arch/apple2/apple2.proto b/arch/apple2/apple2.proto index 11fe2023..5a18f837 100644 --- a/arch/apple2/apple2.proto +++ b/arch/apple2/apple2.proto @@ -1,6 +1,6 @@ syntax = "proto2"; -import "lib/common.proto"; +import "lib/config/common.proto"; message Apple2DecoderProto { optional uint32 side_one_track_offset = 1 diff --git a/arch/build.py b/arch/build.py index 4fa9c2f9..ee4549a5 100644 --- a/arch/build.py +++ b/arch/build.py @@ -24,10 +24,10 @@ "./victor9k/victor9k.proto", "./zilogmcz/zilogmcz.proto", ], - deps=["lib+common_proto"], + deps=["lib/config+common_proto"], ) -protocc(name="proto_lib", srcs=[".+proto"], deps=["lib+common_proto_lib"]) +protocc(name="proto_lib", srcs=[".+proto"], deps=["lib/config+common_proto_lib"]) cxxlibrary( name="arch", diff --git a/arch/c64/c64.proto b/arch/c64/c64.proto index 5e4f7567..641bc182 100644 --- a/arch/c64/c64.proto +++ b/arch/c64/c64.proto @@ -1,6 +1,6 @@ syntax = "proto2"; -import "lib/common.proto"; +import "lib/config/common.proto"; message Commodore64DecoderProto {} diff --git a/arch/ibm/ibm.proto b/arch/ibm/ibm.proto index d750646c..ee289b34 100644 --- a/arch/ibm/ibm.proto +++ b/arch/ibm/ibm.proto @@ -1,6 +1,6 @@ syntax = "proto2"; -import "lib/common.proto"; +import "lib/config/common.proto"; message IbmDecoderProto { // Next: 11 diff --git a/arch/macintosh/macintosh.proto b/arch/macintosh/macintosh.proto index 465cfeeb..5ff666a3 100644 --- a/arch/macintosh/macintosh.proto +++ b/arch/macintosh/macintosh.proto @@ -1,6 +1,6 @@ syntax = "proto2"; -import "lib/common.proto"; +import "lib/config/common.proto"; message MacintoshDecoderProto {} diff --git a/arch/micropolis/micropolis.proto b/arch/micropolis/micropolis.proto index 429c9c05..4c4f3438 100644 --- a/arch/micropolis/micropolis.proto +++ b/arch/micropolis/micropolis.proto @@ -1,6 +1,6 @@ syntax = "proto2"; -import "lib/common.proto"; +import "lib/config/common.proto"; message MicropolisDecoderProto { enum ChecksumType { diff --git a/arch/northstar/northstar.proto b/arch/northstar/northstar.proto index 1c460408..0693e77d 100644 --- a/arch/northstar/northstar.proto +++ b/arch/northstar/northstar.proto @@ -1,6 +1,6 @@ syntax = "proto2"; -import "lib/common.proto"; +import "lib/config/common.proto"; message NorthstarDecoderProto {} diff --git a/arch/tartu/tartu.proto b/arch/tartu/tartu.proto index dc906c02..f66b2f27 100644 --- a/arch/tartu/tartu.proto +++ b/arch/tartu/tartu.proto @@ -1,6 +1,6 @@ syntax = "proto2"; -import "lib/common.proto"; +import "lib/config/common.proto"; message TartuDecoderProto {} diff --git a/arch/tids990/tids990.proto b/arch/tids990/tids990.proto index 0a55a46a..8091e5d7 100644 --- a/arch/tids990/tids990.proto +++ b/arch/tids990/tids990.proto @@ -1,6 +1,6 @@ syntax = "proto2"; -import "lib/common.proto"; +import "lib/config/common.proto"; message Tids990DecoderProto {} diff --git a/arch/victor9k/victor9k.proto b/arch/victor9k/victor9k.proto index 7a35d638..8d0ea666 100644 --- a/arch/victor9k/victor9k.proto +++ b/arch/victor9k/victor9k.proto @@ -1,6 +1,6 @@ syntax = "proto2"; -import "lib/common.proto"; +import "lib/config/common.proto"; message Victor9kDecoderProto {} diff --git a/lib/build.py b/lib/build.py deleted file mode 100644 index 9f6ec56e..00000000 --- a/lib/build.py +++ /dev/null @@ -1,7 +0,0 @@ -from build.protobuf import proto, protocc - - -proto(name="common_proto", srcs=["./common.proto"]) -protocc( - name="common_proto_lib", srcs=[".+common_proto"], deps=["+protobuf_lib"] -) diff --git a/lib/config/build.py b/lib/config/build.py index 1a8f20ba..d1b31695 100644 --- a/lib/config/build.py +++ b/lib/config/build.py @@ -1,17 +1,22 @@ from build.c import cxxlibrary from build.protobuf import proto, protocc +proto(name="common_proto", srcs=["./common.proto"]) +protocc( + name="common_proto_lib", srcs=[".+common_proto"], deps=["+protobuf_lib"] +) + proto( name="drive_proto", srcs=["./drive.proto"], - deps=["lib+common_proto", "lib/external+fl2_proto", ".+layout_proto"], + deps=[".+common_proto", "lib/external+fl2_proto", ".+layout_proto"], ) protocc( name="drive_proto_lib", srcs=[".+drive_proto"], deps=[ ".+layout_proto_lib", - "lib+common_proto_lib", + ".+common_proto_lib", "lib/external+fl2_proto_lib", ], ) @@ -19,12 +24,12 @@ proto( name="layout_proto", srcs=["./layout.proto"], - deps=["lib+common_proto", "lib/external+fl2_proto"], + deps=[".+common_proto", "lib/external+fl2_proto"], ) protocc( name="layout_proto_lib", srcs=[".+layout_proto"], - deps=["lib+common_proto_lib", "lib/external+fl2_proto_lib"], + deps=[".+common_proto_lib", "lib/external+fl2_proto_lib"], ) proto( @@ -33,7 +38,7 @@ deps=[ ".+drive_proto", ".+layout_proto", - "lib+common_proto", + ".+common_proto", "lib/decoders+proto", "lib/encoders+proto", "lib/external+fl2_proto", @@ -51,6 +56,7 @@ srcs=[".+proto", "arch+proto"], deps=[ ".+drive_proto_lib", + ".+common_proto_lib", "lib/decoders+proto_lib", "lib/encoders+proto_lib", "lib/external+fl2_proto_lib", diff --git a/lib/common.proto b/lib/config/common.proto similarity index 100% rename from lib/common.proto rename to lib/config/common.proto diff --git a/lib/config/config.h b/lib/config/config.h index 09c975bb..5025347e 100644 --- a/lib/config/config.h +++ b/lib/config/config.h @@ -4,7 +4,7 @@ #include #include "lib/config/config.pb.h" -#include "lib/common.pb.h" +#include "lib/config/common.pb.h" class ConfigProto; class OptionProto; diff --git a/lib/config/config.proto b/lib/config/config.proto index d1f8a12d..9dc4600e 100644 --- a/lib/config/config.proto +++ b/lib/config/config.proto @@ -9,7 +9,7 @@ import "lib/fluxsink/fluxsink.proto"; import "lib/usb/usb.proto"; import "lib/vfs/vfs.proto"; import "lib/config/drive.proto"; -import "lib/common.proto"; +import "lib/config/common.proto"; import "lib/config/layout.proto"; enum SupportStatus diff --git a/lib/config/drive.proto b/lib/config/drive.proto index 373400ff..aef3033f 100644 --- a/lib/config/drive.proto +++ b/lib/config/drive.proto @@ -1,6 +1,6 @@ syntax = "proto2"; -import "lib/common.proto"; +import "lib/config/common.proto"; import "lib/external/fl2.proto"; // Next: 15 diff --git a/lib/config/layout.proto b/lib/config/layout.proto index 2bf78943..1499809a 100644 --- a/lib/config/layout.proto +++ b/lib/config/layout.proto @@ -1,6 +1,6 @@ syntax = "proto2"; -import "lib/common.proto"; +import "lib/config/common.proto"; import "lib/external/fl2.proto"; message SectorListProto diff --git a/lib/config/proto.cc b/lib/config/proto.cc index 1d258bda..263ecf91 100644 --- a/lib/config/proto.cc +++ b/lib/config/proto.cc @@ -1,6 +1,6 @@ #include "lib/core/globals.h" #include "lib/config/proto.h" -#include "lib/common.pb.h" +#include "lib/config/common.pb.h" #include static ConfigProto config = []() diff --git a/lib/config/proto.h b/lib/config/proto.h index 5809e03b..f2534eba 100644 --- a/lib/config/proto.h +++ b/lib/config/proto.h @@ -2,7 +2,7 @@ #define PROTO_H #include -#include "lib/common.pb.h" +#include "lib/config/common.pb.h" #include "lib/config/config.pb.h" class ProtoPathNotFoundException : public ErrorException diff --git a/lib/decoders/build.py b/lib/decoders/build.py index 4b5fde66..176d1501 100644 --- a/lib/decoders/build.py +++ b/lib/decoders/build.py @@ -4,13 +4,13 @@ proto( name="proto", srcs=["./decoders.proto"], - deps=["lib+common_proto", "arch+proto", "lib/fluxsink+proto"], + deps=["lib/config+common_proto", "arch+proto", "lib/fluxsink+proto"], ) protocc( name="proto_lib", srcs=[".+proto"], - deps=["lib+common_proto_lib", "arch+proto_lib", "lib/fluxsink+proto_lib"], + deps=["lib/config+common_proto_lib", "arch+proto_lib", "lib/fluxsink+proto_lib"], ) cxxlibrary( diff --git a/lib/decoders/decoders.proto b/lib/decoders/decoders.proto index f3103981..df448ec5 100644 --- a/lib/decoders/decoders.proto +++ b/lib/decoders/decoders.proto @@ -20,7 +20,7 @@ import "arch/tids990/tids990.proto"; import "arch/victor9k/victor9k.proto"; import "arch/zilogmcz/zilogmcz.proto"; import "lib/fluxsink/fluxsink.proto"; -import "lib/common.proto"; +import "lib/config/common.proto"; //NEXT: 33 message DecoderProto { diff --git a/lib/encoders/build.py b/lib/encoders/build.py index fe7a8ba4..fe45c05d 100644 --- a/lib/encoders/build.py +++ b/lib/encoders/build.py @@ -4,12 +4,12 @@ proto( name="proto", srcs=["./encoders.proto"], - deps=["lib+common_proto", "arch+proto"], + deps=["lib/config+common_proto", "arch+proto"], ) protocc( name="proto_lib", srcs=[".+proto"], - deps=["lib+common_proto_lib", "arch+proto_lib"], + deps=["lib/config+common_proto_lib", "arch+proto_lib"], ) cxxlibrary( diff --git a/lib/fluxsink/build.py b/lib/fluxsink/build.py index a5b8d375..6f3e480f 100644 --- a/lib/fluxsink/build.py +++ b/lib/fluxsink/build.py @@ -1,8 +1,8 @@ from build.protobuf import proto, protocc from build.c import cxxlibrary -proto(name="proto", srcs=["./fluxsink.proto"], deps=["lib+common_proto"]) -protocc(name="proto_lib", srcs=[".+proto"], deps=["lib+common_proto_lib"]) +proto(name="proto", srcs=["./fluxsink.proto"], deps=["lib/config+common_proto"]) +protocc(name="proto_lib", srcs=[".+proto"], deps=["lib/config+common_proto_lib"]) cxxlibrary( name="fluxsink", diff --git a/lib/fluxsink/fluxsink.proto b/lib/fluxsink/fluxsink.proto index d2a06c55..dd08f658 100644 --- a/lib/fluxsink/fluxsink.proto +++ b/lib/fluxsink/fluxsink.proto @@ -1,6 +1,6 @@ syntax = "proto2"; -import "lib/common.proto"; +import "lib/config/common.proto"; message HardwareFluxSinkProto {} diff --git a/lib/fluxsource/build.py b/lib/fluxsource/build.py index fa9e660f..ff6641ff 100644 --- a/lib/fluxsource/build.py +++ b/lib/fluxsource/build.py @@ -1,12 +1,12 @@ from build.protobuf import proto, protocc from build.c import cxxlibrary -proto(name="proto", srcs=["./fluxsource.proto"], deps=["lib+common_proto"]) +proto(name="proto", srcs=["./fluxsource.proto"], deps=["lib/config+common_proto"]) protocc( name="proto_lib", srcs=[".+proto"], - deps=["lib+common_proto", "lib+common_proto_lib"], + deps=["lib/config+common_proto", "lib/config+common_proto_lib"], ) cxxlibrary( diff --git a/lib/fluxsource/fluxsource.proto b/lib/fluxsource/fluxsource.proto index ab62bb65..fa377049 100644 --- a/lib/fluxsource/fluxsource.proto +++ b/lib/fluxsource/fluxsource.proto @@ -1,6 +1,6 @@ syntax = "proto2"; -import "lib/common.proto"; +import "lib/config/common.proto"; message HardwareFluxSourceProto {} diff --git a/lib/imagereader/build.py b/lib/imagereader/build.py index ce265703..0a9b8d40 100644 --- a/lib/imagereader/build.py +++ b/lib/imagereader/build.py @@ -4,12 +4,12 @@ proto( name="proto", srcs=["./imagereader.proto"], - deps=["lib+common_proto"], + deps=["lib/config+common_proto"], ) protocc( name="proto_lib", srcs=[".+proto"], - deps=["lib+common_proto_lib"], + deps=["lib/config+common_proto_lib"], ) cxxlibrary( diff --git a/lib/imagereader/imagereader.proto b/lib/imagereader/imagereader.proto index 403d685f..6feaad47 100644 --- a/lib/imagereader/imagereader.proto +++ b/lib/imagereader/imagereader.proto @@ -1,6 +1,6 @@ syntax = "proto2"; -import "lib/common.proto"; +import "lib/config/common.proto"; message ImgInputOutputProto {} diff --git a/lib/imagewriter/build.py b/lib/imagewriter/build.py index 3adf3292..5ace8081 100644 --- a/lib/imagewriter/build.py +++ b/lib/imagewriter/build.py @@ -4,12 +4,12 @@ proto( name="proto", srcs=["./imagewriter.proto"], - deps=["lib+common_proto", "lib/imagereader+proto"], + deps=["lib/config+common_proto", "lib/imagereader+proto"], ) protocc( name="proto_lib", srcs=[".+proto"], - deps=["lib+common_proto_lib", "lib/imagereader+proto_lib"], + deps=["lib/config+common_proto_lib", "lib/imagereader+proto_lib"], ) cxxlibrary( diff --git a/lib/imagewriter/imagewriter.proto b/lib/imagewriter/imagewriter.proto index 74a42ae0..c2b42daf 100644 --- a/lib/imagewriter/imagewriter.proto +++ b/lib/imagewriter/imagewriter.proto @@ -1,7 +1,7 @@ syntax = "proto2"; import "lib/imagereader/imagereader.proto"; -import "lib/common.proto"; +import "lib/config/common.proto"; message D64OutputProto {} diff --git a/lib/usb/build.py b/lib/usb/build.py index accb2803..070bee09 100644 --- a/lib/usb/build.py +++ b/lib/usb/build.py @@ -1,8 +1,8 @@ from build.protobuf import proto, protocc from build.c import cxxlibrary -proto(name="proto", srcs=["./usb.proto"], deps=["lib+common_proto"]) -protocc(name="proto_lib", srcs=[".+proto"], deps=["lib+common_proto_lib"]) +proto(name="proto", srcs=["./usb.proto"], deps=["lib/config+common_proto"]) +protocc(name="proto_lib", srcs=[".+proto"], deps=["lib/config+common_proto_lib"]) cxxlibrary( name="usb", diff --git a/lib/usb/usb.proto b/lib/usb/usb.proto index 14f865fc..1826341b 100644 --- a/lib/usb/usb.proto +++ b/lib/usb/usb.proto @@ -1,6 +1,6 @@ syntax = "proto2"; -import "lib/common.proto"; +import "lib/config/common.proto"; message GreaseweazleProto { enum BusType { /* note that these must match CMD_SET_BUS codes */ diff --git a/lib/vfs/build.py b/lib/vfs/build.py index d985e3fb..ee3b9430 100644 --- a/lib/vfs/build.py +++ b/lib/vfs/build.py @@ -4,14 +4,14 @@ proto( name="proto", srcs=["./vfs.proto"], - deps=["lib+common_proto", "lib/config+layout_proto", "lib/external+fl2_proto"], + deps=["lib/config+common_proto", "lib/config+layout_proto", "lib/external+fl2_proto"], ) protocc( name="proto_lib", srcs=[".+proto"], deps=[ - "lib+common_proto_lib", + "lib/config+common_proto_lib", "lib/config+layout_proto_lib", "lib/external+fl2_proto_lib", ], diff --git a/lib/vfs/vfs.proto b/lib/vfs/vfs.proto index f48ea4b5..24acb7f9 100644 --- a/lib/vfs/vfs.proto +++ b/lib/vfs/vfs.proto @@ -1,6 +1,6 @@ syntax = "proto2"; -import "lib/common.proto"; +import "lib/config/common.proto"; import "lib/config/layout.proto"; message AcornDfsProto diff --git a/tests/build.py b/tests/build.py index f4d7d707..95b99bdc 100644 --- a/tests/build.py +++ b/tests/build.py @@ -5,7 +5,7 @@ from scripts.build import protoencode_single -proto(name="test_proto", srcs=["./testproto.proto"], deps=["lib+common_proto"]) +proto(name="test_proto", srcs=["./testproto.proto"], deps=["lib/config+common_proto"]) protocc( name="test_proto_lib", srcs=[".+test_proto"], deps=["lib/config+proto_lib"] diff --git a/tests/testproto.proto b/tests/testproto.proto index 00101c73..802e1333 100644 --- a/tests/testproto.proto +++ b/tests/testproto.proto @@ -1,6 +1,6 @@ syntax = "proto2"; -import "lib/common.proto"; +import "lib/config/common.proto"; message TestProto { message SubMessageProto {