mirror of
https://github.com/rancher/os.git
synced 2025-09-18 08:06:48 +00:00
cleanup Makefile a bit
This commit is contained in:
27
Makefile
27
Makefile
@@ -18,9 +18,6 @@ else
|
||||
ARCH=amd64 VERSION=$(VERSION) ./scripts/mk-ros.sh $@
|
||||
endif
|
||||
|
||||
pwd := $(shell pwd)
|
||||
include scripts/build-common
|
||||
|
||||
|
||||
assets/docker:
|
||||
mkdir -p $(dir $@)
|
||||
@@ -36,31 +33,31 @@ ifdef COMPILED_KERNEL_URL
|
||||
installer: minimal
|
||||
docker build -t $(IMAGE_NAME):$(VERSION) .
|
||||
|
||||
$(DIST)/artifacts/vmlinuz: $(BUILD)/kernel/
|
||||
dist/artifacts/vmlinuz: build/kernel/
|
||||
mkdir -p $(dir $@)
|
||||
mv $(BUILD)/kernel/boot/vmlinuz* $@
|
||||
mv build/kernel/boot/vmlinuz* $@
|
||||
|
||||
|
||||
$(BUILD)/kernel/:
|
||||
build/kernel/:
|
||||
mkdir -p $@
|
||||
curl -L "$(COMPILED_KERNEL_URL)" | tar -xzf - -C $@
|
||||
|
||||
|
||||
$(DIST)/artifacts/initrd: bin/ros assets/docker assets/selinux/policy.29 $(BUILD)/kernel/ $(BUILD)/images.tar
|
||||
dist/artifacts/initrd: bin/ros assets/docker assets/selinux/policy.29 build/kernel/ build/images.tar
|
||||
mkdir -p $(dir $@)
|
||||
ARCH=$(ARCH) DFS_IMAGE=$(DFS_IMAGE) DEV_BUILD=$(DEV_BUILD) ./scripts/mk-initrd.sh $@
|
||||
|
||||
|
||||
$(DIST)/artifacts/rancheros.iso: minimal
|
||||
dist/artifacts/rancheros.iso: minimal
|
||||
./scripts/mk-rancheros-iso.sh
|
||||
|
||||
all: minimal installer iso
|
||||
|
||||
initrd: $(DIST)/artifacts/initrd
|
||||
initrd: dist/artifacts/initrd
|
||||
|
||||
minimal: initrd $(DIST)/artifacts/vmlinuz
|
||||
minimal: initrd dist/artifacts/vmlinuz
|
||||
|
||||
iso: $(DIST)/artifacts/rancheros.iso $(DIST)/artifacts/iso-checksums.txt
|
||||
iso: dist/artifacts/rancheros.iso dist/artifacts/iso-checksums.txt
|
||||
|
||||
test: minimal
|
||||
cd tests/integration && tox
|
||||
@@ -74,22 +71,22 @@ build/os-config.yml: build/host_ros
|
||||
ARCH=$(ARCH) VERSION=$(VERSION) ./scripts/gen-os-config.sh $@
|
||||
|
||||
|
||||
$(BUILD)/images.tar: build/host_ros build/os-config.yml
|
||||
build/images.tar: build/host_ros build/os-config.yml
|
||||
ARCH=$(ARCH) FORCE_PULL=$(FORCE_PULL) ./scripts/mk-images-tar.sh
|
||||
|
||||
|
||||
$(DIST)/artifacts/rootfs.tar.gz: bin/ros assets/docker $(BUILD)/images.tar assets/selinux/policy.29
|
||||
dist/artifacts/rootfs.tar.gz: bin/ros assets/docker build/images.tar assets/selinux/policy.29
|
||||
mkdir -p $(dir $@)
|
||||
ARCH=$(ARCH) DFS_IMAGE=$(DFS_IMAGE) DEV_BUILD=$(DEV_BUILD) IS_ROOTFS=1 ./scripts/mk-initrd.sh $@
|
||||
|
||||
|
||||
$(DIST)/artifacts/iso-checksums.txt: $(DIST)/artifacts/rancheros.iso
|
||||
dist/artifacts/iso-checksums.txt: dist/artifacts/rancheros.iso
|
||||
./scripts/mk-iso-checksums-txt.sh
|
||||
|
||||
|
||||
version:
|
||||
@echo $(VERSION)
|
||||
|
||||
rootfs: $(DIST)/artifacts/rootfs.tar.gz
|
||||
rootfs: dist/artifacts/rootfs.tar.gz
|
||||
|
||||
.PHONY: rootfs version bin/ros
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
set -ex
|
||||
|
||||
TARGET=${1}
|
||||
TARGET=$(pwd)/${1}
|
||||
|
||||
ARCH=${ARCH:-"amd64"}
|
||||
DFS_IMAGE=${DFS_IMAGE:?"DFS_IMAGE not set"}
|
||||
|
Reference in New Issue
Block a user