From d5deb4872dc30b56fb3d7a92c27b6180e3d3c6cf Mon Sep 17 00:00:00 2001
From: daisicheng <daisicheng@huawei.com>
Date: Wed, 17 Aug 2022 15:07:08 +0800
Subject: [PATCH 1/3] modify the Makefile and README document

---
 Makefile     |  4 ++--
 README.md    | 26 +++++++++++++++++---------
 README.zh.md | 24 ++++++++++++++++--------
 3 files changed, 35 insertions(+), 19 deletions(-)

diff --git a/Makefile b/Makefile
index c5384e0..4bdb064 100644
--- a/Makefile
+++ b/Makefile
@@ -46,8 +46,8 @@ help: ## Display the help info
 
 ##@ Build
 
-.PHONY: all ## Build both isula-build and isula-builder
-all: isula-build isula-builder
+.PHONY: all 
+all: isula-build isula-builder ## Build both isula-build and isula-builder
 
 .PHONY: isula-build
 isula-build: ./cmd/cli ## Build isula-build only
diff --git a/README.md b/README.md
index a864363..4549f95 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,7 @@ isula-build is a tool provided by the iSula team for building container images.
 
 The tool adopts the server + client mode. The binary file `isula-build` is the client that provides a CLI for building and managing images, while `isula-builder` is the server that runs as a daemon in the background, responding all the requests from client.
 
-You can use the CLI to
+User can use the CLI to
 
 - Build an image from a Dockerfile (build).
 - List all images in local store (image).
@@ -36,7 +36,7 @@ In addition, the following capabilities are also provided:
 
 #### Install from source.
 
-For compiling from source on openEuler, these packages are required on your OS:
+For compiling from source on openEuler, these packages are required on user's OS:
 
 - make
 - golang (version 1.15 or later)
@@ -50,7 +50,7 @@ For compiling from source on openEuler, these packages are required on your OS:
 - bzip2
 - systemd-devel
 
-You can install them on openEuler with `yum`:
+User can install them on openEuler with `yum`:
 
 ```sh
 sudo yum install make btrfs-progs-devel device-mapper-devel glib2-devel gpgme-devel libassuan-devel libseccomp-devel git bzip2 go-md2man systemd-devel golang
@@ -68,8 +68,16 @@ Enter the source code directory and begin compiling:
 cd isula-build
 sudo make
 ```
+Five targets can be selected to compile under "Build" after the command is executed:
+- all
+- isula-build
+- isula-builder
+- safe
+- debug
 
-After compiling success, you can install the binaries and default configuration files simply with:
+`sudo make all` compiles the client isula-build and server isula-builder. `sudo make isula-build` compiles only the client. `sudo make isula-builder` compiles only the server. `sudo make safe` compiles the client and server to generate secure binary files. `sudo make debug` compiles the client and server to  generate binary files containing debug. User can select targets to compile as required.
+
+After compiling success, user can install the binaries and default configuration files simply with:
 
 ```sh
 sudo make install
@@ -77,7 +85,7 @@ sudo make install
 
 #### Install as RPM package.
 
-`isula-build` is now released with update pack of openEuler 20.03 LTS, you can install it using yum or rpm. Before you install, please enable "update" in the repo file.
+`isula-build` is now released with update pack of openEuler 20.03 LTS, user can install it using yum or rpm. Before user install, please enable "update" in the repo file.
 
 ##### With `yum`
 
@@ -85,11 +93,11 @@ sudo make install
 sudo yum install -y isula-build
 ```
 
