Skip to content

Commit

Permalink
Merge pull request #858 from cgwalters/makefile
Browse files Browse the repository at this point in the history
build: Add `make install`
  • Loading branch information
cgwalters authored Sep 25, 2019
2 parents 15b5b04 + d38dd91 commit 641ec6a
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
export GO111MODULE=on

# Canonical version of this in https://github.com/coreos/coreos-assembler/blob/6eb97016f4dab7d13aa00ae10846f26c1cd1cb02/Makefile#L19
GOARCH:=$(shell uname -m)
ifeq ($(GOARCH),x86_64)
GOARCH=amd64
else ifeq ($(GOARCH),aarch64)
GOARCH=arm64
endif

.PHONY: all
all:
./build

# This currently assumes you're using https://github.com/coreos/ignition-dracut/
# If in the future any other initramfs integration appears, feel free to add a PR
# to make this configurable.
.PHONY: install
install: all
install -m 0755 -D -t $(DESTDIR)/usr/lib/dracut/modules.d/30ignition bin/$(GOARCH)/ignition
install -m 0755 -D -t $(DESTDIR)/usr/bin bin/$(GOARCH)/ignition-validate

.PHONY: vendor
vendor:
@go mod vendor
Expand Down

0 comments on commit 641ec6a

Please sign in to comment.