mirror of
https://github.com/containers/skopeo.git
synced 2025-06-26 14:52:36 +00:00
Merge pull request #1069 from rhatdan/makefile
Make Makefile a little easier to use
This commit is contained in:
commit
c18a977e96
6
Makefile
6
Makefile
@ -86,11 +86,13 @@ endif
|
|||||||
# Note: Uses the -N -l go compiler options to disable compiler optimizations
|
# Note: Uses the -N -l go compiler options to disable compiler optimizations
|
||||||
# and inlining. Using these build options allows you to subsequently
|
# and inlining. Using these build options allows you to subsequently
|
||||||
# use source debugging tools like delve.
|
# use source debugging tools like delve.
|
||||||
all: binary docs-in-container
|
all: bin/skopeo docs
|
||||||
|
|
||||||
help:
|
help:
|
||||||
@echo "Usage: make <target>"
|
@echo "Usage: make <target>"
|
||||||
@echo
|
@echo
|
||||||
|
@echo "Defaults to building bin/skopeo and docs"
|
||||||
|
@echo
|
||||||
@echo " * 'install' - Install binaries and documents to system locations"
|
@echo " * 'install' - Install binaries and documents to system locations"
|
||||||
@echo " * 'binary' - Build skopeo with a container"
|
@echo " * 'binary' - Build skopeo with a container"
|
||||||
@echo " * 'static' - Build statically linked binary"
|
@echo " * 'static' - Build statically linked binary"
|
||||||
@ -134,7 +136,7 @@ build-container:
|
|||||||
${CONTAINER_RUNTIME} build ${BUILD_ARGS} -t "$(IMAGE)" .
|
${CONTAINER_RUNTIME} build ${BUILD_ARGS} -t "$(IMAGE)" .
|
||||||
|
|
||||||
$(MANPAGES): %: %.md
|
$(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)
|
docs: $(MANPAGES)
|
||||||
|
|
||||||
|
26
install.md
26
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
|
$ cd $GOPATH/src/github.com/containers/skopeo && make bin/skopeo
|
||||||
```
|
```
|
||||||
|
|
||||||
### Building in a container
|
By default the `make` command (make all) will build bin/skopeo and the documentation locally.
|
||||||
|
|
||||||
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.
|
|
||||||
```
|
|
||||||
|
|
||||||
### Building documentation
|
### Building documentation
|
||||||
|
|
||||||
@ -190,6 +179,19 @@ Then
|
|||||||
$ make docs
|
$ 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
|
### Installation
|
||||||
|
|
||||||
Finally, after the binary and documentation is built:
|
Finally, after the binary and documentation is built:
|
||||||
|
Loading…
Reference in New Issue
Block a user