-**NOTE**: Please make sure the "update" part of your yum configuration is enabled. You can download the source of yum from [openEuler repo list](https://repo.openeuler.org/) and install it.
+**NOTE**: Please make sure the "update" part of user's yum configuration is enabled. User can download the source of yum from [openEuler repo list](https://repo.openeuler.org/) and install it.
 
 ##### With `rpm`
 
-You can download the RPM package of isula-build and intall it.
+User can download the RPM package of isula-build and intall it.
 
 ```sh
 sudo rpm -ivh isula-build-*.rpm
@@ -108,7 +116,7 @@ sudo systemctl start isula-build
 ```
 
 #### Directly run the isula-builder binary file.
-You can also run the isula-builder binary file on the server to start the service.
+User can also run the isula-builder binary file on the server to start the service.
 
 ```sh
 sudo isula-builder --dataroot="/var/lib/isula-build"
@@ -120,7 +128,7 @@ sudo isula-builder --dataroot="/var/lib/isula-build"
 
 For building container images, `runc` is required.
 
-You can get `runc` by installing `docker` or `docker-runc` on your openEuler distro:
+User can get `runc` by installing `docker` or `docker-runc` on user's openEuler distro:
 
 ```sh
 sudo yum install docker
diff --git a/README.zh.md b/README.zh.md
index e9c2747..fd255a2 100644
--- a/README.zh.md
+++ b/README.zh.md
@@ -38,7 +38,7 @@ isula-build提供的命令行工具提供了很多功能，例如：
 
 #### 从源码开始编译安装
 
-为了顺利从源码编译，以下包需要被安装在你的操作系统中：
+为了顺利从源码编译，以下包需要被安装在用户的操作系统中：
 
 - make
 - golang（大于等于1.15版本）
@@ -52,7 +52,7 @@ isula-build提供的命令行工具提供了很多功能，例如：
 - bzip2
 - systemd-devel
 
-你可以通过`yum`安装这些依赖：
+用户可以通过`yum`安装这些依赖：
 
 ```sh
 sudo yum install make btrfs-progs-devel device-mapper-devel glib2-devel gpgme-devel libassuan-devel libseccomp-devel git bzip2 systemd-devel golang
@@ -70,8 +70,16 @@ git clone https://gitee.com/openeuler/isula-build.git
 cd isula-build
 sudo make
 ```
+执行该命令后可以看到"Build"下面有5个target可编译：
+- all
+- isula-build
+- isula-builder
+- safe
+- debug
 
-编译成功之后，你可以通过该命令将编译完毕的二进制以及相关配置文件安装到系统中：
+其中`sudo make all`编译客户端isula-build和服务端isula-builder，`sudo make isula-build`仅编译客户端，`sudo make isula-builder`仅编译服务端，`sudo make safe`编译客户端和服务端生成安全编译的二进制文件，`sudo make debug`编译客户端和服务端生成带有debug的二进制文件，用户可以根据需求选择编译具体的target
+
+编译成功之后，用户可以通过该命令将编译完毕的二进制以及相关配置文件安装到系统中：
 
 ```sh
 sudo make install
@@ -79,7 +87,7 @@ sudo make install
 
 #### 通过RPM包安装
 
-`isula-build`目前已经收录在openEuler的官方源中，你可以使用`yum`或者`rpm`安装该包：
+`isula-build`目前已经收录在openEuler的官方源中，用户可以使用`yum`或者`rpm`安装该包：
 
 ##### 使用`yum`
 
@@ -89,7 +97,7 @@ sudo yum install -y isula-build
 > **注意：**
 >
 > 需要先enable repo配置的update部分
-> 你可以在[openEuler repo list](https://repo.openeuler.org/)中找到对应的yum源进行安装
+> 用户可以在[openEuler repo list](https://repo.openeuler.org/)中找到对应的yum源进行安装
 
 ##### 使用`rpm`
 
@@ -113,7 +121,7 @@ sudo systemctl start isula-build
 
 #### 直接运行二进制
 
-你也可以直接运行isula-builder二进制开启服务：
+用户也可以直接运行isula-builder二进制开启服务：
 
 ```sh
 sudo isula-builder --dataroot="/var/lib/isula-build"
@@ -125,7 +133,7 @@ sudo isula-builder --dataroot="/var/lib/isula-build"
 
 为了正确构建容器镜像，容器运行时`runc`是必要的
 
-你可以通过安装`docker`或者`docker-runc`来获取`runc`二进制
+用户可以通过安装`docker`或者`docker-runc`来获取`runc`二进制
 
 ```sh
 sudo yum install docker
@@ -139,7 +147,7 @@ sudo yum install docker-runc
 
 #### 构建镜像
 
-以下是一个简单的例子教你如何去构建一个容器镜像，更多的详细操作可以参考[使用指南](./doc/manual_zh.md#使用指南)
+以下是一个简单的例子教用户如何去构建一个容器镜像，更多的详细操作可以参考[使用指南](./doc/manual_zh.md#使用指南)
 
 创建一个构建工作目录，编写一个简单的dockerfile：
 
-- 
2.33.0

