Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makefile: add "make external" to have a quick way to build externals #190

Merged
merged 1 commit into from
Sep 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ git-diff-check:
@git diff --cached --exit-code

## Package building
SRCDIR ?= $(abspath .)
COMMIT = $(shell (cd "$(SRCDIR)" && git rev-parse HEAD))
RPM_SPECFILE=rpmbuild/SPECS/otk-$(COMMIT).spec
RPM_TARBALL=rpmbuild/SOURCES/otk-$(COMMIT).tar.gz
Expand All @@ -55,3 +56,16 @@ rpm: git-diff-check $(RPM_SPECFILE) $(RPM_TARBALL)
rpmbuild -bb \
--define "_topdir $(CURDIR)/rpmbuild" \
$(RPM_SPECFILE)

# Note that "external" will most likely in the future build from internal
# sources instead of pulling of the network
.PHONY: external
IMAGES_REF ?= github.com/osbuild/images
external:
mkdir -p "$(SRCDIR)/external"
for otk_cmd in gen-partition-table \
make-fstab-stage \
make-partition-mounts-devices \
make-partition-stages; do \
GOBIN="$(SRCDIR)/external" go install "$(IMAGES_REF)"/cmd/otk-$${otk_cmd}@latest ; \
done
Loading