Skip to content

Commit

Permalink
Move common.proto into config.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgiven committed Oct 19, 2024
1 parent 944ac97 commit 33d241c
Show file tree
Hide file tree
Showing 38 changed files with 55 additions and 56 deletions.
2 changes: 1 addition & 1 deletion arch/agat/agat.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
syntax = "proto2";

import "lib/common.proto";
import "lib/config/common.proto";

message AgatDecoderProto {}

Expand Down
2 changes: 1 addition & 1 deletion arch/amiga/amiga.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
syntax = "proto2";

import "lib/common.proto";
import "lib/config/common.proto";

message AmigaDecoderProto {}

Expand Down
2 changes: 1 addition & 1 deletion arch/apple2/apple2.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
syntax = "proto2";

import "lib/common.proto";
import "lib/config/common.proto";

message Apple2DecoderProto {
optional uint32 side_one_track_offset = 1
Expand Down
4 changes: 2 additions & 2 deletions arch/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion arch/c64/c64.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
syntax = "proto2";

import "lib/common.proto";
import "lib/config/common.proto";

message Commodore64DecoderProto {}

Expand Down
2 changes: 1 addition & 1 deletion arch/ibm/ibm.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
syntax = "proto2";

import "lib/common.proto";
import "lib/config/common.proto";

message IbmDecoderProto {
// Next: 11
Expand Down
2 changes: 1 addition & 1 deletion arch/macintosh/macintosh.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
syntax = "proto2";

import "lib/common.proto";
import "lib/config/common.proto";

message MacintoshDecoderProto {}

Expand Down
2 changes: 1 addition & 1 deletion arch/micropolis/micropolis.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
syntax = "proto2";

import "lib/common.proto";
import "lib/config/common.proto";

message MicropolisDecoderProto {
enum ChecksumType {
Expand Down
2 changes: 1 addition & 1 deletion arch/northstar/northstar.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
syntax = "proto2";

import "lib/common.proto";
import "lib/config/common.proto";

message NorthstarDecoderProto {}

Expand Down
2 changes: 1 addition & 1 deletion arch/tartu/tartu.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
syntax = "proto2";

import "lib/common.proto";
import "lib/config/common.proto";

message TartuDecoderProto {}

Expand Down
2 changes: 1 addition & 1 deletion arch/tids990/tids990.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
syntax = "proto2";

import "lib/common.proto";
import "lib/config/common.proto";

message Tids990DecoderProto {}

Expand Down
2 changes: 1 addition & 1 deletion arch/victor9k/victor9k.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
syntax = "proto2";

import "lib/common.proto";
import "lib/config/common.proto";

message Victor9kDecoderProto {}

Expand Down
7 changes: 0 additions & 7 deletions lib/build.py

This file was deleted.

16 changes: 11 additions & 5 deletions lib/config/build.py
Original file line number Diff line number Diff line change
@@ -1,30 +1,35 @@
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",
],
)

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(
Expand All @@ -33,7 +38,7 @@
deps=[
".+drive_proto",
".+layout_proto",
"lib+common_proto",
".+common_proto",
"lib/decoders+proto",
"lib/encoders+proto",
"lib/external+fl2_proto",
Expand All @@ -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",
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion lib/config/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include <google/protobuf/message.h>
#include "lib/config/config.pb.h"
#include "lib/common.pb.h"
#include "lib/config/common.pb.h"

class ConfigProto;
class OptionProto;
Expand Down
2 changes: 1 addition & 1 deletion lib/config/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/config/drive.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
syntax = "proto2";

import "lib/common.proto";
import "lib/config/common.proto";
import "lib/external/fl2.proto";

// Next: 15
Expand Down
2 changes: 1 addition & 1 deletion lib/config/layout.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
syntax = "proto2";

import "lib/common.proto";
import "lib/config/common.proto";
import "lib/external/fl2.proto";

message SectorListProto
Expand Down
2 changes: 1 addition & 1 deletion lib/config/proto.cc
Original file line number Diff line number Diff line change
@@ -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 <regex>

static ConfigProto config = []()
Expand Down
2 changes: 1 addition & 1 deletion lib/config/proto.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define PROTO_H

#include <google/protobuf/message.h>
#include "lib/common.pb.h"
#include "lib/config/common.pb.h"
#include "lib/config/config.pb.h"

class ProtoPathNotFoundException : public ErrorException
Expand Down
4 changes: 2 additions & 2 deletions lib/decoders/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion lib/decoders/decoders.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions lib/encoders/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions lib/fluxsink/build.py
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion lib/fluxsink/fluxsink.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
syntax = "proto2";

import "lib/common.proto";
import "lib/config/common.proto";

message HardwareFluxSinkProto {}

Expand Down
4 changes: 2 additions & 2 deletions lib/fluxsource/build.py
Original file line number Diff line number Diff line change
@@ -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(
Expand Down
2 changes: 1 addition & 1 deletion lib/fluxsource/fluxsource.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
syntax = "proto2";

import "lib/common.proto";
import "lib/config/common.proto";

message HardwareFluxSourceProto {}

Expand Down
4 changes: 2 additions & 2 deletions lib/imagereader/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion lib/imagereader/imagereader.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
syntax = "proto2";

import "lib/common.proto";
import "lib/config/common.proto";

message ImgInputOutputProto {}

Expand Down
4 changes: 2 additions & 2 deletions lib/imagewriter/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion lib/imagewriter/imagewriter.proto
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
syntax = "proto2";

import "lib/imagereader/imagereader.proto";
import "lib/common.proto";
import "lib/config/common.proto";

message D64OutputProto {}

Expand Down
4 changes: 2 additions & 2 deletions lib/usb/build.py
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion lib/usb/usb.proto
Original file line number Diff line number Diff line change
@@ -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 */
Expand Down
4 changes: 2 additions & 2 deletions lib/vfs/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
],
Expand Down
2 changes: 1 addition & 1 deletion lib/vfs/vfs.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
syntax = "proto2";

import "lib/common.proto";
import "lib/config/common.proto";
import "lib/config/layout.proto";

message AcornDfsProto
Expand Down
2 changes: 1 addition & 1 deletion tests/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
Loading

0 comments on commit 33d241c

Please sign in to comment.