From 21aa04e3c3073af35a35315462c61cd70743dde6 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Thu, 8 Oct 2020 06:25:48 -0400 Subject: [PATCH 1/3] Make Makefile a little easier to use By default we should build bin/skopeo locally and build docs locally. Show output when doing make docs. Add description in `make help` to explain default behaviour. Signed-off-by: Daniel J Walsh --- Makefile | 6 ++++-- install.md | 26 ++++++++++++++------------ 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index 8e4028ae..00056e11 100644 --- a/Makefile +++ b/Makefile @@ -86,11 +86,13 @@ endif # Note: Uses the -N -l go compiler options to disable compiler optimizations # and inlining. Using these build options allows you to subsequently # use source debugging tools like delve. -all: binary docs-in-container +all: bin/skopeo docs help: @echo "Usage: make " @echo + @echo "Defaults to building bin/skopeo and docs" + @echo @echo " * 'install' - Install binaries and documents to system locations" @echo " * 'binary' - Build skopeo with a container" @echo " * 'static' - Build statically linked binary" @@ -134,7 +136,7 @@ build-container: ${CONTAINER_RUNTIME} build ${BUILD_ARGS} -t "$(IMAGE)" . $(MANPAGES): %: %.md - @sed -e 's/\((skopeo.*\.md)\)//' -e 's/\[\(skopeo.*\)\]/\1/' $< | $(GOMD2MAN) -in /dev/stdin -out $@ + sed -e 's/\((skopeo.*\.md)\)//' -e 's/\[\(skopeo.*\)\]/\1/' $< | $(GOMD2MAN) -in /dev/stdin -out $@ docs: $(MANPAGES) diff --git a/install.md b/install.md index 69547f1d..83c406b4 100644 --- a/install.md +++ b/install.md @@ -157,18 +157,7 @@ $ git clone https://github.com/containers/skopeo $GOPATH/src/github.com/containe $ cd $GOPATH/src/github.com/containers/skopeo && make bin/skopeo ``` -### Building in a container - -Building in a container is simpler, but more restrictive: - -- It requires the `podman` command and the ability to run Linux containers -- The created executable is a Linux executable, and depends on dynamic libraries - which may only be available only in a container of a similar Linux - distribution. - -```bash -$ make binary # Or (make all) to also build documentation, see below. -``` +By default the `make` comman (make all) will build bin/skopeo and the documation locally. ### Building documentation @@ -190,6 +179,19 @@ Then $ make docs ``` +### Building in a container + +Building in a container is simpler, but more restrictive: + +- It requires the `podman` command and the ability to run Linux containers +- The created executable is a Linux executable, and depends on dynamic libraries + which may only be available only in a container of a similar Linux + distribution. + +```bash +$ make binary +``` + ### Installation Finally, after the binary and documentation is built: From bde39ce91dde6868c3eb3154353f763a5c270508 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Fri, 9 Oct 2020 06:57:12 -0400 Subject: [PATCH 2/3] Update install.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Miloslav Trmač --- install.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.md b/install.md index 83c406b4..9024c6da 100644 --- a/install.md +++ b/install.md @@ -157,7 +157,7 @@ $ git clone https://github.com/containers/skopeo $GOPATH/src/github.com/containe $ cd $GOPATH/src/github.com/containers/skopeo && make bin/skopeo ``` -By default the `make` comman (make all) will build bin/skopeo and the documation locally. +By default the `make` command (make all) will build bin/skopeo and the documentation locally. ### Building documentation From 0954077fd70e578631aeff80024171ee971df9d1 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Fri, 9 Oct 2020 06:57:29 -0400 Subject: [PATCH 3/3] Update install.md Co-authored-by: Tom Sweeney --- install.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.md b/install.md index 9024c6da..6996b51e 100644 --- a/install.md +++ b/install.md @@ -183,7 +183,7 @@ $ make docs Building in a container is simpler, but more restrictive: -- It requires the `podman` command and the ability to run Linux containers +- It requires the `podman` command and the ability to run Linux containers. - The created executable is a Linux executable, and depends on dynamic libraries which may only be available only in a container of a similar Linux distribution.