Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  protoc_plugin.mk

  Sprache: Shell
 

# Copyright (c) 2022, Google, Inc. All rights reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# Invoke a protoc command with a custom plugin for protobuf-driven code
# generation and build a library from the generated sources.
#
# args:
# MODULE : module name (required)
# MODULE_PROTOC_PLUGIN: path to a python protoc plugin (required)
# MODULE_PROTOC_PLUGIN_FLAGS: optional flags for the custom plugin
#                             shared via env variable
# MODULE_PROTOS: list of PROTO files
# MODULE_PROTO_PACKAGE: a path that matches the directory structure of
#                       the PROTO package utilized in the module.

PROTOC_TOOL ?= $(firstword $(wildcard out/host/linux-x86/bin/aprotoc prebuilts/libprotobuf/bin/protoc))

ifeq ($(PROTOC_TOOL),)
$(error No PROTOC_TOOL. Please build the aprotoc or checkout with trusty manifest)
endif

ifeq ($(MODULE_PROTOC_PLUGIN),)
$(error No MODULE_PROTOC_PLUGIN provided for $(MODULE))
endif

# WARNING: this implies all sources are under the same package.
# TODO(b/259511922): support multiple packages.
MODULE_SRCS := $(call TOBUILDDIR,$(patsubst %.proto,%.c,$(MODULE_PROTOS)))
MODULE_PROTO_OUT_DIR := $(sort $(dir $(subst $(MODULE_PROTO_PACKAGE),,$(MODULE_SRCS))))

# TODO: support multiple, disparate packages;
# the output directory for the tool should be at the root of
# the package path.
$(MODULE_SRCS): PROTOC_TOOL := $(PROTOC_TOOL)
$(MODULE_SRCS): MODULE_PROTOC_PLUGIN := $(MODULE_PROTOC_PLUGIN)
$(MODULE_SRCS): MODULE_PROTOC_PLUGIN_FLAGS := $(MODULE_PROTOC_PLUGIN_FLAGS)
$(MODULE_SRCS): MODULE_PROTO_PACKAGE := $(MODULE_PROTO_PACKAGE)
$(MODULE_SRCS): MODULE_PROTO_OUT_DIR := $(MODULE_PROTO_OUT_DIR)
$(MODULE_SRCS): $(BUILDDIR)/%.c: %.proto $(MODULE_PROTOC_PLUGIN) $(PROTOC_TOOL)
 @$(MKDIR)
 @echo generating $@ from PROTO
 $(NOECHO)$(PROTOC_TOOL) \
  --plugin=protoc-gen-custom-plugin=$(MODULE_PROTOC_PLUGIN) \
  --custom-plugin_out=$(MODULE_PROTO_OUT_DIR) \
  --custom-plugin_opt=pkg:$(MODULE_PROTO_PACKAGE),$(MODULE_PROTOC_PLUGIN_FLAGS) \
  $<

MODULE_EXPORT_INCLUDES += $(MODULE_PROTO_OUT_DIR)/include

# Ensure that all auto-generated code, including headers, is
# emitted before downstream dependencies
MODULE_EXPORT_SRCDEPS += $(MODULE_SRCS)

# Build the PROTO module into a library
include make/library.mk

MODULE_PROTOS :=
PROTOC_TOOL :=
MODULE_PROTO_OUT_DIR :=
MODULE_PROTOC_PLUGIN :=
MODULE_PROTOC_PLUGIN_FLAGS :=
MODULE_PROTO_PACKAGE :=

Messung V0.5 in Prozent
C=84 H=82 G=82

¤ Dauer der Verarbeitung: 0.11 Sekunden  (vorverarbeitet am  2026-06-26) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik