aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'templates/README.md')
-rw-r--r--templates/README.md39
1 files changed, 9 insertions, 30 deletions
diff --git a/templates/README.md b/templates/README.md
index c837b5b260..a7aeec26c7 100644
--- a/templates/README.md
+++ b/templates/README.md
@@ -1,9 +1,13 @@
# Regenerating project files
-Prerequisites: `python`, `pip install mako`, `go`
+Prerequisites
+- `python`
+- `pip install mako` (the template processor)
+- `pip install pyyaml` (to read the yaml files)
+- `go` (required by boringssl dependency)
```
-# Regenerate the projects files using templates
+# Regenerate the projects files (and other generated files) using templates
tools/buildgen/generate_projects.sh
```
@@ -19,25 +23,13 @@ So instead we decided to work the following way:
targets and files needed to build grpc and its tests, as well as a basic system
for dependency description.
-* Each project file (Makefile, Visual Studio project files, Bazel's BUILD) is
-a [YAML](http://yaml.org) file used by the `build.yaml` file to generate the
-final output file.
+* Most of the build systems supported by gRPC (e.g. Makefile, cmake, XCode) have a template defined in this directory. The templates use the information from the `build.yaml` file to generate the project files specific to a given build system.
This way we can maintain as many project system as we see fit, without having
to manually maintain them when we add or remove new code to the repository.
Only the structure of the project file is relevant to the template. The actual
list of source code and targets isn't.
-We currently have template files for GNU Make, Visual Studio 2013,
-[Bazel](http://bazel.io) and [gyp](https://gyp.gsrc.io/) (albeit only for
-Node.js). In the future, we
-would like to expand to also generate [cmake](https://cmake.org)
-project files, XCode project files, and an Android.mk file allowing to compile
-gRPC using Android's NDK.
-
-We'll gladly accept contribution that'd create additional project files
-using that system.
-
# Structure of `build.yaml`
The `build.yaml` file has the following structure:
@@ -87,7 +79,6 @@ src: # list of files to compile
secure: boolean, # see below
baselib: boolean, # this is a low level library that has system
# dependencies
-vs_project_guid: '{...}', # Visual Studio's unique guid for that project
filegroups: # list of filegroups to merge to that project
# note that this will be expanded automatically
deps: # list of libraries this target depends on
@@ -95,12 +86,6 @@ deps_linkage: "..." # "static" or "dynamic". Used by the Makefile only to
# determine the way dependencies are linkned. Defaults
# to "dynamic".
dll: "..." # see below.
-dll_def: "..." # Visual Studio's dll definition file.
-vs_props: # List of property sheets to attach to that project.
-vs_config_type: "..." # DynamicLibrary/StaticLibrary. Used only when
- # creating a library. Specifies if we're building a
- # static library or a dll. Use in conjunction with `dll_def`.
-vs_packages: # List of nuget packages this project depends on.
```
## The `"build"` tag
@@ -137,23 +122,17 @@ protobuf is for `"c++"` ones.
## The `"dll"` tag
-Used only by Visual Studio's project files. "true" means the project will be
+Currently only used by cmake. "true" means the project will be
built with both static and dynamic runtimes. "false" means it'll only be built
with static runtime. "only" means it'll only be built with the dll runtime.
-## The `"dll_def"` tag
-
-Specifies the visual studio's dll definition file. When creating a DLL, you
-sometimes (not always) need a def file (see grpc.def).
-
# The template system
We're currently using the [mako templates](http://www.makotemplates.org/)
renderer. That choice enables us to simply render text files without dragging
with us a lot of other features. Feel free to explore the current templates
-in that directory. The simplest one is probably [BUILD.template](BUILD.template)
-which is used to create the [Bazel](http://bazel.io/) project file.
+in that directory.
## The renderer engine